econchick / interrogate

Explain yourself! Interrogate a codebase for docstring coverage.
https://interrogate.readthedocs.io
MIT License
575 stars 44 forks source link

Don't require `toml` on Python 3.11 #150

Closed pawelad closed 5 months ago

pawelad commented 1 year ago

Describe the feature you'd like

Hi!

I'm currently upgrading the Python version on of my projects to Python 3.11 (which added tomllib to the standard library) and was delighted to see that almost all packages I use dropped the requirement for tomli:

Screenshot 2023-03-20 at 16 57 32

The only dependencies that don't use the the built in tomllib on Python 3.11 is django-stubs (https://github.com/typeddjango/django-stubs/issues/1408) and interrogate.

I'm not sure if there's a need to switch from toml to tomli, but ideally neither should be required on Python 3.11 and the built in tomllib should be used.

As far as I see, the replacement should be pretty straightforward and I'd be happy to provide a PR.

Lastly, an example of how black dealt with this:

https://github.com/psf/black/blob/ef6e079901d53a42dfae4ab10b081ce7a73a47b5/pyproject.toml#L71

https://github.com/psf/black/blob/ef6e079901d53a42dfae4ab10b081ce7a73a47b5/src/black/files.py#L26-L34

Your Environment

econchick commented 6 months ago

Sorry for the silence! This is in master, and is queued for 1.7.0, which I'm planning to release this month. I'll keep this open until I release :)

econchick commented 5 months ago

Released! feel free to re-open if this is still an issue.