Skip to content

Commit

Permalink
Drop support for Python 3.7 (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanforbes committed Aug 15, 2023
1 parent 511aeb2 commit 87ab143
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .flake8
@@ -1,3 +1,3 @@
[flake8]
ignore = E402,E731,W503,W504,E252
exclude = .git,__pycache__,build,dist,.eggs,.github,.local,.venv
exclude = .git,__pycache__,build,dist,.eggs,.github,.local,.venv,.tox
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
# job.
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
loop: [asyncio, uvloop]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -13,7 +13,7 @@ of PostgreSQL server binary protocol for use with Python's ``asyncio``
framework. You can read more about asyncpg in an introductory
`blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.

asyncpg requires Python 3.7 or later and is supported for PostgreSQL
asyncpg requires Python 3.8 or later and is supported for PostgreSQL
versions 9.5 to 15. Older PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Expand Up @@ -15,7 +15,7 @@ PostgreSQL and Python/asyncio. asyncpg is an efficient, clean implementation
of PostgreSQL server binary protocol for use with Python's ``asyncio``
framework.

**asyncpg** requires Python 3.7 or later and is supported for PostgreSQL
**asyncpg** requires Python 3.8 or later and is supported for PostgreSQL
versions 9.5 to 15. Older PostgreSQL versions or other databases implementing
the PostgreSQL protocol *may* work, but are not being actively tested.

Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Expand Up @@ -2,7 +2,7 @@
name = "asyncpg"
description = "An asyncio PostgreSQL driver"
authors = [{name = "MagicStack Inc", email = "hello@magic.io"}]
requires-python = '>=3.7.0'
requires-python = '>=3.8.0'
readme = "README.rst"
license = {text = "Apache License, Version 2.0"}
dynamic = ["version"]
Expand All @@ -19,17 +19,13 @@ classifiers = [
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Database :: Front-Ends",
]
dependencies = [
'typing-extensions>=3.7.4.3;python_version<"3.8"',
]

[project.urls]
github = "https://github.com/MagicStack/asyncpg"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -7,8 +7,8 @@

import sys

if sys.version_info < (3, 7):
raise RuntimeError('asyncpg requires Python 3.7 or greater')
if sys.version_info < (3, 8):
raise RuntimeError('asyncpg requires Python 3.8 or greater')

import os
import os.path
Expand Down
6 changes: 2 additions & 4 deletions tests/test_adversity.py
Expand Up @@ -10,16 +10,14 @@
import os
import platform
import unittest
import sys

from asyncpg import _testbase as tb


@unittest.skipIf(os.environ.get('PGHOST'), 'using remote cluster for testing')
@unittest.skipIf(
platform.system() == 'Windows' and
sys.version_info >= (3, 8),
'not compatible with ProactorEventLoop which is default in Python 3.8')
platform.system() == 'Windows',
'not compatible with ProactorEventLoop which is default in Python 3.8+')
class TestConnectionLoss(tb.ProxiedClusterTestCase):
@tb.with_timeout(30.0)
async def test_connection_close_timeout(self):
Expand Down
6 changes: 2 additions & 4 deletions tests/test_listeners.py
Expand Up @@ -8,7 +8,6 @@
import asyncio
import os
import platform
import sys
import unittest

from asyncpg import _testbase as tb
Expand Down Expand Up @@ -314,9 +313,8 @@ def listener1(*args):

@unittest.skipIf(os.environ.get('PGHOST'), 'using remote cluster for testing')
@unittest.skipIf(
platform.system() == 'Windows' and
sys.version_info >= (3, 8),
'not compatible with ProactorEventLoop which is default in Python 3.8')
platform.system() == 'Windows',
'not compatible with ProactorEventLoop which is default in Python 3.8+')
class TestConnectionTerminationListener(tb.ProxiedClusterTestCase):

async def test_connection_termination_callback_called_on_remote(self):
Expand Down

0 comments on commit 87ab143

Please sign in to comment.