-
-
Notifications
You must be signed in to change notification settings - Fork 227
combined preparation for the 6.3.0 release and a regression resolution #616
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
Merged
RonnyPfannschmidt
merged 14 commits into
pypa:main
from
RonnyPfannschmidt:fix-regressions
Sep 3, 2021
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
232ffc3
combined preparation for the 7.0.0 release and a regression resolution
RonnyPfannschmidt ba839c1
fix self install check deps
RonnyPfannschmidt d4d1621
Apply suggestions from code review
RonnyPfannschmidt 9681031
Update src/setuptools_scm/integration.py
RonnyPfannschmidt fe1765a
Update testing/Dockerfile.busted-buster
RonnyPfannschmidt f25d50a
restore support of old setuptools/pip while warning
RonnyPfannschmidt 1584862
Merge branch 'fix-regressions' of github.com:RonnyPfannschmidt/setupt…
RonnyPfannschmidt 8e9bd3a
changelog: update back to 6.3.0 after making things work
RonnyPfannschmidt 6419e77
add virtualenv to the ci pipelines
RonnyPfannschmidt 86d11ca
pre-commit update and extras require sync
RonnyPfannschmidt a17b8d1
add own ci job for legacy setuptools testing an skip it for normal tests
RonnyPfannschmidt 0d6dc8d
temporarily mark test_git_worktree_support as xfail
RonnyPfannschmidt 7ccb483
Update .github/workflows/python-tests.yml
RonnyPfannschmidt 7b65699
allow legacy setuptools tests to fail for now
RonnyPfannschmidt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
[build-system] | ||
requires = ["setuptools>=45", "wheel", "tomli"] | ||
requires = [ | ||
"setuptools>=45", | ||
"wheel", | ||
"tomli>=1.0", | ||
"packaging>=20.0" | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
try: | ||
from packaging.version import Version | ||
|
||
assert hasattr(Version, "release") | ||
except ImportError: | ||
from pkg_resources._vendor.packaging.version import Version as SetuptoolsVersion | ||
|
||
try: | ||
SetuptoolsVersion.release | ||
Version = SetuptoolsVersion | ||
except AttributeError: | ||
|
||
class Version(SetuptoolsVersion): # type: ignore | ||
@property | ||
def release(self): | ||
return self._version.release | ||
|
||
@property | ||
def dev(self): | ||
return self._version.dev | ||
|
||
@property | ||
def local(self): | ||
return self._version.local | ||
|
||
|
||
class NonNormalizedVersion(Version): | ||
"""A non-normalizing version handler. | ||
|
||
You can use this class to preserve version verification but skip normalization. | ||
For example you can use this to avoid git release candidate version tags | ||
("1.0.0-rc1") to be normalized to "1.0.0rc1". Only use this if you fully | ||
trust the version tags. | ||
""" | ||
|
||
def __init__(self, version): | ||
# parse and validate using parent | ||
super().__init__(version) | ||
|
||
# store raw for str | ||
self._raw_version = version | ||
|
||
def __str__(self): | ||
# return the non-normalized version (parent returns the normalized) | ||
return self._raw_version | ||
|
||
def __repr__(self): | ||
# same pattern as parent | ||
return f"<NonNormalizedVersion({self._raw_version!r})>" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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.
Also, on this block, mentioning what version is too old and going to produce the warning might be helpful. This starts by saying "warns on legacy" but then says "all releases are affected", it's really unclear, I think. Maybe I could suggest a new version?
This release explicitly warns on unsupported setuptools. When using the legacy ``setup_requires`` mechanism, you cannot request a newer setuptools than the one currently running (this was the reason PEP 517 and PEP 518 were written).
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.
all setuptools releases are affected by the issue, even those that dont trigger legacy problems
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.
Yes, but this is a general issue that has nothing to do with setuptools_scm, it's just easy to hit with it. The current message makes it sound like it's a major issue that most users will hit, while in actuality, now that 31+ is supported instead of 45+, it's only going to pop up in very old systems - which you should be unlikely to hit with Python 3.6+ (though possible). My suggested replacement makes it sound a little less drastic and pushes people gently toward PEP 517/518, which avoids triggering legacy behavior.