Problem vendoring subprocess32 in Ubuntu
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
Ubuntu 16.04/18.04:
Issue
I’m building a Dockerfile and am seeing a RuntimeWarning after running any poetry command that works with the venv. Since I’m using poetry to run a web server (gunicorn), I’m worried that this could have a negative impact on app performance. I haven’t seen this before, so it appears to have been introduced recently?
The warning:
/root/.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)
I installed poetry using the get-poetry.py
script, and have even updated to the latest version. Here is the Dockerfile that I’m using, and the relevant output:
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
software-properties-common \
curl \
htop \
python \
python-dev \
wget
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
ENV PATH=$PATH:/root/.poetry/bin
RUN poetry self:update --preview
RUN poetry version
And the output for the final command…
$: poetry version
/root/.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)
[ImportError]
No module named pkg_resources
Issue Analytics
- State:
- Created 4 years ago
- Reactions:26
- Comments:26 (8 by maintainers)
Top GitHub Comments
I’m having same issue, Debian current, Python 3.7.4
Editing ~/.poetry/bin/poetry and changing “/usr/bin/env python” to “/usr/bin/env python3” fix it, but this will be probably overridden after next self:update
Shouldn’t we use?
#!/usr/bin/env python3
I don’t know if we should use a fallback version to python2 but seems reasonable to support python3 only.