Skip to content

Commit 440163e

Browse files
Improved samples and test suite.
1 parent c665d2e commit 440163e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+426
-240
lines changed

doc/src/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Version 8.3 (TBD)
1717
implicit conversion to integer has become an error in Python 3.10) and
1818
values that are not `int`, `float` or `decimal.Decimal` are explicitly
1919
rejected.
20+
#) Improved samples and test suite.
2021

2122

2223
Version 8.2.1 (June 2021)

samples/bulk_aq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#------------------------------------------------------------------------------
1111
# bulk_aq.py
1212
# This script demonstrates how to use bulk enqueuing and dequeuing of
13-
# messages with advanced queuing using cx_Oracle. It makes use of a RAW queue
14-
# created in the sample setup.
13+
# messages with advanced queuing. It makes use of a RAW queue created in the
14+
# sample setup.
1515
#
1616
# This script requires cx_Oracle 8.2 and higher.
1717
#------------------------------------------------------------------------------

samples/connection_pool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#------------------------------------------------------------------------------
66
# connection_pool.py
7-
# This script demonstrates the use of connection pooling in cx_Oracle. Pools
8-
# can significantly reduce connection times for long running applications that
7+
# This script demonstrates the use of connection pooling. Pools can
8+
# significantly reduce connection times for long running applications that
99
# repeatedly open and close connections. Internal features help protect against
1010
# dead connections, and also aid use of Oracle Database features such as FAN
1111
# and Application Continuity.
@@ -27,8 +27,8 @@
2727
# Create a Connection Pool
2828
pool = oracledb.SessionPool(user=sample_env.get_main_user(),
2929
password=sample_env.get_main_password(),
30-
dsn=sample_env.get_connect_string(), min=2,
31-
max=5, increment=1)
30+
dsn=sample_env.get_connect_string(), min=2, max=5,
31+
increment=1)
3232

3333
def the_long_query():
3434
with pool.acquire() as conn:

samples/cqn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# This script demonstrates using continuous query notification in Python, a
1313
# feature that is available in Oracle 11g and later. Once this script is
1414
# running, use another session to insert, update or delete rows from the table
15-
# cx_Oracle.TestTempTable and you will see the notification of that change.
15+
# TestTempTable and you will see the notification of that change.
1616
#
1717
# This script requires cx_Oracle 5.3 and higher.
1818
#------------------------------------------------------------------------------

samples/database_change_notification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# This script demonstrates using database change notification in Python, a
1313
# feature that is available in Oracle 10g Release 2. Once this script is
1414
# running, use another session to insert, update or delete rows from the table
15-
# cx_Oracle.TestTempTable and you will see the notification of that change.
15+
# TestTempTable and you will see the notification of that change.
1616
#
1717
# This script requires cx_Oracle 5.3 and higher.
1818
#------------------------------------------------------------------------------

samples/generic_row_factory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#------------------------------------------------------------------------------
1111

1212
import collections
13+
1314
import cx_Oracle as oracledb
1415
import sample_env
1516

@@ -21,7 +22,7 @@ def cursor(self):
2122

2223
class Cursor(oracledb.Cursor):
2324

24-
def execute(self, statement, args = None):
25+
def execute(self, statement, args=None):
2526
prepare_needed = (self.statement != statement)
2627
result = super().execute(statement, args or [])
2728
if prepare_needed:

samples/json_blob.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
#
1616
#------------------------------------------------------------------------------
1717

18-
import sys
1918
import json
19+
import sys
20+
2021
import cx_Oracle as oracledb
2122
import sample_env
2223

samples/json_direct.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
# For JSON with older databases see json_blob.py
1111
#------------------------------------------------------------------------------
1212

13-
import sys
1413
import json
14+
import sys
15+
1516
import cx_Oracle as oracledb
1617
import sample_env
1718

samples/multi_consumer_aq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
#------------------------------------------------------------------------------
1111
# multi_consumer_aq.py
12-
# This script demonstrates how to use multi-consumer advanced queuing using
13-
# cx_Oracle. It makes use of a RAW queue created in the sample setup.
12+
# This script demonstrates how to use multi-consumer advanced queuing. It
13+
# makes use of a RAW queue created in the sample setup.
1414
#
1515
# This script requires cx_Oracle 8.2 and higher.
1616
#------------------------------------------------------------------------------

samples/object_aq.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010
#------------------------------------------------------------------------------
1111
# object_aq.py
12-
# This script demonstrates how to use advanced queuing with objects using
13-
# cx_Oracle. It makes use of a simple type and queue created in the sample
14-
# setup.
12+
# This script demonstrates how to use advanced queuing with objects. It makes
13+
# use of a simple type and queue created in the sample setup.
1514
#
1615
# This script requires cx_Oracle 8.2 and higher.
1716
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)