Add warning for use of Python < 3.8 since previous versions have reached

end of life.
This commit is contained in:
Anthony Tuininga 2023-08-14 18:51:53 -06:00
parent 3f85faa05f
commit 22cf7c89ad
2 changed files with 15 additions and 0 deletions

View File

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

View File

@ -29,6 +29,14 @@
#------------------------------------------------------------------------------
import sys
import warnings
if sys.version_info[:2] < (3, 8):
message = f"Python {sys.version_info[0]}.{sys.version_info[1]} " \
"is no longer supported by the Python core team. " \
"Therefore, support for it is deprecated in python-oracledb and " \
"will be removed in a future release"
warnings.warn(message)
from .version import (
__version__ as __version__