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

Bump minimum Python version to 3.8 #325

Merged
merged 11 commits into from
Nov 18, 2023
Merged

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Nov 3, 2023

Description of proposed changes

Drop support for Python 3.6 and 3.7. Adding support for newer versions will be done in separate PRs.

Related issue(s)

Checklist

  • Checks pass

@victorlin victorlin self-assigned this Nov 3, 2023
@victorlin victorlin force-pushed the victorlin/update-python-versions branch 5 times, most recently from 59430a2 to efdb042 Compare November 6, 2023 22:55
@victorlin victorlin changed the title Update supported Python versions Bump minimum Python version to 3.8 Nov 6, 2023
@victorlin victorlin force-pushed the victorlin/update-python-versions branch 2 times, most recently from 6e6cd68 to 87ca344 Compare November 6, 2023 23:48
@victorlin victorlin mentioned this pull request Nov 7, 2023
1 task
@victorlin victorlin marked this pull request as ready for review November 7, 2023 00:12
@victorlin victorlin requested a review from tsibley November 7, 2023 00:12
@tsibley
Copy link
Member

tsibley commented Nov 17, 2023

Would you add an entry to the changelog for this PR?

Copy link
Member

@tsibley tsibley left a comment

Choose a reason for hiding this comment

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

Looks great! A couple minor things noted. A changelog entry as part of this PR would be great too. When released, this will warrant a major version bump, naturally.

Subsequent commits will remove the 3.6 and 3.7-specific workarounds.
This comes with the standard library as of Python 3.7¹.

¹ https://docs.python.org/3.7/whatsnew/3.7.html
The motivation to use argparse was presumably to replace the hardcoded
prefix matching with argparse's built-in functionality¹. That seems
tricky since the current prefix matching omits some patterns (e.g. --co
for --cores, -re for --resources) which would be included by argparse
unless some workarounds are applied.

The current implementation seems reasonable, so leave it as-is.

¹ https://docs.python.org/3.8/library/argparse.html#prefix-matching
This wrapper around subprocess.run() was initially created because its
own capture_output parameter wasn't added until Python 3.7. However,
other things happening in this wrapper - namely environment variable
handling and return value modification - have turned out to be generally
useful. Seems worthwhile to keep it as-is.
The test environment can now be set up properly.
@victorlin victorlin force-pushed the victorlin/update-python-versions branch from 58104af to ea0b766 Compare November 18, 2023 00:11
@victorlin
Copy link
Member Author

Changelog entry added in e15afcc.

@victorlin victorlin merged commit c4c679a into master Nov 18, 2023
@victorlin victorlin deleted the victorlin/update-python-versions branch November 18, 2023 00:50
tsibley added a commit that referenced this pull request May 9, 2024
Missed as part of the bump from Python 3.6 → 3.8.¹

¹ <#325>

Co-authored-by: Thomas Sibley <[email protected]>
tsibley added a commit that referenced this pull request May 9, 2024
Missed as part of the bump from Python 3.6 → 3.8.¹

¹ <#325>

Co-authored-by: Thomas Sibley <[email protected]>
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.

Bump minimum Python dependency to 3.7 (or newer)
2 participants