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

Prefer active Python on Poetry 1.2+ #22

Closed Kurt-von-Laven closed 2 years ago

Kurt-von-Laven commented 2 years ago

Fixes #10.

Set experimental virtualenvs.prefer-active-python config option, newly introduced in Poetry 1.2.0, to true globally on Poetry 1.2+. Instruct Poetry to use the active version of Python rather than the version of Python that was active at the time the virtualenv was created. Spare the end developer the hassle of running poetry env use "$(asdf which python)" or blowing away and recreating their virtualenv when swapping Python versions.

crflynn commented 2 years ago

Hey @Kurt-von-Laven I actually beat you to this change. If you wouldn't mind in your other PR, the next step is to set two different version comparisons, one for the installer, and one for the new configuration post-install. If you make those changes we can merge #20

Kurt-von-Laven commented 2 years ago

Closing since this duplicates #21. Will rebase #20 as you mentioned.