-
-
Notifications
You must be signed in to change notification settings - Fork 675
Remove tomli #41036
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
base: develop
Are you sure you want to change the base?
Remove tomli #41036
Conversation
tomli is a TOML parser that was needed for Python < 3.11. Since Python 3.11+, tomllib is part of the standard library. tomli-w (TOML writer) is kept as it's still needed for writing TOML files. Changes: - Removed tomli from all environment-*.yml files - Removed build/pkgs/tomli directory - Updated package dependencies to remove tomli references
Documentation preview for this PR (built with commit b123481; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the tomli
dependency from the codebase as it's no longer needed for Python 3.11+. Since Python 3.11 includes tomllib
in the standard library for parsing TOML files, the external tomli
package is redundant. The tomli-w
package is retained as it's still needed for writing TOML files.
- Removed
tomli
from all environment configuration files across different Python versions and platforms - Deleted the entire
build/pkgs/tomli
directory and its associated files - Updated package dependency files to remove
tomli
references
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
File | Description |
---|---|
environment-*.yml | Removed tomli dependency from conda environment files for Python 3.10-3.13 across all platforms |
build/pkgs/tomli/ | Completely removed tomli package directory and all configuration files |
build/pkgs/*/dependencies | Updated dependency lists to remove tomli references from various packages |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conda env files are automatically generated. So if tomli is in there, it means that another python library still needs it (or the metadata in some conda package needs to be updated to reflect that tomli is no longer needed).
Cannot say much about the changes in build
. If all of those pkgs are no longer actually using tomli, then it would be fine to remove it.
Maybe some packages in that time also support the python <3.11. So it needs the tomli package. Maybe we need to generate new conda env files. Thank you very much. |
some errors in macos on python3.12 3.11. The version of clang is too high. |
This is because the maxima version raise such errors, maxima version 5.48.1 use different expression. |
- Updated input hashes in environment files for consistency. - Changed version of `brial` from 1.2.3 to 1.2.12 in Linux and macOS environments. - Updated `libbrial` version from 1.2.3 to 1.2.12 in Linux and macOS environments. - Adjusted `linbox` version from 1.7.1 to 1.7.0 in Linux and macOS environments. - Changed `m4ri` version from 20250128 to 20140914 in Linux and updated `m4rie` version accordingly. - Updated various dependencies in the Windows environment, removing obsolete packages and ensuring compatibility.
You can base it on #39189, which fixes these compilation errors by excluding certain package versions. |
Thank you very much. I will wait this merged. Now everything works. |
- Updated `environment-3.13-win.yml` with new dependencies and version updates. - Added several new packages including `annotated-types`, `backports`, `click`, and others. - Updated Python version from 3.13.7 to 3.13.8 and adjusted related dependencies. - Enhanced `update-conda.py` to use threading for processing platforms and Python versions concurrently. - Refactored dependency retrieval logic to improve clarity and maintainability. - Removed unnecessary comments and cleaned up the code for better readability.
I will wait for the #39189 merge |
Removed 'toml' from the list of dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I cannot say much about the changes in the build
folder.
looks OK, if CI agrees |
there still tomli and tomli-w (not sure what the latter is) in yml files: (look at
and |
because in conda, meson-python rely tomli for all Python versions. But in pyproject.toml, It only rely tomli for Python<3.11 |
sagemathgh-41036: Remove tomli tomli is a TOML parser that was needed for Python < 3.11. Since Python 3.11+, tomllib is part of the standard library. tomli-w (TOML writer) is kept as it's still needed for writing TOML files. Changes: - Removed build/pkgs/tomli directory - Updated package dependencies to remove tomli references - Remove the unused 3.10 env file <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#41036 Reported by: Chenxin Zhong Reviewer(s): Copilot, Dima Pasechnik, Tobias Diez
sagemathgh-41036: Remove tomli tomli is a TOML parser that was needed for Python < 3.11. Since Python 3.11+, tomllib is part of the standard library. tomli-w (TOML writer) is kept as it's still needed for writing TOML files. Changes: - Removed build/pkgs/tomli directory - Updated package dependencies to remove tomli references - Remove the unused 3.10 env file <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#41036 Reported by: Chenxin Zhong Reviewer(s): Copilot, Dima Pasechnik, Tobias Diez
tomli is a TOML parser that was needed for Python < 3.11. Since Python 3.11+, tomllib is part of the standard library. tomli-w (TOML writer) is kept as it's still needed for writing TOML files.
Changes:
📝 Checklist
⌛ Dependencies