internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: sonic-net/sonic-mgmt

Issue:
Investigate backend T1 nightly run failure during restart ptf
09/09 test run failed with the following error

TASK [vm_set : Renumber topology t1-backend to VMs. base vm = VM1884] **********
Thursday 09 September 2021  12:08:28 +0000 (0:00:00.041)       0:00:39.947 **** 
fatal: [STR2-ACS-SERV-18]: FAILED! => {"changed": false, "msg": "ret_code=1, error message=\"Cannot find device \"b3f539mgmt\"\n\". cmd=\"nsenter -t 42251 -n ip link set b3f539mgmt up\""}



Discussion:

Resolving patch:
diff --git a/ansible/roles/vm_set/library/vm_topology.py b/ansible/roles/vm_set/library/vm_topology.py
--- a/ansible/roles/vm_set/library/vm_topology.py
+++ b/ansible/roles/vm_set/library/vm_topology.py
@@ -842,9 +842,9 @@ def intf_exists(intf, pid=None):
             bool: True if the interface exists. Otherwise False.
         """
         if pid:
-            cmdline = 'nsenter -t %s -n ifconfig %s' % (pid, intf)
+            cmdline = 'nsenter -t %s -n ifconfig -a %s' % (pid, intf)
         else:
-            cmdline = 'ifconfig %s' % intf
+            cmdline = 'ifconfig -a %s' % intf
 
         try:
             VMTopology.cmd(cmdline)


Test patch:
Repository: sonic-net/sonic-mgmt

Issue:
[sensors] `sensor_facts` library is not Python 3 compatible 
**Description**
The `sensor_facts` ansible library treats the output of `Popen.communicate()` as a string but it is now a bytes array in Python 3.

See here for details: https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate

**Steps to reproduce the issue:**
1. Run the `test_sensors` test

**Describe the results you received:**
Test fails during collection of sensor facts from ansible with `TypeError: expected bytes-like object, not str`

**Describe the results you expected:**
Test succeeds. 

**Note: This failure only occurs on images where Python 3 is the default interpreter such as the bullseye builds**



Discussion:
@saiarcot895 FYI

Resolving patch:
diff --git a/ansible/library/sensors_facts.py b/ansible/library/sensors_facts.py
--- a/ansible/library/sensors_facts.py
+++ b/ansible/library/sensors_facts.py
@@ -82,7 +82,7 @@ def _get_os_version(self):
             if ret_code != 0:
                 self.module.fail_json(msg=stderr)
             else:
-                os_version = self.stdout.split('.')[0].strip()
+                os_version = self.stdout.decode('utf-8').split('.')[0].strip()
 
         return os_version
 
@@ -106,6 +106,8 @@ def collect_sensors(self):
         try:
             process = subprocess.Popen(['sensors', '-A', '-u'], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
             self.stdout, stderr = process.communicate()
+            self.stdout = self.stdout.decode('utf-8')
+            stderr = stderr.decode('utf-8')
             ret_code = process.returncode
         except Exception as e:
             self.module.fail_json(msg=str(e))
diff --git a/ansible/library/sonic_release.py b/ansible/library/sonic_release.py
--- a/ansible/library/sonic_release.py
+++ b/ansible/library/sonic_release.py
@@ -31,6 +31,8 @@ def main():
         process = subprocess.Popen(['sonic-cfggen', '-y', '/etc/sonic/sonic_version.yml', '-v', 'release'],
                 stdout=subprocess.PIPE, stdin=subprocess.PIPE)
         self.stdout, stderr = process.communicate()
+        self.stdout = self.stdout.decode('utf-8')
+        stderr = stderr.decode('utf-8')
         ret_code = process.returncode
     except Exception as e:
         module.fail_json(msg=str(e))


Test patch:
Repository: sonic-net/sonic-mgmt

Issue:
port_alias.py returns empty sysports list due to port_config.ini header change
### Issue Description

In https://github.com/sonic-net/sonic-buildimage/pull/18704 the header of port_config.ini was changed to include underscores in some header names:
coreId -> core_id
corePortId -> core_port_id
numVoq -> num_voq

But the port_alias.py file depends on the header names and it wasn't updated appropriately:
https://github.com/sonic-net/sonic-mgmt/blob/master/ansible/library/port_alias.py#L146
```
                        if 'coreid' in text:
                            port_coreid_index = index
                        if 'coreportid' in text:
                            port_core_portid_index = index
                        if 'numvoq' in text:
                            num_voq_index = index
```

### Results you see

This results in the `deploy-mg` providing a minigraph.xml with an empty SystemPort section:
```
<SystemPorts>
</SystemPorts>
```

### Results you expected to see

The SystemPorts should be populated, e.g.:
```
<SystemPorts>
  <SystemPort>
    <Name>Cpu0</Name>
    <Hostname>nfc407-5</Hostname>
    <AsicName>Asic0</AsicName>
    <Speed>10000</Speed>
    <SystemPortId>0</SystemPortId>
    <SwitchId>0</SwitchId>
    <CoreId>0</CoreId>
    <CorePortId>0</CorePortId>
    <NumVoq>8</NumVoq>
  </SystemPort>
```

### Is it platform specific

generic

### Relevant log output

_No response_

### Output of `show version`

_No response_

### Attach files (if any)

_No response_


Discussion:

Resolving patch:
diff --git a/ansible/library/port_alias.py b/ansible/library/port_alias.py
--- a/ansible/library/port_alias.py
+++ b/ansible/library/port_alias.py
@@ -47,7 +47,7 @@
 FILE_PATH = '/usr/share/sonic/device'
 PORTMAP_FILE = 'port_config.ini'
 ALLOWED_HEADER = ['name', 'lanes', 'alias', 'index', 'asic_port_name', 'role', 'speed',
-                  'coreid', 'coreportid', 'numvoq']
+                  'core_id', 'core_port_id', 'num_voq']
 
 MACHINE_CONF = '/host/machine.conf'
 ONIE_PLATFORM_KEY = 'onie_platform'
@@ -143,11 +143,11 @@ def get_portmap(self, asic_id=None, include_internal=False,
                             role_index = index
                         if 'asic_port_name' in text:
                             asic_name_index = index
-                        if 'coreid' in text:
+                        if 'core_id' in text:
                             port_coreid_index = index
-                        if 'coreportid' in text:
+                        if 'core_port_id' in text:
                             port_core_portid_index = index
-                        if 'numvoq' in text:
+                        if 'num_voq' in text:
                             num_voq_index = index
                         if 'index' in text:
                             port_index = index


Test patch:
Repository: sonic-net/sonic-mgmt

Issue:
port_alias.py returns empty sysports list due to port_config.ini header change
### Issue Description

In https://github.com/sonic-net/sonic-buildimage/pull/18704 the header of port_config.ini was changed to include underscores in some header names:
coreId -> core_id
corePortId -> core_port_id
numVoq -> num_voq

But the port_alias.py file depends on the header names and it wasn't updated appropriately:
https://github.com/sonic-net/sonic-mgmt/blob/master/ansible/library/port_alias.py#L146
```
                        if 'coreid' in text:
                            port_coreid_index = index
                        if 'coreportid' in text:
                            port_core_portid_index = index
                        if 'numvoq' in text:
                            num_voq_index = index
```

### Results you see

This results in the `deploy-mg` providing a minigraph.xml with an empty SystemPort section:
```
<SystemPorts>
</SystemPorts>
```

### Results you expected to see

The SystemPorts should be populated, e.g.:
```
<SystemPorts>
  <SystemPort>
    <Name>Cpu0</Name>
    <Hostname>nfc407-5</Hostname>
    <AsicName>Asic0</AsicName>
    <Speed>10000</Speed>
    <SystemPortId>0</SystemPortId>
    <SwitchId>0</SwitchId>
    <CoreId>0</CoreId>
    <CorePortId>0</CorePortId>
    <NumVoq>8</NumVoq>
  </SystemPort>
```

### Is it platform specific

generic

### Relevant log output

_No response_

### Output of `show version`

_No response_

### Attach files (if any)

_No response_


Discussion:

Resolving patch:
diff --git a/ansible/library/port_alias.py b/ansible/library/port_alias.py
--- a/ansible/library/port_alias.py
+++ b/ansible/library/port_alias.py
@@ -49,7 +49,7 @@
 FILE_PATH = '/usr/share/sonic/device'
 PORTMAP_FILE = 'port_config.ini'
 ALLOWED_HEADER = ['name', 'lanes', 'alias', 'index', 'asic_port_name', 'role', 'speed',
-                  'coreid', 'coreportid', 'numvoq']
+                  'core_id', 'core_port_id', 'num_voq']
 
 MACHINE_CONF = '/host/machine.conf'
 ONIE_PLATFORM_KEY = 'onie_platform'
@@ -135,11 +135,11 @@ def get_portmap(self, asic_id=None, include_internal=False,
                             role_index = index
                         if 'asic_port_name' in text:
                             asic_name_index = index
-                        if 'coreid' in text:
+                        if 'core_id' in text:
                             port_coreid_index = index
-                        if 'coreportid' in text:
+                        if 'core_port_id' in text:
                             port_core_portid_index = index
-                        if 'numvoq' in text:
+                        if 'num_voq' in text:
                             num_voq_index = index
                         if 'index' in text:
                             port_index = index


Test patch:
Repository: diffgram/diffgram

Issue:
Support for webp image format
Hi there, it has been a while!

It seems that there is no support for webp image format. Since it seems to be gaining traction it might be a good idea to support it.

Do we want support for webp in diffgram? If so, what are the requirements for the original media and the facing media?


Discussion:

Resolving patch:
diff --git a/shared/ingest/allowed_ingest_extensions.py b/shared/ingest/allowed_ingest_extensions.py
--- a/shared/ingest/allowed_ingest_extensions.py
+++ b/shared/ingest/allowed_ingest_extensions.py
@@ -1,5 +1,5 @@
 
-images_allowed_file_names = [".jpg", ".jpeg", ".png", ".bmp", ".tif", ".tiff"]
+images_allowed_file_names = [".jpg", ".jpeg", ".png", ".bmp", ".tif", ".tiff", ".webp"]
 sensor_fusion_allowed_extensions = [".json"]
 geo_tiff_allowed_extensions = [".tiff", ".tif"]
 videos_allowed_file_names = [".mp4", ".mov", ".avi", ".m4v", ".quicktime"]
diff --git a/walrus/methods/input/process_media.py b/walrus/methods/input/process_media.py
--- a/walrus/methods/input/process_media.py
+++ b/walrus/methods/input/process_media.py
@@ -1935,7 +1935,7 @@ def save_raw_image_file(self):
 
         # Use original file for jpg and jpeg
         extension = str(self.input.extension).lower()
-        if extension in ['.jpg', '.jpeg']:
+        if extension in ['.jpg', '.jpeg', '.webp']:
             new_temp_filename = self.input.temp_dir_path_and_filename
         # If PNG is used check compression
         elif extension == '.png':
@@ -1957,7 +1957,7 @@ def save_raw_image_file(self):
         else:
             self.input.status = "failed"
             self.input.status_text = f"""Extension: {self.input.extension} not supported yet. 
