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

Test suite support for Python 3.12 #12127

Merged
merged 10 commits into from
Jul 26, 2023
Merged

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Jul 4, 2023

This makes the test suite run on 3.12. Also fix #12121 since the same fixes in noxfile apply for virtualenv configured to not populate setuptools.

@uranusjr uranusjr added the skip news Does not need a NEWS file entry (eg: trivial changes) label Jul 4, 2023
@uranusjr uranusjr force-pushed the no-setuptools-in-tests branch 2 times, most recently from fb41374 to 43d0fe9 Compare July 4, 2023 09:26

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
python-version: ${{ matrix.python.full || matrix.python }}
Copy link
Member

Choose a reason for hiding this comment

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

you can use allow-prereleases: true if you don't care about the specific beta version to test.

c.f. https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#allow-pre-releases

Copy link
Member

@pradyunsg pradyunsg Jul 9, 2023

Choose a reason for hiding this comment

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

Suggested change
python-version: ${{ matrix.python.full || matrix.python }}
python-version: ${{ matrix.python }}-dev

This will gracefully move to using stable releases, once they are out.

Use -dev instead of a patch number (e.g., 3.12-dev) to install the latest patch version release for a given minor version, alpha and beta releases included.

Copy link
Member Author

@uranusjr uranusjr Jul 10, 2023

Choose a reason for hiding this comment

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

Both these solutions would cause prereleases for other versions to be picked up. I’m not sure I’m on board with that. I changed to full key to use -dev instead of -beta.3.

Copy link
Member

Choose a reason for hiding this comment

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

Both these solutions would cause prereleases for other versions to be picked up.

They won't have any though?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will they not? I am not familiar with how GitHub publishes versions, but Python bug fixes do have prereleases officially.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@pfmoore
Copy link
Member

pfmoore commented Jul 15, 2023

Quick note - please avoid merging this until we know that we don't need a bugfix for 23.2 (see my comments on #12105). At which point, the debate about pre-release versions of 3.12 may no longer be relevant...

Co-authored-by: Pradyun Gedam <[email protected]>
@pradyunsg
Copy link
Member

At which point, the debate about pre-release versions of 3.12 may no longer be relevant...

RC releases are still pre-releases! :)

@pfmoore
Copy link
Member

pfmoore commented Jul 15, 2023

Actually, 3.12 final is due 02/10/2023, which is a bit unfortunate as we're going to be releasing 23.3 in October. Not much we can do about it, though. It does mean that maybe testing with the 3.12 RCs is more important than I'd assumed. So ignore my previous comment.

@uranusjr
Copy link
Member Author

uranusjr commented Jul 16, 2023

Reminds me again there’s a discussion on shifting pip’s schedule one or two months to match CPython’s (relatively new) annual schedule

@uranusjr uranusjr merged commit 95640b8 into pypa:main Jul 26, 2023
@uranusjr uranusjr deleted the no-setuptools-in-tests branch July 26, 2023 01:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test suite assumes virtualenv installs setuptools
4 participants