Import issues with Python310 pre-releases due to CPython changes

Thomas Caswell tcaswell at gmail.com
Mon Jun 7 13:57:20 BST 2021


Folks,

There were changes in the default behavior of IntEnum and it's subclasses
in Python 3.10.0a5 release that caused class-definition-time errors if all
of the single-bit flags were not named.  This breaks PyQt6 and a number of
other projects and is being treated as a regression/release blocker by
upstream [1].  I do not think any action is needed on the PyQt6 side.

See [2][3] for details about the change that caused this regression.

Python 3.10.0b2+ (heads/3.10:d0991e2db3, Jun  1 2021, 11:42:08) [GCC
11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt6.QtCore
>>> PyQt6.QtCore.PYQT_VERSION_STR
'6.1.1.dev2105301600'
>>> PyQt6.QtCore.Qt.Key
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tcaswell/.pybuild/bleeding/lib/python3.10/enum.py", line 615,
in __call__
    return cls._create_(
  File "/home/tcaswell/.pybuild/bleeding/lib/python3.10/enum.py", line 762,
in _create_
    return metacls.__new__(metacls, class_name, bases, classdict,
boundary=boundary)
  File "/home/tcaswell/.pybuild/bleeding/lib/python3.10/enum.py", line 544,
in __new__
    raise TypeError(
TypeError: invalid Flag 'DropAction' -- missing values: 8, 16, 32, 64, 128,
32768
>>>


Tom

[1] https://bugs.python.org/issue44242
[2] https://github.com/python/cpython/pull/24215
[3] https://bugs.python.org/issue38250

-- 
Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210607/bdbf6db5/attachment.htm>


More information about the PyQt mailing list