Commit Graph

423 Commits

Author SHA1 Message Date
Daniele Varrazzo
d2dce4dd17 Fixed link to RealDictRow from last news 2019-04-06 20:22:03 +01:00
Daniele Varrazzo
cc815e8e8d RealDictRow inherits from OrderedDict
Now its state is unmodified, so apart from special-casing creation
and initial population can work unmodified, and all the desired
properties just work (modifiability, picklability...)

Close #886.
2019-04-06 19:43:31 +01:00
Daniele Varrazzo
21d16b6f67 Fixed RealDictCursor.pop()
Addresses #886, but there might be something else broken there.
2019-04-06 19:43:09 +01:00
Daniele Varrazzo
755a128ffb Handle ok poll() without a cursor having executed queries
Close #887
2019-04-05 18:04:55 +01:00
Daniele Varrazzo
813ca30953 Fixed notice about new wal_end attribute being on the cursor 2019-04-01 10:40:06 +01:00
Daniele Varrazzo
b8bf6d9917 Added news entry about ReplicationMessage.wal_end 2019-03-30 21:23:20 +00:00
Daniele Varrazzo
f8f5a77838 Mention closed #829 in NEWS file 2019-03-18 01:51:29 +00:00
Daniele Varrazzo
734845b79a Added pq_get_result_async() replaced pg_get_last_result()
The new function keeps together PQconsumeInput() with PQisBusy(), in
order to handle the condition in which not all the results of a sequence
of statements arrive in the same roundtrip.

Added pointer to a PGresult to the connection to keep the state across
async communication: it can probably be used to simplify other code
paths where a result is brought forward manually.

Close #802
Close #855
Close #856
2019-03-17 01:20:06 +00:00
Jon Dufresne
432fdd7d32 Removed support for mxDateTime as the default date and time adapter
The use_pydatetime configuration option has been removed. Now, always
default to Python's builtin datetime. mxDatetime support continues to be
available as an alternative to Python's builtin datetime.
2019-03-16 16:36:49 +00:00
Daniele Varrazzo
f2654d3573 Advertise openssl 1.0.2r and libpq 11.2 in wheels 2019-03-13 11:12:17 +00:00
Daniele Varrazzo
80b7b845d2 Added docs about pgconn_ptr, pgresult_ptr 2019-02-16 18:12:52 +01:00
Daniele Varrazzo
1dd8c7435f Mention binary packages no longer installed by default in NEWS
Also fixed an unrelated typo.

