mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 00:46:33 +03:00
support for python 3.11
This commit is contained in:
parent
898cbff5a6
commit
5fb1305a14
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
|
@ -18,6 +18,7 @@ jobs:
|
||||||
- {python: "3.8", postgres: "12"}
|
- {python: "3.8", postgres: "12"}
|
||||||
- {python: "3.9", postgres: "13"}
|
- {python: "3.9", postgres: "13"}
|
||||||
- {python: "3.10", postgres: "14"}
|
- {python: "3.10", postgres: "14"}
|
||||||
|
- {python: "3.11-dev", postgres: "14"}
|
||||||
|
|
||||||
# Opposite extremes of the supported Py/PG range, other architecture
|
# Opposite extremes of the supported Py/PG range, other architecture
|
||||||
- {python: "3.6", postgres: "14", architecture: "x86"}
|
- {python: "3.6", postgres: "14", architecture: "x86"}
|
||||||
|
@ -25,6 +26,7 @@ jobs:
|
||||||
- {python: "3.8", postgres: "12", architecture: "x86"}
|
- {python: "3.8", postgres: "12", architecture: "x86"}
|
||||||
- {python: "3.9", postgres: "11", architecture: "x86"}
|
- {python: "3.9", postgres: "11", architecture: "x86"}
|
||||||
- {python: "3.10", postgres: "10", architecture: "x86"}
|
- {python: "3.10", postgres: "10", architecture: "x86"}
|
||||||
|
- {python: "3.11-dev", postgres: "10", architecture: "x86"}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PSYCOPG2_TESTDB: postgres
|
PSYCOPG2_TESTDB: postgres
|
||||||
|
@ -48,11 +50,13 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install tox
|
||||||
|
run: pip install tox
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
- name: Install tox
|
|
||||||
run: pip install tox
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: tox -e ${{ matrix.python }}
|
env:
|
||||||
|
MATRIX_PYTHON: ${{ matrix.python }}
|
||||||
|
run: tox -e ${MATRIX_PYTHON%-dev}
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "psycopg/green.h"
|
#include "psycopg/green.h"
|
||||||
#include "psycopg/notify.h"
|
#include "psycopg/notify.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* String indexes match the ISOLATION_LEVEL_* consts */
|
/* String indexes match the ISOLATION_LEVEL_* consts */
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "psycopg/green.h"
|
#include "psycopg/green.h"
|
||||||
#include "psycopg/xid.h"
|
#include "psycopg/xid.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "psycopg/libpq_support.h"
|
#include "psycopg/libpq_support.h"
|
||||||
#include "libpq-fe.h"
|
#include "libpq-fe.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/* select() */
|
/* select() */
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
|
@ -57,6 +57,8 @@
|
||||||
#include <datetime.h>
|
#include <datetime.h>
|
||||||
#include "psycopg/adapter_datetime.h"
|
#include "psycopg/adapter_datetime.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
HIDDEN PyObject *psycoEncodings = NULL;
|
HIDDEN PyObject *psycoEncodings = NULL;
|
||||||
HIDDEN PyObject *sqlstate_errors = NULL;
|
HIDDEN PyObject *sqlstate_errors = NULL;
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,11 @@ replicationConnection_repr(replicationConnectionObject *self)
|
||||||
self, self->conn.dsn, self->conn.closed);
|
self, self->conn.dsn, self->conn.closed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
replicationConnectionType_traverse(PyObject *self, visitproc visit, void *arg)
|
||||||
|
{
|
||||||
|
return connectionType.tp_traverse(self, visit, arg);
|
||||||
|
}
|
||||||
|
|
||||||
/* object calculated member list */
|
/* object calculated member list */
|
||||||
|
|
||||||
|
@ -173,7 +178,7 @@ PyTypeObject replicationConnectionType = {
|
||||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER |
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER |
|
||||||
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
replicationConnectionType_doc, /*tp_doc*/
|
replicationConnectionType_doc, /*tp_doc*/
|
||||||
0, /*tp_traverse*/
|
replicationConnectionType_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
|
@ -346,6 +346,11 @@ replicationCursor_repr(replicationCursorObject *self)
|
||||||
"<ReplicationCursor object at %p; closed: %d>", self, self->cur.closed);
|
"<ReplicationCursor object at %p; closed: %d>", self, self->cur.closed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
replicationCursorType_traverse(PyObject *self, visitproc visit, void *arg)
|
||||||
|
{
|
||||||
|
return cursorType.tp_traverse(self, visit, arg);
|
||||||
|
}
|
||||||
|
|
||||||
/* object type */
|
/* object type */
|
||||||
|
|
||||||
|
@ -374,7 +379,7 @@ PyTypeObject replicationCursorType = {
|
||||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER |
|
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER |
|
||||||
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
|
||||||
replicationCursorType_doc, /*tp_doc*/
|
replicationCursorType_doc, /*tp_doc*/
|
||||||
0, /*tp_traverse*/
|
replicationCursorType_traverse, /*tp_traverse*/
|
||||||
0, /*tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -1,10 +1,11 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = {3.6,3.7,3.8,3.9,3.10}
|
envlist = {3.6,3.7,3.8,3.9,3.10,3.11}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands = make check
|
commands = make check
|
||||||
whitelist_externals = make
|
whitelist_externals = make
|
||||||
passenv = PG* PSYCOPG2_TEST*
|
passenv = PG* PSYCOPG2_TEST*
|
||||||
|
basepython = python{envname}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 85
|
max-line-length = 85
|
||||||
|
|
Loading…
Reference in New Issue
Block a user