diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10e7d84..9a22a73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] postgresql-version: [15, 14, 13, 12, 11] container: diff --git a/README.rst b/README.rst index 28295b7..26dc74e 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,7 @@ pg8000 pg8000 is a pure-`Python `_ `PostgreSQL `_ driver that complies with `DB-API 2.0 `_. It is tested on Python -versions 3.7+, on CPython and PyPy, and PostgreSQL versions 11+. pg8000's name comes +versions 3.8+, on CPython and PyPy, and PostgreSQL versions 11+. pg8000's name comes from the belief that it is probably about the 8000th PostgreSQL interface for Python. pg8000 is distributed under the BSD 3-clause license. diff --git a/pg8000/core.py b/pg8000/core.py index af9a827..54ef496 100644 --- a/pg8000/core.py +++ b/pg8000/core.py @@ -2,6 +2,7 @@ import socket from collections import defaultdict, deque from hashlib import md5 +from importlib.metadata import version from io import IOBase, TextIOBase from itertools import count from struct import Struct @@ -17,10 +18,6 @@ ) from pg8000.exceptions import DatabaseError, Error, InterfaceError -try: - from importlib.metadata import version -except ImportError: - from importlib_metadata import version ver = version("pg8000") diff --git a/pyproject.toml b/pyproject.toml index 4018848..fd785b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" name = "pg8000" description = "PostgreSQL interface library" readme = "README.rst" -requires-python = ">=3.7" +requires-python = ">=3.8" keywords= ["postgresql", "dbapi"] license = {text = "BSD 3-Clause License"} classifiers = [ @@ -18,10 +18,10 @@ classifiers = [ "License :: OSI Approved :: BSD License", "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", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", @@ -31,7 +31,6 @@ classifiers = [ ] dependencies = [ "scramp >= 1.4.3", - 'importlib-metadata >= 1.0 ; python_version < "3.8"', 'python-dateutil >= 2.8.2', ] dynamic = ["version"]