commit python-psycopg2 for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-psycopg2 for openSUSE:Factory checked in at 2021-11-29 17:28:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-psycopg2 (Old) and /work/SRC/openSUSE:Factory/.python-psycopg2.new.31177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-psycopg2" Mon Nov 29 17:28:34 2021 rev:39 rq:934511 version:2.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-psycopg2/python-psycopg2.changes 2021-10-16 22:47:56.264706961 +0200 +++ /work/SRC/openSUSE:Factory/.python-psycopg2.new.31177/python-psycopg2.changes 2021-12-02 02:24:02.012863120 +0100 @@ -1,0 +2,10 @@ +Mon Nov 29 10:57:15 UTC 2021 - Dirk M��ller <dmueller@suse.com> + +- update to 2.9.2: + * Raise `ValueError` for dates >= Y10k (:ticket:`#1307`). + * `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to + PostgreSQL 14. + * Add preliminary support for Python 3.11 (:tickets:`#1376, #1386`). + * Wheel package compiled against OpenSSL 1.1.1l and PostgreSQL 14.1 + +------------------------------------------------------------------- Old: ---- psycopg2-2.9.1.tar.gz New: ---- psycopg2-2.9.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-psycopg2.spec ++++++ --- /var/tmp/diff_new_pack.GiSYVh/_old 2021-12-02 02:24:02.436861641 +0100 +++ /var/tmp/diff_new_pack.GiSYVh/_new 2021-12-02 02:24:02.440861627 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-psycopg2 -Version: 2.9.1 +Version: 2.9.2 Release: 0 Summary: Python-PostgreSQL Database Adapter License: LGPL-3.0-or-later AND (LGPL-3.0-or-later OR ZPL-2.0) AND SUSE-GPL-2.0-with-openssl-exception ++++++ psycopg2-2.9.1.tar.gz -> psycopg2-2.9.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/NEWS new/psycopg2-2.9.2/NEWS --- old/psycopg2-2.9.1/NEWS 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/NEWS 2021-11-12 01:02:18.000000000 +0100 @@ -1,10 +1,21 @@ Current release --------------- +What's new in psycopg 2.9.2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Raise `ValueError` for dates >= Y10k (:ticket:`#1307`). +- `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to + PostgreSQL 14. +- Add preliminary support for Python 3.11 (:tickets:`#1376, #1386`). +- Wheel package compiled against OpenSSL 1.1.1l and PostgreSQL 14.1 + (:ticket:`#1388`). + + What's new in psycopg 2.9.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Fix regression with named `sql.Placeholder` (:ticket:`1291`). +Fix regression with named `sql.Placeholder` (:ticket:`#1291`). What's new in psycopg 2.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/PKG-INFO new/psycopg2-2.9.2/PKG-INFO --- old/psycopg2-2.9.1/PKG-INFO 2021-06-17 01:47:10.153814300 +0200 +++ new/psycopg2-2.9.2/PKG-INFO 2021-11-12 01:02:18.751813400 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 1.2 Name: psycopg2 -Version: 2.9.1 +Version: 2.9.2 Summary: psycopg2 - Python-PostgreSQL Database Adapter Home-page: https://psycopg.org/ Author: Federico Di Gregorio Author-email: fog@initd.org Maintainer: Daniele Varrazzo -Maintainer-email: daniele.varrazzo@gmail.org +Maintainer-email: daniele.varrazzo@gmail.com License: LGPL with exceptions Project-URL: Homepage, https://psycopg.org/ Project-URL: Documentation, https://www.psycopg.org/docs/ @@ -94,6 +94,7 @@ Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: C diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/doc/Makefile new/psycopg2-2.9.2/doc/Makefile --- old/psycopg2-2.9.1/doc/Makefile 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/doc/Makefile 2021-11-12 01:02:18.000000000 +0100 @@ -19,7 +19,7 @@ cp -r src/_build/html . src/sqlstate_errors.rst: ../psycopg/sqlstate_errors.h $(BUILD_DIR) - env/bin/python src/tools/make_sqlstate_docs.py $< > $@ + ./env/bin/python src/tools/make_sqlstate_docs.py $< > $@ $(BUILD_DIR): $(MAKE) PYTHON=$(PYTHON) -C .. package @@ -33,7 +33,7 @@ rm -rf html src/sqlstate_errors.rst env: requirements.txt - virtualenv -p $(PYTHON) env + $(PYTHON) -m venv env ./env/bin/pip install -r requirements.txt echo "$$(pwd)/../build/lib.$(PYTHON_VERSION)" \ > env/lib/python$(PYTHON_VERSION)/site-packages/psycopg.pth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/doc/src/cursor.rst new/psycopg2-2.9.2/doc/src/cursor.rst --- old/psycopg2-2.9.1/doc/src/cursor.rst 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/doc/src/cursor.rst 2021-11-12 01:02:18.000000000 +0100 @@ -562,13 +562,6 @@ >>> cur.fetchall() [(6, 42, 'foo'), (7, 74, 'bar')] - .. note:: the name of the table is not quoted: if the table name - contains uppercase letters or special characters it must be quoted - with double quotes:: - - cur.copy_from(f, '"TABLE"') - - .. versionchanged:: 2.0.6 added the *columns* parameter. @@ -577,6 +570,11 @@ are encoded in the connection `~connection.encoding` when sent to the backend. + .. versionchanged:: 2.9 + the table and fields names are now quoted. If you need to specify + a schema-qualified table please use `copy_expert()`. + + .. method:: copy_to(file, table, sep='\\t', null='\\\\N', columns=None) Write the content of the table named *table* *to* the file-like @@ -598,12 +596,6 @@ 2|\N|dada ... - .. note:: the name of the table is not quoted: if the table name - contains uppercase letters or special characters it must be quoted - with double quotes:: - - cur.copy_to(f, '"TABLE"') - .. versionchanged:: 2.0.6 added the *columns* parameter. @@ -612,6 +604,10 @@ are decoded in the connection `~connection.encoding` when read from the backend. + .. versionchanged:: 2.9 + the table and fields names are now quoted. If you need to specify + a schema-qualified table please use `copy_expert()`. + .. method:: copy_expert(sql, file, size=8192) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/doc/src/install.rst new/psycopg2-2.9.2/doc/src/install.rst --- old/psycopg2-2.9.1/doc/src/install.rst 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/doc/src/install.rst 2021-11-12 01:02:18.000000000 +0100 @@ -31,7 +31,7 @@ This will install a pre-compiled binary version of the module which does not require the build or runtime prerequisites described below. Make sure to use -an up-date-date version of :program:`pip` (you can upgrade it using something +an up-to-date version of :program:`pip` (you can upgrade it using something like ``pip install -U pip``). You may then import the ``psycopg2`` package, as usual: @@ -131,8 +131,8 @@ .. NOTE: keep consistent with setup.py and the /features/ page. -- Python versions from 3.6 to 3.9 -- PostgreSQL server versions from 7.4 to 13 +- Python versions from 3.6 to 3.10 +- PostgreSQL server versions from 7.4 to 14 - PostgreSQL client library version from 9.1 @@ -198,7 +198,7 @@ (usually distributed in a ``libpq.so`` or ``libpq.dll`` file). `!psycopg2` relies on the host OS to find the library if the library is installed in a standard location there is usually no problem; if the library is in a -non-standard location you will have to tell somehow Psycopg how to find it, +non-standard location you will have to tell Psycopg how to find it, which is OS-dependent (for instance setting a suitable :envvar:`LD_LIBRARY_PATH` on Linux). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/doc/src/usage.rst new/psycopg2-2.9.2/doc/src/usage.rst --- old/psycopg2-2.9.1/doc/src/usage.rst 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/doc/src/usage.rst 2021-11-12 01:02:18.000000000 +0100 @@ -795,6 +795,8 @@ .. index:: single: with statement +.. _with: + ``with`` statement ^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/lib/errorcodes.py new/psycopg2-2.9.2/lib/errorcodes.py --- old/psycopg2-2.9.1/lib/errorcodes.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/lib/errorcodes.py 2021-11-12 01:02:18.000000000 +0100 @@ -391,6 +391,7 @@ CRASH_SHUTDOWN = '57P02' CANNOT_CONNECT_NOW = '57P03' DATABASE_DROPPED = '57P04' +IDLE_SESSION_TIMEOUT = '57P05' # Class 58 - System Error (errors external to PostgreSQL itself) SYSTEM_ERROR = '58000' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/connection_int.c new/psycopg2-2.9.2/psycopg/connection_int.c --- old/psycopg2-2.9.1/psycopg/connection_int.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/connection_int.c 2021-11-12 01:02:18.000000000 +0100 @@ -33,6 +33,7 @@ #include "psycopg/green.h" #include "psycopg/notify.h" +#include <stdlib.h> #include <string.h> /* String indexes match the ISOLATION_LEVEL_* consts */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/connection_type.c new/psycopg2-2.9.2/psycopg/connection_type.c --- old/psycopg2-2.9.1/psycopg/connection_type.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/connection_type.c 2021-11-12 01:02:18.000000000 +0100 @@ -35,6 +35,7 @@ #include "psycopg/green.h" #include "psycopg/xid.h" +#include <stdlib.h> #include <string.h> #include <ctype.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/pqpath.c new/psycopg2-2.9.2/psycopg/pqpath.c --- old/psycopg2-2.9.1/psycopg/pqpath.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/pqpath.c 2021-11-12 01:02:18.000000000 +0100 @@ -47,6 +47,7 @@ #include "psycopg/libpq_support.h" #include "libpq-fe.h" +#include <stdlib.h> #ifdef _WIN32 /* select() */ #include <winsock2.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/psycopgmodule.c new/psycopg2-2.9.2/psycopg/psycopgmodule.c --- old/psycopg2-2.9.1/psycopg/psycopgmodule.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/psycopgmodule.c 2021-11-12 01:02:18.000000000 +0100 @@ -57,6 +57,8 @@ #include <datetime.h> #include "psycopg/adapter_datetime.h" +#include <stdlib.h> + HIDDEN PyObject *psycoEncodings = NULL; HIDDEN PyObject *sqlstate_errors = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/replication_connection_type.c new/psycopg2-2.9.2/psycopg/replication_connection_type.c --- old/psycopg2-2.9.1/psycopg/replication_connection_type.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/replication_connection_type.c 2021-11-12 01:02:18.000000000 +0100 @@ -129,6 +129,11 @@ 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 */ @@ -173,7 +178,7 @@ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ replicationConnectionType_doc, /*tp_doc*/ - 0, /*tp_traverse*/ + replicationConnectionType_traverse, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/replication_cursor_type.c new/psycopg2-2.9.2/psycopg/replication_cursor_type.c --- old/psycopg2-2.9.1/psycopg/replication_cursor_type.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/replication_cursor_type.c 2021-11-12 01:02:18.000000000 +0100 @@ -346,6 +346,11 @@ "<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 */ @@ -374,7 +379,7 @@ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ replicationCursorType_doc, /*tp_doc*/ - 0, /*tp_traverse*/ + replicationCursorType_traverse, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/sqlstate_errors.h new/psycopg2-2.9.2/psycopg/sqlstate_errors.h --- old/psycopg2-2.9.1/psycopg/sqlstate_errors.h 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/sqlstate_errors.h 2021-11-12 01:02:18.000000000 +0100 @@ -279,6 +279,7 @@ {"57P02", "CrashShutdown"}, {"57P03", "CannotConnectNow"}, {"57P04", "DatabaseDropped"}, +{"57P05", "IdleSessionTimeout"}, /* Class 58 - System Error (errors external to PostgreSQL itself) */ {"58000", "SystemError"}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg/typecast_datetime.c new/psycopg2-2.9.2/psycopg/typecast_datetime.c --- old/psycopg2-2.9.1/psycopg/typecast_datetime.c 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg/typecast_datetime.c 2021-11-12 01:02:18.000000000 +0100 @@ -71,7 +71,6 @@ return NULL; } else { - if (y > 9999) y = 9999; obj = PyObject_CallFunction( (PyObject*)PyDateTimeAPI->DateType, "iii", y, m, d); } @@ -172,8 +171,6 @@ mm += 1; ss -= 60; } - if (y > 9999) - y = 9999; tzinfo_factory = ((cursorObject *)curs)->tzinfo_factory; if (n >= 5 && tzinfo_factory != Py_None) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg2.egg-info/PKG-INFO new/psycopg2-2.9.2/psycopg2.egg-info/PKG-INFO --- old/psycopg2-2.9.1/psycopg2.egg-info/PKG-INFO 2021-06-17 01:47:10.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg2.egg-info/PKG-INFO 2021-11-12 01:02:18.000000000 +0100 @@ -1,12 +1,12 @@ Metadata-Version: 1.2 Name: psycopg2 -Version: 2.9.1 +Version: 2.9.2 Summary: psycopg2 - Python-PostgreSQL Database Adapter Home-page: https://psycopg.org/ Author: Federico Di Gregorio Author-email: fog@initd.org Maintainer: Daniele Varrazzo -Maintainer-email: daniele.varrazzo@gmail.org +Maintainer-email: daniele.varrazzo@gmail.com License: LGPL with exceptions Project-URL: Homepage, https://psycopg.org/ Project-URL: Documentation, https://www.psycopg.org/docs/ @@ -94,6 +94,7 @@ Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: C diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/psycopg2.egg-info/SOURCES.txt new/psycopg2-2.9.2/psycopg2.egg-info/SOURCES.txt --- old/psycopg2-2.9.1/psycopg2.egg-info/SOURCES.txt 2021-06-17 01:47:10.000000000 +0200 +++ new/psycopg2-2.9.2/psycopg2.egg-info/SOURCES.txt 2021-11-12 01:02:18.000000000 +0100 @@ -135,7 +135,6 @@ scripts/make_errorcodes.py scripts/make_errors.py scripts/refcounter.py -scripts/travis_update_docs.sh scripts/build/appveyor.py scripts/build/build_libpq.sh scripts/build/build_macos.sh @@ -144,6 +143,7 @@ scripts/build/build_sdist.sh scripts/build/download_packages_appveyor.py scripts/build/download_packages_github.py +scripts/build/strip_wheel.sh tests/__init__.py tests/dbapi20.py tests/dbapi20_tpc.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/appveyor.py new/psycopg2-2.9.2/scripts/build/appveyor.py --- old/psycopg2-2.9.1/scripts/build/appveyor.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/build/appveyor.py 2021-11-12 01:02:18.000000000 +0100 @@ -321,15 +321,11 @@ def build_binary_packages(): - """Create wheel/exe binary packages.""" + """Create wheel binary packages.""" os.chdir(opt.package_dir) add_pg_config_path() - # Build .exe packages for whom still use them - if opt.package_name == 'psycopg2': - run_python(['setup.py', 'bdist_wininst', "-d", opt.dist_dir]) - # Build .whl packages run_python(['setup.py', 'bdist_wheel', "-d", opt.dist_dir]) @@ -661,7 +657,7 @@ def py_ver(self): """The Python version to build as 2 digits string.""" rv = os.environ['PY_VER'] - assert rv in ('36', '37', '38', '39'), rv + assert rv in ('36', '37', '38', '39', '310'), rv return rv @property @@ -747,6 +743,7 @@ '37': '14.0', '38': '14.0', '39': '16.0', + '310': '16.0', } return vsvers[self.py_ver] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/build_libpq.sh new/psycopg2-2.9.2/scripts/build/build_libpq.sh --- old/psycopg2-2.9.1/scripts/build/build_libpq.sh 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/build/build_libpq.sh 2021-11-12 01:02:18.000000000 +0100 @@ -5,10 +5,10 @@ set -euo pipefail set -x -openssl_version="1.1.1k" +openssl_version="1.1.1l" ldap_version="2.4.59" sasl_version="2.1.27" -postgres_version="13.3" +postgres_version="14.1" yum install -y zlib-devel krb5-devel pam-devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/build_macos.sh new/psycopg2-2.9.2/scripts/build/build_macos.sh --- old/psycopg2-2.9.1/scripts/build/build_macos.sh 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/build/build_macos.sh 2021-11-12 01:02:18.000000000 +0100 @@ -11,7 +11,10 @@ dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" prjdir="$( cd "${dir}/../.." && pwd )" -brew install gnu-sed postgresql@13 +brew update +brew install gnu-sed postgresql@14 +# Fetch 14.1 if 14.0 is still the default version +brew reinstall postgresql # Start the database for testing brew services start postgresql diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/build_manylinux2014.sh new/psycopg2-2.9.2/scripts/build/build_manylinux2014.sh --- old/psycopg2-2.9.1/scripts/build/build_manylinux2014.sh 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/build/build_manylinux2014.sh 2021-11-12 01:02:18.000000000 +0100 @@ -41,6 +41,7 @@ # Bundle external shared libraries into the wheels for whl in "${prjdir}"/dist/*.whl; do + "${dir}/strip_wheel.sh" "$whl" auditwheel repair "$whl" -w "$distdir" done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/build_manylinux_2_24.sh new/psycopg2-2.9.2/scripts/build/build_manylinux_2_24.sh --- old/psycopg2-2.9.1/scripts/build/build_manylinux_2_24.sh 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/build/build_manylinux_2_24.sh 2021-11-12 01:02:18.000000000 +0100 @@ -27,7 +27,7 @@ fi # Install prerequisite libraries -curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - +curl -k -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - echo "deb http://apt.postgresql.org/pub/repos/apt stretch-pgdg main" \ > /etc/apt/sources.list.d/pgdg.list apt-get -y update @@ -41,6 +41,7 @@ # Bundle external shared libraries into the wheels for whl in "${prjdir}"/dist/*.whl; do + "${dir}/strip_wheel.sh" "$whl" auditwheel repair "$whl" -w "$distdir" done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/download_packages_appveyor.py new/psycopg2-2.9.2/scripts/build/download_packages_appveyor.py --- old/psycopg2-2.9.1/scripts/build/download_packages_appveyor.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/build/download_packages_appveyor.py 2021-11-12 01:02:18.000000000 +0100 @@ -8,6 +8,7 @@ import logging import datetime as dt from pathlib import Path +from argparse import ArgumentParser import requests @@ -24,6 +25,7 @@ def main(): + opt = parse_cmdline() try: token = os.environ["APPVEYOR_TOKEN"] except KeyError: @@ -33,8 +35,13 @@ s.headers["Content-Type"] = "application/json" s.headers["Authorization"] = f"Bearer {token}" - logger.info("fetching last run") - resp = s.get(f"{API_URL}/projects/{REPOS}/") + if opt.build: + logger.info("fetching build %s", opt.build) + resp = s.get(f"{API_URL}/projects/{REPOS}/build/{opt.build}") + else: + logger.info("fetching last run") + resp = s.get(f"{API_URL}/projects/{REPOS}") + resp.raise_for_status() data = resp.json() @@ -52,7 +59,7 @@ jobs = data["build"]["jobs"] for job in jobs: if job["status"] != "success": - raise ScriptError("status for job {job['jobId']} is {job['status']}") + raise ScriptError(f"status for job {job['jobId']} is {job['status']}") logger.info(f"fetching artifacts info for {job['name']}") resp = s.get(f"{API_URL}/buildjobs/{job['jobId']}/artifacts/") @@ -77,6 +84,13 @@ logger.info("now you can run: 'twine upload -s packages/*'") +def parse_cmdline(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("--build", help="build version to download [default: latest]") + opt = parser.parse_args() + return opt + + def pretty_interval(td): secs = td.total_seconds() mins, secs = divmod(secs, 60) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/build/strip_wheel.sh new/psycopg2-2.9.2/scripts/build/strip_wheel.sh --- old/psycopg2-2.9.1/scripts/build/strip_wheel.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/psycopg2-2.9.2/scripts/build/strip_wheel.sh 2021-11-12 01:02:18.000000000 +0100 @@ -0,0 +1,41 @@ +#!/bin/bash + +# Strip symbols inplace from the libraries in a zip archive. +# +# Stripping symbols is beneficial (reduction of 30% of the final package, > +# %90% of the installed libraries. However just running `auditwheel repair +# --strip` breaks some of the libraries included from the system, which fail at +# import with errors such as "ELF load command address/offset not properly +# aligned". +# +# System libraries are already pretty stripped. _psycopg2.so goes around +# 1.6M -> 300K (python 3.8, x86_64) +# +# This script is designed to run on a wheel archive before auditwheel. + +set -euo pipefail +set -x + +wheel=$(realpath "$1") +shift + +# python or python3? +if which python > /dev/null; then + py=python +else + py=python3 +fi + +tmpdir=$(mktemp -d) +trap "rm -r ${tmpdir}" EXIT + +cd "${tmpdir}" +$py -m zipfile -e "${wheel}" . + +find . -name *.so -ls -exec strip "$@" {} \; +# Display the size after strip +find . -name *.so -ls + +$py -m zipfile -c "${wheel}" * + +cd - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/make_errorcodes.py new/psycopg2-2.9.2/scripts/make_errorcodes.py --- old/psycopg2-2.9.1/scripts/make_errorcodes.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/make_errorcodes.py 2021-11-12 01:02:18.000000000 +0100 @@ -33,7 +33,7 @@ file_start = read_base_file(filename) # If you add a version to the list fix the docs (in errorcodes.rst) classes, errors = fetch_errors( - ['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13']) + ['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13', '14']) disambiguate(errors) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/make_errors.py new/psycopg2-2.9.2/scripts/make_errors.py --- old/psycopg2-2.9.1/scripts/make_errors.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/make_errors.py 2021-11-12 01:02:18.000000000 +0100 @@ -30,7 +30,7 @@ # If you add a version to the list fix the docs (in errors.rst) classes, errors = fetch_errors( - ['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13']) + ['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13', '14']) f = open(filename, "w") print("/*\n * Autogenerated by 'scripts/make_errors.py'.\n */\n", file=f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/scripts/travis_update_docs.sh new/psycopg2-2.9.2/scripts/travis_update_docs.sh --- old/psycopg2-2.9.1/scripts/travis_update_docs.sh 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/scripts/travis_update_docs.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -#!/bin/bash - -# Trigger a rebuild of the psycopg.org website to update the documentation. -# The script is meant to run by Travis CI. - -set -euo pipefail - -# The travis token can be set at https://github.com/psycopg/psycopg2/settings/secrets/actions -# and can be set on a selected branch only (which should match the DOC_BRANCH -# in the psycopg-website Makefile, or it won't refresh a thing). -if [ -z "${TRAVIS_TOKEN:-}" ]; then - echo "skipping docs update: travis token not set" >&2 - exit 0 -fi - -echo "triggering psycopg-website rebuild" >&2 -curl -s -X POST \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -H "Travis-API-Version: 3" \ - -H "Authorization: token ${TRAVIS_TOKEN}" \ - -d "{\"request\": {\"branch\": \"${TRAVIS_BRANCH}\"}}" \ - https://api.travis-ci.com/repo/psycopg%2Fpsycopg-website/requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/setup.py new/psycopg2-2.9.2/setup.py --- old/psycopg2-2.9.1/setup.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/setup.py 2021-11-12 01:02:18.000000000 +0100 @@ -44,7 +44,7 @@ # Take a look at https://www.python.org/dev/peps/pep-0440/ # for a consistent versioning pattern. -PSYCOPG_VERSION = '2.9.1' +PSYCOPG_VERSION = '2.9.2' # note: if you are changing the list of supported Python version please fix @@ -59,6 +59,7 @@ Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 +Programming Language :: Python :: 3.10 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython Programming Language :: C @@ -550,7 +551,7 @@ author="Federico Di Gregorio", author_email="fog@initd.org", maintainer="Daniele Varrazzo", - maintainer_email="daniele.varrazzo@gmail.org", + maintainer_email="daniele.varrazzo@gmail.com", url="https://psycopg.org/", license="LGPL with exceptions", platforms=["any"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/psycopg2-2.9.1/tests/test_dates.py new/psycopg2-2.9.2/tests/test_dates.py --- old/psycopg2-2.9.1/tests/test_dates.py 2021-06-17 01:47:09.000000000 +0200 +++ new/psycopg2-2.9.2/tests/test_dates.py 2021-11-12 01:02:18.000000000 +0100 @@ -115,12 +115,26 @@ self.DATETIME = psycopg2.extensions.PYDATETIME self.INTERVAL = psycopg2.extensions.PYINTERVAL + def test_parse_10k_date(self): + # datetime does not support dates larger than date.max + self.assertEqual(self.DATE('9999-12-31', self.curs), date(9999, 12, 31)) + self.assertRaises(ValueError, self.DATE, '10000-01-01', self.curs) + def test_parse_bc_date(self): # datetime does not support BC dates + self.assertEqual(self.DATE('0001-01-01', self.curs), date(1, 1, 1)) self.assertRaises(ValueError, self.DATE, '00042-01-01 BC', self.curs) + def test_parse_10k_datetime(self): + # datetime does not support dates larger than date.max + self.assertEqual(self.DATETIME('9999-12-31 23:59:59', self.curs), + datetime(9999, 12, 31, 23, 59, 59)) + self.assertRaises(ValueError, self.DATE, '10000-01-01', self.curs) + def test_parse_bc_datetime(self): # datetime does not support BC dates + self.assertEqual(self.DATETIME('0001-01-01 13:30:29', self.curs), + datetime(1, 1, 1, 13, 30, 29)) self.assertRaises(ValueError, self.DATETIME, '00042-01-01 13:30:29 BC', self.curs)
participants (1)
-
Source-Sync