Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.9: TypeError: can't set attributes of built-in/extension type 'type' #51

Closed
dmrlawson opened this issue Mar 25, 2021 · 4 comments · Fixed by #56
Closed

Python 3.9: TypeError: can't set attributes of built-in/extension type 'type' #51

dmrlawson opened this issue Mar 25, 2021 · 4 comments · Fixed by #56

Comments

@dmrlawson
Copy link

Hi,

In Python 3.9 I get the above error when importing capnpy:

$ python
Python 3.9.2 (default, Mar  8 2021, 11:23:50) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import capnpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/venv3.9.2/lib/python3.9/site-packages/capnpy/__init__.py", line 4, in <module>
    from capnpy.compiler.compiler import DynamicCompiler
  File "/tmp/venv3.9.2/lib/python3.9/site-packages/capnpy/compiler/compiler.py", line 11, in <module>
    from capnpy import schema
  File "/tmp/venv3.9.2/lib/python3.9/site-packages/capnpy/schema.py", line 7, in <module>
    from capnpy.struct_ import Struct as _Struct
  File "capnpy/struct_.py", line 1, in init capnpy.struct_
  File "capnpy/type.pxd", line 1, in init capnpy.blob
  File "capnpy/type.py", line 33, in init capnpy.type
  File "capnpy/type.py", line 29, in capnpy.type.Types._make
TypeError: can't set attributes of built-in/extension type 'type'
>>>
@antocuni
Copy link
Owner

Thank you for reporting this. Unfortunately I am no longer working on capnpy, see #53 .
Hopefully someone will step up and look at this issue

@chaosite
Copy link

chaosite commented Oct 13, 2021

This looks very much like cython/cython#3395, but that issue is not very helpful.

@antocuni
Copy link
Owner

As described by commit 94939ce, the problem appeared only when using an old version of Cython. With recent cythons, it just works

@chaosite
Copy link

I originally got this problem with Cython 0.29.24.

However, I can't reproduce the problem after installing the current version master, so it still seems fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants