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 2023-11-30 22:00:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-psycopg2 (Old)
 and      /work/SRC/openSUSE:Factory/.python-psycopg2.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-psycopg2"

Thu Nov 30 22:00:04 2023 rev:45 rq:1129668 version:2.9.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-psycopg2/python-psycopg2.changes  
2023-09-07 21:15:30.387236805 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-psycopg2.new.25432/python-psycopg2.changes   
    2023-11-30 22:00:58.536295800 +0100
@@ -1,0 +2,9 @@
+Tue Nov 28 21:39:17 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.9.9:
+  * Add support for Python 3.12.
+  * Drop support for Python 3.6.
+  * Wheel package bundled with PostgreSQL 16 libpq in order to
+    add support for recent features, such as ``sslcertmode``.
+
+-------------------------------------------------------------------

Old:
----
  psycopg2-2.9.7.tar.gz

New:
----
  psycopg2-2.9.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-psycopg2.spec ++++++
--- /var/tmp/diff_new_pack.DozLl1/_old  2023-11-30 22:00:59.048314662 +0100
+++ /var/tmp/diff_new_pack.DozLl1/_new  2023-11-30 22:00:59.048314662 +0100
@@ -18,22 +18,22 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-psycopg2
-Version:        2.9.7
+Version:        2.9.9
 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
 URL:            https://www.psycopg.org/
 Source:         
https://files.pythonhosted.org/packages/source/p/psycopg2/psycopg2-%{version}.tar.gz
-BuildRequires:  %{python_module devel >= 3.6}
+BuildRequires:  %{python_module devel >= 3.7}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 # newer postgresql packages pg_config in -server-devel
 %if 0%{?sle_version} > 150100 || 0%{?suse_version} > 1500
-BuildRequires:  postgresql-server-devel >= 9.1
+BuildRequires:  postgresql-server-devel >= 15
 %else
-BuildRequires:  postgresql-devel >= 9.1
+BuildRequires:  postgresql-devel >= 15
 %endif
 %if 0%{?suse_version} || 0%{?fedora_version} >= 24
 Suggests:       postgresql-server

++++++ psycopg2-2.9.7.tar.gz -> psycopg2-2.9.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/NEWS new/psycopg2-2.9.9/NEWS
--- old/psycopg2-2.9.7/NEWS     2023-08-04 18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/NEWS     2023-10-03 11:41:53.000000000 +0200
@@ -1,13 +1,27 @@
 Current release
 ---------------
 
+What's new in psycopg 2.9.9
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Add support for Python 3.12.
+- Drop support for Python 3.6.
+
+
+What's new in psycopg 2.9.8
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Wheel package bundled with PostgreSQL 16 libpq in order to add support for
+  recent features, such as ``sslcertmode``.
+
+
 What's new in psycopg 2.9.7
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 - Fix propagation of exceptions raised during module initialization
   (:ticket:`#1598`).
 - Fix building when pg_config returns an empty string (:ticket:`#1599`).
-- Wheel package compiled against OpenSSL 1.1.1v.
+- Wheel package bundled with OpenSSL 1.1.1v.
 
 
 What's new in psycopg 2.9.6
@@ -15,7 +29,7 @@
 
 - Package manylinux 2014 for aarch64 and ppc64le platforms, in order to
   include libpq 15 in the binary package (:ticket:`#1396`).
-- Wheel package compiled against OpenSSL 1.1.1t.
+- Wheel package bundled with OpenSSL 1.1.1t.
 
 
 What's new in psycopg 2.9.5
@@ -24,7 +38,7 @@
 - Add support for Python 3.11.
 - Add support for rowcount in MERGE statements in binary packages
   (:ticket:`#1497`).
-- Wheel package compiled against OpenSSL 1.1.1r and PostgreSQL 15 libpq.
+- Wheel package bundled with OpenSSL 1.1.1r and PostgreSQL 15 libpq.
 
 
 What's new in psycopg 2.9.4
@@ -38,7 +52,7 @@
   binary packages (:ticket:`#1365`).
 - `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
   PostgreSQL 15.
-- Wheel package compiled against OpenSSL 1.1.1q and PostgreSQL 14.4 libpq.
+- Wheel package bundled with OpenSSL 1.1.1q and PostgreSQL 14.4 libpq.
 
 
 What's new in psycopg 2.9.3
@@ -55,7 +69,7 @@
 - `~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 libpq
