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

Import fails on Python 3.10.0b1 #10

Closed
mattclay opened this issue May 6, 2021 · 2 comments · Fixed by #11
Closed

Import fails on Python 3.10.0b1 #10

mattclay opened this issue May 6, 2021 · 2 comments · Fixed by #11

Comments

@mattclay
Copy link
Collaborator

mattclay commented May 6, 2021

Python 3.10.0b1 (default, May  6 2021, 02:44:57) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import spnego
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/demo/lib/python3.10/site-packages/spnego/__init__.py", line 12, in <module>
    from spnego._context import (
  File "/tmp/demo/lib/python3.10/site-packages/spnego/_context.py", line 37, in <module>
    from spnego.iov import (
  File "/tmp/demo/lib/python3.10/site-packages/spnego/iov.py", line 14, in <module>
    class BufferType(IntFlag):
  File "/usr/lib/python3.10/enum.py", line 544, in __new__
    raise TypeError(
TypeError: invalid Flag 'BufferType' -- missing values: 4, 8

This appears to be due to this change in CPython: python/cpython#24215

@jborean93
Copy link
Owner

Hmm I saw this when trying out the alpha and I hoped it would not be the case on the beta but obviously not. This personally seems like a breaking change on their part and I cannot understand the reasons why this is not required. I’ll have to try and follow it up.

@jborean93
Copy link
Owner

So I was wrong, I was mistakenly using IntFlag instead of IntEnum here causing the problems. The field is a single value so shouldn't be IntFlag and is the reason why it's complaining that 4 and 8 were missing.

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.

2 participants