Skip to content
Permalink
Browse files

Remove support for Python 2.7

  • Loading branch information...
bboe committed Jul 4, 2019
1 parent 3756dcc commit eda3c8ec5fe7579f733f128ab0e5ee58b3dc6944
@@ -89,7 +89,7 @@ import sys
import traceback
from prawcore import NotFound
import six
import requests
from ...const import API_PATH
from ..listing.mixins import SubmissionListingMixin
@@ -15,7 +15,6 @@ jobs:
stage: lint
language: python
python:
- 2.7
- 3.5
- 3.6
- 3.7
@@ -15,6 +15,11 @@ Unreleased
* :meth:`~.Submission.crosspost` support parameter ``spoiler`` to
mark the submission as a spoiler immediately upon crossposting.


**Removed**

* Drop official support for Python 2.7.

6.3.1 (2019/06/10)
------------------

@@ -26,7 +26,7 @@ agent and you're set.
Installation
------------

PRAW is supported on python 2.7, 3.3, 3.4, 3.5 and 3.6. The recommended way to
PRAW is supported on python 3.5+. The recommended way to
install PRAW is via `pip <https://pypi.python.org/pypi/pip>`_.

.. code-block:: bash
@@ -1,8 +1,7 @@
Installing PRAW
===============

PRAW supports python 2.7, 3.3, 3.4, 3.5, and 3.6. The recommended way to
install PRAW is via ``pip``.
PRAW supports python 3.5+. The recommended way to install PRAW is via ``pip``.

.. code-block:: bash
@@ -8,9 +8,8 @@ easy. Let's get started.
Prerequisites
-------------

:Python Knowledge: You need to know at least a little Python to use PRAW; it's
a Python wrapper after all. PRAW supports `Python 2.7`_, and
`Python 3.3 to 3.6`_. If you are stuck on a problem,
:Python Knowledge: You need to know at least a little Python to use PRAW; it's a Python wrapper
after all. PRAW supports `Python 3.5+`_. If you are stuck on a problem,
`/r/learnpython`_ is a great place to ask for help.

:Reddit Knowledge: A basic understanding of how `reddit.com`_ works is a
@@ -35,8 +34,7 @@ Prerequisites
more about user-agents at `Reddit's API wiki page`_.


.. _`Python 2.7`: https://docs.python.org/2/tutorial/index.html
.. _`Python 3.3 to 3.6`: https://docs.python.org/3/tutorial/index.html
.. _`Python 3.5+`: https://docs.python.org/3/tutorial/index.html
.. _`/r/learnpython`: https://www.reddit.com/r/learnpython/
.. _reddit.com: https://www.reddit.com
.. _FAQ: https://www.reddit.com/wiki/faq
@@ -44,7 +44,7 @@ def __iter__(self):
return self

def __next__(self):
"""Permit ListingGenerator to operate as a generator in py3."""
"""Permit ListingGenerator to operate as a generator."""
if self.limit is not None and self.yielded >= self.limit:
raise StopIteration()

@@ -75,7 +75,3 @@ def _next_batch(self):
self.params["after"] = self._listing.after
else:
self._exhausted = True

def next(self):
"""Permit ListingGenerator to operate as a generator in py2."""
return self.__next__()
@@ -26,7 +26,6 @@
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
@@ -57,7 +56,6 @@
"betamax-serializers >=0.2, <0.3",
"mock >=0.8",
"pytest >=2.7.3",
"six >=1.10",
],
test_suite="tests",
url="https://praw.readthedocs.org/",
@@ -1,7 +1,6 @@
"""Test praw.models.auth."""
from prawcore import InvalidToken
from praw import Reddit
from six import string_types
import pytest

from .. import IntegrationTest
@@ -27,7 +26,7 @@ def setup_reddit(self):
def test_authorize(self):
with self.recorder.use_cassette("TestAuthWeb.test_authorize"):
token = self.reddit.auth.authorize(pytest.placeholders.auth_code)
assert isinstance(token, string_types)
assert isinstance(token, str)
assert self.reddit.read_only is False
assert self.reddit.auth.scopes() == {"submit"}

@@ -58,19 +58,15 @@ def test_check_for_updates__true(self):
config = Config("DEFAULT", check_for_updates=value)
assert config.check_for_updates is True

@mock.patch("six.moves.configparser.RawConfigParser")
def test_load_ini_from_appdata(self, mock_config):
self._assert_config_read("APPDATA", mock_config)

@mock.patch("six.moves.configparser.RawConfigParser")
def test_load_ini_from_home(self, mock_config):
self._assert_config_read("HOME", mock_config)

@mock.patch("six.moves.configparser.RawConfigParser")
def test_load_ini_from_xdg_config_home(self, mock_config):
self._assert_config_read("XDG_CONFIG_HOME", mock_config)

@mock.patch("six.moves.configparser.RawConfigParser")
def test_load_ini_with_no_config_directory(self, mock_config):
mock_instance = mock_config.return_value
Config.CONFIG = None # Force config file reload
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py34,py35,py36
envlist = py35,py36,py37
skip_missing_interpreters = true
skipsdist = true

@@ -10,9 +10,7 @@ deps =
betamax-serializers >=0.2, <0.3
mock >=0.8
pytest >=2.7.3
six >=1.10
flake8
flake8-quotes
commands =
python setup.py test
flake8 praw

0 comments on commit eda3c8e

Please sign in to comment.
You can’t perform that action at this time.