* The close() methods on connections and cursors don't raise exceptions if
called on already closed objects.
* Fixed fetchmany() with no argument in cursor subclasses.
* Use lo_creat() instead of lo_create() when possible for better interaction
with pgpool-II.
* Error and its subclasses are picklable, useful for multiprocessing interaction
* Better efficiency and formatting of timezone offset objects thanks to Menno
Smits.
* Fixed rownumber during iteration on cursor subclasses. Regression introduced
in 2.4.4.
* Added support for inet arrays.
* Fixed commit() concurrency problem.
* Codebase cleaned up using the GCC Python plugin's static analysis tool, which
has revealed several unchecked return values, possible NULL dereferences,
reference counting problems.
While here, let to register egg-info.
What's new in psycopg 2.4.4
---------------------------
- 'register_composite()' also works with the types implicitly defined
after a table row, not only with the ones created by 'CREATE TYPE'.
- Values for the isolation level symbolic constants restored to what
they were before release 2.4.2 to avoid breaking apps using the
values instead of the constants.
- Named DictCursor/RealDictCursor honour itersize (ticket #80).
- Fixed rollback on error on Zope (ticket #73).
- Raise 'DatabaseError' instead of 'Error' with empty libpq errors,
consistently with other disconnection-related errors: regression
introduced in release 2.4.1 (ticket #82).
What's new in psycopg 2.4.3
---------------------------
- connect() supports all the keyword arguments supported by the
database
- Added 'new_array_type()' function for easy creation of array
typecasters.
- Added support for arrays of hstores and composite types (ticket #66).
- Fixed segfault in case of transaction started with connection lost
(and possibly other events).
- Fixed adaptation of Decimal type in sub-interpreters, such as in
certain mod_wsgi configurations (ticket #52).
- Rollback connections in transaction or in error before putting them
back into a pool. Also discard broken connections (ticket #62).
- Lazy import of the slow uuid module, thanks to Marko Kreen.
- Fixed NamedTupleCursor.executemany() (ticket #65).
- Fixed --static-libpq setup option (ticket #64).
- Fixed interaction between RealDictCursor and named cursors
(ticket #67).
- Dropped limit on the columns length in COPY operations (ticket #68).
- Fixed reference leak with arguments referenced more than once
in queries (ticket #81).
- Fixed typecasting of arrays containing consecutive backslashes.
- 'errorcodes' map updated to PostgreSQL 9.1.
* Added 'set_session()' method and 'autocommit' property to the
connection. Added support for read-only sessions and, for PostgreSQL
9.1, for the "repeatable read" isolation level and the "deferrable"
transaction property.
* Psycopg doesn't execute queries at connection time to find the
default isolation level.
* Fixed bug with multithread code potentially causing loss of sync
with the server communication or lock of the client.
* Don't fail import if mx.DateTime module can't be found, even if its
support was built.
* Fixed escape for negative numbers prefixed by minus operator.
* Fixed refcount issue during copy.
* Trying to execute concurrent operations on the same connection
through concurrent green thread results in an error instead of a
deadlock.
* Use own parser for bytea output, not requiring anymore the libpq 9.0 to parse
the hex format.
* Don't fail connection if the client encoding is a non-normalized variant.
* Correctly detect an empty query sent to the backend.
* Fixed a SystemError clobbering libpq errors raised without SQLSTATE.
* Fixed interaction between NamedTuple and server-side cursors.
* Allow to specify --static-libpq on setup.py command line instead of just in
'setup.cfg'.
* New features and changes:
- Added support for Python 3.1 and 3.2. The conversion has also
brought several improvements:
- Added 'b' and 't' mode to large objects: write can deal with both
bytes strings and unicode; read can return either bytes strings
or decoded unicode.
- COPY sends Unicode data to files implementing 'io.TextIOBase'.
- Improved PostgreSQL-Python encodings mapping.
- Added a few missing encodings: EUC_CN, EUC_JIS_2004, ISO885910,
ISO885916, LATIN10, SHIFT_JIS_2004.
- Dropped repeated dictionary lookups with unicode query/parameters.
- Improvements to the named cusors:
- More efficient iteration on named cursors, fetching 'itersize'
records at time from the backend.
- The named cursors name can be an invalid identifier.
- Improvements in data handling:
- Added 'register_composite()' function to cast PostgreSQL
composite types into Python tuples/namedtuples.
- Adapt types 'bytearray' (from Python 2.6), 'memoryview' (from
Python 2.7) and other objects implementing the "Revised Buffer
Protocol" to 'bytea' data type.
- The 'hstore' adapter can work even when the data type is not
installed in the 'public' namespace.
- Raise a clean exception instead of returning bad data when
receiving bytea in 'hex' format and the client libpq can't parse
them.
- Empty lists correctly roundtrip Python -> PostgreSQL -> Python.
- Other changes:
- 'cursor.description' is provided as named tuples if available.
- The build script refuses to guess values if 'pg_config' is not
found.
- Connections and cursors are weakly referenceable.
* Bug fixes
* Fixed segfault with middleware not passing DateStyle to the client
Changes 2.3.1:
* Fixed build problem on CentOS 5.5 x86_64
Changes 2.3.0:
psycopg 2.3 aims to expose some new features introduced in PostgreSQL 9.0.
* Main new features:
- `dict` to `hstore` adapter and `hstore` to `dict` typecaster, using both
9.0 and pre-9.0 syntax.
- Two-phase commit protocol support as per DBAPI specification.
- Support for payload in notifications received from the backed.
- `namedtuple`-returning cursor.
- Query execution cancel.
* psycopg/cursor_type.c: executemany() propagates exceptions raised by the
iterable to the caller.
* lib/pool.py: dropped logging.basicConfig() call. It messes up with
projects using logging but where no handler is installed on the root
logger.
* psycopg/cursor_type.c: exceptions raised in the columns iterator of the
copy methods propagated to the caller.
* psycopg/typecast_datetime.c: Round seconds in historical timezones to
the nearest minute.
* lib/extras.py: register_tstz_w_secs() is now no-op.
Changes 2.2.1:
* Builds again on Windows.
Changes 2.2.0:
* typecast.c: Fixed problem related to receiving None from Python
when a string was expected.
* psycopg/adapter_datetime.c: Fixed TimestampFromTicks for second
values > 59.5.
* psycopg/adapter_datetime.c: Fixed same bug for TimeFromTicks.
* Added typecasters for arrays of specific MX/Py time-related types.
* psycopg/adapter_[mx]datetime.c: Explicit cast of the SQL representation
of time-related objects.
* psycopg/adapter_binary.c: Adapt buffer objects using an explicit cast on
the string literal
* lib/pqpath.c: Fixed reference leak in notify reception.
* Notifies are collected if available after every query execution.
* lib/extensions.py: DECIMAL typecaster imported from _psycopg.
* lib/extensions.py: PY* and MX* time typecaster imported from _psycopg.
* psycopg/connection_type.c: Correctly parse keywords in connect().
* psycopg/pqpath.c: Ensure running COPY in blocking mode.
* psycopg/pqpath.c: Free the GIL in blocking operations in V2 COPY FROM.
* psycopg/pqpath.c: Evaluate Python objects only once outside the COPY I/O
loops.
* Fixed problem with asynchronous NOTIFYs.
* Integrated async pacthes from Jan's git tree.
- support for UUIDs
- fix issues with non-blocking connections and lo_write
- support reset() on connections as faster alternative to open()/close()
- improved support for COPY TO and COPY FROM
- bugfixes
- assume that Python 2.4 and 2.5 are compatible and allow checking for
fallout.
- remove PYTHON_VERSIONS_COMPATIBLE that are obsoleted by the 2.3+
default. Modify the others to deal with the removals.
This is version 2, a complete rewrite of the original code to provide
new-style classes for connection and cursor objects and other
sweet candies. Like the original, psycopg 2 was written with the aim of
being very small and fast, and stable as a rock.