-                Try adding an accepted extension [.jpg, .jpeg, .png, .bmp, .tif, .tiff] or no extension at all if from cloud source and response header content-type is set correctly."""
+                Try adding an accepted extension [.jpg, .jpeg, .png, .bmp, .tif, .tiff, .webp] or no extension at all if from cloud source and response header content-type is set correctly."""
             self.log['error']['extension'] = self.input.status_text
             return
 


Test patch:
diff --git a/walrus/tests/methods/input/test_process_media.py b/walrus/tests/methods/input/test_process_media.py
--- a/walrus/tests/methods/input/test_process_media.py
+++ b/walrus/tests/methods/input/test_process_media.py
@@ -46,7 +46,7 @@ def test_determine_media_type(self):
 
         self.assertIsNone(result)
 
-        for extension in [".jpg", ".jpeg", ".png"]:
+        for extension in [".jpg", ".jpeg", ".png", ".webp"]:
             result = process_media.Process_Media.determine_media_type(
                 input_type = input_type,
                 extension = extension,
Repository: nod-ai/SHARK

Issue:
Added missing set_dep_pypaths scripts.



Discussion:

Resolving patch:
diff --git a/apps/language_models/scripts/stablelm.py b/apps/language_models/scripts/stablelm.py
--- a/apps/language_models/scripts/stablelm.py
+++ b/apps/language_models/scripts/stablelm.py
@@ -251,7 +251,7 @@ def get_tokenizer():
 # sharkStableLM = compile_stableLM(None, tuple([input_ids, attention_mask]), "stableLM_linalg_f32_seqLen256", "/home/shark/vivek/stableLM_shark_f32_seqLen256")
 def generate(
     new_text,
-    streamer,
+    # streamer,
     max_new_tokens,
     do_sample,
     top_p,
@@ -265,7 +265,7 @@ def generate(
     attention_mask=torch.randint(3, (1, 256)),
 ):
     if tok == None:
-        tok = get_tokenizer
+        tok = get_tokenizer()
     # Construct the input message string for the model by concatenating the current system message and conversation history
     # Tokenize the messages string
     # sharkStableLM = compile_stableLM(None, tuple([input_ids, attention_mask]), "stableLM_linalg_f32_seqLen256", "/home/shark/vivek/stableLM_shark_f32_seqLen256")
diff --git a/apps/stable_diffusion/web/ui/stablelm_ui.py b/apps/stable_diffusion/web/ui/stablelm_ui.py
--- a/apps/stable_diffusion/web/ui/stablelm_ui.py
+++ b/apps/stable_diffusion/web/ui/stablelm_ui.py
@@ -128,12 +128,12 @@ def chat(curr_system_message, history, model):
     )
     # print(messages)
     # Tokenize the messages string
-    streamer = TextIteratorStreamer(
-        tok, timeout=10.0, skip_prompt=True, skip_special_tokens=True
-    )
+    # streamer = TextIteratorStreamer(
+    #     tok, timeout=10.0, skip_prompt=True, skip_special_tokens=True
+    # )
     generate_kwargs = dict(
         new_text=messages,
-        streamer=streamer,
+        # streamer=streamer,
         max_new_tokens=512,
         do_sample=True,
         top_p=0.95,


Test patch:
Repository: incuna/django-pgcrypto-fields

Issue:
EmailPGPPublicKeyField does not use the correct mixin
As defined in https://github.com/incuna/django-pgcrypto-fields/blob/master/pgcrypto/fields.py#L41 `EmailPGPPublicKeyField` uses the `PGPSymmetricKeyFieldMixin` mixin instead of the `PGPPublicKeyFieldMixin` one.


Discussion:

Resolving patch:
diff --git a/pgcrypto/fields.py b/pgcrypto/fields.py
--- a/pgcrypto/fields.py
+++ b/pgcrypto/fields.py
@@ -38,7 +38,7 @@ class TextHMACField(HashMixin, models.TextField):
 TextHMACField.register_lookup(HashLookup)
 
 
-class EmailPGPPublicKeyField(PGPSymmetricKeyFieldMixin, models.EmailField):
+class EmailPGPPublicKeyField(PGPPublicKeyFieldMixin, models.EmailField):
     """Email PGP public key encrypted field."""
 
 


Test patch:
Repository: incuna/django-pgcrypto-fields

Issue:
Remove support for python3.5
[Python 3.5 end-of-life is next month](https://devguide.python.org/#status-of-python-branches) I suggest to drop the support. It would allow to update twine (see pyup.io build status https://github.com/incuna/django-pgcrypto-fields/pull/260) to the last version too as [the library deprecated support for it last year](https://github.com/pypa/twine/commit/06663c5787a16250debf80aad3a9047fa25e52cd).


Discussion:
Seems very reasonable.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 from setuptools import find_packages, setup
 
 CURRENT_PYTHON = sys.version_info[:2]
-REQUIRED_PYTHON = (3, 5)
+REQUIRED_PYTHON = (3, 6)
 
 # This check and everything above must remain compatible with Python 2.7.
 if CURRENT_PYTHON < REQUIRED_PYTHON:
@@ -49,9 +49,9 @@
         'Natural Language :: English',
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
         'Programming Language :: Python :: 3 :: Only',
         'Topic :: Database',
         'Topic :: Security :: Cryptography',


Test patch:
diff --git a/tests/factories.py b/tests/factories.py
--- a/tests/factories.py
+++ b/tests/factories.py
@@ -6,7 +6,7 @@
 from .models import EncryptedFKModel, EncryptedModel
 
 
-class EncryptedFKModelFactory(factory.DjangoModelFactory):
+class EncryptedFKModelFactory(factory.django.DjangoModelFactory):
     """Factory to generate foreign key data."""
     fk_pgp_sym_field = factory.Sequence('Text with symmetric key {}'.format)
 
@@ -15,7 +15,7 @@ class Meta:
         model = EncryptedFKModel
 
 
-class EncryptedModelFactory(factory.DjangoModelFactory):
+class EncryptedModelFactory(factory.django.DjangoModelFactory):
     """Factory to generate hashed and encrypted data."""
 
     digest_field = factory.Sequence('Text digest {}'.format)
diff --git a/tests/test_fields.py b/tests/test_fields.py
--- a/tests/test_fields.py
+++ b/tests/test_fields.py
@@ -38,7 +38,7 @@ def test_get_placeholder(self):
 
 
 class TestPGPMixin(TestCase):
-    multi_db = True
+    databases = '__all__'
     """Test `PGPMixin` behave properly."""
     def test_check(self):
         """Assert `max_length` check does not return any error."""
@@ -65,7 +65,7 @@ def test_max_length_validator(self):
 
 
 class TestEncryptedTextFieldModel(TestCase):
-    multi_db = True
+    databases = '__all__'
     """Test `EncryptedTextField` can be integrated in a `Django` model."""
     model = EncryptedModel
Repository: incuna/django-pgcrypto-fields

Issue:
cast_type of DateTimePGPSymmetricKeyField does not allow for dumpdata exports exporting timezone aware datetimes.
Extremely easy to override with a custom class when using Postgres as your database
```
class CustomDateTimePGPSymmetricKeyField(fields.DateTimePGPSymmetricKeyField):
    """
    Overriding cast_type so `dumpdata` command exports timezone aware datetimes.
    """
    cast_type = 'TIMESTAMPTZ'
```
but maybe this could be a setting? Or it could look at current USE_TZ setting?


Discussion:
@steezeburger 

Django treats all datetimes with timezone so this likely a bug by using the wrong cast type. Ref:

https://docs.djangoproject.com/en/3.1/topics/i18n/timezones/#postgresql

I think we can safely change over to `TIMESTAMPTZ` without any ill effects given that is what Django always uses. A PR is welcome to fix this.

Resolving patch:
diff --git a/pgcrypto/fields.py b/pgcrypto/fields.py
--- a/pgcrypto/fields.py
+++ b/pgcrypto/fields.py
@@ -71,7 +71,7 @@ class DatePGPPublicKeyField(PGPPublicKeyFieldMixin, models.DateField):
 class DateTimePGPPublicKeyField(PGPPublicKeyFieldMixin, models.DateTimeField):
     """DateTime PGP public key encrypted field for postgres."""
     encrypt_sql = PGP_PUB_ENCRYPT_SQL_WITH_NULLIF
-    cast_type = 'TIMESTAMP'
+    cast_type = 'TIMESTAMPTZ'
 
 
 class EmailPGPSymmetricKeyField(PGPSymmetricKeyFieldMixin, models.EmailField):
@@ -107,7 +107,7 @@ class DatePGPSymmetricKeyField(PGPSymmetricKeyFieldMixin, models.DateField):
 class DateTimePGPSymmetricKeyField(PGPSymmetricKeyFieldMixin, models.DateTimeField):
     """DateTime PGP symmetric key encrypted field for postgres."""
     encrypt_sql = PGP_SYM_ENCRYPT_SQL_WITH_NULLIF
-    cast_type = 'TIMESTAMP'
+    cast_type = 'TIMESTAMPTZ'
 
 
 class DecimalPGPPublicKeyField(DecimalPGPFieldMixin,


Test patch:
Repository: cython/cython

Issue:
Code generated for __setslice__ and __delslice__ fails to build in Py3
In Py 3.0.1, the `PySequenceMethods.sq_ass_slice` slot was typed as `void*` to make users aware that the slot was actually dropped. This lets the C compiler fail to build the generated source.

It might actually be best to just emit a clear and visible warning when users use these slots, and to point them to the `__*item__` slots instead. It's not really Cython's fault that they were not removed from Py3.0.

Migrated from http://trac.cython.org/ticket/215



Discussion:

Resolving patch:
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -82,6 +82,7 @@ def extend_if_not_in(L1, L2):
             # Ensure that we don't generate import code for these entries!
             for entry in scope.c_class_entries:
                 entry.type.module_name = self.full_module_name
+                entry.type.scope.directives["internal"] = True
 
             self.scope.merge_in(scope)
 
diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
--- a/Cython/Compiler/Nodes.py
+++ b/Cython/Compiler/Nodes.py
@@ -7952,10 +7952,14 @@ class CnameDecoratorNode(StatNode):
     def analyse_declarations(self, env):
         self.node.analyse_declarations(env)
 
-        self.is_function = isinstance(self.node, FuncDefNode)
-        is_struct_or_enum = isinstance(self.node, (CStructOrUnionDefNode,
+        node = self.node
+        if isinstance(node, CompilerDirectivesNode):
+            node = node.body.stats[0]
+
+        self.is_function = isinstance(node, FuncDefNode)
+        is_struct_or_enum = isinstance(node, (CStructOrUnionDefNode,
                                                    CEnumDefNode))
-        e = self.node.entry
+        e = node.entry
 
         if self.is_function:
             e.cname = self.cname
@@ -7966,7 +7970,7 @@ def analyse_declarations(self, env):
         elif is_struct_or_enum:
             e.cname = e.type.cname = self.cname
         else:
-            scope = self.node.scope
+            scope = node.scope
 
             e.cname = self.cname
             e.type.objstruct_cname = self.cname + '_obj'


Test patch:
diff --git a/tests/run/memoryview_namespace_T775.pyx b/tests/run/memoryview_namespace_T775.pyx
new file mode 100644
--- /dev/null
+++ b/tests/run/memoryview_namespace_T775.pyx
@@ -0,0 +1,13 @@
+
+cdef int data[10]
+cdef int[:] myslice = data
+
+def test_memoryview_namespace():
+    """
+    >>> test_memoryview_namespace()
+    """
+    namespace = dir(__import__(__name__))
+    assert 'array' not in namespace, namespace
+    assert 'memoryview' not in namespace, namespace
+    assert '_memoryviewslice' not in namespace, namespace
+    assert 'Enum' not in namespace, namespace
Repository: cython/cython

Issue:
cython-mode.el: don't highlight builtins when they're part of varname
Current version of cython-mode for Emacs caused weird highlighting when a builtin or a keyword is a part of a variable/function name (e.g. is_**float**). To avoid that one needs to check for symbol boundaries, not word boundaries when matching keywords.



Discussion:
Thanks. Since I can't really evaluate this, could you please ask on the cython-users mailing list if other Emacs users can test it? I'm a bit surprised that no-one complained about this yet.

Since no-one seemed to care on the mailing list, I'll just merge this and see if users start to complain afterwards. :)


Resolving patch:
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -2185,6 +2185,8 @@ def visit_CClassDefNode(self, node, pxd_def=None):
         if pxd_def is None:
             pxd_def = self.scope.lookup(node.class_name)
         if pxd_def:
+            if not pxd_def.defined_in_pxd:
+                return node
             outer_scope = self.scope
             self.scope = pxd_def.type.scope
         self.visitchildren(node)


Test patch:
diff --git a/tests/errors/pure_cclass_without_body.pxd b/tests/errors/pure_cclass_without_body.pxd
new file mode 100644
--- /dev/null
+++ b/tests/errors/pure_cclass_without_body.pxd
@@ -0,0 +1,3 @@
+# mode: error
+
+cdef class Test
diff --git a/tests/errors/pure_cclass_without_body.py b/tests/errors/pure_cclass_without_body.py
new file mode 100644
--- /dev/null
+++ b/tests/errors/pure_cclass_without_body.py
@@ -0,0 +1,8 @@
+# mode: error
+
+class Test(object):
+    pass
+
+_ERRORS = u"""
+3:5: C class 'Test' is declared but not defined
+"""