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.7 and 3.5 deprecation #2683

Merged
merged 2 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ ensuring you have the right stack everywhere.

![Poetry Install](https://github.com/raw/python-poetry/poetry/master/assets/install.gif)

It supports Python 2.7 and 3.4+.
It supports Python 2.7 and 3.5+.

**Note**: Python 2.7 and 3.5 will no longer be supported in the next feature release (1.2).
You should consider updating your Python version to a supported one.

[![Tests Status](https://github.com/python-poetry/poetry/workflows/Tests/badge.svg?branch=master&event=push)](https://github.com/python-poetry/poetry/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)

Expand Down
7 changes: 6 additions & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ It allows you to declare the libraries your project depends on and it will manag

## System requirements

Poetry requires Python 2.7 or 3.4+. It is multi-platform and the goal is to make it work equally well
Poetry requires Python 2.7 or 3.5+. It is multi-platform and the goal is to make it work equally well
on Windows, Linux and OSX.

!!! note

Python 2.7 and 3.5 will no longer be supported in the next feature release (1.2).
You should consider updating your Python version to a supported one.


## Installation

Expand Down
20 changes: 20 additions & 0 deletions poetry/console/application.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from cleo import Application as BaseApplication

from poetry.__version__ import __version__
Expand Down Expand Up @@ -38,6 +40,24 @@ def __init__(self):
for command in self.get_default_commands():
self.add(command)

if sys.version_info[:2] < (3, 6):
python_version = "<c1>{}</c1>".format(
".".join(str(v) for v in sys.version_info[:2])
)
poetry_feature_release = "<c1>1.2</c1>"
message = (
"\n"
"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"
""
"Note that you will still be able to manage Python {} projects "
"by using the <c1>env</c1> command.\n"
"See <fg=blue>https://python-poetry.org/docs/managing-environments/</> "
"for more information."
).format(python_version, poetry_feature_release, python_version)
self._preliminary_io.write_line("<fg=yellow>{}</>\n".format(message))

@property
def poetry(self):
from poetry.factory import Factory
Expand Down