asdf-community / asdf-poetry

Poetry plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
77 stars 16 forks source link

Support Installation of Poetry 1.1.x #19

Closed Kurt-von-Laven closed 2 years ago

Kurt-von-Laven commented 2 years ago

asdf install poetry 1.1.15 began failing with the release of Poetry 1.2.0, because support for installation via get-poetry.py was removed. This plugin should use the new https://install.python-poetry.org installer for Poetry 1.1.7 and later as recommended by the official Poetry 1.1 documentation. Currently the plugin only uses the new installer for Poetry 1.2+.

Retrieving Poetry metadata

This installer is deprecated, and cannot install Poetry 1.2.0a1 or newer.
Additionally, Poetry installations created by this installer cannot `self update` to 1.2.0a1 or later.
You should migrate to https://install.python-poetry.org instead. Instructions are available at https://python-poetry.org/docs/#installation.

This installer will now exit. If you understand the above warning and wish to proceed anyway, set GET_POETRY_IGNORE_DEPRECATION=1 in the environment and run this installer again.
python 3.10.6 is already installed
Kurt-von-Laven commented 2 years ago

I am actually still observing the same issue installing Poetry 1.1.15 after upgrading the plugin. Installing Poetry 1.2.0 works for me at least.

Kurt-von-Laven commented 2 years ago

From python-poetry/poetry#6314, it looks like Poetry added some extra hoops to using the old installer in an effort to drive adoption of the new installer. I don't see why that would impact installation of Poetry 1.1.15 using the new installer though.

crflynn commented 2 years ago

I tested myself and it seems to work:

$ asdf plugin update poetry
Updating poetry to master
Already on 'master'
Your branch is up to date with 'origin/master'.

$ asdf install poetry 1.1.15
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/Users/cflynn/.asdf/installs/poetry/1.1.15/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.1.15): Done

Poetry (1.1.15) is installed now. Great!

To get started you need Poetry's bin directory (/Users/cflynn/.asdf/installs/poetry/1.1.15/bin) in your `PATH`
environment variable.

Add `export PATH="/Users/cflynn/.asdf/installs/poetry/1.1.15/bin:$PATH"` to your shell configuration file.

Alternatively, you can call Poetry explicitly with `/Users/cflynn/.asdf/installs/poetry/1.1.15/bin/poetry`.

You can test that everything is set up by executing:

`poetry --version`

Warning: Poetry versions prior to 1.2.0 may not work properly with asdf.
Consider upgrading to a later version.
https://github.com/asdf-community/asdf-poetry/issues/10

I'm not sure how it would be using the old installer with the changes we made.

Kurt-von-Laven commented 2 years ago

I get the same result as you when retrying installation of Poetry 1.1.15. No idea what went wrong, but I assume the failure I observed was unrelated to this plugin one way or another.