summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* chore: upgrade error codes to PostgreSQL 15Daniele Varrazzo2022-10-061-0/+1
|
* fix: look up for range types defined in schemas in the search pathDaniele Varrazzo2022-10-061-16/+37
|
* fix: correctly handle composites with names or schema requiring escapeDaniele Varrazzo2022-10-061-7/+10
|
* fix: handle types in the search path in register_composite()Daniele Varrazzo2022-10-061-2/+33
| | | | Fix #1487.
* Remove `__nonzero__` methodNikita Sobolev2022-07-301-4/+0
|
* errorcodes map and errors classes updated to PostgreSQL 14.Daniele Varrazzo2021-11-111-0/+1
|
* Fix representation of sql.Placeholder2_9_1Daniele Varrazzo2021-06-171-1/+4
| | | | | Fix also Placeholder tests, including an error which made an assert always true, which made us miss the regression in #1291.
* Fix regression with named `sql.Placeholder`Daniele Varrazzo2021-06-161-1/+1
| | | | Close #1291.
* Copyright year updated to 2021Daniele Varrazzo2021-06-1511-11/+11
| | | | | ag -l Copyright | xargs sed -i \ "s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*Psycopg Team.*\)/\1-$(date +%Y)\3/I"
* Deprecate the psycopg2.tz moduleDaniele Varrazzo2021-06-151-2/+0
| | | | | Don't use its objects anymore in the tests (except for the tests for the objects themselves).
* Drop support for mx.DateTime objectsDaniele Varrazzo2021-06-141-8/+0
| | | | They are Python 2 only.
* Handle correctly timestamps with fractions of minute in the timezone offsetDaniele Varrazzo2021-06-141-13/+32
| | | | Close #1272.
* Fix typoYusuke Hayashi2021-05-221-1/+1
|
* Unbreak f-string wrong replacementsDaniele Varrazzo2021-05-201-1/+1
|
* Merge branch 'master' into rm-2.7Daniele Varrazzo2021-05-201-3/+0
|\
| * Accept no param in connect()Daniele Varrazzo2021-05-201-3/+0
| | | | | | | | | | | | More friendly towards ``connect(**parse_dsn())``, and what psycopg3 does. Close #1250
* | Upgrade f-strings with flynt -a and remove int()Hugo van Kemenade2020-11-181-4/+4
| |
* | Upgrade f-strings with flyntHugo van Kemenade2020-11-174-37/+31
| |
* | Drop support for EOL Python 2.7Hugo van Kemenade2020-11-171-104/+0
| |
* | Upgrade Python syntax with pyupgrade --py36-plusHugo van Kemenade2020-11-177-66/+66
| |
* | Drop support for EOL Python 2.7Hugo van Kemenade2020-11-176-63/+16
|/
* Errors mapping updated to PostgreSQL 13Daniele Varrazzo2020-09-051-0/+1
|
* Added duplicate values to errcodes moduleDaniele Varrazzo2020-09-051-6/+7
| | | | Close #1133
* dictcursor-docs-improvementAlexey Bashtanov2020-06-181-1/+4
|
* Fixed copy() on DictRowfix-1073Daniele Varrazzo2020-04-061-1/+7
| | | | Close #1073.
* Merge branch 'logging-adapter'Daniele Varrazzo2020-03-081-2/+2
|\
| * #1026 added support for logging.LoggerAdapterBjoern Boschman2020-01-071-2/+2
| |
* | Copyright bumped to 2020Daniele Varrazzo2020-01-1711-0/+11
| |
* | Website on httpsDaniele Varrazzo2019-12-311-1/+1
| |
* | Changed docs to point to psycopg.orgDaniele Varrazzo2019-12-301-1/+1
|/
* Fixed use of cursor_factory attribute in connecion subclassesfix-1019Daniele Varrazzo2019-12-091-5/+6
| | | | Close #1019
* Added Postgres 12 errorsDaniele Varrazzo2019-10-191-0/+15
|
* Making my linter happyDaniele Varrazzo2019-06-071-3/+5
|
* fix `NamedTupleCursor._cached_make_nt`Changaco2019-06-041-5/+11
|
* Smart replication feedbackAlexander Kukushkin2019-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes psycopg2 responsible for sending the status update (feedback) messages to the server regardless of whether a synchronous or asynchronous connection is used. Feedback is sent every *status_update* (default value is 10) seconds, which could be configured by passing a corresponding parameter to the `start_replication()` or `start_replication_expert()` methods. The actual feedback message is sent by the `pq_read_replication_message()` when the *status_update* timeout is reached. The default behavior of the `send_feedback()` method is changed. It doesn't send a feedback message on every call anymore but just updates internal structures. There is still a way to *force* sending a message if *force* or *reply* parameters are set. The new approach has certain advantages: 1. The client can simply call the `send_feedback()` for every processed message and the library will take care of not overwhelming the server. Actually, in the synchronous mode it is even mandatory to confirm every processed message. 2. The library tracks internally the pointer of the last received message which is not keepalive. If the client confirmed the last message and after that server sends only keepalives with increasing *wal_end*, the library can safely move forward *flush* position to the *wal_end* and later automatically report it to the server. Reporting of the *wal_end* received from keepalive messages is very important. Not doing so casing: 1. Excessive disk usage, because the replication slot prevents from WAL being cleaned up. 2. The smart and fast shutdown of the server could last indefinitely because walsender waits until the client report *flush* position equal to the *wal_end*. This implementation is only extending the existing API and therefore should not break any of the existing code.
* More robust RealDictRow populationDaniele Varrazzo2019-04-061-1/+1
| | | | | | | In the presence of repeated columns the mapping would have remained into into the dictionary. Now it is removed. Fix #884
* RealDictRow inherits from OrderedDictfix-886Daniele Varrazzo2019-04-061-54/+30
| | | | | | | | Now its state is unmodified, so apart from special-casing creation and initial population can work unmodified, and all the desired properties just work (modifiability, picklability...) Close #886.
* Fixed RealDictCursor.pop()Daniele Varrazzo2019-04-061-0/+7
| | | | Addresses #886, but there might be something else broken there.
* Allow 0 as key in the poolDaniele Varrazzo2019-03-171-3/+3
| | | | Close #848
* Use PY2, PY3 for conditional code instead of sys.version_infoDaniele Varrazzo2019-03-163-12/+10
|
* Added PY2, PY3 to compat moduleDaniele Varrazzo2019-03-161-0/+4
|
* Remove unnecessary `except ImportError` for Python datetime typesJon Dufresne2019-03-161-7/+4
| | | | | The Python datetime module is available on all supported platforms. The types are always available and never raise an ImportError.
* Use True/False instead of 1/0 to represent bool valuesJon Dufresne2019-03-131-12/+11
| | | | Slightly more modern, readable, and Pythonic.
* Convert `while 1:` statements to `while True:`Jon Dufresne2019-03-131-4/+4
| | | | A slightly more readable and modern syntax.
* Fix typoDavid Fischer2019-02-261-1/+1
|
* Copyright year updatedDaniele Varrazzo2019-02-1710-10/+10
| | | | | ag -l Copyright | xargs sed -i \ "s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*\)/\1-$(date +%Y)\3/I"
* SQLSTATE error classes implemented in CDaniele Varrazzo2019-02-101-1304/+27
| | | | The module is only used to export them to Python.
* Use a proper LRU cache for namedtuplesfast-namedtupleDaniele Varrazzo2019-02-023-13/+122
| | | | | | | | | Previous one didn't refresh by last use. Use the stdlib version for py3 and one of our own for py2. Max size set to 512, which should be fine for everyone (tweaking is still possible by monkeypatching, as the tests do, but I don't want to make an interface of it).
* Added caching of types generated by NamedTupleCursorDaniele Varrazzo2019-02-021-10/+21
| | | | see #838
* Added BYTESARRAY typecasterDaniele Varrazzo2019-01-181-4/+4
|