summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Improvements to errors module docserrors-module-cDaniele Varrazzo2019-02-112-7/+17
|
* Fixed use of StandardError in testDaniele Varrazzo2019-02-111-1/+1
| | | | In Py3 it's gone.
* Allow importing _psycopg even if the 'errors' module is not availableDaniele Varrazzo2019-02-101-9/+23
|
* SQLSTATE error classes implemented in CDaniele Varrazzo2019-02-1010-1531/+572
| | | | The module is only used to export them to Python.
* Merge remote-tracking branch 'origin/fast-namedtuple'Daniele Varrazzo2019-02-065-10/+170
|\ | | | | | | Close #838
| * Use a proper LRU cache for namedtuplesfast-namedtupleDaniele Varrazzo2019-02-024-26/+138
| | | | | | | | | | | | | | | | | | 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-023-10/+58
|/ | | | see #838
* Merge branch 'drop-display-size'Daniele Varrazzo2019-01-255-151/+158
|\
| * Dropped PSYCOPG_DISPLAY_SIZE build parameterDaniele Varrazzo2019-01-255-151/+158
|/ | | | | Big and complex _pq_fetch_tuples simplified by moving per-column calculation to a separate function.
* Merge branch 'module-init-cleanup'Daniele Varrazzo2019-01-239-325/+282
|\
| * General cleanup of module init shenanigansmodule-init-cleanupDaniele Varrazzo2019-01-234-80/+90
| | | | | | | | | | | | Pass around the module instead of its dict (getting the latter is fast if needed), mark function raising with negative results, check all errors, consistent names...
| * Incref an object which will be held forever in a static varDaniele Varrazzo2019-01-231-0/+1
| |
| * Decrement the refcount of temporary objects in module init failedDaniele Varrazzo2019-01-221-6/+16
| | | | | | | | We are going to die anyway, but let's do it in style.
| * Date/time modules initialized in separate functionsDaniele Varrazzo2019-01-225-50/+68
| |
| * Dropped psyco_errors_fill()Daniele Varrazzo2019-01-211-19/+16
| | | | | | | | Just use psyco_errors_init() for complete errors initialization
| * Dropped project wide type to define encodings tableDaniele Varrazzo2019-01-212-19/+21
| |
| * Dropped C API interfaceDaniele Varrazzo2019-01-212-84/+4
| | | | | | | | | | I guess it was unused as it only contained two init functions. The Capsule should do things better now I guess.
| * Respect refcount with PyModule_AddObject()Daniele Varrazzo2019-01-211-87/+63
| | | | | | | | | | The function steals a ref. The module is never destroyed so things work fine but the refcount is wrong.
| * Module constants definition moved in a separate function for clarityDaniele Varrazzo2019-01-211-16/+39
| |
* | Mention new OpenSSL version in wheel packageDaniele Varrazzo2019-01-221-0/+1
| |
* | Merge branch 'execute-locks'Daniele Varrazzo2019-01-222-92/+131
|\ \ | |/ |/|
| * Mention cursor locks cleanup in news fileDaniele Varrazzo2019-01-221-0/+7
| |
| * Assign the PGresult to the cursor in the execute critical sectionexecute-locksDaniele Varrazzo2019-01-221-4/+9
| | | | | | | | | | Possible cause of the issue reported in #346 (in concurrent environments).
| * Split pq_execute into sync/async partsDaniele Varrazzo2019-01-221-92/+119
|/
* Merge remote-tracking branch 'origin/code-cleanup'Daniele Varrazzo2019-01-2119-348/+353
|\
| * Handle failed allocation in list adaptationcode-cleanupDaniele Varrazzo2019-01-211-1/+3
| |
| * Dropped funny handling of REPLICATION_* constantsDaniele Varrazzo2019-01-213-31/+8
| |
| * _psyco_curs_execute() simplifiedDaniele Varrazzo2019-01-211-53/+39
| | | | | | | | | | | | | | Dropped code duplications, more regular increc/decref pattern. Check the return value of formatting named cursor: would have segfaulted in case of error.
| * More straightforward semantics for psyco_GetDecimalTypeDaniele Varrazzo2019-01-212-6/+4
| | | | | | | | Raise an exception when returning NULL, leave the caller cleaning it.
| * Dropped use of converter function to verify copy argumentDaniele Varrazzo2019-01-211-44/+25
| | | | | | | | They weren't really converters, and they confused the static checker
| * Mark psyco_set_error as returning a borrowed objectDaniele Varrazzo2019-01-212-3/+2
| |
| * Added utils.h fileDaniele Varrazzo2019-01-215-141/+176
| | | | | | | | | | | | utils.c functions definition moved out of psycopg.h Some utility functions defined into psycopgmodule.c moved into utils.c.
| * Mark setter as raising on negative resultsDaniele Varrazzo2019-01-213-6/+6
| | | | | | | | Fixed static check of psyco_conn_cursor().
| * Consider the case dereferencing weakref in conn_poll returns NULLDaniele Varrazzo2019-01-211-1/+10
| | | | | | | | | | It shouldn't but handle the case to avoid a possible null pointer dereferencing.
| * Dropped possible wrong code path in conn_decodeDaniele Varrazzo2019-01-211-13/+15
| | | | | | | | | | It shouldn't happen for both cdecoder and pydecoder to be null, but just in case...
| * Wrap _Bytes_Resize into a function with clearer semanticDaniele Varrazzo2019-01-211-5/+19
| | | | | | | | Limit the static checker hacking to a simpler function.
| * Avoid unlikely leaks in case of memory errors in Bytes_FormatDaniele Varrazzo2019-01-211-0/+4
| |
| * Move var setting into the only case using itDaniele Varrazzo2019-01-211-5/+2
| | | | | | | | | | The original function was more complex than this. This refactoring avoids a false positive in the static checker
| * Avoid using PyErr_BadInternalCall as the static checker doesn't get itDaniele Varrazzo2019-01-211-1/+1
| |
| * Use the real definition of Py_LOCAL_INLINEDaniele Varrazzo2019-01-211-4/+1
| |
| * Bytes_Format: use a couple of macros instead of functionsDaniele Varrazzo2019-01-211-3/+2
| | | | | | | | The type was already checked upstream in the func body.
| * psycopg_escape_string: don't make me cringeDaniele Varrazzo2019-01-211-8/+8
| | | | | | | | Just reformatted.
| * Stricter use of PyArg_ParseTuple typed objectsDaniele Varrazzo2019-01-212-7/+12
| | | | | | | | The function expect PyObject *, not subclasses.
| * Respect PyCFunction signature in METH_NOARGS functionsDaniele Varrazzo2019-01-216-25/+25
|/ | | | A second parameter does exist, although it's always NULL.
* Merge remote-tracking branch 'origin/register-bytes'Daniele Varrazzo2019-01-1910-18/+100
|\ | | | | | | Close #835
| * Added documentation for BYTES casterregister-bytesDaniele Varrazzo2019-01-184-3/+39
| |
| * Added BYTESARRAY typecasterDaniele Varrazzo2019-01-184-6/+33
| |
| * Added test for BYTES typecasterDaniele Varrazzo2019-01-181-0/+11
| |
| * Fixed typecast definition orderDaniele Varrazzo2019-01-181-1/+1
| | | | | | | | | | Didn't notice that the order matter: the last typecaster registered is the effective one so let STRING win over UNICODE and BYTES.
| * Preliminary test for a BYTES adapter.Daniele Varrazzo2019-01-183-10/+18
|/ | | | | Allow returning unparsed bytes from databases with mixed encodings. See issue #519.