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 python 3.11 to list of supported versions #50

Open
murilo-cunha opened this issue Nov 4, 2022 · 2 comments
Open

Add python 3.11 to list of supported versions #50

murilo-cunha opened this issue Nov 4, 2022 · 2 comments

Comments

@murilo-cunha
Copy link
Member

Python 3.11 is out! 🚀
Add it to CICD tests, check for updates (tomlib vs tomli, ...), etc.

@murilo-cunha murilo-cunha changed the title Add python 3.11 to list of supported packages Add python 3.11 to list of supported versions Nov 4, 2022
@IndexSeek
Copy link
Contributor

Python 3.11 was added to CI with 7ce93b7 and #58. It might be worth exploring the capabilities of tomllib, though.

I'm not sure how to go about implementing the same code differently for different versions of Python. Would it be something like this?

pyproject.toml

[tool.poetry.dependencies]
toml = ">=0.10.2,<0.11"

[tool.poetry.dependencies.tomli]
python = ">=3.7,<3.11"

[tool.poetry.dependencies]
python = "^3.11"

databooks/cli.py

try:
    import tomli
except ImportError:
    import tomlib as tomli

I would think this might work as load seems to be synonymous, but that seems tricky. It seems like tomli is primarily being used to load the config file in cli.py, it might be replaced.

@murilo-cunha
Copy link
Member Author

Thanks for looking into it!

For databooks/cli.py, I believe you are correct!

For the pyproject.toml, I think it should look a bit differently:

[tool.poetry.dependencies]
tomli = { version = "^2.0.1", python = "<3.11" }

Following the docs

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

No branches or pull requests

2 participants