Skip to content

Commit 3673dc6

Browse files
authored
Fix for issues #796, #764 and added python 3.11 support (#809)
Signed-off-by: ek <ek@rocketsoftware.com> Signed-off-by: ek <ek@rocketsoftware.com>
1 parent 94df146 commit 3673dc6

9 files changed

+71
-13
lines changed

CHANGES.md

+28
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
1+
2022-11-08, Version 3.1.4
2+
===========================
3+
4+
* Fix for issue #796 (Earamma kanasavi)
5+
6+
* Fix for issue #764 (Earamma Kanasavi)
7+
8+
* Fix for issue #795 (Earamma Kanasavi)
9+
10+
* Fix for issue #792 (Earamma Kanasavi)
11+
12+
* Fix for python issue #779 and #778 (Earamma Kanasavi)
13+
14+
* Added Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS for the API's [Fixed for issue #703] (Earamma Kanasavi)
15+
16+
* Update Python 3.11 support in readme and setup.py (Earamma Kanasavi)
17+
18+
* Updating changes.md and readme.md file (Earamma Kanasavi)
19+
20+
2022-08-03, Version 3.1.3
21+
=========================
22+
23+
* setup.py upgrade : better error handling while installation(Earamma Kanasavi)
24+
25+
* Code fix for #757 (Earamma Kanasavi)
26+
27+
* Code fix for #766 (Earamma Kanasavi)
128

29+
* Fix installation failure issue when IBM site is down (Bimal)
230

331
2022-06-13, Version 3.1.2
432
===========================

IBM_DB/ibm_db/CHANGES.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1+
2022-11-08, Version 3.1.4
2+
===========================
3+
4+
* Fix for issue #796 (Earamma kanasavi)
5+
6+
* Fix for issue #764 (Earamma Kanasavi)
7+
8+
* Fix for issue #795 (Earamma Kanasavi)
9+
10+
* Fix for issue #792 (Earamma Kanasavi)
11+
12+
* Fix for python issue #779 and #778 (Earamma Kanasavi)
13+
14+
* Added Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS for the API's [Fixed for issue #703] (Earamma Kanasavi)
15+
16+
* Update Python 3.11 support in readme and setup.py (Earamma Kanasavi)
17+
18+
* Updating CHNGES.md and README.md file (Earamma Kanasavi)
19+
120
2022-08-03, Version 3.1.3
221
=========================
3-
* setup.py upgrade : better error handling while installation
422

23+
* setup.py upgrade : better error handling while installation (Earamma Kanasavi)
24+
525
* Code fix for #757 (Earamma Kanasavi)
6-
26+
727
* Code fix for #766 (Earamma Kanasavi)
8-
9-
* Fix installation failure issue when IBM site is down (Bimal)
1028

29+
* Fix installation failure issue when IBM site is down (Bimal)
30+
1131
2022-06-13, Version 3.1.2
1232
===========================
1333

IBM_DB/ibm_db/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fail on version 8.x of Db2.
171171
In order to run the entire python driver testsuite on Linux, run this
172172
command at the command prompt:
173173
```
174-
python tests.py
174+
python ibmdb_tests.py
175175
```
176176
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
177177
the test filename you would like to run, followed by the previous command.
@@ -180,7 +180,7 @@ fail on version 8.x of Db2.
180180
In order to run the entire python driver testsuite on Windows, run this
181181
command at the command prompt:
182182
```
183-
tests.py
183+
ibmdb_tests.py
184184
```
185185
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
186186
the test filename you would like to run, followed by the previous command.

IBM_DB/ibm_db/ibm_db.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
+--------------------------------------------------------------------------+
2323
*/
2424

25-
#define MODULE_RELEASE "3.1.3"
25+
#define MODULE_RELEASE "3.1.4"
2626

2727
#include <Python.h>
2828
#include <datetime.h>
@@ -12320,5 +12320,6 @@ INIT_ibm_db(void) {
1232012320
PyModule_AddIntConstant(m, "SQL_ATTR_PARAMSET_SIZE", SQL_ATTR_PARAMSET_SIZE);
1232112321
PyModule_AddIntConstant(m, "SQL_ATTR_PARAM_BIND_TYPE", SQL_ATTR_PARAM_BIND_TYPE);
1232212322
PyModule_AddIntConstant(m, "SQL_PARAM_BIND_BY_COLUMN", SQL_PARAM_BIND_BY_COLUMN);
12323+
PyModule_AddIntConstant(m, "SQL_ATTR_XML_DECLARATION", SQL_ATTR_XML_DECLARATION);
1232312324
return MOD_RETURN_VAL(m);
1232412325
}

