Skip to content

Commit b54a0ab

Browse files
author
James William Pye
committed
Add warnings and notes about the pending deprecations.
1 parent ecf6bd2 commit b54a0ab

2 files changed

Lines changed: 20 additions & 8 deletions

File tree

postgresql/documentation/driver.txt

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ driver would never identify them as driver parameters.
9090

9191
The general structure of a PQ-locator is::
9292

93-
protocol://user:password@host:port/database?[driver_setting]=value&server_setting=value#schema,public
93+
protocol://user:password@host:port/database?[driver_setting]=value&server_setting=value
9494

9595
Optionally, connection keyword arguments can be used to override anything given
9696
in the locator::
@@ -295,7 +295,7 @@ used to interact with the database provided by the server. If further use of the
295295
server is desired, a new connection *must* be established.
296296

297297
.. note::
298-
Cannot connect failures, exceptions raised on ``connect()``, are also terminal.
298+
Cannot connect failures, exceptions raised on ``connect()``, are also terminal.
299299

300300
In cases where operations are performed on a closed connection, a
301301
`postgresql.exceptions.ConnectionDoesNotExistError` will be raised.
@@ -806,9 +806,9 @@ Likewise, cursors created from statement invocations will be automatically
806806
released when they are no longer referenced.
807807

808808
.. note::
809-
PG-API cursors are a direct interface to single result-set SQL cursors. This
810-
is in contrast with DB-API cursors, which have interfaces for dealing with
811-
multiple result-sets. There is no execute method on PG-API cursors.
809+
PG-API cursors are a direct interface to single result-set SQL cursors. This
810+
is in contrast with DB-API cursors, which have interfaces for dealing with
811+
multiple result-sets. There is no execute method on PG-API cursors.
812812

813813

814814
Cursor Interface Points
@@ -1267,6 +1267,10 @@ instruction methods provided by `postgresql.api.Transaction` objects.
12671267
Transaction Configuration
12681268
-------------------------
12691269

1270+
.. warning::
1271+
**All transaction configuration arguments are being deprecated over the**
1272+
**next few versions of py-postgresql. Use should be discontinued**.
1273+
12701274
Keyword arguments given to ``xact()`` provide the means for configuring the
12711275
properties of the transaction. Only three points of configuration are available:
12721276

@@ -1314,11 +1318,11 @@ that change of state.
13141318
phase.
13151319

13161320
``x.recover()``
1317-
Identify the existence of the prepared transaction.
1321+
Identify the existence of the prepared transaction. (**Deprecated**)
13181322

13191323
``x.prepare()``
13201324
Prepare the transaction for the final commit. Once prepared, the second commit
1321-
may be ran to finalize the transaction, ``x.commit()``.
1325+
may be ran to finalize the transaction, ``x.commit()``. (**Deprecated**)
13221326

13231327
These methods are primarily provided for applications that manage transactions
13241328
in a way that cannot be formed around single, sequential blocks of code.
@@ -1374,6 +1378,10 @@ property on the raised exception.
13741378
Prepared Transactions
13751379
---------------------
13761380

1381+
.. warning::
1382+
**The two phase commit interfaces are being deprecated.**
1383+
**Use should be discontinued.**
1384+
13771385
Transactions configured with the ``gid`` keyword will require two steps to fully
13781386
commit the transaction. First, ``prepare()``, then ``commit()``. The prepare
13791387
method will issue the necessary PREPARE TRANSACTION statement, and commit will
@@ -1458,6 +1466,10 @@ And ``update(...)`` is better performing for multiple sets:
14581466
... 'default_statistics_target' : "1000"
14591467
... })
14601468

1469+
..note::
1470+
The ``transaction_isolation`` setting cannot be set using the ``settings``
1471+
mapping. Internally, ``settings`` uses ``set_config``, which cannot adjust
1472+
that particular setting.
14611473

14621474
Settings Interface Points
14631475
-------------------------

sphinx-src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ mkdirs:
7474
dump: mkdirs
7575
cp ../postgresql/documentation/*.txt ./
7676
cp index.rst index.txt
77-
cp modules.rst modules.txt
77+
#cp modules.rst modules.txt

0 commit comments

Comments
 (0)