Skip to content

Show a dedicated hint for setuptools dash-separator change#12438

Merged
charliermarsh merged 1 commit intomainfrom
charlie/x
Mar 24, 2025
Merged

Show a dedicated hint for setuptools dash-separator change#12438
charliermarsh merged 1 commit intomainfrom
charlie/x

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

@charliermarsh charliermarsh commented Mar 24, 2025

Summary

See: #12434.

Test Plan

The error in-context:

Screenshot 2025-03-24 at 12 10 11 PM

@charliermarsh charliermarsh requested review from konstin and zanieb March 24, 2025 16:10
@charliermarsh charliermarsh added the error messages Messaging when something goes wrong label Mar 24, 2025
@charliermarsh charliermarsh marked this pull request as ready for review March 24, 2025 16:10
MissingLibrary::NonNormalizedSetupCfgKey => {
write!(
f,
"setuptools deprecated support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:\n```toml\n[tool.uv]\nbuild-constraint-dependencies = [\"setuptools<78\"]\n```"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"setuptools deprecated support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:\n```toml\n[tool.uv]\nbuild-constraint-dependencies = [\"setuptools<78\"]\n```"
"setuptools removed support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:\n```toml\n[tool.uv]\nbuild-constraint-dependencies = [\"setuptools<78\"]\n```"

Deprecation implies warning not erroring to me.

raise InvalidConfigError(
setuptools.errors.InvalidConfigError: Invalid dash-separated key 'requires-python' in 'metadata' (setup.cfg), please use the underscore name 'requires_python' instead.

hint: setuptools deprecated support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hint: setuptools deprecated support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:
hint: setuptools removed support for dash-separated and uppercased keys in v78.0.0. Consider updating the relevant `setup.cfg`, or use `tool.uv.build-constraint-dependencies` to pin `setuptools<78`:

@zanieb
Copy link
Copy Markdown
Member

zanieb commented Mar 24, 2025

Clippy:

error: unnecessary hashes around raw string literal
     --> crates/uv/tests/it/pip_install.rs:10279:33
      |
10279 |       setup_cfg.write_str(indoc! {r#"
      |  _________________________________^
10280 | |         [metadata]
10281 | |         name = foo
10282 | |         version = 0.1.0
10283 | |         requires-python = >=3.12
10284 | |         install_requires = iniconfig
10285 | |     "#})?;
      | |______^

@charliermarsh charliermarsh force-pushed the charlie/x branch 2 times, most recently from ea18139 to 787b167 Compare March 24, 2025 16:16
@charliermarsh charliermarsh enabled auto-merge (squash) March 24, 2025 16:16
@charliermarsh charliermarsh merged commit 664c77a into main Mar 24, 2025
76 checks passed
@charliermarsh charliermarsh deleted the charlie/x branch March 24, 2025 16:37
charliermarsh added a commit that referenced this pull request Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error messages Messaging when something goes wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants