Skip to content

Commit

Permalink
Merge 240cf15 into 4dd911d
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Oct 24, 2023
2 parents 4dd911d + 240cf15 commit b78686b
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 41 deletions.
6 changes: 5 additions & 1 deletion CHANGES.rst
Expand Up @@ -34,12 +34,16 @@ Unreleased

- XML parsing error when media uploads fail.

**Changed**

- Drop support for Python 3.7, which is end-of-life on 2023-06-27.

7.7.1 (2023/07/11)
------------------

**Changed**

- Drop asyncio_extras dependency, use contextlib.asynccontextmanager instead.
- Drop ``asyncio_extras`` dependency, use ``contextlib.asynccontextmanager`` instead.

**Fixed**

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -49,7 +49,7 @@ you're set.
Installation
------------

Async PRAW is supported on Python 3.7+. The recommended way to install Async PRAW is via
Async PRAW is supported on Python 3.8+. The recommended way to install Async PRAW is via
`pip <https://pypi.python.org/pypi/pip>`_.

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/installation.rst
@@ -1,7 +1,7 @@
Installing Async PRAW
=====================

Async PRAW supports Python 3.7+. The recommended way to install Async PRAW is via
Async PRAW supports Python 3.8+. The recommended way to install Async PRAW is via
``pip``.

.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/quick_start.rst
Expand Up @@ -9,7 +9,7 @@ Prerequisites
-------------

:Python Knowledge: You need to know at least a little Python and some understanding of
asynchronous usage in Python to use Async PRAW. Async PRAW supports `Python 3.7+`_.
asynchronous usage in Python to use Async PRAW. Async PRAW supports `Python 3.8+`_.
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 works is a must. In the event you
are not already familiar with Reddit start at `Reddit Help`_.
Expand All @@ -27,7 +27,7 @@ Prerequisites

.. _first steps guide: https://github.com/reddit/reddit/wiki/OAuth2-Quick-Start-Example#first-steps

.. _python 3.7+: https://docs.python.org/3/tutorial/index.html
.. _python 3.8+: https://docs.python.org/3/tutorial/index.html

.. _r/learnpython: https://www.reddit.com/r/learnpython/

Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Expand Up @@ -13,7 +13,6 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -34,7 +33,7 @@ license = {file = "LICENSE.txt"}
maintainers = [{name = "Joel Payne", email = "lilspazjoekp@gmail.com"}]
name = "asyncpraw"
readme = "README.rst"
requires-python = "~=3.7"
requires-python = "~=3.8"

[project.optional-dependencies]
ci = ["coveralls"]
Expand All @@ -54,7 +53,6 @@ readthedocs = [
"sphinxcontrib-trio"
]
test = [
"asynctest ==0.13.* ; python_version < '3.8'", # TODO: Remove me when support for 3.7 is dropped
"mock ==4.*",
"pytest ==7.*",
"pytest-asyncio ==0.18.*",
Expand Down Expand Up @@ -87,7 +85,7 @@ filterwarnings = "ignore::DeprecationWarning"
testpaths = "tests"

[tool.ruff]
target-version = "py37"
target-version = "py38"
include = [
"asyncpraw/**/*.py"
]
Expand Down
8 changes: 2 additions & 6 deletions tests/integration/models/reddit/test_subreddit.py
Expand Up @@ -9,12 +9,8 @@
from aiohttp.http_websocket import WebSocketError
from asyncprawcore import BadRequest, Forbidden, NotFound, TooLarge

if sys.version_info < (3, 8):
from asynctest import CoroutineMock as AsyncMock
from asynctest import MagicMock, mock
else:
from unittest import mock
from unittest.mock import AsyncMock, MagicMock
from unittest import mock
from unittest.mock import AsyncMock, MagicMock

from asyncpraw.const import PNG_HEADER
from asyncpraw.exceptions import (
Expand Down
8 changes: 2 additions & 6 deletions tests/unit/models/reddit/test_subreddit.py
Expand Up @@ -3,12 +3,8 @@
import aiohttp
import pytest

if sys.version_info < (3, 8):
from asynctest import CoroutineMock as AsyncMock
from asynctest import MagicMock, mock
else:
from unittest import mock
from unittest.mock import AsyncMock, MagicMock
from unittest import mock
from unittest.mock import AsyncMock, MagicMock

from asyncpraw.exceptions import ClientException, MediaPostFailed
from asyncpraw.models import InlineGif, InlineImage, InlineVideo, Subreddit, WikiPage
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/models/test_redditors.py
Expand Up @@ -2,11 +2,7 @@

import sys

if sys.version_info < (3, 8):
from asynctest import CoroutineMock as AsyncMock
from asynctest import patch
else:
from unittest.mock import patch, AsyncMock
from unittest.mock import patch, AsyncMock

from .. import UnitTest

Expand Down
5 changes: 1 addition & 4 deletions tests/unit/test_config.py
Expand Up @@ -4,10 +4,7 @@

import pytest

if sys.version_info < (3, 8):
from asynctest import mock
else:
from unittest import mock
from unittest import mock

from asyncpraw.config import Config
from asyncpraw.exceptions import ClientException
Expand Down
8 changes: 2 additions & 6 deletions tests/unit/test_reddit.py
Expand Up @@ -6,12 +6,8 @@
from asyncprawcore import Requestor
from asyncprawcore.exceptions import BadRequest

if sys.version_info < (3, 8):
from asynctest import CoroutineMock as AsyncMock
from asynctest import MagicMock, mock
else:
from unittest import mock
from unittest.mock import AsyncMock, MagicMock
from unittest import mock
from unittest.mock import AsyncMock, MagicMock

from asyncpraw import Reddit, __version__
from asyncpraw.config import Config
Expand Down
5 changes: 1 addition & 4 deletions tests/unit/util/test_token_manager.py
Expand Up @@ -5,10 +5,7 @@
import aiofiles
import pytest

if sys.version_info < (3, 8):
from asynctest import mock
else:
from unittest import mock
from unittest import mock

from asyncpraw.util.token_manager import (
BaseTokenManager,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,py39,py310,py311
envlist = py38,py39,py310,py311
skipsdist = true

[testenv]
Expand Down

0 comments on commit b78686b

Please sign in to comment.