-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
AttributeError: 'Version' object has no attribute 'release'
after upgrade to 6.1.0
#605
Comments
I'll get to debugging this as soon as the toddler is sleeping |
I'll leave it up to maintainers to provide a definitive answer, but it looks like this occurs because of an incompatibility between an old version of Tl;dr upgrade setuptools to |
I suspect its a missed compatibility test between setuptools and packaging, please try a setuptools update as well (i believe i missed that old setuptools vendors a too old packaging) Any setuptools that tries to use pip instead of easy install is likely recent enough |
@crockeo thanks for verifying my suspicion faster than I send it out |
Just dealt with a support ticket about this earlier today, so I wanted to share my findings upstream 🙂 |
yanked the release now that i'm back at the computer, will work on a fix now |
i finished analysis - setuptools is ignoring the requirement for the line in https://github.com/pypa/setuptools_scm/blob/main/setup.py#L31 should have sorted the issue, it didn't |
setup.py isn't run (or included) when you install from a wheel, so virtually no one should see that error. |
@henryiii the error happens in a build egg location, so it is executed |
CI is currently failing: * <lowRISC#7952> * <pypa/setuptools_scm#605> While this isn't necessarily the correct direct fix, it seems like it would be better for the Docker image build to be aligned with ci/install-build-deps.sh (which will always update to the latest pip and setuptools). Signed-off-by: Alex Bradbury <asb@lowrisc.org>
CI is currently failing: * <lowRISC#7952> * <pypa/setuptools_scm#605> While this isn't necessarily the correct direct fix, it seems like it would be better for the Docker image build to be aligned with ci/install-build-deps.sh (which will always update to the latest pip and setuptools). Also, as a test, install python deps with --user (which also better aligns with the CI dependency installation). Signed-off-by: Alex Bradbury <asb@lowrisc.org>
On Debian venv creation uses a fairly old version of setuptools: /usr/bin/python3 -m venv --upgrade /tmp/venv; /tmp/venv/bin/pip list Package Version ------------- ------- pip 20.3.4 pkg-resources 0.0.0 setuptools 44.1.1 This can cause issues installing packages, e.g. pypa/setuptools_scm#605 Upgrade setuptools in addition to pip. This matches the builtin behavior of venv when passing the new --upgrade-deps option, which we could eventually use to have these packages upgraded automatically upon venv creation. Also log the output of the upgrade as this might be useful later. Debugging bootstrap is quite a bit harder when all of the output is discarded. No-Docs-Update-Reason: bug fix Change-Id: I3c13ccef171f5e9d17b6781341568e7b9909a161 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/58520 Commit-Queue: Michael Spang <spang@google.com> Reviewed-by: Rob Mohr <mohrr@google.com>
setuptool_scm>=6.1 has had issues with external dependencies and changing extras pypa/setuptools_scm#611 pypa/setuptools_scm#605
I'd suggest finding a way to retain compatibility with older setuptools as virtualenvs with older setuptools than you require are produced by default on every system I've tried. |
(Not that I like being stuck with old versions of things, but I agree - upgrading setuptools as a requirement has always been very hard to do. It's solved by PEP 517, but not everyone is using that (though I'm not sure why not).) |
* Cap setuptools_scm <6.1 setuptool_scm>=6.1 has had issues with external dependencies and changing extras pypa/setuptools_scm#611 pypa/setuptools_scm#605 * Add release note * also update pyproject.toml
* Cap setuptools_scm <6.1 setuptool_scm>=6.1 has had issues with external dependencies and changing extras pypa/setuptools_scm#611 pypa/setuptools_scm#605 * Add release note * also update pyproject.toml (cherry picked from commit 5b8d345) # Conflicts: # setup.py
* Cap setuptools_scm <6.1 setuptool_scm>=6.1 has had issues with external dependencies and changing extras pypa/setuptools_scm#611 pypa/setuptools_scm#605 * Add release note * also update pyproject.toml (cherry picked from commit 5b8d345) # Conflicts: # setup.py
* Cap setuptools_scm <6.1 (#2816) * Cap setuptools_scm <6.1 setuptool_scm>=6.1 has had issues with external dependencies and changing extras pypa/setuptools_scm#611 pypa/setuptools_scm#605 * Add release note * also update pyproject.toml (cherry picked from commit 5b8d345) # Conflicts: # setup.py * Update setup.py * Update setup.py Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
* Cap setuptools_scm <6.1 (#2816) * Cap setuptools_scm <6.1 setuptool_scm>=6.1 has had issues with external dependencies and changing extras pypa/setuptools_scm#611 pypa/setuptools_scm#605 * Add release note * also update pyproject.toml (cherry picked from commit 5b8d345) # Conflicts: # setup.py * Update setup.py * Update setup.py Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
Pip installation that was working with python36-devel stopped working while called via DockerFile. And I tried setuptools latest version, still it throws AttributeError: 'Version' object has no attribute 'release'. Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tzjqsevs/petl/ Can someone please let me know any options worth trying to get back working pip installations via docker |
@muthu-tech update pip and setuptools |
@RonnyPfannschmidt I did that . I have ,
and first entry in requirements.txt has setuptools==57.4.0 And it throws ERROR: Could not install packages due to an OSError: [Errno 39] Directory not empty: 'pycache' FYI, these commands are inside a dockerfile and pip installations were working fine until last week and right now they are broken. |
Update setuptools first in requirements is too late |
Looks like setuptools_scm broke its compatibility with older setuptools. See pypa/setuptools_scm#605. Recommended solution is to upgrade pip and setuptools to newest version. Since we're upgrading setuptools on our Linux CI anyway, do the same on appveyor.
Doing as instructed here More info at pypa/setuptools_scm#605
We have jobs in CI that depend on the latest version of this extension and so as soon as 6.1.0 became available on PyPI we started hitting the following error:
Our
setup.py
has the followingand we also have
in
install_requires
.The text was updated successfully, but these errors were encountered: