Daniele Varrazzo
f4282c6d87
chore: drop Postgres version parsing in setup.py
...
The macro is in the include files, no idea why parsing it from pg_config
was needed.
2025-01-04 19:06:56 +01:00
Daniele Varrazzo
78561ac99d
Merge pull request #1728 from romank0/fetch-notifications-on-commit
...
Adds notifies processing during commit
2024-10-11 03:13:56 +02:00
Daniele Varrazzo
5283a835dc
chore: add TransactionTimeout error, added in PostgreSQL 17
...
Url to fetch source changed from the official Postgres one to the Github
mirror because the former throttled us.
2024-10-11 02:41:31 +02:00
Roman Konoval
282360dd04
adds notifications processing after every PQexec
2024-10-11 00:26:05 +02:00
Roman Konoval
362cb00978
Adds notifies processing in pq_commit
2024-10-11 00:24:37 +02:00
Edgar Ramírez-Mondragón
e1cf23d9c7
Drop Python 3.7 in other places
2024-10-05 01:41:20 -06:00
Karolina Surma
829a7a2be9
_PyInterpreterState_Get() has become public in Python 3.13
...
Since 3.13.0a1 it has been renamed to PyInterpreterStateGet()
Source: https://github.com/python/cpython/pull/106321
2024-04-24 10:15:50 +02:00
Nick Zandbergen
a971c11d50
Update lobject_type.c
...
Add bytes as accepted input for documentation
2024-02-15 22:26:05 +00:00
Daniele Varrazzo
abf2723c0a
chore: drop support for Python 3.6
2023-10-03 11:39:35 +02:00
Jacob Champion
959339cefb
Return NULL on failed module initialization
...
Previously, any exceptions raised during initialization were swallowed
with a message like
SystemError: initialization of _psycopg raised unreported exception
Fixes #1598 .
2023-08-04 17:19:58 +01:00
Daniele Varrazzo
29a65f756c
chore: upgrade error codes to PostgreSQL 15
2022-10-06 02:26:09 +01:00
John Vandenberg
4d4d2bc444
Include sys/time.h for gettimeofday
...
Fixes https://github.com/psycopg/psycopg2/issues/1397
2021-12-03 11:29:39 +01:00
John Vandenberg
4b637ec34a
PyPy does not have PyDateTime_TimeZone_UTC
...
Fixes https://github.com/psycopg/psycopg2/issues/1398
2021-12-03 11:29:21 +01:00
Cyril Jouve
5fb1305a14
support for python 3.11
2021-11-11 21:13:38 +01:00
Daniele Varrazzo
7dd193a7f7
errorcodes map and errors classes updated to PostgreSQL 14.
2021-11-11 20:08:39 +01:00
Daniele Varrazzo
1a0c02a6f4
Raise an error for dates > 10K instead of returning Y9999
...
Close #1307 .
2021-11-11 20:01:14 +01:00
Daniele Varrazzo
1d3a89a0bb
Copyright year updated to 2021
...
ag -l Copyright | xargs sed -i \
"s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*Psycopg Team.*\)/\1-$(date +%Y)\3/I"
2021-06-15 00:37:22 +01:00
Daniele Varrazzo
f28502663f
Use datetime.timezone as default tzinfo_factory.
2021-06-15 00:17:14 +01:00
Daniele Varrazzo
2eac70786e
Drop support for mx.DateTime objects
...
They are Python 2 only.
2021-06-14 23:05:48 +01:00
Daniele Varrazzo
476a969bd8
Handle correctly timestamps with fractions of minute in the timezone offset
...
Close #1272 .
2021-06-14 22:25:02 +01:00
Daniele Varrazzo
5667026883
Use a stdlib timezone in TimestampFromTicks
...
This is the only use of `LocalTimezone` in psycopg2 code.
2021-06-14 19:22:59 +01:00
Daniele Varrazzo
8a2deb39ed
Escape table and column names in cursor.copy_from() and .copy_to()
2021-05-25 11:50:23 +01:00
Daniele Varrazzo
e5ad0ab2d9
'with' starts a transaction even on autocommit connections
...
Close #941
2021-05-24 14:13:19 +02:00
Daniele Varrazzo
cb12317d21
Drop use of obsolete alias PyMem_Del
2021-05-24 11:15:24 +02:00
Daniele Varrazzo
8f40c648af
Merge branch 'master' into rm-2.7
2021-05-20 16:36:55 +02:00
Sandro Mani
f59d626fe3
Don't re-initialize psycoEncodings if already initialized
2021-05-20 16:14:24 +02:00
Sandro Mani
22575528be
Don't abort if sqlstate_errors already initialized
2021-05-20 16:14:24 +02:00
Daniele Varrazzo
8ea5d0c0b8
Fix segfault initialising Column object manually
...
Close #1252
2021-05-20 13:10:59 +02:00
Tim Gates
0d7953a521
docs: fix a few simple typos
...
There are small typos in:
- doc/src/faq.rst
- psycopg/cursor_type.c
- psycopg/xid_type.c
- scripts/make_errorcodes.py
- scripts/make_errors.py
- tests/dbapi20.py
- tests/test_connection.py
Fixes:
- Should read `publicly` rather than `publically`.
- Should read `unicode` rather than `uniconde`.
- Should read `supposed` rather than `suppsed`.
- Should read `something` rather than `somenthing`.
- Should read `portable` rather than `portible`.
- Should read `exhausted` rather than `exausted`.
- Should read `compliance` rather than `compiliance`.
Closes #1275
2021-05-20 12:22:47 +02:00
Hugo van Kemenade
8830e30f73
Merge branch 'master' into rm-2.7
2020-11-18 18:10:16 +02:00
Daniele Varrazzo
e85ef2298b
Merge branch 'connection_exception'
2020-11-17 22:45:52 +00:00
Hugo van Kemenade
6c48b63ae4
Drop support for EOL Python 2.7
2020-11-17 22:22:11 +02:00
Hugo van Kemenade
694a20fb95
Drop support for EOL Python 3.5 ( #1197 )
2020-11-17 20:17:12 +00:00
Justas Sadzevicius
cdca0a20e0
Classify connection exceptions as operational errors to better conform with PEP 249
2020-11-17 18:02:06 +02:00
Hugo
d04a420bce
Drop support for EOL Python 3.4
2020-11-10 08:44:42 +02:00
Daniele Varrazzo
dec28a21ac
'cursor.query' reports the query of the last COPY opearation too
...
Close #1141 .
2020-09-05 21:47:35 +01:00
Daniele Varrazzo
dd1724c447
Errors mapping updated to PostgreSQL 13
2020-09-05 20:26:19 +01:00
Cyril Jouve
442f300e91
use Py_SET_TYPE for compat with python 3.10
2020-07-26 15:41:53 +02:00
Kevin Michel
364b0e0563
Fix memory leak in conn_set_client_encoding
...
If the specified encoding is the same as the current one,
the early exit did not release the clean_enc string allocated
by clear_encoding_name.
2020-05-04 09:40:36 +02:00
Daniele Varrazzo
f2852a520a
Merge branch 'add-aix-support'
2020-04-06 16:49:42 +12:00
Jon Dufresne
fbba461052
Fix typo: occured → occurred
2020-04-06 16:40:45 +12:00
Abdirahim Musse
6de23eb793
fixup! feat: Add AIX support
2020-03-12 13:21:02 -05:00
Daniele Varrazzo
054123254e
Column objects can be sliced
...
Close #1034 .
2020-03-11 10:50:56 +13:00
Abdirahim Musse
de58332bdd
feat: Add AIX support
2020-03-05 12:34:25 -06:00
Daniele Varrazzo
5e0b02afb2
Copyright bumped to 2020
2020-01-17 21:21:11 +00:00
Daniele Varrazzo
cb7109dfa9
Merge branch 'fix-951'
2019-10-19 18:38:56 +01:00
Daniele Varrazzo
b0b09cbb24
Merge branch 'bugfix/940'
2019-10-19 18:04:02 +01:00
Daniele Varrazzo
8a18ff7699
Mention that with PgBouncer get_backend_pid() is not updated
...
Close #956
2019-10-19 17:57:31 +01:00
Daniele Varrazzo
96156727c0
Allow parsing boolean both upper and lowercase
...
Reportedly useful on H2 databases.
Close #965
2019-10-19 16:28:10 +01:00
Daniele Varrazzo
d5c7ec7ae8
Added Postgres 12 errors
2019-10-19 15:22:48 +02:00