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

python 3.12 in pipelines #7803

Merged
merged 2 commits into from
Sep 17, 2023
Merged

python 3.12 in pipelines #7803

merged 2 commits into from
Sep 17, 2023

Conversation

dimbleby
Copy link
Contributor

expecting this to fail per #7766, let's check that's true and see whether anything else shows up

@dimbleby
Copy link
Contributor Author

dimbleby commented Apr 30, 2023

not sure what's with the ubuntu and macos pipeline failure now, but the good news is that the __getattr__ that seems to be recursed on does not exist in the main branch of poetry-core - so with any luck releasing that will solve this.

(There's a corresponding __getattr__ now in poetry: I want to remove that too - but doing so only becomes possible when poetry-core is released. So probably clean 3.12 pipelines is just blocked on a poetry-core release)

I've no idea what the windows failure is about

Oh, this probably is all python/cpython#103272 and will go away in due course as the cpython fix makes its way out into the world

@dimbleby
Copy link
Contributor Author

getting closer

  • virtualenv behaves differently at python 3.12, per their changelog:

Do not install wheel and setuptools seed packages for Python 3.12+. To restore the old behaviour use:

for wheel use VIRTUALENV_WHEEL=bundle environment variable or --wheel=bundle CLI flag,
for setuptools use VIRTUALENV_SETUPTOOLS=bundle environment variable or --setuptools=bundle CLI flag.

By @chrysle. (#2487)

so I suppose code needs writing to deal with that. (I'm not in any hurry to get there, if anyone would like to contribute then please don't wait on me)

and there's still something screwy on windows which I haven't looked at but I imagine is likely someone else's bug that will be sorted in due course. Probably.

@dimbleby dimbleby force-pushed the ci-3.12 branch 3 times, most recently from 027a034 to 747bd09 Compare June 20, 2023 18:50
@dimbleby
Copy link
Contributor Author

looks like whatever the screwy thing was on windows has now gone away, so all that is left is the virtualenv behaviour change

@dimbleby dimbleby force-pushed the ci-3.12 branch 5 times, most recently from 46a6aca to 7aa5dc3 Compare June 20, 2023 20:08
@dimbleby dimbleby force-pushed the ci-3.12 branch 2 times, most recently from 1cd80c1 to a491269 Compare August 6, 2023 12:15
@dimbleby dimbleby force-pushed the ci-3.12 branch 9 times, most recently from 0f3629f to 15d0428 Compare September 3, 2023 14:05
@dimbleby
Copy link
Contributor Author

dimbleby commented Sep 3, 2023

re the virtualenv behaviour change I've taken the view that poetry should roll with it and head in the same direction of not installing setuptools and wheel in new environments, certainly on new python.

then there's a bit of a rework to make sure that they are installed in the one case where poetry itself wants them

a behaviour change here is that poetry no longer automatically installs wheel by default alongside pip, this really shouldn't be necessary. (By way of comparison, python -m venv does not install wheel). I suppose we could continue to install wheel at python < 3.12, but that seems likely to cause more confusion than it solves.

@radoering
Copy link
Member

re the virtualenv behaviour change I've taken the view that poetry should roll with it and head in the same direction of not installing setuptools and wheel in new environments, certainly on new python.

I agree.

I suppose we could continue to install wheel at python < 3.12, but that seems likely to cause more confusion than it solves.

Not sure about that. I have no idea if there are users who rely on it but I suppose from a user perspective it would be more like a clean cut to keep setuptools and wheel for < 3.12 and drop it only for >= 3.12. On the other side, the current design is quite weird because we don't have a no-wheel config option and introducing it now does not seem very alluring so maybe just risk the hassle.

@dimbleby
Copy link
Contributor Author

dimbleby commented Sep 9, 2023

I'm pretty sure that putting setuptools and wheel into the project environment shouldn't be useful for anyone in the modern world of isolated builds. (Except those who have forgotten to declare the dependency and have been getting away with it because of this behaviour: but those people should fix their dependencies.)

In the long run it's probably desirable to lose any options or code that make a special case of those packages, but I've tried to rein in any such ambitions in this merge request...

3.12.0 is due at the start of October. While there's obviously no obligation to be instantly ready for that, it is approaching time to make any decisions that need making.

@Secrus
Copy link
Member

Secrus commented Sep 11, 2023

My take on that would be that we should only leave pip in the project environment, starting from now. Since this is now a default for Python 3.12+, I don't see why we should stick to a different set of rules. I would add a note about that in the next release blog post and changelog and add deprecation/future warning to the environment creation code, that we will be removing setuptools and wheel installation in project venv for older pythons in let's say, 2 releases.

@radoering radoering added the impact/docs Contains or requires documentation changes label Sep 11, 2023
@github-actions
Copy link

github-actions bot commented Sep 11, 2023

Deploy preview for website ready!

✅ Preview
https://website-2u94c2f73-python-poetry.vercel.app

Built with commit 73501aa.
This pull request is being automatically deployed with vercel-action

@radoering
Copy link
Member

I would add a note about that in the next release blog post and changelog

Agreed. We should mention the difference between Python 3.12 and older versions, as well as the removal of wheel for older versions (if we merge the PR as is).

and add deprecation/future warning to the environment creation code, that we will be removing setuptools and wheel installation in project venv for older pythons in let's say, 2 releases.

I don't think it's necessary to change the behavior for setuptools. Of course, we could, but I wouldn't spend the effort but just let the old behavior fade out together with the older Python versions.

wheel is already removed (as per this PR) and it would require additional effort to keep the old behavior for older Python versions. I don't think the changed behavior is a big thing, so I'd probably go with dimbleby and risk this change.

so that it is possible to force installation of setuptools and wheel
@radoering radoering merged commit 0c31913 into python-poetry:master Sep 17, 2023
32 checks passed
@dimbleby dimbleby deleted the ci-3.12 branch September 17, 2023 12:35
@radoering radoering mentioned this pull request Sep 28, 2023
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact/docs Contains or requires documentation changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants