-
-
Notifications
You must be signed in to change notification settings - Fork 227
Fix 1216 explicitly deprecate setuptools dynamic version when active #1219
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: main
Are you sure you want to change the base?
Changes from 3 commits
7570f68
e67c027
629f4f4
a47b08e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,6 +174,7 @@ def read_pyproject( | |
tool_name: str = DEFAULT_TOOL_NAME, | ||
canonical_build_package_name: str = "setuptools-scm", | ||
_given_result: _t.GivenPyProjectResult = None, | ||
_given_definition: TOML_RESULT | None = None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
) -> PyProjectData: | ||
"""Read and parse pyproject configuration. | ||
|
||
|
@@ -195,7 +196,10 @@ def read_pyproject( | |
if isinstance(_given_result, (InvalidTomlError, FileNotFoundError)): | ||
raise _given_result | ||
|
||
defn = read_toml_content(path) | ||
if _given_definition is not None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The conditional logic for Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
defn = _given_definition | ||
else: | ||
defn = read_toml_content(path) | ||
|
||
requires: list[str] = defn.get("build-system", {}).get("requires", []) | ||
is_required = has_build_package(requires, canonical_build_package_name) | ||
|
@@ -224,6 +228,18 @@ def read_pyproject( | |
requires, | ||
) | ||
|
||
setuptools_dynamic_version = ( | ||
defn.get("tool", {}) | ||
.get("setuptools", {}) | ||
.get("dynamic", {}) | ||
.get("version", None) | ||
) | ||
if setuptools_dynamic_version is not None: | ||
warnings.warn( | ||
f"{path}: at [tool.setuptools.dynamic]\n" | ||
"version = {attr = ...} is sabotaging setuptools-scm" | ||
RonnyPfannschmidt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
) | ||
|
||
return pyproject_data | ||
|
||
|
||
|
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.
There are two
## v9.2.0
sections in the changelog, which will create confusion. The second one should likely be a different version number or these sections should be merged.Copilot uses AI. Check for mistakes.