Skip to content
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

combined preparation for the 6.3.0 release and a regression resolution #616

Merged
merged 14 commits into from
Sep 3, 2021

Conversation

RonnyPfannschmidt
Copy link
Contributor

@RonnyPfannschmidt RonnyPfannschmidt commented Aug 29, 2021

this fixes the support for old setuptools while not starting to claim to support old setuptools

* fix pypa#612: depend on packaging to ensure version parsing parts
* fix pypa#611: correct the typo that hid away the toml extra and add it in ``setup.py`` as well
* fix pypa#615: restore support for the git_archive plugin which doesn't pass over the config
src/setuptools_scm/integration.py Outdated Show resolved Hide resolved
src/setuptools_scm/integration.py Outdated Show resolved Hide resolved
src/setuptools_scm/integration.py Outdated Show resolved Hide resolved
if int(_version.split(".")[0]) < 45:
raise SystemExit(
f"""
ERROR: setuptools=={_version} is used in combination with setuptools_scm>=6.x
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably read 7.x?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is 6.2 or 6.3 now?

* detach from packaging version parsing/class and integrate backward compat mixin
* move version classes to own internal module
* don't warn when pyproject.toml is missing
* consistently fetch dist name from setup.cfg
* extend warning with notes on minimal versions
* trace to stderr instead of stdout
* create extensive tests around running on old setuptools
@RonnyPfannschmidt RonnyPfannschmidt changed the title combined preparation for the 7.0.0 release and a regression resolution combined preparation for the 6.3.0 release and a regression resolution Sep 2, 2021
Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

If you want to make an RC release, I can try it out on a couple projects (though I'm going to be be heavily biased toward pyproject.toml projects, don't think I have any legacy ones).

.github/workflows/python-tests.yml Outdated Show resolved Hide resolved
next to ``setup.py``, which would install the required version of setuptools.

This mechanism has long since been deprecated and removed
as most people haven't been using it
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
as most people haven't been using it
as most people haven't been using it.

Copy link
Contributor

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).

Copy link
Contributor Author

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

Copy link
Contributor

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.

setup.cfg Show resolved Hide resolved
src/setuptools_scm/__init__.py Show resolved Hide resolved
src/setuptools_scm/integration.py Show resolved Hide resolved
if int(_version.split(".")[0]) < 45:
raise SystemExit(
f"""
ERROR: setuptools=={_version} is used in combination with setuptools_scm>=6.x
Copy link
Contributor

Choose a reason for hiding this comment

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

This is 6.2 or 6.3 now?

tox.ini Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants