PyGreSQL 6.0b1__tar.gz → 6.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/LICENSE.txt +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/PKG-INFO +13 -12
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/PyGreSQL.egg-info/PKG-INFO +13 -12
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/README.rst +2 -2
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/about.rst +3 -3
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/conf.py +10 -2
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/changelog.rst +14 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/install.rst +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/db_wrapper.rst +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/copyright.rst +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pgconn.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pginternal.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pglarge.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pgmodule.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pgnotice.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pgquery.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pgsource.c +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/__init__.py +81 -29
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/adapt.py +9 -3
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/cast.py +14 -4
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/core.py +68 -24
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/db.py +9 -6
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/error.py +6 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/helpers.py +8 -2
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/__init__.py +57 -16
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/adapt.py +31 -7
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/cast.py +18 -5
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pyproject.toml +27 -23
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/setup.py +23 -5
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic_connection.py +11 -10
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic_dbwrapper.py +14 -5
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic_functions.py +2 -2
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic_largeobj.py +7 -8
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_dbapi20.py +1 -1
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tox.ini +20 -15
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/MANIFEST.in +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/PyGreSQL.egg-info/SOURCES.txt +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/PyGreSQL.egg-info/dependency_links.txt +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/PyGreSQL.egg-info/not-zip-safe +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/PyGreSQL.egg-info/top_level.txt +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/Makefile +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/_static/favicon.ico +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/_static/pygresql.png +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/community/homes.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/community/index.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/community/issues.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/community/mailinglist.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/community/source.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/community/support.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/examples.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/general.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/index.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/adaptation.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/connection.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/db_types.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/index.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/introduction.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/large_objects.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/module.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/notification.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pg/query.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/adaptation.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/connection.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/cursor.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/index.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/introduction.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/module.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/typecache.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/pgdb/types.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/postgres/advanced.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/postgres/basic.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/postgres/func.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/postgres/index.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/postgres/syscat.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/contents/tutorial.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/download/download.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/download/files.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/download/index.rst +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/make.bat +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/docs/requirements.txt +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/ext/pgtypes.h +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/_pg.pyi +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/attrs.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/notify.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/py.typed +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pg/tz.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/connect.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/connection.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/constants.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/cursor.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/py.typed +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/pgdb/typecode.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/setup.cfg +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/__init__.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/config.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/dbapi20.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic_attrdict.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_classic_notification.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_dbapi20_copy.py +0 -0
- {PyGreSQL-6.0b1 → pygresql-6.1.0}/tests/test_tutorial.py +0 -0
|
@@ -6,7 +6,7 @@ Copyright (c) 1995, Pascal Andre
|
|
|
6
6
|
|
|
7
7
|
Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain
|
|
8
8
|
|
|
9
|
-
Further modifications copyright (c) 2009-
|
|
9
|
+
Further modifications copyright (c) 2009-2024 by the PyGreSQL Development Team
|
|
10
10
|
|
|
11
11
|
PyGreSQL is released under the PostgreSQL License, a liberal Open Source
|
|
12
12
|
license, similar to the BSD or MIT licenses:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyGreSQL
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: Python PostgreSQL interfaces
|
|
5
5
|
Home-page: https://pygresql.github.io/
|
|
6
|
-
Download-URL: https://pygresql.github.io/
|
|
6
|
+
Download-URL: https://pygresql.github.io/download/
|
|
7
7
|
Author: D'Arcy J. M. Cain
|
|
8
8
|
Author-email: "D'Arcy J. M. Cain" <darcy@pygresql.org>, Christoph Zwerschke <cito@online.de>
|
|
9
9
|
License: Written by D'Arcy J.M. Cain (darcy@PyGreSQL.org)
|
|
@@ -14,7 +14,7 @@ License: Written by D'Arcy J.M. Cain (darcy@PyGreSQL.org)
|
|
|
14
14
|
|
|
15
15
|
Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain
|
|
16
16
|
|
|
17
|
-
Further modifications copyright (c) 2009-
|
|
17
|
+
Further modifications copyright (c) 2009-2024 by the PyGreSQL Development Team
|
|
18
18
|
|
|
19
19
|
PyGreSQL is released under the PostgreSQL License, a liberal Open Source
|
|
20
20
|
license, similar to the BSD or MIT licenses:
|
|
@@ -37,13 +37,13 @@ License: Written by D'Arcy J.M. Cain (darcy@PyGreSQL.org)
|
|
|
37
37
|
AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
|
|
38
38
|
ENHANCEMENTS, OR MODIFICATIONS.
|
|
39
39
|
|
|
40
|
-
Project-URL:
|
|
41
|
-
Project-URL:
|
|
42
|
-
Project-URL:
|
|
43
|
-
Project-URL:
|
|
44
|
-
Project-URL:
|
|
45
|
-
Project-URL:
|
|
46
|
-
Project-URL:
|
|
40
|
+
Project-URL: Homepage, https://pygresql.github.io/
|
|
41
|
+
Project-URL: Documentation, https://pygresql.github.io/contents/
|
|
42
|
+
Project-URL: Source Code, https://github.com/PyGreSQL/PyGreSQL
|
|
43
|
+
Project-URL: Issue Tracker, https://github.com/PyGreSQL/PyGreSQL/issues/
|
|
44
|
+
Project-URL: Changelog, https://pygresql.github.io/contents/changelog.html
|
|
45
|
+
Project-URL: Download, https://pygresql.github.io/download/
|
|
46
|
+
Project-URL: Mailing List, https://mail.vex.net/mailman/listinfo/pygresql
|
|
47
47
|
Keywords: pygresql,postgresql,database,api,dbapi
|
|
48
48
|
Classifier: Development Status :: 6 - Mature
|
|
49
49
|
Classifier: Intended Audience :: Developers
|
|
@@ -58,6 +58,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
58
58
|
Classifier: Programming Language :: Python :: 3.10
|
|
59
59
|
Classifier: Programming Language :: Python :: 3.11
|
|
60
60
|
Classifier: Programming Language :: Python :: 3.12
|
|
61
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
61
62
|
Classifier: Programming Language :: SQL
|
|
62
63
|
Classifier: Topic :: Database
|
|
63
64
|
Classifier: Topic :: Database :: Front-Ends
|
|
@@ -86,8 +87,8 @@ The following Python versions are supported:
|
|
|
86
87
|
* PyGreSQL 5.x: Python 2 and Python 3
|
|
87
88
|
* PyGreSQL 6.x and newer: Python 3 only
|
|
88
89
|
|
|
89
|
-
The current version of PyGreSQL supports Python versions 3.7 to 3.
|
|
90
|
-
and PostgreSQL versions 10 to
|
|
90
|
+
The current version of PyGreSQL supports Python versions 3.7 to 3.13
|
|
91
|
+
and PostgreSQL versions 10 to 17 on the server.
|
|
91
92
|
|
|
92
93
|
Installation
|
|
93
94
|
------------
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyGreSQL
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: Python PostgreSQL interfaces
|
|
5
5
|
Home-page: https://pygresql.github.io/
|
|
6
|
-
Download-URL: https://pygresql.github.io/
|
|
6
|
+
Download-URL: https://pygresql.github.io/download/
|
|
7
7
|
Author: D'Arcy J. M. Cain
|
|
8
8
|
Author-email: "D'Arcy J. M. Cain" <darcy@pygresql.org>, Christoph Zwerschke <cito@online.de>
|
|
9
9
|
License: Written by D'Arcy J.M. Cain (darcy@PyGreSQL.org)
|
|
@@ -14,7 +14,7 @@ License: Written by D'Arcy J.M. Cain (darcy@PyGreSQL.org)
|
|
|
14
14
|
|
|
15
15
|
Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain
|
|
16
16
|
|
|
17
|
-
Further modifications copyright (c) 2009-
|
|
17
|
+
Further modifications copyright (c) 2009-2024 by the PyGreSQL Development Team
|
|
18
18
|
|
|
19
19
|
PyGreSQL is released under the PostgreSQL License, a liberal Open Source
|
|
20
20
|
license, similar to the BSD or MIT licenses:
|
|
@@ -37,13 +37,13 @@ License: Written by D'Arcy J.M. Cain (darcy@PyGreSQL.org)
|
|
|
37
37
|
AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
|
|
38
38
|
ENHANCEMENTS, OR MODIFICATIONS.
|
|
39
39
|
|
|
40
|
-
Project-URL:
|
|
41
|
-
Project-URL:
|
|
42
|
-
Project-URL:
|
|
43
|
-
Project-URL:
|
|
44
|
-
Project-URL:
|
|
45
|
-
Project-URL:
|
|
46
|
-
Project-URL:
|
|
40
|
+
Project-URL: Homepage, https://pygresql.github.io/
|
|
41
|
+
Project-URL: Documentation, https://pygresql.github.io/contents/
|
|
42
|
+
Project-URL: Source Code, https://github.com/PyGreSQL/PyGreSQL
|
|
43
|
+
Project-URL: Issue Tracker, https://github.com/PyGreSQL/PyGreSQL/issues/
|
|
44
|
+
Project-URL: Changelog, https://pygresql.github.io/contents/changelog.html
|
|
45
|
+
Project-URL: Download, https://pygresql.github.io/download/
|
|
46
|
+
Project-URL: Mailing List, https://mail.vex.net/mailman/listinfo/pygresql
|
|
47
47
|
Keywords: pygresql,postgresql,database,api,dbapi
|
|
48
48
|
Classifier: Development Status :: 6 - Mature
|
|
49
49
|
Classifier: Intended Audience :: Developers
|
|
@@ -58,6 +58,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
58
58
|
Classifier: Programming Language :: Python :: 3.10
|
|
59
59
|
Classifier: Programming Language :: Python :: 3.11
|
|
60
60
|
Classifier: Programming Language :: Python :: 3.12
|
|
61
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
61
62
|
Classifier: Programming Language :: SQL
|
|
62
63
|
Classifier: Topic :: Database
|
|
63
64
|
Classifier: Topic :: Database :: Front-Ends
|
|
@@ -86,8 +87,8 @@ The following Python versions are supported:
|
|
|
86
87
|
* PyGreSQL 5.x: Python 2 and Python 3
|
|
87
88
|
* PyGreSQL 6.x and newer: Python 3 only
|
|
88
89
|
|
|
89
|
-
The current version of PyGreSQL supports Python versions 3.7 to 3.
|
|
90
|
-
and PostgreSQL versions 10 to
|
|
90
|
+
The current version of PyGreSQL supports Python versions 3.7 to 3.13
|
|
91
|
+
and PostgreSQL versions 10 to 17 on the server.
|
|
91
92
|
|
|
92
93
|
Installation
|
|
93
94
|
------------
|
|
@@ -18,8 +18,8 @@ The following Python versions are supported:
|
|
|
18
18
|
* PyGreSQL 5.x: Python 2 and Python 3
|
|
19
19
|
* PyGreSQL 6.x and newer: Python 3 only
|
|
20
20
|
|
|
21
|
-
The current version of PyGreSQL supports Python versions 3.7 to 3.
|
|
22
|
-
and PostgreSQL versions 10 to
|
|
21
|
+
The current version of PyGreSQL supports Python versions 3.7 to 3.13
|
|
22
|
+
and PostgreSQL versions 10 to 17 on the server.
|
|
23
23
|
|
|
24
24
|
Installation
|
|
25
25
|
------------
|
|
@@ -8,7 +8,7 @@ powerful PostgreSQL features from Python.
|
|
|
8
8
|
|
|
9
9
|
| This software is copyright © 1995, Pascal Andre.
|
|
10
10
|
| Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain.
|
|
11
|
-
| Further modifications are copyright © 2009-
|
|
11
|
+
| Further modifications are copyright © 2009-2024 by the PyGreSQL team.
|
|
12
12
|
| For licensing details, see the full :doc:`copyright`.
|
|
13
13
|
|
|
14
14
|
**PostgreSQL** is a highly scalable, SQL compliant, open source
|
|
@@ -39,6 +39,6 @@ on the PyGres95 code written by Pascal Andre (andre@chimay.via.ecp.fr).
|
|
|
39
39
|
D'Arcy (darcy@druid.net) renamed it to PyGreSQL starting with
|
|
40
40
|
version 2.0 and serves as the "BDFL" of PyGreSQL.
|
|
41
41
|
|
|
42
|
-
The current version PyGreSQL |version| needs PostgreSQL 10 to
|
|
43
|
-
3.7 to 3.
|
|
42
|
+
The current version PyGreSQL |version| needs PostgreSQL 10 to 17, and Python
|
|
43
|
+
3.7 to 3.13. If you need to support older PostgreSQL or Python versions,
|
|
44
44
|
you can resort to the PyGreSQL 5.x versions that still support them.
|
|
@@ -8,9 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
project = 'PyGreSQL'
|
|
10
10
|
author = 'The PyGreSQL team'
|
|
11
|
-
copyright = '
|
|
11
|
+
copyright = '2024, ' + author
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
def project_version():
|
|
14
|
+
with open('../pyproject.toml') as f:
|
|
15
|
+
for d in f:
|
|
16
|
+
if d.startswith("version ="):
|
|
17
|
+
version = d.split("=")[1].strip().strip('"')
|
|
18
|
+
return version
|
|
19
|
+
raise Exception("Cannot determine PyGreSQL version")
|
|
20
|
+
|
|
21
|
+
version = release = project_version()
|
|
14
22
|
|
|
15
23
|
language = 'en'
|
|
16
24
|
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
ChangeLog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
Version 6.1.0 (2024-12-05)
|
|
5
|
+
--------------------------
|
|
6
|
+
- Support Python 3.13 and PostgreSQL 17.
|
|
7
|
+
|
|
8
|
+
Version 6.0.1 (2024-04-19)
|
|
9
|
+
--------------------------
|
|
10
|
+
- Properly adapt falsy JSON values (#86)
|
|
11
|
+
|
|
12
|
+
Version 6.0 (2023-10-03)
|
|
13
|
+
------------------------
|
|
14
|
+
- Tested with the recent releases of Python 3.12 and PostgreSQL 16.
|
|
15
|
+
- Make pyproject.toml the only source of truth for the version number.
|
|
16
|
+
- Please also note the changes already made in version 6.0b1.
|
|
17
|
+
|
|
4
18
|
Version 6.0b1 (2023-09-06)
|
|
5
19
|
--------------------------
|
|
6
20
|
- Officially support Python 3.12 and PostgreSQL 16 (tested with rc versions).
|
|
@@ -14,7 +14,7 @@ On Windows, you also need to make sure that the directory that contains
|
|
|
14
14
|
``libpq.dll`` is part of your ``PATH`` environment variable.
|
|
15
15
|
|
|
16
16
|
The current version of PyGreSQL has been tested with Python versions
|
|
17
|
-
3.7 to 3.
|
|
17
|
+
3.7 to 3.13, and PostgreSQL versions 10 to 17.
|
|
18
18
|
|
|
19
19
|
PyGreSQL will be installed as two packages named ``pg`` (for the classic
|
|
20
20
|
interface) and ``pgdb`` (for the DB API 2 compliant interface). The former
|
|
@@ -715,7 +715,7 @@ delete -- delete a row from a database table
|
|
|
715
715
|
Delete a row from a database table
|
|
716
716
|
|
|
717
717
|
:param str table: name of table
|
|
718
|
-
:param dict
|
|
718
|
+
:param dict row: optional dictionary of values
|
|
719
719
|
:param col: optional keyword arguments for updating the dictionary
|
|
720
720
|
:rtype: None
|
|
721
721
|
:raises pg.ProgrammingError: table has no primary key,
|
|
@@ -10,7 +10,7 @@ Copyright (c) 1995, Pascal Andre
|
|
|
10
10
|
Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain
|
|
11
11
|
(darcy@PyGreSQL.org)
|
|
12
12
|
|
|
13
|
-
Further modifications copyright (c) 2009-
|
|
13
|
+
Further modifications copyright (c) 2009-2024 by the PyGreSQL team.
|
|
14
14
|
|
|
15
15
|
Permission to use, copy, modify, and distribute this software and its
|
|
16
16
|
documentation for any purpose, without fee, and without a written agreement
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# This file contains the classic pg module.
|
|
6
6
|
#
|
|
7
|
-
# Copyright (c)
|
|
7
|
+
# Copyright (c) 2024 by the PyGreSQL Development Team
|
|
8
8
|
#
|
|
9
9
|
# The notification handler is based on pgnotify which is
|
|
10
10
|
# Copyright (c) 2001 Ng Pheng Siong. All rights reserved.
|
|
@@ -99,34 +99,86 @@ from .helpers import RowCache, init_core
|
|
|
99
99
|
from .notify import NotificationHandler
|
|
100
100
|
|
|
101
101
|
__all__ = [
|
|
102
|
-
'DB',
|
|
103
|
-
'
|
|
104
|
-
'
|
|
105
|
-
'
|
|
106
|
-
'
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
'
|
|
111
|
-
'
|
|
112
|
-
'
|
|
113
|
-
'
|
|
114
|
-
'
|
|
115
|
-
'
|
|
116
|
-
'TRANS_ACTIVE',
|
|
117
|
-
'
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'
|
|
128
|
-
'
|
|
129
|
-
'
|
|
102
|
+
'DB',
|
|
103
|
+
'INV_READ',
|
|
104
|
+
'INV_WRITE',
|
|
105
|
+
'POLLING_FAILED',
|
|
106
|
+
'POLLING_OK',
|
|
107
|
+
'POLLING_READING',
|
|
108
|
+
'POLLING_WRITING',
|
|
109
|
+
'RESULT_DDL',
|
|
110
|
+
'RESULT_DML',
|
|
111
|
+
'RESULT_DQL',
|
|
112
|
+
'RESULT_EMPTY',
|
|
113
|
+
'SEEK_CUR',
|
|
114
|
+
'SEEK_END',
|
|
115
|
+
'SEEK_SET',
|
|
116
|
+
'TRANS_ACTIVE',
|
|
117
|
+
'TRANS_IDLE',
|
|
118
|
+
'TRANS_INERROR',
|
|
119
|
+
'TRANS_INTRANS',
|
|
120
|
+
'TRANS_UNKNOWN',
|
|
121
|
+
'Adapter',
|
|
122
|
+
'Bytea',
|
|
123
|
+
'Connection',
|
|
124
|
+
'DataError',
|
|
125
|
+
'DatabaseError',
|
|
126
|
+
'Error',
|
|
127
|
+
'Hstore',
|
|
128
|
+
'IntegrityError',
|
|
129
|
+
'InterfaceError',
|
|
130
|
+
'InternalError',
|
|
131
|
+
'InvalidResultError',
|
|
132
|
+
'Json',
|
|
133
|
+
'Literal',
|
|
134
|
+
'MultipleResultsError',
|
|
135
|
+
'NoResultError',
|
|
136
|
+
'NotSupportedError',
|
|
137
|
+
'NotificationHandler',
|
|
138
|
+
'OperationalError',
|
|
139
|
+
'ProgrammingError',
|
|
140
|
+
'Query',
|
|
141
|
+
'RowCache',
|
|
142
|
+
'Typecasts',
|
|
143
|
+
'Warning',
|
|
144
|
+
'__version__',
|
|
145
|
+
'cast_array',
|
|
146
|
+
'cast_hstore',
|
|
147
|
+
'cast_record',
|
|
148
|
+
'connect',
|
|
149
|
+
'escape_bytea',
|
|
150
|
+
'escape_string',
|
|
151
|
+
'get_array',
|
|
152
|
+
'get_bool',
|
|
153
|
+
'get_bytea_escaped',
|
|
154
|
+
'get_datestyle',
|
|
155
|
+
'get_decimal',
|
|
156
|
+
'get_decimal_point',
|
|
157
|
+
'get_defbase',
|
|
158
|
+
'get_defhost',
|
|
159
|
+
'get_defopt',
|
|
160
|
+
'get_defport',
|
|
161
|
+
'get_defuser',
|
|
162
|
+
'get_jsondecode',
|
|
163
|
+
'get_pqlib_version',
|
|
164
|
+
'get_typecast',
|
|
165
|
+
'set_array',
|
|
166
|
+
'set_bool',
|
|
167
|
+
'set_bytea_escaped',
|
|
168
|
+
'set_datestyle',
|
|
169
|
+
'set_decimal',
|
|
170
|
+
'set_decimal_point',
|
|
171
|
+
'set_defbase',
|
|
172
|
+
'set_defhost',
|
|
173
|
+
'set_defopt',
|
|
174
|
+
'set_defpasswd',
|
|
175
|
+
'set_defport',
|
|
176
|
+
'set_defuser',
|
|
177
|
+
'set_jsondecode',
|
|
178
|
+
'set_query_helpers',
|
|
179
|
+
'set_typecast',
|
|
180
|
+
'unescape_bytea',
|
|
181
|
+
'version',
|
|
130
182
|
]
|
|
131
183
|
|
|
132
184
|
__version__ = version
|
|
@@ -21,8 +21,14 @@ if TYPE_CHECKING:
|
|
|
21
21
|
from .db import DB
|
|
22
22
|
|
|
23
23
|
__all__ = [
|
|
24
|
-
'
|
|
25
|
-
'
|
|
24
|
+
'UUID',
|
|
25
|
+
'Adapter',
|
|
26
|
+
'Bytea',
|
|
27
|
+
'DbType',
|
|
28
|
+
'DbTypes',
|
|
29
|
+
'Hstore',
|
|
30
|
+
'Json',
|
|
31
|
+
'Literal'
|
|
26
32
|
]
|
|
27
33
|
|
|
28
34
|
|
|
@@ -333,7 +339,7 @@ class Adapter:
|
|
|
333
339
|
|
|
334
340
|
def _adapt_json(self, v: Any) -> str | None:
|
|
335
341
|
"""Adapt a json parameter."""
|
|
336
|
-
if
|
|
342
|
+
if v is None:
|
|
337
343
|
return None
|
|
338
344
|
if isinstance(v, str):
|
|
339
345
|
return v
|
|
@@ -25,10 +25,20 @@ from .core import (
|
|
|
25
25
|
from .tz import timezone_as_offset
|
|
26
26
|
|
|
27
27
|
__all__ = [
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
28
|
+
'Typecasts',
|
|
29
|
+
'cast_bool',
|
|
30
|
+
'cast_date',
|
|
31
|
+
'cast_int2vector',
|
|
32
|
+
'cast_interval',
|
|
33
|
+
'cast_json',
|
|
34
|
+
'cast_money',
|
|
35
|
+
'cast_num',
|
|
36
|
+
'cast_time',
|
|
37
|
+
'cast_timestamp',
|
|
38
|
+
'cast_timestamptz',
|
|
39
|
+
'cast_timetz',
|
|
40
|
+
'get_typecast',
|
|
41
|
+
'set_typecast'
|
|
32
42
|
]
|
|
33
43
|
|
|
34
44
|
def get_args(func: Callable) -> list:
|
|
@@ -108,29 +108,73 @@ from ._pg import (
|
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
__all__ = [
|
|
111
|
-
'
|
|
112
|
-
'
|
|
113
|
-
'
|
|
114
|
-
'
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'SEEK_CUR',
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'
|
|
128
|
-
'
|
|
129
|
-
'
|
|
130
|
-
'
|
|
131
|
-
'
|
|
132
|
-
'
|
|
133
|
-
'
|
|
134
|
-
'
|
|
111
|
+
'INV_READ',
|
|
112
|
+
'INV_WRITE',
|
|
113
|
+
'POLLING_FAILED',
|
|
114
|
+
'POLLING_OK',
|
|
115
|
+
'POLLING_READING',
|
|
116
|
+
'POLLING_WRITING',
|
|
117
|
+
'RESULT_DDL',
|
|
118
|
+
'RESULT_DML',
|
|
119
|
+
'RESULT_DQL',
|
|
120
|
+
'RESULT_EMPTY',
|
|
121
|
+
'SEEK_CUR',
|
|
122
|
+
'SEEK_END',
|
|
123
|
+
'SEEK_SET',
|
|
124
|
+
'TRANS_ACTIVE',
|
|
125
|
+
'TRANS_IDLE',
|
|
126
|
+
'TRANS_INERROR',
|
|
127
|
+
'TRANS_INTRANS',
|
|
128
|
+
'TRANS_UNKNOWN',
|
|
129
|
+
'Connection',
|
|
130
|
+
'DataError',
|
|
131
|
+
'DatabaseError',
|
|
132
|
+
'Error',
|
|
133
|
+
'IntegrityError',
|
|
134
|
+
'InterfaceError',
|
|
135
|
+
'InternalError',
|
|
136
|
+
'InvalidResultError',
|
|
137
|
+
'LargeObject',
|
|
138
|
+
'MultipleResultsError',
|
|
139
|
+
'NoResultError',
|
|
140
|
+
'NotSupportedError',
|
|
141
|
+
'OperationalError',
|
|
142
|
+
'ProgrammingError',
|
|
143
|
+
'Query',
|
|
144
|
+
'Warning',
|
|
145
|
+
'cast_array',
|
|
146
|
+
'cast_hstore',
|
|
147
|
+
'cast_record',
|
|
148
|
+
'connect',
|
|
149
|
+
'escape_bytea',
|
|
150
|
+
'escape_string',
|
|
151
|
+
'get_array',
|
|
152
|
+
'get_bool',
|
|
153
|
+
'get_bytea_escaped',
|
|
154
|
+
'get_datestyle',
|
|
155
|
+
'get_decimal',
|
|
156
|
+
'get_decimal_point',
|
|
157
|
+
'get_defbase',
|
|
158
|
+
'get_defhost',
|
|
159
|
+
'get_defopt',
|
|
160
|
+
'get_defport',
|
|
161
|
+
'get_defuser',
|
|
162
|
+
'get_jsondecode',
|
|
163
|
+
'get_pqlib_version',
|
|
164
|
+
'set_array',
|
|
165
|
+
'set_bool',
|
|
166
|
+
'set_bytea_escaped',
|
|
167
|
+
'set_datestyle',
|
|
168
|
+
'set_decimal',
|
|
169
|
+
'set_decimal_point',
|
|
170
|
+
'set_defbase',
|
|
171
|
+
'set_defhost',
|
|
172
|
+
'set_defopt',
|
|
173
|
+
'set_defpasswd',
|
|
174
|
+
'set_defport',
|
|
175
|
+
'set_defuser',
|
|
176
|
+
'set_jsondecode',
|
|
177
|
+
'set_query_helpers',
|
|
178
|
+
'unescape_bytea',
|
|
135
179
|
'version',
|
|
136
180
|
]
|
|
@@ -802,8 +802,9 @@ class DB:
|
|
|
802
802
|
adapt = params.add
|
|
803
803
|
col = self.escape_identifier
|
|
804
804
|
what = 'oid, *' if qoid else '*'
|
|
805
|
-
where = ' AND '.join(
|
|
806
|
-
col(k)
|
|
805
|
+
where = ' AND '.join(
|
|
806
|
+
f'{col(k)} OPERATOR(pg_catalog.=) {adapt(row[k], attnames[k])}'
|
|
807
|
+
for k in keyname)
|
|
807
808
|
if 'oid' in row:
|
|
808
809
|
if qoid:
|
|
809
810
|
row[qoid] = row['oid']
|
|
@@ -913,8 +914,9 @@ class DB:
|
|
|
913
914
|
params = self.adapter.parameter_list()
|
|
914
915
|
adapt = params.add
|
|
915
916
|
col = self.escape_identifier
|
|
916
|
-
where = ' AND '.join(
|
|
917
|
-
col(k)
|
|
917
|
+
where = ' AND '.join(
|
|
918
|
+
f'{col(k)} OPERATOR(pg_catalog.=) {adapt(row[k], attnames[k])}'
|
|
919
|
+
for k in keynames)
|
|
918
920
|
if 'oid' in row:
|
|
919
921
|
if qoid:
|
|
920
922
|
row[qoid] = row['oid']
|
|
@@ -1103,8 +1105,9 @@ class DB:
|
|
|
1103
1105
|
params = self.adapter.parameter_list()
|
|
1104
1106
|
adapt = params.add
|
|
1105
1107
|
col = self.escape_identifier
|
|
1106
|
-
where = ' AND '.join(
|
|
1107
|
-
col(k)
|
|
1108
|
+
where = ' AND '.join(
|
|
1109
|
+
f'{col(k)} OPERATOR(pg_catalog.=) {adapt(row[k], attnames[k])}'
|
|
1110
|
+
for k in keynames)
|
|
1108
1111
|
if 'oid' in row:
|
|
1109
1112
|
if qoid:
|
|
1110
1113
|
row[qoid] = row['oid']
|
|
@@ -13,8 +13,14 @@ from .core import Query, set_decimal, set_jsondecode, set_query_helpers
|
|
|
13
13
|
SomeNamedTuple = Any # alias for accessing arbitrary named tuples
|
|
14
14
|
|
|
15
15
|
__all__ = [
|
|
16
|
-
'
|
|
17
|
-
'
|
|
16
|
+
'QuoteDict',
|
|
17
|
+
'RowCache',
|
|
18
|
+
'dictiter',
|
|
19
|
+
'namediter',
|
|
20
|
+
'namednext',
|
|
21
|
+
'oid_key',
|
|
22
|
+
'quote_if_unqualified',
|
|
23
|
+
'scalariter'
|
|
18
24
|
]
|
|
19
25
|
|
|
20
26
|
|