-
Notifications
You must be signed in to change notification settings - Fork 20
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
install-poetry.py
: Use for 1.1.9
and up
#14
Conversation
This operates independently of poetry releases so it can pull bugfixes merged outside of poetry's own release cadence. See also: - https://github.com/python-poetry/install.python-poetry.org - python-poetry/poetry#3345 (comment) In conjunction with asdf-community#14 this gets python 3.10 working with poetry 1.1.11 where ModuleNotFoundError: No module named 'cleo' was raised.
install-poetry.py
: Use for 1.1.7
and upinstall-poetry.py
: Use for 1.1.9
and up
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.
I am not affiliated with asdf, asdf-poetry, or Poetry, but this looks good to me.
This operates independently of poetry releases so it can pull bugfixes merged outside of poetry's own release cadence. See also: - https://github.com/python-poetry/install.python-poetry.org - python-poetry/poetry#3345 (comment) In conjunction with asdf-community#14 this gets python 3.10 working with poetry 1.1.11 where ModuleNotFoundError: No module named 'cleo' was raised.
I'm testing some changes locally starting with this PR.
I'm able to repro this, and while it does fix the cleo error, it also expands issue #10 for ^1.1.9 on python <3.10.
Not able to repro this. Is there a specific python version I should be using/installing with? |
@crflynn Taking a look |
Happened with with I can also set it to 1.1.7 in this PR if it was just me
You can reproduce with this
The bug happens here: python-poetry/poetry#4409 (comment) |
This operates independently of poetry releases so it can pull bugfixes merged outside of poetry's own release cadence. See also: - https://github.com/python-poetry/install.python-poetry.org - python-poetry/poetry#3345 (comment) In conjunction with asdf-community#14 this gets python 3.10 working with poetry 1.1.11 where ModuleNotFoundError: No module named 'cleo' was raised.
This operates independently of poetry releases so it can pull bugfixes merged outside of poetry's own release cadence. See also: - https://github.com/python-poetry/install.python-poetry.org - python-poetry/poetry#3345 (comment) In conjunction with asdf-community#14 this gets python 3.10 working with poetry 1.1.11 where ModuleNotFoundError: No module named 'cleo' was raised.
1.1.7 and 1.1.8 will run afoul of python-poetry/poetry#4409 and the needed fix isn't in until 1.1.9.
06acefb
to
13369e6
Compare
I'm reluctant to merge this because:
and I would rather not further break the functionality of this plugin on what I would guess is currently a more common situation for users than ^1.1.9 on python=3.10. You point out some discussion here #15 (comment) which seems to be related to #10 and indicates an incoming fix in poetry 1.2. Since we have 1.2+ on the new installer perhaps it's better wait for that release and inform users that in order to use python 3.10 they must be using at least poetry 1.2. |
The plugin is broke 1.1.9 - 1.1.11 with python 3.10 currently, this is a patch to add support for those systems.
Can you rephrase? Is it a plugins place to tell the user / developers what python version and poetry version to use? 1.1.9 - 1.1.11 is broke for me without this patch. I am not sure how this would further break functionality. 1.1.9 - As-is:
1.1.9 - WIth PR:
1.1.11 - Without this patch (as-is):
1.11 - With this patch
|
I think you are misunderstanding that issue #10 has nothing to do with the cleo bug. Rather it has to do with poetry not using the python version specified by asdf when creating venvs if it was installed with the new installer, essentially breaking the expected behavior of asdf with python in this particular case. I understand that this fixes the cleo bug with 3.10. However it makes #10 worse because now the issue applies to ^1.1.9 rather than just ^1.2.0. |
My mistake, I misunderstand / don't understand the #10 issue. @Kurt-von-Laven you were on the threads relating to the other bug (with virtualenv versions) at python-poetry/poetry#1888 (comment), python-poetry/poetry#4199 (comment). Do you have any preferences or ideas? If you try this PR / approach how does it work for you in terms of the virtualenv + python interpreter issue? |
To summarize briefly, when poetry is installed with the new installer: if you set your asdf python version to |
In case this is helpful context, I encountered the cleo bug when attempting to upgrade to Poetry 3.10 and was advised to reinstall Poetry using the version of
This matches my understanding. I can't claim credit for the workaround, and I've lost track of who first posted it at this point, but I have used it enough times that I'm confident it addresses the issue of Poetry installed via
I would either simply keep using the |
@Kurt-von-Laven If this PR was scoped to python 3.10 (and beyond?), would that be sufficient? (since python 3.10 is DOA on installation with get-poetry.py method) Assuming the detection of python version wasn't reliable for some reason (python shims for instance) where do you stand on this PR as is? |
@tony, that is a good point; thanks for bringing that up. When I approved this PR I was under the mistaken impression that all of the needed patches were to |
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.
See my comment immediately above.
@Kurt-von-Laven It would be helpful to have something more succinct, if possible.
I'm using it right now on multiple systems with 10+ large projects with different python versions. poetry 1.1.11 (at least) is compatible with 3.10 the plugin is crashing outright and this PR fixes it. It adds 3.10 support for Python 1.1.9 - 1.1.11. |
@Kurt-von-Laven The reason why is right now what we have threads that I'm having difficulty wrapping my head around. Would @crflynn's summarization at #14 (comment) describe what you're experiencing? |
Until another version of Poetry 1.2 is released, I would keep the asdf Poetry plugin as is but add some warnings about needing Poetry 1.2 for Python 3.10 and using
Right, so my understanding is that it's really any version of Poetry (I think) installed via the |
@Kurt-von-Laven Thank you!
So users with poetry 1.1 be able to use python 3.10? As another option: perhaps a |
Probably only those that read this thread for now unfortunately? I think the warning should be clear enough about the fact that those users can upgrade to Poetry 1.2 or downgrade to Python 3.9 though. I agree that it's a regrettable situation. I suppose part of the beauty of asdf is that if someone really must use Python 3.10 with Poetry 1.1, they can use your (or their own) fork of the asdf Poetry plugin instead.
I am quite new to the asdf ecosystem, but I'm not aware of other plugins that take special options like this, and to my mind one of the principal selling points of asdf is that it exposes the same interface to version management of so many different tools. It's probably better that someone with more experience with asdf weigh in though. |
Thank you!
I went with something It uses an optional, environmental variable: For a common plugin example: |
That is pretty compelling to me at least. |
Part 1 of 2 fix for #10 / python-poetry/poetry#3345
Error:
ModuleNotFoundError: No module named 'cleo'
, Versions: Python 3.10 and poetry 1.1.9 - 1.1.11 duringpoetry
invocation'Link' object has no attribute 'is_absolute'
poetry 1.1.7 - 1.1.8 duringpoetry install
ofpycparser==0.20.0
See also: