pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.36k stars 2.98k forks source link

Use the stdlib tomllib on python 3.11+ #12797

Open eli-schwartz opened 5 days ago

eli-schwartz commented 5 days ago

Although a tomli copy is vendored, doing this conditional import allows:

eli-schwartz commented 4 days ago

I wasn't too sure about that myself -- it is very internal and shouldn't affect anyone by default. tomli has to remain compatible with tomllib as a backport anyways so it shouldn't be possible to get an error from using the "wrong" version.

Maybe if anywhere, a changelog entry should be in the "vendor" section?

ichard26 commented 3 days ago

Maybe if anywhere, a changelog entry should be in the "vendor" section?

I guess so. Let's add one to keep downstreams aware of the changes. (I would myself, but I don't have write permissions :slightly_smiling_face:)