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

xlib support broken in Python 3.7.6 (and possibly other new Python releases) #112

Closed
hoechenberger opened this issue Dec 25, 2019 · 5 comments

Comments

@hoechenberger
Copy link
Contributor

hoechenberger commented Dec 25, 2019

$ python -V
Python 3.7.6
$ python -c 'from pyglet.libs.x11 import xlib'
...
Traceback (most recent call last):
  File "/root/miniconda3/envs/pyglet/lib/python3.7/site-packages/pyglet/libs/x11/xlib.py", line 2962, in <module>
    XEHeadOfExtensionList.argtypes = [XEDataObject]
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.

Tested with pyglet 1.4.8.
I suppose this is caused by a bugfix that has made it into that Python release.

@hoechenberger hoechenberger changed the title xlib support broken in Python 3.7.6+ (and possibly other new Python releases) xlib support broken in Python 3.7.6 (and possibly other new Python releases) Dec 25, 2019
@benmoran56
Copy link
Member

Thanks for opening the ticket, and the links.

I don't see an issue on my Linux machines with 3.8, but if I'm reading that Python bugfix correctly, this change will be in 3.9 as well. I'll have a look at this soon.

@hoechenberger
Copy link
Contributor Author

I don't see an issue on my Linux machines with 3.8, but if I'm reading that Python bugfix correctly, this change will be in 3.9 as well. I'll have a look at this soon.

Currently only 3.7.6 is broken, as it was just recently released and contains the change. I guess 3.8 will break with the next minor release, which will most likely contain the same fix.

@gperetin
Copy link

Confirming it is broken on Python 3.8.1.

(env) ❯ python -V
Python 3.8.1
(env) ❯ python -c 'from pyglet.libs.x11 import xlib'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/goran/Code/game-test/arcade-test/env/lib/python3.8/site-packages/pyglet/libs/x11/xlib.py", line 2962, in <module>
    XEHeadOfExtensionList.argtypes = [XEDataObject]
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.

@benmoran56
Copy link
Member

Thanks everyone for the feedback. Luckily the xlib function in question is not used by pyglet, so I was able to push a quick fix. I'll see if I can push out a pyglet point release later today. I can confirm this is now working on my machines with Python 3.8.1, but it should also be OK on 3.7.6 and others.

@benmoran56
Copy link
Member

I just pushed out pyglet 1.4.9, which is now available for download or install via pip.
If this problem still persists, please reopen this ticket. Thanks again for the detailed report!

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

No branches or pull requests

3 participants