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

Use tomllib instead of PyPI toml on Python 3.11 and later #115

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

musicinmybrain
Copy link
Contributor

On Python 3.11 and later, it’s not necessary to carry a dependency on the PyPI toml package since tomllib provides equivalent functionality in the standard library.

Furthermore, the toml package was last updated in 2020, and in Fedora Linux, the python-toml package is deprecated, meaning new dependencies on it are prohibited.

I tested this with hatch test --all and did not observe any regressions.

@15r10nk
Copy link
Owner

15r10nk commented Sep 18, 2024

The typing error should go away when you use if sys.version_info >= (3,11) instead of try:

You can also use hatch run types:check locally.

@musicinmybrain
Copy link
Contributor Author

The typing error should go away when you use if sys.version_info >= (3,11) instead of try:

You can also use hatch run types:check locally.

Thanks for the suggestions! I’ve force-pushed with an explicit version check.

@15r10nk 15r10nk merged commit 0b95cd5 into 15r10nk:main Sep 18, 2024
27 checks passed
@15r10nk
Copy link
Owner

15r10nk commented Sep 18, 2024

Thank you for your contribution @musicinmybrain.

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