+- Wheel package bundled with OpenSSL 1.1.1l and PostgreSQL 14.1 libpq
   (:ticket:`#1388`).
 
 
@@ -92,7 +106,7 @@
   platforms.
 - Provide :pep:`600` wheels packages (manylinux_2_24 tag) for aarch64 and
   ppc64le platforms.
-- Wheel package compiled against OpenSSL 1.1.1k and PostgreSQL 13.3 libpq.
+- Wheel package bundled with OpenSSL 1.1.1k and PostgreSQL 13.3 libpq.
 - Build system for Linux/MacOS binary packages moved to GitHub Actions.
 
 
@@ -116,7 +130,7 @@
 - `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
   PostgreSQL 13.
 - Added wheel packages for ARM architecture (:ticket:`#1125`).
-- Wheel package compiled against OpenSSL 1.1.1g.
+- Wheel package bundled with OpenSSL 1.1.1g.
 
 
 What's new in psycopg 2.8.5
@@ -145,7 +159,7 @@
   and `~psycopg2.extensions.Column.type_code` (:ticket:`#961`).
 - `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
   PostgreSQL 12.
-- Wheel package compiled against OpenSSL 1.1.1d and PostgreSQL at least 11.4.
+- Wheel package bundled with OpenSSL 1.1.1d and PostgreSQL at least 11.4.
 
 
 What's new in psycopg 2.8.3
@@ -234,7 +248,7 @@
   source files are now compatible with Python 2 & 3 as is.
 - The `!psycopg2.test` package is no longer installed by ``python setup.py
   install``.
-- Wheel package compiled against OpenSSL 1.0.2r and PostgreSQL 11.2 libpq.
+- Wheel package bundled with OpenSSL 1.0.2r and PostgreSQL 11.2 libpq.
 
 
 What's new in psycopg 2.7.7
@@ -242,14 +256,14 @@
 
 - Cleanup of the cursor results assignment code, which might have solved
   double free and inconsistencies in concurrent usage (:tickets:`#346, #384`).
-- Wheel package compiled against OpenSSL 1.0.2q.
+- Wheel package bundled with OpenSSL 1.0.2q.
 
 
 What's new in psycopg 2.7.6.1
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 - Fixed binary package broken on OS X 10.12 (:ticket:`#807`).
-- Wheel package compiled against PostgreSQL 11.1 libpq.
+- Wheel package bundled with PostgreSQL 11.1 libpq.
 
 
 What's new in psycopg 2.7.6
@@ -266,7 +280,7 @@
 - `~psycopg2.extras.execute_values()` accepts `~psycopg2.sql.Composable`
   objects (:ticket:`#794`).
 - `~psycopg2.errorcodes` map updated to PostgreSQL 11.
-- Wheel package compiled against PostgreSQL 10.5 libpq and OpenSSL 1.0.2p.
+- Wheel package bundled with PostgreSQL 10.5 libpq and OpenSSL 1.0.2p.
 
 
 What's new in psycopg 2.7.5
@@ -280,7 +294,7 @@
 - Maybe fixed building on MSYS2 (as reported in :ticket:`#658`).
 - Allow string subclasses in connection and other places (:ticket:`#679`).
 - Don't raise an exception closing an unused named cursor (:ticket:`#716`).
-- Wheel package compiled against PostgreSQL 10.4 libpq and OpenSSL 1.0.2o.
+- Wheel package bundled with PostgreSQL 10.4 libpq and OpenSSL 1.0.2o.
 
 
 What's new in psycopg 2.7.4
@@ -302,7 +316,7 @@
 - Fixed `~cursor.rowcount` after `~cursor.executemany()` with :sql:`RETURNING`
   statements (:ticket:`#633`).
 - Fixed compatibility problem with pypy3 (:ticket:`#649`).
-- Wheel packages compiled against PostgreSQL 10.1 libpq and OpenSSL 1.0.2n.
+- Wheel packages bundled with PostgreSQL 10.1 libpq and OpenSSL 1.0.2n.
 - Wheel packages for Python 2.6 no more available (support dropped from
   wheel building infrastructure).
 
@@ -310,7 +324,7 @@
 What's new in psycopg 2.7.3.2
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-- Wheel package compiled against PostgreSQL 10.0 libpq and OpenSSL 1.0.2l
+- Wheel package bundled with PostgreSQL 10.0 libpq and OpenSSL 1.0.2l
   (:tickets:`#601, #602`).
 
 
@@ -383,7 +397,7 @@
   them together.
 - Added `~psycopg2.__libpq_version__` and
   `~psycopg2.extensions.libpq_version()` to inspect the version of the
-  ``libpq`` library the module was compiled/loaded with
+  ``libpq`` library the module was bundled with
   (:tickets:`#35, #323`).
 - The attributes `~connection.notices` and `~connection.notifies` can be
   customized replacing them with any object exposing an `!append()` method
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/PKG-INFO new/psycopg2-2.9.9/PKG-INFO
--- old/psycopg2-2.9.7/PKG-INFO 2023-08-04 18:33:04.492184200 +0200
+++ new/psycopg2-2.9.9/PKG-INFO 2023-10-03 11:41:54.191774800 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: psycopg2
-Version: 2.9.7
+Version: 2.9.9
 Summary: psycopg2 - Python-PostgreSQL Database Adapter
 Home-page: https://psycopg.org/
 Author: Federico Di Gregorio
@@ -19,12 +19,12 @@
 Classifier: License :: OSI Approved :: GNU Library or Lesser General Public 
License (LGPL)
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.6
 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.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: C
@@ -35,7 +35,7 @@
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Operating System :: Microsoft :: Windows
 Classifier: Operating System :: Unix
-Requires-Python: >=3.6
+Requires-Python: >=3.7
 License-File: LICENSE
 
 Psycopg is the most popular PostgreSQL database adapter for the Python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/doc/requirements.txt 
new/psycopg2-2.9.9/doc/requirements.txt
--- old/psycopg2-2.9.7/doc/requirements.txt     2023-08-04 18:33:04.000000000 
+0200
+++ new/psycopg2-2.9.9/doc/requirements.txt     2023-10-03 11:41:53.000000000 
+0200
@@ -8,7 +8,7 @@
     # via sphinx
 babel==2.12.1
     # via sphinx
-certifi==2022.12.7
+certifi>=2023.7.22
     # via requests
 charset-normalizer==3.1.0
     # via requests
@@ -26,7 +26,7 @@
     # via sphinx
 pygments==2.15.0
     # via sphinx
-requests==2.28.2
+requests==2.31.0
     # via sphinx
 snowballstemmer==2.2.0
     # via sphinx
@@ -46,5 +46,5 @@
     # via sphinx
 sphinxcontrib-serializinghtml==1.1.5
     # via sphinx
-urllib3==1.26.15
+urllib3==1.26.17
     # via requests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/doc/src/install.rst 
new/psycopg2-2.9.9/doc/src/install.rst
--- old/psycopg2-2.9.7/doc/src/install.rst      2023-08-04 18:33:04.000000000 
+0200
+++ new/psycopg2-2.9.9/doc/src/install.rst      2023-10-03 11:41:53.000000000 
+0200
@@ -131,8 +131,8 @@
 ..
     NOTE: keep consistent with setup.py and the /features/ page.
 
-- Python versions from 3.6 to 3.11
-- PostgreSQL server versions from 7.4 to 15
+- Python versions from 3.7 to 3.12
+- PostgreSQL server versions from 7.4 to 16
 - PostgreSQL client library version from 9.1
 
 .. note::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/psycopg/python.h 
new/psycopg2-2.9.9/psycopg/python.h
--- old/psycopg2-2.9.7/psycopg/python.h 2023-08-04 18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/psycopg/python.h 2023-10-03 11:41:53.000000000 +0200
@@ -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>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/psycopg/typecast_datetime.c 
new/psycopg2-2.9.9/psycopg/typecast_datetime.c
--- old/psycopg2-2.9.7/psycopg/typecast_datetime.c      2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/psycopg/typecast_datetime.c      2023-10-03 
11:41:53.000000000 +0200
@@ -103,18 +103,8 @@
         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 @@
            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 @@
            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;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/psycopg2.egg-info/PKG-INFO 
new/psycopg2-2.9.9/psycopg2.egg-info/PKG-INFO
--- old/psycopg2-2.9.7/psycopg2.egg-info/PKG-INFO       2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/psycopg2.egg-info/PKG-INFO       2023-10-03 
11:41:54.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: psycopg2
-Version: 2.9.7
+Version: 2.9.9
 Summary: psycopg2 - Python-PostgreSQL Database Adapter
 Home-page: https://psycopg.org/
 Author: Federico Di Gregorio
@@ -19,12 +19,12 @@
 Classifier: License :: OSI Approved :: GNU Library or Lesser General Public 
License (LGPL)
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.6
 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.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: C
@@ -35,7 +35,7 @@
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Operating System :: Microsoft :: Windows
 Classifier: Operating System :: Unix
-Requires-Python: >=3.6
+Requires-Python: >=3.7
 License-File: LICENSE
 
 Psycopg is the most popular PostgreSQL database adapter for the Python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/psycopg2.egg-info/SOURCES.txt 
new/psycopg2-2.9.9/psycopg2.egg-info/SOURCES.txt
--- old/psycopg2-2.9.7/psycopg2.egg-info/SOURCES.txt    2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/psycopg2.egg-info/SOURCES.txt    2023-10-03 
11:41:54.000000000 +0200
@@ -142,6 +142,7 @@
 scripts/build/download_packages_appveyor.py
 scripts/build/print_so_versions.sh
 scripts/build/run_build_macos_arm64.sh
+scripts/build/scaleway_m1.sh
 scripts/build/strip_wheel.sh
 scripts/build/wheel_linux_before_all.sh
 scripts/build/wheel_macos_before_all.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/scripts/build/appveyor.py 
new/psycopg2-2.9.9/scripts/build/appveyor.py
--- old/psycopg2-2.9.7/scripts/build/appveyor.py        2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/scripts/build/appveyor.py        2023-10-03 
11:41:53.000000000 +0200
@@ -660,7 +660,7 @@
         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', "312"), rv
         return rv
 
     @property
@@ -742,12 +742,12 @@
         # 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',
             '310': '16.0',
             '311': '16.0',
+            '312': '16.0',
         }
         return vsvers[self.py_ver]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/scripts/build/build_libpq.sh 
new/psycopg2-2.9.9/scripts/build/build_libpq.sh
--- old/psycopg2-2.9.7/scripts/build/build_libpq.sh     2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/scripts/build/build_libpq.sh     2023-10-03 
11:41:53.000000000 +0200
@@ -155,7 +155,8 @@
     # export LD_LIBRARY_PATH="${LIBPQ_BUILD_PREFIX}/lib"
 
     ./configure --prefix=${LIBPQ_BUILD_PREFIX} 
--sysconfdir=/etc/postgresql-common \
-        --without-readline --with-gssapi --with-openssl --with-pam --with-ldap 
\
+        --with-gssapi --with-openssl --with-pam --with-ldap \
+        --without-readline --without-icu \
         CPPFLAGS=-I${LIBPQ_BUILD_PREFIX}/include/ 
LDFLAGS=-L${LIBPQ_BUILD_PREFIX}/lib
     make -C src/interfaces/libpq
     make -C src/bin/pg_config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/scripts/build/build_macos_arm64.sh 
new/psycopg2-2.9.9/scripts/build/build_macos_arm64.sh
--- old/psycopg2-2.9.7/scripts/build/build_macos_arm64.sh       2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/scripts/build/build_macos_arm64.sh       2023-10-03 
11:41:53.000000000 +0200
@@ -8,10 +8,14 @@
 # so it can pretty much only be executed by a sudo user as it is.
 
 set -euo pipefail
-set -x
+# set -x
 
-python_versions="3.8.10 3.9.13 3.10.5 3.11.0"
-pg_version=15
+python_versions="3.8.10 3.9.13 3.10.5 3.11.0 3.12.0"
+pg_version=16
+
+function log {
+    echo "$@" >&2
+}
 
 # Move to the root of the project
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -26,6 +30,7 @@
 if [[ -x /opt/homebrew/bin/brew ]]; then
     eval "$(/opt/homebrew/bin/brew shellenv)"
 else
