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 support for Python 3.12 #23

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Add support for Python 3.12 #23

merged 2 commits into from
Jan 8, 2024

Conversation

ghisvail
Copy link
Contributor

@ghisvail ghisvail commented Jan 3, 2024

When running the medkit test suite for Python 3.12, the following error is triggered with importing iamsystem:

TypeError: type ‘typing.TypeVar’ is not an acceptable base type

This is a bug in typing_extensions, which is fixed in a newer release (starting from version 4.7).

This PR updates the project metadata and dependencies to provide support and run tests on Python 3.12.

  • Bump minimum version of typing_extensions to the one with official support for Python 3.12
  • Update trove classifiers in project metadata
  • Enable tests for Python 3.12 in CI
  • Use setup-python@v5 caching capabilities

@ghisvail
Copy link
Contributor Author

ghisvail commented Jan 5, 2024

Is there any specific reason to have such a strict requirement for typing_extensions?

typing_extensions~=4.4.0 means downstream projects using iamsystem are stuck with your version (4.4.x) and cannot benefit from further improvements and bug fixes to the package, such as the fixes introduced for Python 3.12 since version 4.7.

Although my PR should work as is, such constraints are officially discouraged, especially for libraries. Maybe we could revisit whether such constraint (still) is necessary?

Copy link
Owner

@scossin scossin left a comment

Choose a reason for hiding this comment

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

Thanks for the changes

@scossin scossin merged commit 591c243 into scossin:main Jan 8, 2024
6 checks passed
@ghisvail ghisvail deleted the py312 branch April 24, 2024 15:24
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