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

Update CI and workflows for Python 3.12 support #1757

Merged
merged 9 commits into from
Sep 11, 2023
Merged

Conversation

mdickinson
Copy link
Member

Python 3.12 is imminent. This is an experimental PR to add Python 3.12 support:

  • Add 3.12 to the trove classifiers
  • Add 3.12 to CI test matrices
  • Allow running tests with PySide6 on Python 3.11, but not on Python 3.12
  • Update cibuildwheel to latest version so that Python 3.12 eggs are built when making a release

Making this as a draft PR for now, since the possible failure modes are many and varied.

@@ -5,7 +5,7 @@ on:
- workflow_dispatch

env:
# Temporary workaround prior to release of Traits 8.0
# Temporary workaround prior to release of TraitsUI 8.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Drive-by fix while we're touching this file, unrelated to the rest of the PR.

@mdickinson mdickinson marked this pull request as ready for review September 11, 2023 16:30
@mdickinson
Copy link
Member Author

This is now ready for review.

@rahulporuri rahulporuri self-requested a review September 11, 2023 16:58
@@ -21,6 +21,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Copy link
Member Author

Choose a reason for hiding this comment

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

This allows setup-python to install a Python 3.12 pre-release, and avoids the need to change these workflows again once Python 3.12.0 is released.

@@ -1,5 +1,5 @@
[build-system]
requires = ['setuptools<65.2', 'wheel']
requires = ['setuptools', 'wheel']
Copy link
Member Author

Choose a reason for hiding this comment

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

Older versions of setuptools break with Python 3.12, so it was necessary to remove this restriction.

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

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

LGTM with one minor question/clarification

@@ -1,5 +1,5 @@
[build-system]
requires = ['setuptools<65.2', 'wheel']
Copy link
Contributor

Choose a reason for hiding this comment

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

I should be able to verify that the original issue (#1722) got resolved by simply creating an edm environment and pip installing traits locally?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I missed this. Yes, that should work.

Copy link
Member Author

Choose a reason for hiding this comment

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

And FWIW, it works for me locally:

mdickinson@mirzakhani traits % edm shell -e bob
Starting new shell in EDM environment 'bob'.
Type 'exit' or 'Ctrl+D' to return.
mdickinson@mirzakhani traits % pip install .
Processing /Users/mdickinson/Enthought/ETS/traits
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: traits
  Building wheel for traits (pyproject.toml) ... done
  Created wheel for traits: filename=traits-7.0.0.dev1851-cp38-cp38-macosx_10_14_x86_64.whl size=5035351 sha256=cbd45aee56f93007374dcb2c7330d9f1707f852c1a1add1b90cfbda84db196e4
  Stored in directory: /private/var/folders/07/jbbjv8b53bs5y9xyjdyn1zgw0000gn/T/pip-ephem-wheel-cache-1i0m0er8/wheels/80/64/db/3f6e4e87e7ce87ed7ce15857cd598e38271c06a101e37b45bb
Successfully built traits
Installing collected packages: traits
Successfully installed traits-7.0.0.dev1851

Copy link
Contributor

Choose a reason for hiding this comment

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

yep yep it worked for me locally on python 3.11.4 edm

@mdickinson mdickinson merged commit b1aee80 into main Sep 11, 2023
32 checks passed
@mdickinson mdickinson deleted the enh/python312-support branch September 11, 2023 18:07
mdickinson added a commit that referenced this pull request Sep 11, 2023
mdickinson added a commit that referenced this pull request Sep 11, 2023
mdickinson added a commit that referenced this pull request Sep 11, 2023
@mdickinson mdickinson mentioned this pull request Sep 11, 2023
mdickinson added a commit that referenced this pull request Oct 9, 2023
This PR:

- backports PR #1755 to the release branch
- updates the version and changelog in preparation for a Traits 6.4.3
release

EDIT: Updated 2023-09-11 to backport PRs #1757  and #1758.
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 this pull request may close these issues.

2 participants