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
setuptools 8.4 breaks non-pip upgrades #314
Comments
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): @richardipsum can you look into the cause of this and devise a workaround? I suspect the issue has to do with metadata from 8.4 applying to an installation from 8.3 or earlier which doesn't implement the writer. |
Original comment by tseaver (Bitbucket: tseaver, GitHub: tseaver): Reproducing:
|
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): I've pulled Setuptools 8.4 from PyPI and pinned the bootstrap script to 8.3 for now while the issue is investigated. I've put a copy of 8.4 in the Downloads section, so the script to reproduce should now use
in place of
|
Original comment by jamilappa (Bitbucket: jamilappa, GitHub: Unknown): The bootstrap script at https://bootstrap.pypa.io/ez_setup.py still refers to 8.4 can you fix this. Thanks. |
Original comment by richardipsum (Bitbucket: richardipsum, GitHub: richardipsum): Sorry about this :/ |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):
That's probably my oversight. I moved the bootstrap bookmark on the repo and pushed it to github, but I didn't push it to bitbucket, and I'm guessing that's the repo the bootstrap site uses. It should be corrected in the next 12 minutes. |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): @richardipsum, Don't sweat it. These problems crop up, and there doesn't seem to be anything inherent about your work that was implicated here. I had some more time to think about this issue this morning, and I think the issue is this - when easy_install is invoked, it imports the installed setuptools (<8.4). That code locates, downloads, and extracts the sdist, and then using the 'sandbox' logic, namely at easy_install.py:1045, the setup.py is invoked. But because setuptools is already in sys.modules, the sandbox invocation works gets the old module and not the one just downloaded, but it still gets the most recent metadata (egg_info). I imagined there would be a straightforward workaround, but as I think about it more, I don't think there is. Best I can imagine, any technique I've yet conceived would have to have already been present in the old code. I suspect we will have to back out this change, make new releases to support this type of update, allow them to trickle through the community, and only then release the updated behavior. I wonder if it's possible to reload the setuptools package (and all of its modules) from sys.modules in the sandbox runner. I don't know what happens when modules that are running code are removed from sys.modules. I'm also tempted to abandon the sandbox runner for a subprocess runner, which seems to be the most popular technique for invoking isolated behavior. I don't know what implications that would have. I invite @pje to comment on the issue, as he may have encountered this in past releases or have other experiences to relate. |
Original comment by alex_gaynor (Bitbucket: alex_gaynor, GitHub: Unknown): |
Original comment by jbbarth_ (Bitbucket: jbbarth_, GitHub: Unknown):
Just a quick note about this, please be aware that some (private) pypi mirrors don't keep up with that kind of strategies. Actually mine at work is broken because it still has 8.4 in the index, and it tries to download 8.4 from pypi which leads to a 404. And I'm having a hard time understanding how it works. Don't you think it would be a better strategy to release a 8.4.1 or 8.5 which would be the same as 8.3 ? That's a naive question honestly, I'm a python newbie and I'd understand if you have valid reasons to pull the release like you did. Good luck for the bugs ! :-) |
Originally reported by: tseaver (Bitbucket: tseaver, GitHub: tseaver)
Both zc.buildout and easy_install fail to update to setuptools 8.4 with tracebacks like so:
The text was updated successfully, but these errors were encountered: