Skip to content

Commit

Permalink
Merge pull request #1488 from deathbybandaid/py2_warning
Browse files Browse the repository at this point in the history
Py2 warning
  • Loading branch information
dgw authored Mar 22, 2019
2 parents 4aba0f2 + 3f04898 commit 3ac3e65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Sopel requires ``backports.ssl_match_hostname`` to be installed. Use
``yum install python-backports.ssl_match_hostname`` to install it, or download
and install it manually `from PyPI <https://pypi.org/project/backports.ssl_match_hostname>`_.

Note: Python 2.x is near end of life. Sopel support at that point is TBD.

In the source directory (whether cloned or from the tarball) run
``setup.py install``. You can then run ``sopel`` to configure and start the
bot. Alternately, you can just run the ``sopel.py`` file in the source
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# Maybe not the cleanest or best way to do this, but I'm tired of answering
# this fucking question, and if you get here you should go RTGDMFM.
raise ImportError('Sopel requires Python 2.7+ or 3.3+.')
if sys.version_info.major == 2:
print('Warning: Python 2.x is near end of life. Sopel support at that point is TBD.', file=sys.stderr)


def read_reqs(path):
Expand Down
2 changes: 2 additions & 0 deletions sopel/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
if sys.version_info < (2, 7):
tools.stderr('Error: Requires Python 2.7 or later. Try python2.7 sopel')
sys.exit(1)
if sys.version_info.major == 2:
tools.stderr('Warning: Python 2.x is near end of life. Sopel support at that point is TBD.')
if sys.version_info.major == 3 and sys.version_info.minor < 3:
tools.stderr('Error: When running on Python 3, Python 3.3 is required.')
sys.exit(1)
Expand Down

0 comments on commit 3ac3e65

Please sign in to comment.