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

Switch to tomli/tomllib for toml parsing #339

Closed
sacsar opened this issue Nov 23, 2023 · 2 comments · Fixed by #340
Closed

Switch to tomli/tomllib for toml parsing #339

sacsar opened this issue Nov 23, 2023 · 2 comments · Fixed by #340

Comments

@sacsar
Copy link
Contributor

sacsar commented Nov 23, 2023

Due to uiri/toml#270, vulture won't run for projects with a pyproject.toml that contain an array with mixed types. According to python-poetry/poetry#7094 (comment), this is not an issue in the tomllib in Python 3.11+ or its backport (https://github.com/hukkin/tomli).

It looks like this should be a quick swap. I'll send a PR along when I have a moment.

@jendrikseipp
Copy link
Owner

Sounds good!

sacsar added a commit to sacsar/vulture that referenced this issue Nov 23, 2023
Fixes jendrikseipp#339 -- the toml package does not support heterogenous arrays,
which are now allowed in the toml spec. This commit swaps in tomllib
from the standard library for Python >= 3.11 and its backport tomli for
older versions.
@sacsar
Copy link
Contributor Author

sacsar commented Nov 23, 2023

A bit more involved than I expected, but the PR is up.

jendrikseipp added a commit that referenced this issue Nov 24, 2023
* Swap tomllib for toml.

Fixes #339 -- the toml package does not support heterogenous arrays,
which are now allowed in the toml spec. This commit swaps in tomllib
from the standard library for Python >= 3.11 and its backport tomli for
older versions.

---------

Co-authored-by: Jendrik Seipp <jendrikseipp@gmail.com>
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 a pull request may close this issue.

2 participants