+    log "installing brew"
     command -v brew > /dev/null || (
         # Not necessary: already installed
         # xcode-select --install
@@ -39,11 +44,12 @@
 
 # Install PostgreSQL, if necessary
 command -v pg_config > /dev/null || (
+    log "installing postgres"
     brew install postgresql@${pg_version}
 )
 
-# After PostgreSQL 15, the bin path is not in the path.
-export PATH=$(ls -d1 /opt/homebrew/Cellar/postgresql@${pg_version}/*/bin):$PATH
+# Starting from PostgreSQL 15, the bin path is not in the path.
+export PATH="$(ls -d1 
/opt/homebrew/Cellar/postgresql@${pg_version}/*/bin):$PATH"
 
 # Make sure the server is running
 
@@ -51,7 +57,8 @@
 # brew services start postgresql@${pg_version}
 
 if ! pg_ctl status; then
-    pg_ctl -l /opt/homebrew/var/log/postgresql@${pg_version}.log start
+    log "starting the server"
+    pg_ctl -l "/opt/homebrew/var/log/postgresql@${pg_version}.log" start
 fi
 
 
@@ -59,6 +66,7 @@
 for ver3 in $python_versions; do
     ver2=$(echo $ver3 | sed 's/\([^\.]*\)\(\.[^\.]*\)\(.*\)/\1\2/')
     command -v python${ver2} > /dev/null || (
+        log "installing Python $ver3"
         (cd /tmp &&
             curl -fsSl -O \
                 
https://www.python.org/ftp/python/${ver3}/python-${ver3}-macos11.pkg)
@@ -68,12 +76,16 @@
 
 # Create a virtualenv where to work
 if [[ ! -x .venv/bin/python ]]; then
+    log "creating a virtualenv"
     python3 -m venv .venv
 fi
 
+log "installing cibuildwheel"
 source .venv/bin/activate
 pip install cibuildwheel
 
+log "building wheels"
+
 # Build the binary packages
 export CIBW_PLATFORM=macos
 export CIBW_ARCHS=arm64
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/psycopg2-2.9.7/scripts/build/run_build_macos_arm64.sh 
new/psycopg2-2.9.9/scripts/build/run_build_macos_arm64.sh
--- old/psycopg2-2.9.7/scripts/build/run_build_macos_arm64.sh   2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/scripts/build/run_build_macos_arm64.sh   2023-10-03 
11:41:53.000000000 +0200
@@ -5,36 +5,61 @@
 # This script is designed to run on a local machine: it will clone the repos
 # remotely and execute the `build_macos_arm64.sh` script remotely, then will
 # download the built packages. A tag to build must be specified.
-#
-# In order to run the script, the `m1` host must be specified in
-# `~/.ssh/config`; for instance:
-#
-#   Host m1
-#     User m1
-#     HostName 1.2.3.4
+
+# The script requires a Scaleway secret key in the SCW_SECRET_KEY env var:
+# It will use scaleway_m1.sh to provision a server and use it.
 
 set -euo pipefail
 # set -x
 
+function log {
+    echo "$@" >&2
+}
+function error {
+    # Print an error message and exit.
+    log "ERROR: $@"
+    exit 1
+}
+
 tag=${1:-}
 
 if [[ ! "${tag}" ]]; then
-    echo "Usage: $0 TAG" >&2
-    exit 2
+    error "Usage: $0 REF"
 fi
 
-rdir=psycobuild
+dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 
-# Clone the repos
-ssh m1 rm -rf "${rdir}"
-ssh m1 git clone https://github.com/psycopg/psycopg2.git --branch ${tag} 
"${rdir}"
+server=$("${dir}/scaleway_m1.sh" ensure)
 
-# Allow sudoing without password, to allow brew to install
-ssh -t m1 bash -c \
-    'test -f /etc/sudoers.d/m1 || echo "m1 ALL=(ALL) NOPASSWD:ALL" | sudo tee 
/etc/sudoers.d/m1'
+status=$(echo "$server" | jq -r .status)
+if [[ "$status" != "ready" ]]; then
+    error "server status is $status"
+fi
+
+# Get user, password, ip from vnc url
+tmp=$(echo "$server" | jq -r .vnc_url)  # vnc://m1:PASS@1.2.3.4:5900
+tmp=${tmp/vnc:\/\//}  # m1:PASS@1.2.3.4:5900
+user=${tmp%%:*}  # m1
+tmp=${tmp#*:}  # PASS@1.2.3.4:5900
+password=${tmp%%@*}  # PASS
+tmp=${tmp#*@}  # 1.2.3.4:5900
+host=${tmp%%:*}  # 1.2.3.4
+
+ssh="ssh ${user}@${host} -o StrictHostKeyChecking=no"
+
+# Allow the user to sudo without asking for password.
+echo "$password" | \
+    $ssh sh -c "test -f /etc/sudoers.d/${user} \
+    || sudo -S --prompt= sh -c \
+        'echo \"${user} ALL=(ALL) NOPASSWD:ALL\" > /etc/sudoers.d/${user}'"
+
+# Clone the repos
+rdir=psycobuild
+$ssh rm -rf "${rdir}"
+$ssh git clone https://github.com/psycopg/psycopg2.git --branch ${tag} 
"${rdir}"
 
 # Build the wheel packages
-ssh m1 "${rdir}/scripts/build/build_macos_arm64.sh"
+$ssh "${rdir}/scripts/build/build_macos_arm64.sh"
 
 # Transfer the packages locally
-scp -r "m1:${rdir}/wheelhouse" .
+scp -r "${user}@${host}:${rdir}/wheelhouse" .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/scripts/build/scaleway_m1.sh 
new/psycopg2-2.9.9/scripts/build/scaleway_m1.sh
--- old/psycopg2-2.9.7/scripts/build/scaleway_m1.sh     1970-01-01 
01:00:00.000000000 +0100
+++ new/psycopg2-2.9.9/scripts/build/scaleway_m1.sh     2023-10-03 
11:41:53.000000000 +0200
@@ -0,0 +1,119 @@
+#!/bin/bash
+
+# Implement the following commands:
+#
+# ensure:
+#
+#   Get data about currently provisioned M1 server on Scaleway. If needed,
+#   provision one.
+#
+#   The script requires the SCW_SECRET_KEY env var set to a valid secret.
+#
+#   If successful, return the response data on stdout. It may look like:
+#
+#    {
+#      "id": "8b196119-3cea-4a9d-b916-265037a85e60",
+#      "type": "M1-M",
+#      "name": "mac-m1-psycopg",
+#      "project_id": "4cf7a85e-f21e-40d4-b758-21d1f4ad3dfb",
+#      "organization_id": "4cf7a85e-f21e-40d4-b758-21d1f4ad3dfb",
+#      "ip": "1.2.3.4",
+#      "vnc_url": "vnc://m1:PASSWORD@1.2.3.4:5900",
+#      "status": "starting",
+#      "created_at": "2023-09-22T18:00:18.754646Z",
+#      "updated_at": "2023-09-22T18:00:18.754646Z",
+#      "deletable_at": "2023-09-23T18:00:18.754646Z",
+#      "zone": "fr-par-3"
+#    }
+#
+# delete:
+#
+#   Delete one provisioned server, if available.
+# 
+# See https://www.scaleway.com/en/developers/api/apple-silicon/ for api docs.
+
+set -euo pipefail
+# set -x
+
+project_id="4cf7a85e-f21e-40d4-b758-21d1f4ad3dfb"
+zone=fr-par-3
+servers_url="https://api.scaleway.com/apple-silicon/v1alpha1/zones/${zone}/servers";
+
+function log {
+    echo "$@" >&2
+}
+function error {
+    log "ERROR: $@"
+    exit 1
+}
+
+function req {
+    method=$1
+    shift
+    curl -sSL --fail-with-body -X $method \
+        -H "Content-Type: application/json" \
+        -H "X-Auth-Token: ${SCW_SECRET_KEY}" \
+        "$@"
+}
+function get {
+    req GET "$@"
+}
+function post {
+    req POST "$@"
+}
+function delete {
+    req DELETE "$@"
+}
+
+function server_id {
+    # Return the id of the first server available, else the empty string
+    servers=$(get $servers_url || error "failed to request servers list")
+    server_ids=$(echo "$servers" | jq -r ".servers[].id")
+    for id in $server_ids; do
+        echo $id
+        break
+    done
+}
+
+function maybe_jq {
+    # Process the output via jq if displaying on console, otherwise leave
+    # it unprocessed.
+    if [ -t 1 ]; then
+        jq .
+    else
+        cat
+    fi
+}
+
+cmd=${1:-list}
+case $cmd in
+    ensure)
+        id=$(server_id)
+        if [[ "$id" ]]; then
+            log "You have servers."
+            get "$servers_url/$id" | maybe_jq
+        else
+            log "Creating new server."
+            post $servers_url -d "
+            {
+                \"name\": \"mac-m1-psycopg\",
+                \"project_id\": \"$project_id\",
+                \"type\": \"M1-M\"
+            }" | maybe_jq
+        fi
+        ;;
+    delete)
+        id=$(server_id)
+        if [[ "$id" ]]; then
+            log "Deleting server $id."
+            delete "$servers_url/$id" | maybe_jq
+        else
+            log "No server found."
+        fi
+        ;;
+    list)
+        get $servers_url | maybe_jq
+        ;;
+    *)
+        error "Usage: $(basename $0) [list|ensure|delete]"
+esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/psycopg2-2.9.7/scripts/build/wheel_macos_before_all.sh 
new/psycopg2-2.9.9/scripts/build/wheel_macos_before_all.sh
--- old/psycopg2-2.9.7/scripts/build/wheel_macos_before_all.sh  2023-08-04 
18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/scripts/build/wheel_macos_before_all.sh  2023-10-03 
11:41:53.000000000 +0200
@@ -2,6 +2,8 @@
 
 # Configure the environment needed to build wheel packages on Mac OS.
 # This script is designed to be used by cibuildwheel as CIBW_BEFORE_ALL_MACOS
+#
+# The PG_VERSION env var must be set to a Postgres major version (e.g. 16).
 
 set -euo pipefail
 set -x
@@ -9,7 +11,7 @@
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 prjdir="$( cd "${dir}/../.." && pwd )"
 
-brew install gnu-sed postgresql@15
+brew install gnu-sed postgresql@${PG_VERSION}
 
 # Start the database for testing
 brew services start postgresql
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/setup.py new/psycopg2-2.9.9/setup.py
--- old/psycopg2-2.9.7/setup.py 2023-08-04 18:33:04.000000000 +0200
+++ new/psycopg2-2.9.9/setup.py 2023-10-03 11:41:53.000000000 +0200
@@ -36,15 +36,12 @@
 from distutils.ccompiler import get_default_compiler
 from distutils.errors import CompileError
 
-try:
-    import configparser
-except ImportError:
-    import ConfigParser as configparser
+import configparser
 
 # Take a look at https://www.python.org/dev/peps/pep-0440/
 # for a consistent versioning pattern.
 
-PSYCOPG_VERSION = '2.9.7'
+PSYCOPG_VERSION = '2.9.9'
 
 
 # note: if you are changing the list of supported Python version please fix
@@ -55,12 +52,12 @@
 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
 Programming Language :: Python :: 3.10
 Programming Language :: Python :: 3.11
+Programming Language :: Python :: 3.12
 Programming Language :: Python :: 3 :: Only
 Programming Language :: Python :: Implementation :: CPython
 Programming Language :: C
@@ -161,10 +158,7 @@
         return None
 
     def _get_pg_config_from_registry(self):
-        try:
-            import winreg
-        except ImportError:
-            import _winreg as winreg
+        import winreg
 
         reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
         try:
@@ -557,7 +551,7 @@
       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],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/psycopg2-2.9.7/tests/test_connection.py 
new/psycopg2-2.9.9/tests/test_connection.py
--- old/psycopg2-2.9.7/tests/test_connection.py 2023-08-04 18:33:04.000000000 
+0200
+++ new/psycopg2-2.9.9/tests/test_connection.py 2023-10-03 11:41:53.000000000 
+0200
@@ -1922,6 +1922,10 @@
     @skip_before_libpq(9, 5)
     @skip_after_libpq(16)
     def test_ssl_attribute(self):
+        # Skip this test even if libpq built == 15, runtime == 16 (see #1619)
+        if ext.libpq_version() >= 160000:
+            return self.skipTest("libpq runtime version == %s" % 
ext.libpq_version())
+
         attribs = self.conn.info.ssl_attribute_names
         self.assert_(attribs)
         if self.conn.info.ssl_in_use:

Reply via email to