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 2 used, then warned about, for all new installs #3519

Closed
ron-wolf opened this issue Dec 30, 2020 · 4 comments
Closed

Python 2 used, then warned about, for all new installs #3519

ron-wolf opened this issue Dec 30, 2020 · 4 comments

Comments

@ron-wolf
Copy link

The warning presented by the following piece of code appears every time I run Poetry:

"Python {} will no longer be supported "
"in the next feature release of Poetry ({}).\n"
"You should consider updating your Python version to a supported one.\n\n"

However, the Python executable used to run Poetry was set to python (the Python 2 command) when I installed it:

python_executable = self._which_python()
f.write(u("#!/usr/bin/env {}\n".format(python_executable)))

This is because I ran get-poetry.py using python, as instructed in the docs:

### osx / linux / bashonwindows install instructions
```bash
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
```

It seems like this is the only place that the version of Python is hard-coded, as the only other place the Python executable or version is referenced is console/commands/self/update.py (lines 49 and 265–282). Do I just manually change the shebang at the top of $POETRY_HOME/bin/poetry to read #!/usr/bin/env python3? Or will this be done for me automatically when Poetry 1.2 is installed?

@finswimmer
Copy link
Member

Hello @ron-wolf,

as @sinoroc showed, this topic already exists. That's why I'm closing yours.

fin swimmer

@MPvHarmelen
Copy link

@finswimmer, I would want to vouch for reopening this issue: the related issues mentioned by @sinoroc are indeed related, but do not cover the fact that the recommended way of installing poetry leads to warnings on systems that already support python3.

  1. The installation instructions mention explicitly that installing using get-poetry.py is the recommended way:

    Poetry provides a custom installer that will install poetry isolated from the rest of your system by vendorizing its dependencies. This is the recommended way of installing poetry.

  2. After having run the recommended installation, practically any invocation of poetry leads to the deprecation warning mentioned above.

While #3029, #522 and #3288 are about configuring the used python version and #3184 is about changing the default version (of which most are possible solutions to this issue), this issue is about making sure the recommended way of installing does not lead to warnings on supported systems, irrespective of the solution.

Importantly, the solution to this issue should not require configuration using other programs (like pyenv). Put frankly: the recommended way of installing poetry should "Just Work™".

Copy link

github-actions bot commented Mar 2, 2024

This issue 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants