summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Merge pull request #828 from wbolster/patch-1Daniele Varrazzo2019-01-081-1/+1
|\ | | | | mention postgresql 11 in install docs
| * mention postgresql 11 in install docswouter bolsterlee2018-12-071-1/+1
| |
* | Don't call CLEARPGRES on the cursor state without holding the gilDaniele Varrazzo2019-01-021-2/+2
| | | | | | | | | | | | | | There is a chance it is executed by two different threads resulting in issue #384. I havent't found any other case that may lead to double free.
* | Couple of objects into NEWS entries converted into linksDaniele Varrazzo2018-12-271-3/+4
| |
* | Added # char to a few issues in newsDaniele Varrazzo2018-12-271-5/+5
| | | | | | | | Just a formatting thing #ocd #youdontcare #really.
* | Merge remote-tracking branch ↵Daniele Varrazzo2018-12-274-1/+23
|\ \ | |/ |/| | | 'eternalflow/execute-values-returning-clause-support'
| * Mention execute_values() fetch in newsDaniele Varrazzo2018-12-271-0/+2
| |
| * Docs wordsmith for execute_values() fetch paramDaniele Varrazzo2018-12-272-3/+4
| |
| * Some harmless adjustments in execute_values() codeDaniele Varrazzo2018-12-271-3/+2
| | | | | | | | No optional result, and create the list only if requred.
| * add versionchanged to docsIvan Kotelnikov2018-11-241-0/+2
| |
| * rename param name to fetchIvan Kotelnikov2018-11-242-5/+5
| |
| * write test for fetch_result flagIvan Kotelnikov2018-11-221-0/+9
| |
| * add RETURNING clause support in execute_values functionIvan Kotelnikov2018-11-211-1/+10
| |
* | Merge pull request #823 from jdufresne/dep-poolDaniele Varrazzo2018-12-053-63/+2
|\ \ | | | | | | Dropped deprecated PersistentConnectionPool
| * | Dropped deprecated PersistentConnectionPoolJon Dufresne2018-12-043-63/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This class was deprecated in 27cd6c4880161a715b1952be64cc96ebc968fa2b (Dec 2, 2012), which was first included in release 2.5. Enough time has passed for library uses to find an alternative solution. This class was untested.
* | | Merge pull request #819 from jdufresne/ctypesDaniele Varrazzo2018-12-051-27/+8
|\ \ \ | |/ / |/| | Remove unnecessary test decorator 'skip_if_cant_cast'
| * | Remove unnecessary test decorator 'skip_if_cant_cast'Jon Dufresne2018-12-041-27/+8
|/ / | | | | | | | | | | ctypes is available and works on all supported Pythons. It has been available since Python 2.5. The tests were written when Python 2.4 was still supported.
* | Merge pull request #822 from jdufresne/decorate-allDaniele Varrazzo2018-12-042-88/+50
|\ \ | | | | | | Simplify 'decorate_all_tests' usage by decorating the test class
| * | Simplify 'decorate_all_tests' usage by decorating the test classJon Dufresne2018-12-012-88/+50
| |/ | | | | | | | | Skip tests as early as possible by decorating the whole class with unittest.skipIf instead of every test method individually.
* | Merge pull request #821 from jdufresne/skip-libpqDaniele Varrazzo2018-12-042-7/+0
|\ \ | | | | | | Remove workarounds for unsupported libpq < 9.1
| * | Remove workarounds for unsupported libpq < 9.1Jon Dufresne2018-12-012-7/+0
| |/ | | | | | | | | | | Per http://initd.org/psycopg/docs/install.html#prerequisites: > PostgreSQL client library version from 9.1
* | Merge pull request #820 from jdufresne/appveyorDaniele Varrazzo2018-12-041-3/+2
|\ \ | | | | | | Remove Python 3.3 references from appveyor.yml
| * | Remove Python 3.3 references from appveyor.ymlJon Dufresne2018-12-011-3/+2
| |/ | | | | | | | | Python 3.3 has been unsupported since c2d082e896e7bcb81231603404e7d4789e56cf00.
* | Merge pull request #818 from jdufresne/bool-simplifyDaniele Varrazzo2018-12-045-47/+12
|\ \ | |/ |/| Simplify PyBool usage with Python convenience macros/functions
| * Simplify PyBool usage with Python convenience macros/functionsJon Dufresne2018-11-305-47/+12
|/ | | | https://docs.python.org/3/c-api/bool.html