Skip to content

Migrate Python dependency uiri/toml to tomllib / hukkin/tomli - #821

Merged
messense merged 1 commit into
PyO3:mainfrom
Contextualist:toml-migrate
Feb 27, 2022
Merged

messense merged 1 commit into
PyO3:mainfrom
Contextualist:toml-migrate

Conversation

@Contextualist

Copy link
Copy Markdown
Contributor

Reasons for the migration:

  1. hukkin/tomli has been accepted as part of the Python standard library (see PEP680 and bpo-40059: tomllib python/cpython#31498), named as tomllib, and will be released along with Python 3.11.
  2. uiri/toml is unmaintained since Oct 2020, while hukkin/tomli is an actively maintained implementation of TOML 1.0 spec, with 100% test coverage.

@netlify

netlify Bot commented Feb 27, 2022 •

Copy link
Copy Markdown

✔️ Deploy Preview for maturin-guide canceled.

🔨 Explore the source changes: b896ade

🔍 Inspect the deploy log: https://app.netlify.com/sites/maturin-guide/deploys/621af41e90f94b0007c3cfab

@messense

Copy link
Copy Markdown
Member

I remember setuptools-rust removed tomli dependency due to a issue from cryptography: pyca/cryptography#6671 (comment) , I'm not sure if it also affects building maturin from sdist if we merge this.

@Contextualist

Copy link
Copy Markdown
Contributor Author

If I understand correctly, this is referring to the circular dependency problem between flit and tomli.

flit depends on tomli starting from version 3.4, while they fixed the circular dependency issue in version 3.6 by vendoring tomli.

Building tomli>=1.1.0 from sdist requires flit_core>=3.2.0,<4, so those who have to use flit_core version 3.4, 3.5, or 3.5.1 will probably experience the issue.

@messense

Copy link
Copy Markdown
Member

Thanks for the clarification!

Building tomli>=1.1.0 from sdist requires flit_core>=3.2.0,<4, so those who have to use flit_core version 3.4, 3.5, or 3.5.1 will probably experience the issue.

I think this is fine now since flit_core is already fixed in recent versions.

@messense
messense merged commit 37acb65 into PyO3:main Feb 27, 2022
messense added a commit that referenced this pull request Feb 27, 2022
@Contextualist
Contextualist deleted the toml-migrate branch February 27, 2022 15:52
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