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

.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: #2106

Closed
JulianChia opened this issue Feb 28, 2020 · 9 comments
Closed
Labels
kind/bug Something isn't working as expected

Comments

@JulianChia
Copy link

After installing Poetry with:

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

or

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3

I see this warning:

$ poetry --version
~/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
Poetry version 1.0.3
$ uname -srvmo
Linux 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 GNU/Linux

Not sure why there is this warning???

@JulianChia JulianChia added the kind/bug Something isn't working as expected label Feb 28, 2020
@babuloseo
Copy link

Try using Python3
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3

@JulianChia
Copy link
Author

JulianChia commented Mar 2, 2020

@babuloseo As mentioned above, it gave the warning as mentioned above, except that it is now poetry version 1.0.5:

$ poetry --version
~/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
Poetry version 1.0.5

It is strange that py2.7 is used for a python3 install.

@finswimmer
Copy link
Member

Hello,

both things are described in several issues here. But I took this to investigate the subprocess32 thing a bit more.

There are a few hits about this, when searching the web. It looks like the _posixsubprocess module needs to be compiled during install subprocess32. When vendoring the resulting package, and therefor transport it to a different system than it was compiled, seems to be a problem.

Nevertheless poetry seems to work fine despite of this message. So one could ignore it.

If you really want to get rid of it, I've found a workaround: You have to create your own vendor on the target system:

$ python -m pip install subprocess32 --no-deps --target ~/.poetry/lib/poetry/_vendor/py2.7 --upgrade

@wohali
Copy link

wohali commented Mar 25, 2020

One small edit to the get-poetry.py script fixes this:

#1494 (comment)

Make that change, then invoke python3 get-poetry.py.

@adonmez16
Copy link

  1. download get-poetry.py:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry.py

  1. Edit get-poetry.py on line 200:
    from BIN = """#!/usr/bin/env python to BIN = """#!/usr/bin/env python3

ps. f-string modification doesn't work on Python3.8

@wohali
Copy link

wohali commented May 26, 2020

My fork addresses this: #2222

Hopefully #2222 or #1494 will get merged.

@rinoguchi
Copy link

rinoguchi commented Jun 16, 2020

When I downloaded the latest get-poetry.py and installed by python3 get-poetry.py in Ubuntu, same error still occurred.

$ poetry --version
/home/xxx/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
Poetry version 1.0.9

I changed get-poetry.py as follows (around L.593), and this problem was solved.

-        allowed_executables = ["python", "python3"]
+        allowed_executables = ["python3", "python"]

@finswimmer
Copy link
Member

The new install-poetry.py script shouldn't have this issue. Furthermore python2 support is dropped by the upcoming version 1.2.

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
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

6 participants