Add warning for use of Python < 3.8 since previous versions have reached
end of life.
This commit is contained in:
parent
3f85faa05f
commit
22cf7c89ad
|
@ -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
|
||||
|
|
|
@ -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__
|
||||
|
|
Loading…
Reference in New Issue