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
Upgrade to toml v0.5.11 #2040
Upgrade to toml v0.5.11 #2040
Conversation
3c5f527
to
820404b
Compare
\cc @messense |
Looks like the released version on crates.io doesn’t use toml_edit currently: https://crates.io/crates/toml/0.5.11/dependencies |
Oh, strange. Any idea what the state of the crate is? Should I revert this? |
Only
For now you can revert it to be more compliant with TOML 1.0. At least a new Or we can just depends on |
Interesting, I did run through the example described in that issue and it seemed to work with the new crate. Is that unexpected? |
@messense - It looks like v0.5.11 was mostly about deprecations in advance of the toml-edit migration. I am confused though why this now works: [tool.hatch]
version.source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version" So, I might leave it as-is for now? Is that bad? What did we lose by not supporting TOML 1.0? |
It still fails for me?
Cargo.toml [package]
name = "toml-test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
toml = "0.5.11" src/main.rs fn main() {
let content = r#"# pyproject.toml
[tool.hatch]
version.source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version""#;
println!("{:#?}", toml::from_str::<toml::Value>(content));
} |
Interesting, let me try again in the morning. |
Yeah I can reproduce that, but interestingly, this works fine: let content = r#"# pyproject.toml
[tool.hatch]
version.source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version""#;
println!("{:#?}", toml::from_str::<Pyproject>(content)); |
This reverts commit 20a9252.
This _did_ fix #1894, but was a little premature. `toml` doesn't actually depend on `toml-edit` yet, and `v0.5.11` was mostly about deprecations AFAICT. So upgrading might solve that issue, but could introduce other incompatibilities, and I'd like to minimize churn. I expect that `toml` will have a new release soon, so we can revert this revert. Reverts #2040.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `^0.0.228` -> `^0.0.229` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.229/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.229/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.229/compatibility-slim/0.0.228)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.229/confidence-slim/0.0.228)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.229`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.229) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.228...v0.0.229) ##### What's Changed - README: `--force-exclude` is already set by [@​hugovk](https://togithub.com/hugovk) in [astral-sh/ruff#2042 - Upgrade to toml v0.5.11 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#2040 - Add support for pycodestyle E101 by [@​ericroberts](https://togithub.com/ericroberts) in [astral-sh/ruff#2038 - \[`flake8-executable`] EXE003-005 by [@​sbrugman](https://togithub.com/sbrugman) in [astral-sh/ruff#2023 - perf: Reduce allocations by [@​Stranger6667](https://togithub.com/Stranger6667) in [astral-sh/ruff#2045 - refactor: RuleOrigin, RuleCodePrefix and Rule::origin by [@​not-my-profile](https://togithub.com/not-my-profile) in [astral-sh/ruff#2029 - Add scaffolding for `flake8-type-checking` extension by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#2048 - De-duplicate SIM102 by [@​harupy](https://togithub.com/harupy) in [astral-sh/ruff#2050 - Fix S101 range to only highlight `assert` by [@​harupy](https://togithub.com/harupy) in [astral-sh/ruff#2052 - Avoid removing comments in RUF005 by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#2057 - Revert "Upgrade to toml v0.5.11" by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#2058 - Pyupgrade: Printf string formatting by [@​colin99d](https://togithub.com/colin99d) in [astral-sh/ruff#1803 - \[`flake8-builtins`] Add `builtins-ignorelist` Option by [@​saadmk11](https://togithub.com/saadmk11) in [astral-sh/ruff#2061 - feat: plugin scaffold for tryceratops with TRY300 by [@​sbrugman](https://togithub.com/sbrugman) in [astral-sh/ruff#2055 - Avoid flagging redefined imports as unused in same-scope by [@​charliermarsh](https://togithub.com/charliermarsh) in [astral-sh/ruff#2065 ##### New Contributors - [@​hugovk](https://togithub.com/hugovk) made their first contribution in [astral-sh/ruff#2042 - [@​ericroberts](https://togithub.com/ericroberts) made their first contribution in [astral-sh/ruff#2038 - [@​sbrugman](https://togithub.com/sbrugman) made their first contribution in [astral-sh/ruff#2023 **Full Changelog**: astral-sh/ruff@v0.0.228...v0.0.229 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDguMSIsInVwZGF0ZWRJblZlciI6IjM0LjEwOC4xIn0=--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
In #1680, we moved over to
toml_edit
. But it looks liketoml
now usestoml_edit
, and has implemented some improvements (e.g., this closes #1894).