Skip to content

Support Python 3.9 #2154

@cjolowicz

Description

@cjolowicz
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

It would be great if Poetry could support Python 3.9 early on, to allow testing projects against the upcoming Python version. Python 3.9 is currently in its alpha phase, with the final release planned for 2020-10-05 (see Release Schedule).

Currently Poetry cannot be run under Python 3.9 because this Python version is not included in the vendorized dependencies. The workaround for this is to install Poetry using pip. Here is a minimal Dockerfile to reproduce the issue:

FROM python:3.9.0a4
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
ENV PATH /root/.poetry/bin:$PATH
ENTRYPOINT ["poetry"]
$ docker build -t poetry .

$ docker run --rm -ti poetry --version
Traceback (most recent call last):
  File "/root/.poetry/bin/poetry", line 12, in <module>
    from poetry.console import main
  File "/root/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
    from .application import Application
  File "/root/.poetry/lib/poetry/console/application.py", line 1, in <module>
    from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo'

$ docker run --rm -ti --entrypoint sh poetry
# ls /root/.poetry/lib/poetry/_vendor
py2.7  py3.5  py3.6  py3.7  py3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions