8000 Support Python 3.12 and PostgreSQL 16 · PyGreSQL/PyGreSQL@20ce949 · GitHub
[go: up one dir, main page]

Skip to content

Commit 20ce949

Browse files
committed
Support Python 3.12 and PostgreSQL 16
1 parent cc78102 commit 20ce949

File tree

13 files changed

+30
-14
lines changed

13 files changed

+30
-14
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 6.0
2+
current_version = 6.0b1
33
commit = False
44
tag = False
55

.devcontainer/provision.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ sudo apt-get install -y python3.8 python3.8-dev python3.8-distutils
2626
sudo apt-get install -y python3.9 python3.9-dev python3.9-distutils
2727
sudo apt-get install -y python3.10 python3.10-dev python3.10-distutils
2828
sudo apt-get install -y python3.11 python3.11-dev python3.11-distutils
29+
sudo apt-get install -y python3.12 python3.12-dev python3.12-distutils
2930

3031
# install build and testing tool
3132

@@ -43,7 +44,7 @@ sudo apt-get install -y tox clang-format
4344

4445
sudo apt-get install -y postgresql libpq-dev
4546

46-
for pghost in pg10 pg12 pg14 pg15
47+
for pghost in pg10 pg12 pg14 pg15 pg16
4748
do
4849
export PGHOST=$pghost
4950
export PGDATABASE=postgres
@@ -76,3 +77,7 @@ do
7677
psql -c "create extension hstore" test_latin9
7778
psql -c "create extension hstore" test_cyrillic
7879
done
80+
81+
export PGDATABASE=test
82+
export PGUSER=test
83+
export PGPASSWORD=test

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ The following Python versions are supported:
1818
* PyGreSQL 5.x: Python 2 and Python 3
1919
* PyGreSQL 6.x and newer: Python 3 only
2020

21+
The current version of PyGreSQL supports Python versions 3.7 to 3.12
22+
and PostgreSQL versions 10 to 16 on the server.
23+
2124
Installation
2225
------------
2326

@@ -28,6 +31,9 @@ The simplest way to install PyGreSQL is to type::
2831
For other ways of installing PyGreSQL and requirements,
2932
see the documentation.
3033

34+
Note that PyGreSQL also requires the libpq shared library to be
35+
installed and accessible on the client machine.
36+
3137
Documentation
3238
-------------
3339

docs/about.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ on the PyGres95 code written by Pascal Andre (andre@chimay.via.ecp.fr).
3939
D'Arcy (darcy@druid.net) renamed it to PyGreSQL starting with
4040
version 2.0 and serves as the "BDFL" of PyGreSQL.
4141

42-
The current version PyGreSQL |version| needs PostgreSQL 10 to 15, and Python
43-
3.7 to 3.11. If you need to support older PostgreSQL or Python versions,
42+
The current version PyGreSQL |version| needs PostgreSQL 10 to 16, and Python
43+
3.7 to 3.12. If you need to support older PostgreSQL or Python versions,
4444
you can resort to the PyGreSQL 5.x versions that still support them.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
author = 'The PyGreSQL team'
1111
copyright = '2023, ' + author
1212

13-
version = release = '6.0'
13+
version = release = '6.0b1'
1414

1515
language = 'en'
1616

docs/contents/changelog.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
ChangeLog
22
=========
33

4-
Version 6.0 (to be released)
5-
----------------------------
4+
Version 6.0b1 (2023-09-06)
5+
--------------------------
6+
- Officially support Python 3.12 and PostgreSQL 16 (tested with rc versions).
67
- Removed support for Python versions older than 3.7 (released June 2017)
78
and PostgreSQL older than version 10 (released October 2017).
89
- Converted the standalone modules `pg` and `pgdb` to packages with

docs/contents/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ On Windows, you also need to make sure that the directory that contains
1414
``libpq.dll`` is part of your ``PATH`` environment variable.
1515

1616
The current version of PyGreSQL has been tested with Python versions
17-
3.7 to 3.11, and PostgreSQL versions 10 to 15.
17+
3.7 to 3.12, and PostgreSQL versions 10 to 16.
1818

1919
PyGreSQL will be installed as two packages named ``pg`` (for the classic
2020
interface) and ``pgdb`` (for the DB API 2 compliant interface). The former

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "PyGreSQL"
3-
version = "6.0"
3+
version = "6.0b1"
44
requires-python = ">=3.7"
55
authors = [
66
{name = "D'Arcy J. M. Cain", email = "darcy@pygresql.org"},
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
2526
"Programming Language :: SQL",
2627
"Topic :: Database",
2728
"Topic :: Database :: Front-Ends",

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from setuptools import Extension, setup
2020
from setuptools.command.build_ext import build_ext
2121

22-
version = '6.0'
22+
version = '6.0b1'
2323

2424
if not (3, 7) <= sys.version_info[:2] < (4, 0):
2525
raise Exception(
@@ -152,6 +152,7 @@ def finalize_options(self):
152152
'Programming Language :: Python :: 3.9',
153153
'Programming Language :: Python :: 3.10',
154154
'Programming Language :: Python :: 3.11',
155+
'Programming Language :: Python :: 3.12',
155156
'Programming Language :: SQL',
156157
'Topic :: Database',
157158
'Topic :: Database :: Front-Ends',

tests/test_classic_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def test_attribute_protocol_version(self):
174174
def test_attribute_server_version(self):
175175
server_version = self.connection.server_version
176176
self.assertIsInstance(server_version, int)
177-
self.assertTrue(100000 <= server_version < 160000)
177+
self.assertGreaterEqual(server_version, 100000)
178+
self.assertLess(server_version, 170000)
178179

179180
def test_attribute_socket(self):
180181
socket = self.connection.socket

tests/test_classic_dbwrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ def test_attribute_protocol_version(self):
168168
def test_attribute_server_version(self):
169169
server_version = self.db.server_version
170170
self.assertIsInstance(server_version, int)
171-
self.assertTrue(100000 <= server_version < 160000)
171+
self.assertGreaterEqual(server_version, 100000)
172+
self.assertLess(server_version, 170000)
172173
self.assertEqual(server_version, self.db.db.server_version)
173174

174175
def test_attribute_socket(self):

tests/test_classic_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_pqlib_version(self):
125125
v = pg.get_pqlib_version()
126126
self.assertIsInstance(v, int)
127127
self.assertGreater(v, 100000)
128-
self.assertLess(v, 160000)
128+
self.assertLess(v, 170000)
129129

130130

131131
class TestParseArray(unittest.TestCase):

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# config file for tox
22

33
[tox]
4-
envlist = py3{7,8,9,10,11},ruff,mypy,cformat,docs
4+
envlist = py3{7,8,9,10,11,12},ruff,mypy,cformat,docs
55

66
[testenv:ruff]
77
basepython = python3.11

0 commit comments

Comments
 (0)
0