Skip to content

Commit

Permalink
Fix for issues #796, #764 and added python 3.11 support (#809)
Browse files Browse the repository at this point in the history
Signed-off-by: ek <[email protected]>

Signed-off-by: ek <[email protected]>
  • Loading branch information
Earammak authored Nov 17, 2022
1 parent 94df146 commit 3673dc6
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 13 deletions.
28 changes: 28 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
2022-11-08, Version 3.1.4
===========================

* Fix for issue #796 (Earamma kanasavi)

* Fix for issue #764 (Earamma Kanasavi)

* Fix for issue #795 (Earamma Kanasavi)

* Fix for issue #792 (Earamma Kanasavi)

* Fix for python issue #779 and #778 (Earamma Kanasavi)

* Added Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS for the API's [Fixed for issue #703] (Earamma Kanasavi)

* Update Python 3.11 support in readme and setup.py (Earamma Kanasavi)

* Updating changes.md and readme.md file (Earamma Kanasavi)

2022-08-03, Version 3.1.3
=========================

* setup.py upgrade : better error handling while installation(Earamma Kanasavi)

* Code fix for #757 (Earamma Kanasavi)

* Code fix for #766 (Earamma Kanasavi)

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

2022-06-13, Version 3.1.2
===========================
Expand Down
28 changes: 24 additions & 4 deletions IBM_DB/ibm_db/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
2022-11-08, Version 3.1.4
===========================

* Fix for issue #796 (Earamma kanasavi)

* Fix for issue #764 (Earamma Kanasavi)

* Fix for issue #795 (Earamma Kanasavi)

* Fix for issue #792 (Earamma Kanasavi)

* Fix for python issue #779 and #778 (Earamma Kanasavi)

* Added Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS for the API's [Fixed for issue #703] (Earamma Kanasavi)

* Update Python 3.11 support in readme and setup.py (Earamma Kanasavi)

* Updating CHNGES.md and README.md file (Earamma Kanasavi)

2022-08-03, Version 3.1.3
=========================
* setup.py upgrade : better error handling while installation

* setup.py upgrade : better error handling while installation (Earamma Kanasavi)

* Code fix for #757 (Earamma Kanasavi)

* Code fix for #766 (Earamma Kanasavi)

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions IBM_DB/ibm_db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fail on version 8.x of Db2.
In order to run the entire python driver testsuite on Linux, run this
command at the command prompt:
```
python tests.py
python ibmdb_tests.py
```
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
the test filename you would like to run, followed by the previous command.
Expand All @@ -180,7 +180,7 @@ fail on version 8.x of Db2.
In order to run the entire python driver testsuite on Windows, run this
command at the command prompt:
```
tests.py
ibmdb_tests.py
```
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
the test filename you would like to run, followed by the previous command.
Expand Down
3 changes: 2 additions & 1 deletion IBM_DB/ibm_db/ibm_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
+--------------------------------------------------------------------------+
*/

#define MODULE_RELEASE "3.1.3"
#define MODULE_RELEASE "3.1.4"

#include <Python.h>
#include <datetime.h>
Expand Down Expand Up @@ -12320,5 +12320,6 @@ INIT_ibm_db(void) {
PyModule_AddIntConstant(m, "SQL_ATTR_PARAMSET_SIZE", SQL_ATTR_PARAMSET_SIZE);
PyModule_AddIntConstant(m, "SQL_ATTR_PARAM_BIND_TYPE", SQL_ATTR_PARAM_BIND_TYPE);
PyModule_AddIntConstant(m, "SQL_PARAM_BIND_BY_COLUMN", SQL_PARAM_BIND_BY_COLUMN);
PyModule_AddIntConstant(m, "SQL_ATTR_XML_DECLARATION", SQL_ATTR_XML_DECLARATION);
return MOD_RETURN_VAL(m);
}
4 changes: 4 additions & 0 deletions IBM_DB/ibm_db/ibm_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@

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

#ifndef SQL_ATTR_XML_DECLARATION
#define SQL_ATTR_XML_DECLARATION 0
#endif

#ifndef SQL_XML
#define SQL_XML -370
#endif
Expand Down
7 changes: 5 additions & 2 deletions IBM_DB/ibm_db/ibm_db_tests/test_52949_TestSPIntVarcharXml.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def drop_tables(self, conn):
pass

def run_test_52949(self):
conn = ibm_db.connect(config.database, config.user, config.password)
options = {ibm_db.SQL_ATTR_XML_DECLARATION : 0}
conn = ibm_db.connect(config.database, config.user, config.password, options)

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

#self.test_xml(conn)
self.test_xml(conn)
except:
pass

Expand Down Expand Up @@ -106,6 +107,8 @@ def run_test_52949(self):

#__END__
#__LUW_EXPECTED__
#__LUW_EXPECTED__
#ProcessXML: <example>This is an example</example>
#ProcessINT: 24
#ProcessVAR: Kellen
#__ZOS_EXPECTED__
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions IBM_DB/ibm_db/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from setuptools.command.install import install

PACKAGE = 'ibm_db'
VERSION = '3.1.3'
VERSION = '3.1.4'
LICENSE = 'Apache License 2.0'
readme = os.path.join(os.path.dirname(__file__),'README.md')

Expand Down Expand Up @@ -467,7 +467,7 @@ def print_exception( e, url):
(get_python_lib(), ['./LICENSE']),
(get_python_lib(), ['./config.py.sample'])]

modules = ['ibm_db_dbi', 'testfunctions', 'tests']
modules = ['ibm_db_dbi', 'testfunctions', 'ibmdb_tests']

if 'zos' == sys.platform:
ext_modules = _ext_modules(os.path.join(os.getcwd(), include_dir), library, ibm_db_lib, ibm_db_lib_runtime)
Expand Down Expand Up @@ -512,6 +512,7 @@ def print_exception( e, url):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Database :: Front-Ends'],

long_description = 'Python DBI driver for IBM Db2 for LUW, IBM Informix, IBM Db2 for iSeries(AS400) and IBM Db2 for z/OS servers',
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ python 3.7
python 3.8
python 3.9
python 3.10
python 3.11
```
You might need zlib, openssl, pip installations if not already available in your setup.
Expand Down Expand Up @@ -477,7 +478,7 @@ fail on version 8.x of Db2.
In order to run the entire python driver testsuite on Linux, run this
command at the command prompt:
```
python tests.py
python ibmdb_tests.py
```
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
the test filename you would like to run, followed by the previous command.
Expand All @@ -486,7 +487,7 @@ fail on version 8.x of Db2.
In order to run the entire python driver testsuite on Windows, run this
command at the command prompt:
```
tests.py
ibmdb_tests.py
```
To run a single test, set the environment variable, **SINGLE_PYTHON_TEST**, to
the test filename you would like to run, followed by the previous command.
Expand Down

0 comments on commit 3673dc6

Please sign in to comment.