Skip to content

PR: Add Python 3.11 to CIs/tags & overhaul CI config#392

Merged
dalthviz merged 6 commits intospyder-ide:masterfrom
CAM-Gerlach:add-support-py311
Dec 19, 2022
Merged

PR: Add Python 3.11 to CIs/tags & overhaul CI config#392
dalthviz merged 6 commits intospyder-ide:masterfrom
CAM-Gerlach:add-support-py311

Conversation

@CAM-Gerlach
Copy link
Copy Markdown
Member

@CAM-Gerlach CAM-Gerlach commented Dec 17, 2022

As discussed in #386 , adds official support for Python 3.11 (following a similar template to #296 which added 3.10 support) in the Trove tags and CI tests, making the necessary binding and Qt version adjustments as required for the 3.11 jobs, including a somewhat non-ideal but necessary workaround for a conda package solver incompatibility on Py311 + pyqt 5.15 + qt 5.15.

Along the way, I've refactored the CI config to centralize the binding and Qt API version selection all in one place in the matrix config, to greatly reduce duplication of version constants and the scattering of the logic multiple places in the declarative config and the dynamic execution script. In concert with that, I've been able to:

  • Ensure that all four bindings have their lower (5.9/6.2), middle (5.12/6.3) and upper (5.15/6.2) bound versions tested on at least one CI job
  • Fix an issue with most PySide 6.x jobs accidentally using the lower rather than the middle or upper bound version
  • Unskip the macOS-Python3.7-pip job, as it now runs fine without errors
  • Add the missing Qt version parameter to the conda install call for PySide6 and fix its indent (from PR PR: Try PySide6 on conda #378)
  • Fix some other issues in test.sh, including a small but meaningful typo in a comment, an unnecessary pip spec/version, and a tab/spaces problem

I've also updated/fixed a few related small ancillary bits:

  • Upgraded the checkout and setup-python action versions to the current
  • Elided the redundant wheel build-time dependency
  • Removed the deprecated license_file metadata key superceded by license_files

Fixes #386

@CAM-Gerlach CAM-Gerlach self-assigned this Dec 17, 2022
@CAM-Gerlach CAM-Gerlach marked this pull request as draft December 17, 2022 04:05
@CAM-Gerlach CAM-Gerlach changed the title PR: Upgrade Trove tags and CIs to officially support Python 3.11 PR: Upgrade CI config & metadata to officially support & test Python 3.11 Dec 17, 2022
@CAM-Gerlach CAM-Gerlach changed the title PR: Upgrade CI config & metadata to officially support & test Python 3.11 PR: Add official Python 3.11 support in CIs & metadata, and refactor CI config Dec 17, 2022
@CAM-Gerlach CAM-Gerlach changed the title PR: Add official Python 3.11 support in CIs & metadata, and refactor CI config PR: Add Python 3.11 support to CIs & metadata, and refactor CI config Dec 17, 2022
@CAM-Gerlach CAM-Gerlach changed the title PR: Add Python 3.11 support to CIs & metadata, and refactor CI config PR: Add Python 3.11 support to CIs & metadata; refactor CI config Dec 17, 2022
@CAM-Gerlach
Copy link
Copy Markdown
Member Author

@ccordoba12 @dalthviz I've apparently discovered a conda dependency solution issue that can be worked around here, but should probably be fixed properly upstream, most likely with a new release of the qt metapackage (which might in turn require a new release of qt-webengine). Specifically, no version of the qt metapackage and pyqt are mutually compatible on Python 3.11, and running

conda create -n test-env python=3.11 pyqt qt

or equivalently

conda create -n test-env python=3.11 pyqt=5.15 qt=5.15

fails on all platforms with a dependency resolution error, which you can see the full output of on CI in e.g. this run.

Specifically, I've traced the issue to following three incompatible constraints:

  • The latest pyqt 5.15.7 is the earliest version supported on Python 3.11 (5.15.4 will not install)
  • pyqt 5.15.7 requires qt-main, of which only 5.15.6 is mutually compatible with pyqt (5.15.4 is mutually incompatible, but will install on its own on Python 3.11, or with pyqt 5.15.7on Python <3.11)
  • The latest version of the qt 5.15 meta-package is 5.15.4, which pins on qt-main and qt-webengine of the same point version

To note,

conda create -n test-env python=3.11 pyqt=5.15.7 qt-main=5.15.6 qt-webengine=5.15.4

does resolve. Also, 5.15.4 is the latest version of qt-webengine, though conda-forge/qt-webengine-feedstock#20 is open to update it to 5.15.7—though that wouldn't be in sync with the latest qt-main version, so I'm not sure if that can be pinned with qt unless qt-main is also updated to that version.

Should this be reported to one or more of those feedstocks? Or can something else be done about it?

@CAM-Gerlach CAM-Gerlach changed the title PR: Add Python 3.11 support to CIs & metadata; refactor CI config PR: Add Python 3.11 to CIs/tags & overhaul CI config Dec 17, 2022
@CAM-Gerlach CAM-Gerlach marked this pull request as ready for review December 17, 2022 10:18
@ccordoba12
Copy link
Copy Markdown
Member

Should this be reported to one or more of those feedstocks? Or can something else be done about it?

I think it should be reported in the qt-feedstock to update the constraints it has on qt-main and qt-webengine.

@CAM-Gerlach
Copy link
Copy Markdown
Member Author

Thanks, I've opened conda-forge/qt-feedstock#234 on there as suggested.

In the meantime, though, that doesn't block this PR, since I implemented a workaround (that's not quite as elegant as I'd like, but works just fine for now).

@dalthviz dalthviz added this to the v2.4.0 milestone Dec 18, 2022
Copy link
Copy Markdown
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small suggestions for you @CAM-Gerlach, otherwise looks good to me.

Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
@dalthviz dalthviz modified the milestones: v2.4.0, v2.3.1 Dec 19, 2022
Copy link
Copy Markdown
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks @CAM-Gerlach!

Copy link
Copy Markdown
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CAM-Gerlach !

@dalthviz dalthviz merged commit 7bd9ea7 into spyder-ide:master Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add official support for Python 3.11

3 participants