[skip ci]
2019-02-16 16:10:03 +01:00
Daniele Varrazzo
805527fcd6 Added caching of types generated by NamedTupleCursor
see #838
2019-02-02 14:22:25 +00:00
Daniele Varrazzo
4298718978 Dropped PSYCOPG_DISPLAY_SIZE build parameter
Big and complex _pq_fetch_tuples simplified by moving per-column
calculation to a separate function.
2019-01-25 17:31:39 +00:00
Daniele Varrazzo
63040e5134 Mention new OpenSSL version in wheel package 2019-01-22 12:25:03 +00:00
Daniele Varrazzo
c34c99aa7f Mention cursor locks cleanup in news file 2019-01-22 11:20:36 +00:00
Daniele Varrazzo
49777de74c Added documentation for BYTES caster 2019-01-18 16:15:15 +00:00
Daniele Varrazzo
ddcf808d56 Couple of objects into NEWS entries converted into links 2018-12-27 15:04:43 +01:00
Daniele Varrazzo
b26a0b149d Added # char to a few issues in news
Just a formatting thing #ocd #youdontcare #really.
2018-12-27 15:01:45 +01:00
Daniele Varrazzo
f3695e36c7 Merge remote-tracking branch 'eternalflow/execute-values-returning-clause-support' 2018-12-27 14:53:12 +01:00
Daniele Varrazzo
7c8d2f484e Mention execute_values() fetch in news 2018-12-27 14:51:18 +01:00
Jon Dufresne
a1fdaebc30 Dropped deprecated PersistentConnectionPool
This class was deprecated in
27cd6c4880 (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.
2018-12-04 06:32:00 -08:00
Daniele Varrazzo
73a680f45d Convert int subclasses to long before adapting
Fixes adaptation of int/long subclasses whose str() is not the number,
such IntEnum

Close #591

Note that I thought it would have needed a new adapter, so I considered
it a new feature. But it is more a shortcoming of the int adapter
failing to do something reasonable (poor Liskov, always mistreated) so I
may actually backport it if there is a new 2.7 release.
2018-11-16 18:16:03 +00:00
Daniele Varrazzo
654be4784c Dropped examples dir (and some leftover reference to the sandbox dir)
Close #645.
2018-11-16 17:06:06 +00:00
Daniele Varrazzo
f9d6430ae4 Mentioning binary packages fixes in news file 2018-11-10 23:48:47 +00:00
Daniele Varrazzo
3279ff7507 Mention get_native_connection() in the news file 2018-11-09 11:40:17 +00:00
Daniele Varrazzo
991b0e02c5 Fixed NEWS file after I actually re-read it for release. 2018-11-09 11:33:03 +00:00
Daniele Varrazzo
a83696fc50 Fixed adaptation of lists of empty lists
...somehow. Postgres doesn't support them and converts them into a
simple empty array. However this is not really our concern: the syntax
we return is valid.

Close #788
2018-10-30 01:48:51 +00:00
Daniele Varrazzo
8fb0f694f7 Don't barf on Composite passed to execute_values()
Close #794
2018-10-23 01:57:48 +01:00
Daniele Varrazzo
fae4284a64 Minimal formatting tweak to last news 2018-10-15 01:36:55 +01:00
Daniele Varrazzo
0236c68da9 Merge branch 'connection-info' 2018-10-15 01:24:00 +01:00
Daniele Varrazzo
c567556d71 Fixed NEWS file to mention the connection.info object 2018-10-15 01:23:51 +01:00
Daniele Varrazzo
b205764fdd Merge branch 'master' into errors-module 2018-10-15 00:58:32 +01:00
Daniele Varrazzo
5da968d6f6 Added documentation for the errors module 2018-10-15 00:48:44 +01:00
Daniele Varrazzo
7a5edff6c6 errorcodes map update to PostgreSQL 11 2018-10-14 22:57:48 +01:00
Daniele Varrazzo
d29aa1c437 Fixed refcount in connection's readonly and deferrable getters
Close #790
2018-10-12 23:32:13 +01:00
Daniele Varrazzo
6b3d3604bf Added docs for the Column object 2018-10-11 04:27:42 +01:00
Daniele Varrazzo
c314512115 Fixed infinite loop in pq_get_last_result after COPY
There will be an error downstream but we have to get out of this
function first.

Close #781
2018-10-10 23:57:34 +01:00
Daniele Varrazzo
9148157697 Merge branch 'master' into https 2018-10-10 22:07:33 +01:00
Daniele Varrazzo
cd9d74c462 Merge branch 'conn-get-host' 2018-10-10 22:03:36 +01:00
Daniele Varrazzo
382eeccab8 Small tweaks to connection.host docs 2018-10-10 22:02:20 +01:00
Marco De Paoli
1c553bb703 Added connection.host
Return the server host name of the current connect.
2018-10-06 15:19:01 +02:00
Daniele Varrazzo
4e0b2ec9c9 Added Diagnostics.severity_nonlocalized attribute
Close #783.
2018-10-04 16:13:46 +01:00
Daniele Varrazzo
4aa02b7855 sql.Identifier can wrap a sequence of strings to represent qualified names
Close #732.
2018-10-04 12:46:10 +01:00
Daniele Varrazzo
81d6f7a7ca Mention the better str(Range) in the docs. 2018-10-04 11:57:31 +01:00
Jon Dufresne
b07e34e0b8 Prefer https:// URLs when available 2018-09-22 19:02:33 -07:00
Daniele Varrazzo
0eaa0c9d4e Mention FreeBSD build fixed in news file 2018-09-07 23:57:34 +01:00
Daniele Varrazzo
6d8f4f9f0d Close named cursor if exist, even if we didn't run execute
Close #746
2018-07-24 21:16:36 +01:00
Daniele Varrazzo
6becf0ef55 Note the upgrade in wheel dependencies in NEWS file 2018-05-23 21:51:49 +01:00
Daniele Varrazzo
0bb7d0db48 DictCursor and RealDictCursor rows maintain columns order
Close #177.
2018-05-21 03:14:08 +01:00
Daniele Varrazzo
e8a831dda2 Merge branch 'master' into drop-2to3 2018-05-20 23:56:29 +01:00
Daniele Varrazzo
9eb3e0cb79 encrypt_password() reported in the news file 2018-05-20 22:31:22 +01:00
Daniele Varrazzo
3f0a7f9af4 Added license to the docs
Includes other docs improvements, such as the ones proposed in #711.
2018-05-20 17:03:08 +01:00
Daniele Varrazzo
c4da939909 Don't raise an exception closing an unused named cursor
Close #716
2018-05-20 14:00:09 +01:00
Daniele Varrazzo
098c00d73e Merge remote-tracking branch 'nested-array-nulls' 2018-05-20 12:51:13 +01:00
Daniele Varrazzo
bc84b6233e Allow non-ascii chars in namedtuple fields
They can be valid chars in Python 3. Or maybe not? In which case Python
will throw an exception, but that's fine.

Fix regression introduced fixing #211
2018-05-18 12:15:50 +01:00
Daniele Varrazzo
b5e4a040f8 Fixed adaptation of arrays of arrays of nulls
Close #325, close #706.
2018-05-18 12:10:20 +01:00
Daniele Varrazzo
ea923b63a4 Allow strings subclasses in ensure_bytes
Fix #679
2018-02-21 10:27:28 +00:00
Daniele Varrazzo
ede418a009 Report MSYS2 build probably fixed 2018-02-19 13:53:50 +00:00
Daniele Varrazzo
8670287928 Added Solaris 11 fix to news file 2018-02-19 11:43:37 +00:00
Daniele Varrazzo
c52e49a9da Report Python 2.6 wheels no more available
[skip ci]
2018-01-29 12:58:28 +00:00
Daniele Varrazzo
ddb87b7727 Convert fields names into valid Python identifiers in NamedTupleCursor
Close #211.
2018-01-29 03:30:46 +00:00
Daniele Varrazzo
957fd79a27 Build using OpenSSL 1.0.2n 2018-01-29 03:27:08 +00:00
Daniele Varrazzo
f976c428d2 Mention new wheel packages in news file
Close #543.
2018-01-29 03:23:59 +00:00
Daniele Varrazzo
74d2c4bef9 Fixed idempotence check changing connection characteristics 2018-01-11 02:23:27 +00:00
Daniele Varrazzo
e0226fc46a 'cursor.mogrify()' can be called on closed cursors
Fix #579.
2018-01-11 08:55:31 +09:00
Daniele Varrazzo
b3a70e09e9 pypi3 fix noted in the news file 2018-01-10 22:44:37 +00:00
Jon Dufresne
8ad2098b74 Drop 2to3 build step; make all code compatible with all Pythons
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.
2017-12-11 20:26:58 -08:00
Jon Dufresne
389f6c08d9 Avoid installing tests to site-packages
For library end users, there is no need to install tests alongside the
package itself. This keeps the tests available for development without
adding extra packages to user's site-packages directory. Reduces the
size of the installed package. Avoids accidental execution of test code
by an installed package.
2017-12-10 10:55:58 -08:00
Jon Dufresne
19b1efd629 Drop long deprecated function register_tstz_w_secs()
Deprecated in commit b263fbf274 on
2010-01-13. The deprecation warning was first released in version 2.2.2.

The function used to register an alternate type caster for TIMESTAMP
WITH TIME ZONE to deal with historical time zones with seconds in the
UTC offset. These are now correctly handled by the default type caster,
so currently the function doesn't do anything.
2017-12-10 07:57:11 -08:00
Daniele Varrazzo
861e389fcf Dropped psycopg1 module 2017-12-04 11:56:27 +00:00
Daniele Varrazzo
a51160317c Fixed NEWS file entries
- 2.6.3 has not been released (yet). Fixes for bug #420, bug #462 were
  relased in 2.7.
- Added missing report for bug #489 fixed in 2.7.
2017-12-01 16:29:29 +00:00
Daniele Varrazzo
65ed5478d1 Collect rowcount in executemany even when discarding results
Closes #633.
2017-11-29 15:42:04 +00:00
Daniele Varrazzo
727b952a32 Build and test packages with libpq 10.1 and OpenSSL 1.0.2m 2017-11-28 17:19:55 +00:00
Daniele Varrazzo
87da2f898d Fixed __libpq_version__ for Postgres >= 10.1
The version should be considered as 10.0.1; the number was generated as
10.1.0 instead.

Version number bumped to test building new wheels packages.

Fix #632.
2017-11-28 17:19:01 +00:00
Hugo
60b1517c55 Add news and update version check 2017-11-28 16:11:02 +00:00
Daniele Varrazzo
914ccbacb5 Merge branch 'python3_mintimeloggingconnection' 2017-11-28 03:23:42 +00:00
Daniele Varrazzo
b4f066bd43 Mention MinTimeLoggingCursor fix in NEWS file 2017-11-28 03:22:53 +00:00
Daniele Varrazzo
1959d2403f Merge branch 'solaris-support' 2017-11-28 03:16:04 +00:00
Daniele Varrazzo
a1831ef498 Mention solaris support in NEWS
Close #532.
2017-11-28 03:13:25 +00:00
Daniele Varrazzo
7a2dd85caa NEWS updated after last bugfix. 2017-11-16 16:07:34 +00:00
Daniele Varrazzo
980145eaee Preparing release 2.7.3.2
Close #601, close #602.
2017-10-24 11:43:26 +01:00
Daniele Varrazzo
6ee8b4c9aa Bumping version to test libpq 10 wheel package 2017-10-18 22:25:42 +01:00
Daniele Varrazzo
c45e219387 Preparing release 2.7.3.1 to fix wheel packages 2017-08-25 15:12:12 +01:00
Daniele Varrazzo
775de754cf Added back timestamptz[] default cast
It was registered as side effect of an excessive definition that got
cleaned up in 338dbe70a6.

Looking at other removed redundant type oids, this was the only one
missing from the `string_types` map.

Close #578.
2017-07-24 14:23:36 +01:00
Daniele Varrazzo
1a97445471 Accept Composable in start_replication_expert()
Close #554
2017-06-17 03:30:44 +01:00
Daniele Varrazzo
991f0988ee Use an import style reported not broken on Python 3.6
Couldn't reproduce the issue but it has been documented in #550.
2017-06-17 01:51:37 +01:00
Daniele Varrazzo
2b5e131831 Merge branch 'fix-558' 2017-06-16 19:41:52 +01:00
Daniele Varrazzo
70a2d2238e Consider redshift interval supported after further tests 2017-06-16 19:39:18 +01:00
Daniele Varrazzo
789eb64f3a Added Json.prepare()
Close #562
2017-06-16 01:37:49 +01:00
Daniele Varrazzo
21ee8b62ef Merge branch 'mr-566' 2017-06-16 01:04:27 +01:00
Daniele Varrazzo
eef198ac5e Report issue #541 fixed in the NEWS file 2017-06-15 23:25:19 +01:00
Daniele Varrazzo
602c74faa6 Check return code from decoding the connection status
It fails on Py3 after receiving a SIGABRT. Because we don't handle it
here it will resurface later with nonsense such as:

    SystemError: <some function> returned a result with an error set

Close #551
2017-06-15 17:33:05 +01:00
Daniele Varrazzo
256910f8ff Updated docs about versions supported in errcodes 2017-06-05 12:34:17 +01:00
Daniele Varrazzo
6e5abf33f2 Merge branch 'fix-547' 2017-04-19 01:34:39 +01:00
Daniele Varrazzo
9d7ff405ee Added news entries for the previous 2 merge requests 2017-04-19 01:16:08 +01:00
Daniele Varrazzo
248e653c9e Fixed args parsing in ReplicationCursor.consume_stream()
Close #547.
2017-04-19 01:01:59 +01:00
Daniele Varrazzo
a66c34a6d0 Don't clobber a Python exception with an unknown error
Close #410
2017-04-05 14:54:07 +01:00
Daniele Varrazzo
7214c6652e Return objects with timezone parsing infinity timestamptz
Close #536.
2017-03-22 03:03:02 +00:00
Daniele Varrazzo
9f160fd820 Obscure the password on url dsn too
Note that we don't leak anymore the password length.

Fix #528
2017-03-16 03:53:40 +00:00