Skip to content

Commit

Permalink
Display a deprecation message for Python 2.7 and 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed Jul 17, 2020
1 parent d5a99f0 commit a1348c9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 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,15 @@ def __init__(self):
for command in self.get_default_commands():
self.add(command)

if sys.version_info[:2] < (3, 6):
self._preliminary_io.write_line(
"\n<fg=yellow>Python <fg=yellow;options=bold>{}</> will no longer be supported "
"in the next feature release of Poetry (<fg=yellow;options=bold>1.2</>).\n"
"You should consider updating your Python version to a supported one.</>\n".format(
".".join(str(v) for v in sys.version_info[:2])
)
)

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

0 comments on commit a1348c9

Please sign in to comment.