Commit Graph

898 Commits

Author SHA1 Message Date
Daniele Varrazzo
80ebb14df4 Use stable anchors to reference PostgreSQL docs. 2010-09-23 23:13:59 +01:00
Daniele Varrazzo
9b3aa290d2 Added missing import required by Sphinx 1.0. 2010-08-05 01:08:21 +01:00
Daniele Varrazzo
660b75c2f4 Typo fixed. 2010-08-04 23:26:52 +01:00
Federico Di Gregorio
c3b835929b Preparing release 2.2.2 2010-07-18 12:32:45 +02:00
Federico Di Gregorio
557608f715 Applied spelling fixes patch from Peter Eisentraut 2010-07-18 12:14:46 +02:00
Federico Di Gregorio
b263fbf274 Added deprecation warning to register_tstz_w_secs 2010-07-13 14:26:52 +02:00
Daniele Varrazzo
deb2d9050f Exceptions raised by the columns iterator propagated. 2010-07-10 00:12:50 +01:00
Daniele Varrazzo
cb8128c6d4 Added test to verify copy_from() with columns. 2010-07-10 00:04:54 +01:00
Daniele Varrazzo
927f2bb1f1 Dropped logging.basicConfig() call.
It messes up with projects using logging but where no handler is
installed on the root logger.  Bug reported by Joe Abbate.
2010-07-09 23:23:10 +01:00
Daniele Varrazzo
3773b50bb3 Propagate iterable exceptions to the executemany caller. 2010-07-09 23:22:35 +01:00
Daniele Varrazzo
bd6a4139da Added test to verify executemany doesn't propagate exceptions. 2010-07-09 15:23:02 +01:00
Daniele Varrazzo
4a78e4068b Dropped register_tstz_w_secs() implementation.
The function is no-op now that the default type caster can deal with
seconds in the tz offset.
2010-05-20 02:18:04 +01:00
Daniele Varrazzo
305d86f38a Handle time zones with seconds in the UTC offset.
The offset is rounded to the nearest minute.
2010-05-20 02:16:04 +01:00
Daniele Varrazzo
e3d489f701 Bump to version 2.2.2-devel.
The -devel suffix appears in the docs we publish on the website, so it's
clear that they refer to the upcoming version.
2010-05-20 02:03:07 +01:00
Daniele Varrazzo
eacf6febfe Warn on declarations not at beginning of the block.
They are accepted by gcc but not by MS compilers.
2010-05-19 11:40:38 +01:00
Daniele Varrazzo
b597ccf917 Tests can be run again different coroutine libraries.
Use PSYCOPG2_TEST_GREEN=<something>, where <something> is 1 or a library
name. Currently eventlet is supported.
2010-05-19 11:40:13 +01:00
Federico Di Gregorio
23391a3c55 Preparing release 2.2.1 2010-05-17 21:51:25 +02:00
Jason Erickson
069695b4ae Additional Library for Windows linking and OpenSSL 1.0.0
Added the linking of crypt32.lib to the windows SSL build, as it seems that the current version of OpenSSL is looking for crypt32.lib as well.
2010-05-17 09:06:29 +02:00
Jason Erickson
1f1133b871 Micrsoft Visual C Compile Fix
Moved the declarations of variables/pointers to the beginning of the block, where MSVC wants them.
2010-05-17 09:06:14 +02:00
Federico Di Gregorio
e286970b62 Preparing release 2.2.0 2010-05-16 12:55:59 +02:00
Federico Di Gregorio
6521fb5a44 Fixed error related to calling C typecasters from Python ones 2010-05-15 19:34:56 +02:00
Federico Di Gregorio
36cbefdee1 Updated project and version for release 2.2.0 2010-05-15 17:51:54 +02:00
Daniele Varrazzo
a35498532a Fixed time test to be independent from the TZ it runs. 2010-05-15 14:27:24 +01:00
Daniele Varrazzo
c46a1dad63 Fixed TimeFromTicks for second values > 59.5. 2010-05-15 14:27:24 +01:00
Daniele Varrazzo
afea19651c Fixed TimestampFromTicks for second values > 59.5.
Bug reported and fixed by Jozsef Szalay on 2010-05-06 at 14:11:59.999920.
2010-05-15 14:27:24 +01:00
Daniele Varrazzo
b04bf41f99 Fixed decimal to float recipe to avoid using FLOAT.
FLOAT seems not working with NULLs.
2010-05-15 14:27:24 +01:00
Daniele Varrazzo
5e3f240ac9 Cast datetime into timestamptz when the tzinfo field is set. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
60e7522e47 Added evaluable representation for the FixedOffsetTimezone object. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
d30daac782 Fixed typo in LocalTimezone doc. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
bf1c76b792 Explicit cast of the SQL representation of time-related objects.
Allow the objects to be recognized as the proper type by Postgres in not
strong contexts: problem reported by Peter Eisentraut.

Added tests to check the types are respected in a complete Py -> PG ->
Py roundtrip without context.
2010-05-15 14:27:23 +01:00
Daniele Varrazzo
e8c2a14362 Added typecasters for arrays of specific MX/Py time-related types. 2010-05-15 14:27:23 +01:00
Daniele Varrazzo
c8aef26e15 Adapt buffer objects using an explicit cast on the string literal.
Don't rely on Postgres casting the literal according to the context:
this doesn't work e.g. passing the object as function argument where a
function with the same name but taking a text exists. It doesn't work
either when the object is in an ARRAY construct.

Added test to check the type is respected in a complete Py -> PG -> Py
roundtrip without context.

Bug and solution reported by Peter Eisentraut.
2010-05-15 14:27:23 +01:00
Daniele Varrazzo
2020790ba1 Typo fixed. 2010-05-15 14:27:02 +01:00
Daniele Varrazzo
73db6bee01 Keep the connection in blocking mode unless it is not async.
Dropped set/unset nonblocking mode for copy and lobject operations:
lobjects don't work in nonblocking mode so they will hardly be supported
in green/async branches.  Support for copy is still feasible, but it
will be done in other code paths (called by poll).
2010-05-09 20:37:48 +01:00
Daniele Varrazzo
e29424a230 Dropped large object support when psycopg is in green mode.
Async mode and large object are not compatible, albeit I haven't found
an authoritative source yet.
2010-05-09 20:34:02 +01:00
Daniele Varrazzo
2596cf7125 Simplified psyco_wait() function interface. 2010-04-25 23:08:08 +01:00
Daniele Varrazzo
8efa1fa6af Dropped compiling warning. 2010-04-25 23:08:08 +01:00
Daniele Varrazzo
dab098c1cb Cleaned up documentation for connection status constants.
Dropped reference to unused/internal states.
2010-04-23 13:28:49 +01:00
Daniele Varrazzo
cb40342afa poll implementation for async, sync and green connection unified. 2010-04-23 13:28:49 +01:00
Daniele Varrazzo
0da4befe78 Added function to advance the state after flush attempt. 2010-04-23 13:28:38 +01:00
Daniele Varrazzo
f3b3483df3 Added a function to advance the state after a read attempt.
Dropped calls to PQisBusy/PQconsumeInput in the connection code.
2010-04-23 13:24:36 +01:00
Daniele Varrazzo
e82d2be64b More lenient test timeout for a slow (or busy) machine. 2010-04-23 13:24:35 +01:00
Daniele Varrazzo
1edbd16577 Dropped curs_get_last_result function.
The result is read from a pqpath function and put on the async_cursor by
a function that also checks for is presence and dismiss it after its
usage.
2010-04-23 13:24:35 +01:00
Daniele Varrazzo
a66de9808f Added 'pq_get_last_result()' function.
The function reads the last result after an asynchronous query.
2010-04-23 13:24:35 +01:00
Daniele Varrazzo
5be0fc52ca Reusable parts of the green polling refactored out.
The functions _conn_poll_connecting() and _conn_poll_query() will be
usable by the async connections too.
2010-04-23 13:24:35 +01:00
Daniele Varrazzo
df959c20be Making sync and async connection setup somewhat more consistent. 2010-04-23 13:24:35 +01:00
Daniele Varrazzo
d915cb12a8 Functions to poll in ready state moved on the connection. 2010-04-23 13:24:35 +01:00
Daniele Varrazzo
9f5d835de6 Functions conn_poll_* renamed to conn_poll_connect_*.
These functions are used only during async connections, not for polling
afterwards.
2010-04-23 13:24:35 +01:00
Daniele Varrazzo
d2d1160260 Documentation about coroutines support reviewed. 2010-04-23 13:20:56 +01:00
Daniele Varrazzo
7af0bf0b54 Set the async_status to ASYNC_DONE after a query with wait callback.
Failing in doing that broke notifications reception.

The responsibility for changing the async_status has been moved to the
poll function: this is consistent with how the async branch is
implemented.

With this commit all the test suite passes in "green" mode.
2010-04-21 16:20:16 +01:00