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

Add Python 3.11 compatibility #511

Closed
1 task
mdickinson opened this issue Mar 7, 2023 · 3 comments · Fixed by #513
Closed
1 task

Add Python 3.11 compatibility #511

mdickinson opened this issue Mar 7, 2023 · 3 comments · Fixed by #513
Milestone

Comments

@mdickinson
Copy link
Member

The upcoming 7.0 release would be a good time to make sure that the Envisage codebase has no compatibility issues with Python 3.11.

Currently known blockers:

  • When using PySide6, we currently depend on PySide6 < 6.4.0, and that's not available for Python 3.11. There's ongoing work in Pyface to remove this restriction.
@mdickinson mdickinson added this to the Release 7.0 milestone Mar 7, 2023
@mdickinson
Copy link
Member Author

Working locally on macOS, I can run the test suite successfully on Python 3.11 if I have no GUI backend installed; that ends up skipping 5 tests. That's better than nothing, so we should probably update the workflow to run on Python 3.11 but without PySide6 installed.

@mdickinson
Copy link
Member Author

And if I do install the most recent version of PySide6, I run into the known issue (enthought/pyface#1163):

  File "/Users/mdickinson/.venvs/envisage/lib/python3.11/site-packages/pyface/ui/qt4/tasks/main_window_layout.py", line 29, in <module>
    from .dock_pane import AREA_MAP
  File "/Users/mdickinson/.venvs/envisage/lib/python3.11/site-packages/pyface/ui/qt4/tasks/dock_pane.py", line 31, in <module>
    INVERSE_AREA_MAP = dict((int(v), k) for k, v in AREA_MAP.items())
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mdickinson/.venvs/envisage/lib/python3.11/site-packages/pyface/ui/qt4/tasks/dock_pane.py", line 31, in <genexpr>
    INVERSE_AREA_MAP = dict((int(v), k) for k, v in AREA_MAP.items())
                             ^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'DockWidgetArea'

@mdickinson
Copy link
Member Author

That's better than nothing, so we should probably update the workflow to run on Python 3.11 but without PySide6 installed.

Done in #513.

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.

1 participant