mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 00:46:33 +03:00
chore: drop support for Python 3.6
This commit is contained in:
parent
2da65a715c
commit
abf2723c0a
6
NEWS
6
NEWS
|
@ -1,6 +1,12 @@
|
|||
Current release
|
||||
---------------
|
||||
|
||||
What's new in psycopg 2.9.9
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Drop support for Python 3.6.
|
||||
|
||||
|
||||
What's new in psycopg 2.9.8
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ The current `!psycopg2` implementation supports:
|
|||
..
|
||||
NOTE: keep consistent with setup.py and the /features/ page.
|
||||
|
||||
- Python versions from 3.6 to 3.11
|
||||
- Python versions from 3.7 to 3.11
|
||||
- PostgreSQL server versions from 7.4 to 15
|
||||
- PostgreSQL client library version from 9.1
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#ifndef PSYCOPG_PYTHON_H
|
||||
#define PSYCOPG_PYTHON_H 1
|
||||
|
||||
#if PY_VERSION_HEX < 0x03060000
|
||||
#error "psycopg requires Python 3.6"
|
||||
#if PY_VERSION_HEX < 0x03070000
|
||||
#error "psycopg requires Python 3.7"
|
||||
#endif
|
||||
|
||||
#include <structmember.h>
|
||||
|
|
|
@ -103,18 +103,8 @@ _parse_inftz(const char *str, PyObject *curs)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x03070000
|
||||
{
|
||||
PyObject *tzoff;
|
||||
if (!(tzoff = PyDelta_FromDSU(0, 0, 0))) { goto exit; }
|
||||
tzinfo = PyObject_CallFunctionObjArgs(tzinfo_factory, tzoff, NULL);
|
||||
Py_DECREF(tzoff);
|
||||
if (!tzinfo) { goto exit; }
|
||||
}
|
||||
#else
|
||||
tzinfo = PyDateTime_TimeZone_UTC;
|
||||
Py_INCREF(tzinfo);
|
||||
#endif
|
||||
|
||||
/* m.replace(tzinfo=tzinfo) */
|
||||
if (!(args = PyTuple_New(0))) { goto exit; }
|
||||
|
@ -178,11 +168,6 @@ _parse_noninftz(const char *str, Py_ssize_t len, PyObject *curs)
|
|||
appropriate tzinfo object calling the factory */
|
||||
Dprintf("typecast_PYDATETIMETZ_cast: UTC offset = %ds", tzsec);
|
||||
|
||||
#if PY_VERSION_HEX < 0x03070000
|
||||
/* Before Python 3.7 the timezone offset had to be a whole number
|
||||
* of minutes, so round the seconds to the closest minute */
|
||||
tzsec = 60 * (int)round(tzsec / 60.0);
|
||||
#endif
|
||||
if (!(tzoff = PyDelta_FromDSU(0, tzsec, 0))) { goto exit; }
|
||||
if (!(tzinfo = PyObject_CallFunctionObjArgs(
|
||||
tzinfo_factory, tzoff, NULL))) {
|
||||
|
@ -270,11 +255,6 @@ typecast_PYTIME_cast(const char *str, Py_ssize_t len, PyObject *curs)
|
|||
appropriate tzinfo object calling the factory */
|
||||
Dprintf("typecast_PYTIME_cast: UTC offset = %ds", tzsec);
|
||||
|
||||
#if PY_VERSION_HEX < 0x03070000
|
||||
/* Before Python 3.7 the timezone offset had to be a whole number
|
||||
* of minutes, so round the seconds to the closest minute */
|
||||
tzsec = 60 * (int)round(tzsec / 60.0);
|
||||
#endif
|
||||
if (!(tzoff = PyDelta_FromDSU(0, tzsec, 0))) { goto exit; }
|
||||
if (!(tzinfo = PyObject_CallFunctionObjArgs(tzinfo_factory, tzoff, NULL))) {
|
||||
goto exit;
|
||||
|
|
|
@ -660,7 +660,7 @@ class Options:
|
|||
For large values of 2, occasionally.
|
||||
"""
|
||||
rv = os.environ['PY_VER']
|
||||
assert rv in ('36', '37', '38', '39', '310', '311'), rv
|
||||
assert rv in ('37', '38', '39', '310', '311'), rv
|
||||
return rv
|
||||
|
||||
@property
|
||||
|
@ -742,7 +742,6 @@ class Options:
|
|||
# Py 3.6--3.8 = VS Ver. 14.0 (VS 2015)
|
||||
# Py 3.9 = VS Ver. 16.0 (VS 2019)
|
||||
vsvers = {
|
||||
'36': '14.0',
|
||||
'37': '14.0',
|
||||
'38': '14.0',
|
||||
'39': '16.0',
|
||||
|
|
3
setup.py
3
setup.py
|
@ -52,7 +52,6 @@ Intended Audience :: Developers
|
|||
License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
|
@ -551,7 +550,7 @@ setup(name="psycopg2",
|
|||
url="https://psycopg.org/",
|
||||
license="LGPL with exceptions",
|
||||
platforms=["any"],
|
||||
python_requires='>=3.6',
|
||||
python_requires='>=3.7',
|
||||
description=readme.split("\n")[0],
|
||||
long_description="\n".join(readme.split("\n")[2:]).lstrip(),
|
||||
classifiers=[x for x in classifiers.split("\n") if x],
|
||||
|
|
Loading…
Reference in New Issue
Block a user