summaryrefslogtreecommitdiff
path: root/lib/extensions.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into drop-2to3Daniele Varrazzo2018-05-201-1/+1
|\
| * Merge branch 'master' into masterAshesh Vashi2018-05-081-1/+1
| |\
| * | Moving the encrypt_password method from the connection class to theAshesh Vashi2017-09-141-1/+1
| | | | | | | | | | | | | | | psycopgmodule, and exported it from psycopg2.extensions as per review comments.
* | | Drop 2to3 build step; make all code compatible with all PythonsJon Dufresne2017-12-111-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make all library code compatible with both Python 2 and Python 3. Helps move to modern Python idioms. Can now write for Python 3 (with workarounds for Python 2) instead of the other way around. In the future, when it is eventually time to drop Python 2, the library will be in a better position to remove workarounds Added a very small comparability module compat.py where required. It includes definitions for: - text_type -- A type. str on Python 3. unicode on Python 2. - string_types -- A tuple. Contains only str on Python 3. Contains str & unicode on Python 2.
* | Use dict comprehensionsDaniele Varrazzo2017-11-281-1/+1
|/
* Expose *DATETIMETZ* objects in the extensions moduleDaniele Varrazzo2017-03-221-4/+4
|
* Ignore None arguments passed to make_dsn()fix-517Daniele Varrazzo2017-03-011-0/+3
| | | | Close #517.
* connection.isolation_level is now writableDaniele Varrazzo2017-02-161-1/+1
|
* Exposing ISOLATION_LEVEL_DEFAULT to PythonDaniele Varrazzo2017-02-041-0/+1
| | | | | This is now the state that is returned to Python if nothing has been explicitly set.
* Python source cleanup using flake8Daniele Varrazzo2016-10-111-42/+40
|
* Dropped use of b() "macro" and 2to3 fixerDaniele Varrazzo2016-08-151-11/+2
| | | | Just use the b"" strings syntax supported from python 2.6.
* Allow make_dsn to take no parameterDaniele Varrazzo2016-03-031-1/+1
| | | | | The behaviour of connect() is unchanged: either dsn or params must be specified.
* Validate output result from make_dsn()Daniele Varrazzo2016-03-031-1/+6
| | | | | The output is not necessarily munged anyway: if no keyword is passed, validate the input but return it untouched.
* Verify that the dsn is not manipulated by make_dsn if not necessaryDaniele Varrazzo2016-03-031-0/+7
|
* Implementation of make_dsn in PythonDaniele Varrazzo2016-03-031-3/+42
| | | | | This is equivalent to what proposed in #363, but with a much simpler implementation.
* Add psycopg2.extensions.quote_ident.Oleksandr Shulgin2015-10-141-1/+1
|
* Merge branch 'master' into feature/parse-dsnOleksandr Shulgin2015-06-021-1/+1
|\ | | | | | | | | Conflicts: lib/extensions.py
| * Add libpq version discoveryOleksandr Shulgin2015-06-011-1/+1
| |
* | Move parse_dsn to extensions, add testsOleksandr Shulgin2015-06-011-1/+1
|/
* Make Column picklable on Python >= 3.3Daniele Varrazzo2015-02-081-1/+1
| | | | | Also expose the type from the extensions module, not from the main module.
* Add register_default_jsonb() and register the typeDaniele Varrazzo2014-08-131-2/+4
|
* Fix multiple misspellingsPiotr Kasprzyk2013-04-261-1/+1
|
* Dropped __all__ from modulesDaniele Varrazzo2013-04-071-2/+0
| | | | | | They were only used to generate docs with Epydoc, now largely forgotten. Imports in extras cleaned up to expose the API only.
* Enable by default the range typecastersDaniele Varrazzo2013-04-071-0/+4
| | | | | Otherwise it would have been enabled importing psycopg2.extras, which is a surprising behaviour.
* Expose the Diagnostics object in the extensions moduleDaniele Varrazzo2013-03-171-1/+1
|
* Merge branch 'json' into develDaniele Varrazzo2012-09-271-0/+11
|\
| * Added register_default_json() functionDaniele Varrazzo2012-09-191-6/+3
| | | | | | | | Register a typecaster for PostgreSQL 9.2 json.
| * Added json typecasterDaniele Varrazzo2012-09-191-0/+14
| |
* | Fixed SQL_IN when getquoted() is called without prepare()Daniele Varrazzo2012-09-241-5/+6
|/
* Put back a distinct ISOLATION_LEVEL_READ_UNCOMMITTED valueDaniele Varrazzo2011-12-151-3/+1
|
* Reverted isolation level values to backward compatible valuesFederico Di Gregorio2011-12-151-4/+6
| | | | | | | | This basically removes the READ UNCOMMITED level (that internally PostgreSQL maps to READ COMMITED anyway) to keep the numeric values compattible with old psycopg versions. For full details and discussion see this thread: http://archives.postgresql.org/psycopg/2011-12/msg00008.php
* Added new_array_type() functionDaniele Varrazzo2011-09-221-1/+1
| | | | Allows the creation of a generic array typecaster from Python.
* Don't leak private variables into the psycopg2.extensions interfaceDaniele Varrazzo2011-09-221-0/+1
|
* Merge branch 'neg-escape' into develDaniele Varrazzo2011-05-301-1/+1
|\
| * Fixed escape for negative numbers prefixed by minus operatorDaniele Varrazzo2011-05-301-1/+1
| | | | | | | | Closes ticket #57.
* | Use all the isolation levels accepted by PostgreSQLDaniele Varrazzo2011-05-111-7/+5
|/ | | | In PG 9.1 repeatable read and serializable are distinct levels.
* Only use absolute imports in the packageDaniele Varrazzo2011-01-081-23/+23
| | | | | In Python 3.2b2 the relative imports are not converted into explicit ones (with .).
* None/IN adaptation ported to Python 3.Daniele Varrazzo2011-01-021-5/+6
|
* Merge branch 'python2' into python3Daniele Varrazzo2011-01-011-0/+14
|\ | | | | | | | | | | | | | | | | Conflicts: ChangeLog NEWS-2.3 lib/extensions.py psycopg/microprotocols.c setup.py
| * Fixed adaptation of None in composite types (ticket #26).Daniele Varrazzo2011-01-011-0/+13
| | | | | | | | | | | | | | Added an adapter for None: it is usually not invoked as adaptation to NULL is a fast path in mogrify, but can be invoked by composite types. Notice that composite types still have the option to fast-path None (e.g. list adapter does).
* | Added b() function to return bytes in both Py2 and Py3.Daniele Varrazzo2010-12-311-0/+10
| |
* | Fixed PG -> Py encodings mapping with non-alnum chars.Daniele Varrazzo2010-12-211-0/+8
|/ | | | | | We mangle the encoding names a little bit before asking it to the backend: be sure to be able to find the equivalent Python code back or decoding (unicode cast or Py3) will barf.
* Expose the Xid object in the extension module.Daniele Varrazzo2010-11-051-1/+1
|
* Added tpc_prepare and CONN_STATUS_PREPARED.Daniele Varrazzo2010-11-051-2/+3
|
* Notify object exposed in the extensions module.Daniele Varrazzo2010-11-051-1/+1
|
* Added typecasters for arrays of specific MX/Py time-related types.Daniele Varrazzo2010-05-151-0/+2
|
* Added 'get_wait_callback()' function.Daniele Varrazzo2010-04-211-1/+1
|
* Added wait callback and functions to deal with it.Daniele Varrazzo2010-04-211-0/+6
|
* PY* and MX* typecasters imported into the extensions module.Daniele Varrazzo2010-04-141-0/+3
|
* DECIMAL typecaster imported into the extensions module.Daniele Varrazzo2010-04-141-1/+1
|