IBM_DB/ibm_db/ibm_db.h

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383

8484
#define ENABLE_NUMERIC_LITERALS 1 /* Enable CLI numeric literals */
8585

86+
#ifndef SQL_ATTR_XML_DECLARATION
87+
#define SQL_ATTR_XML_DECLARATION 0
88+
#endif
89+
8690
#ifndef SQL_XML
8791
#define SQL_XML -370
8892
#endif

IBM_DB/ibm_db/ibm_db_tests/test_52949_TestSPIntVarcharXml.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def drop_tables(self, conn):
5656
pass
5757

5858
def run_test_52949(self):
59-
conn = ibm_db.connect(config.database, config.user, config.password)
59+
options = {ibm_db.SQL_ATTR_XML_DECLARATION : 0}
60+
conn = ibm_db.connect(config.database, config.user, config.password, options)
6061

6162
if conn:
6263
serverinfo = ibm_db.server_info(conn )
@@ -72,7 +73,7 @@ def run_test_52949(self):
7273
st1 = "CREATE PROCEDURE processxml(OUT risorsa xml) LANGUAGE SQL BEGIN SELECT cv INTO risorsa FROM test_stored WHERE ID = 1; END"
7374
result = ibm_db.exec_immediate(conn, st1)
7475

75-
#self.test_xml(conn)
76+
self.test_xml(conn)
7677
except:
7778
pass
7879

@@ -106,6 +107,8 @@ def run_test_52949(self):
106107

107108
#__END__
108109
#__LUW_EXPECTED__
110+
#__LUW_EXPECTED__
111+
#ProcessXML: <example>This is an example</example>
109112
#ProcessINT: 24
110113
#ProcessVAR: Kellen
111114
#__ZOS_EXPECTED__
File renamed without changes.

IBM_DB/ibm_db/setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from setuptools.command.install import install
2525

2626
PACKAGE = 'ibm_db'
27-
VERSION = '3.1.3'
27+
VERSION = '3.1.4'
2828
LICENSE = 'Apache License 2.0'
2929
readme = os.path.join(os.path.dirname(__file__),'README.md')
3030

@@ -467,7 +467,7 @@ def print_exception( e, url):
467467
(get_python_lib(), ['./LICENSE']),
468468
(get_python_lib(), ['./config.py.sample'])]
469469

470-
modules = ['ibm_db_dbi', 'testfunctions', 'tests']
470+
modules = ['ibm_db_dbi', 'testfunctions', 'ibmdb_tests']
471471

472472
if 'zos' == sys.platform:
473473
ext_modules = _ext_modules(os.path.join(os.getcwd(), include_dir), library, ibm_db_lib, ibm_db_lib_runtime)
@@ -512,6 +512,7 @@ def print_exception( e, url):
512512
'Programming Language :: Python :: 3.8',
513513
'Programming Language :: Python :: 3.9',
514514
'Programming Language :: Python :: 3.10',
515+
'Programming Language :: Python :: 3.11',
515516
'Topic :: Database :: Front-Ends'],
516517

517518
long_description = 'Python DBI driver for IBM Db2 for LUW, IBM Informix, IBM Db2 for iSeries(AS400) and IBM Db2 for z/OS servers',

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ python 3.7
7272
python 3.8
7373
python 3.9
7474
python 3.10
75+
python 3.11
7576
```
7677
7778
You might need zlib, openssl, pip installations if not already available in your setup.
@@ -477,7 +478,7 @@ fail on version 8.x of Db2.
477478
In order to run the entire python driver testsuite on Linux, run this
478479
command at the command prompt:
479480
```
480-
python tests.py
481+
python ibmdb_tests.py
481482
```
482483
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
483484
the test filename you would like to run, followed by the previous command.
@@ -486,7 +487,7 @@ fail on version 8.x of Db2.
486487
In order to run the entire python driver testsuite on Windows, run this
487488
command at the command prompt:
488489
```
489-
tests.py
490+
ibmdb_tests.py
490491
```
491492
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
492493
the test filename you would like to run, followed by the previous command.

0 commit comments

Comments
 (0)