Skip to content

Commit 22cf7c8

Browse files
Add warning for use of Python < 3.8 since previous versions have reached
end of life.
1 parent 3f85faa commit 22cf7c8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

doc/src/release_notes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ Thick Mode Changes
7373
Common Changes
7474
++++++++++++++
7575

76+
#) Use of Python 3.6 and 3.7 is deprecated and support for them will be
77+
removed in a future release. A warning is issued when these versions are
78+
used but otherwise they will continue to function as usual. The warning can
79+
be suppressed by importing `warnings
80+
<https://docs.python.org/3/library/warnings.html>`__ and adding a call like
81+
``warnings.filterwarnings(action='ignore', module="oracledb")``
82+
*before* importing ``oracledb``.
7683
#) Added support for the :attr:`~Variable.outconverter` being called when a
7784
null value is fetched from the database and the new parameter
7885
``convert_nulls`` to the method :meth:`Cursor.var()` is passed the value

src/oracledb/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
#------------------------------------------------------------------------------
3030

3131
import sys
32+
import warnings
33+
34+
if sys.version_info[:2] < (3, 8):
35+
message = f"Python {sys.version_info[0]}.{sys.version_info[1]} " \
36+
"is no longer supported by the Python core team. " \
37+
"Therefore, support for it is deprecated in python-oracledb and " \
38+
"will be removed in a future release"
39+
warnings.warn(message)
3240

3341
from .version import (
3442
__version__ as __version__

0 commit comments

Comments
 (0)