From dd97344149f7cfc7a14220b36d853b1a2e656565 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 6 Sep 2020 17:24:04 +0100 Subject: [PATCH 1/7] Suggest how to auto-generate tag name in release doc --- doc/release.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/release.rst b/doc/release.rst index e942775a9..66c03a465 100644 --- a/doc/release.rst +++ b/doc/release.rst @@ -36,7 +36,8 @@ How to make a psycopg2 release - Create a signed tag with the content of the relevant NEWS bit and push it. E.g.:: - $ git tag -a -s 2_8_4 + # Tag name will be 2_8_4 + $ git tag -a -s ${VERSION//\./_} Psycopg 2.8.4 released From f54cf3b87bb64e495b4ece0eedf02b5f5513b43e Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 6 Sep 2020 17:24:33 +0100 Subject: [PATCH 2/7] Bump to next dev release --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6f15e0244..4b4889d93 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ # Take a look at https://www.python.org/dev/peps/pep-0440/ # for a consistent versioning pattern. -PSYCOPG_VERSION = '2.8.6' +PSYCOPG_VERSION = '2.8.7.dev0' # note: if you are changing the list of supported Python version please fix From 616dab7064e7e90b35115c3878f574e6d90ea47c Mon Sep 17 00:00:00 2001 From: Jannis Vamvas Date: Mon, 19 Oct 2020 23:13:31 +0200 Subject: [PATCH 3/7] Remove semicolon from code example --- doc/src/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/install.rst b/doc/src/install.rst index ee845f7f8..868b1b709 100644 --- a/doc/src/install.rst +++ b/doc/src/install.rst @@ -47,7 +47,7 @@ You may then import the ``psycopg`` package, as usual: cur = conn.cursor() # Execute a query - cur.execute("SELECT * FROM my_data"); + cur.execute("SELECT * FROM my_data") # Retrieve query results records = cur.fetchall() From 7cd7b97d5d0f6c1ccb92d7931f09ef2ee695de1a Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 27 Oct 2020 11:48:27 +0100 Subject: [PATCH 4/7] First batch of changes to build on appveyor with Python 3.9 --- .appveyor.yml | 4 +++- scripts/appveyor.py | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0106e048c..db14dbe05 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,5 @@ version : 2.x.{build} - +image: Visual Studio 2019 clone_folder: C:\Project environment: @@ -13,6 +13,8 @@ environment: # https://www.appveyor.com/docs/windows-images-software/#python - {PY_VER: "27", PY_ARCH: "32"} - {PY_VER: "27", PY_ARCH: "64"} + - {PY_VER: "39", PY_ARCH: "32"} + - {PY_VER: "39", PY_ARCH: "64"} - {PY_VER: "38", PY_ARCH: "32"} - {PY_VER: "38", PY_ARCH: "64"} - {PY_VER: "37", PY_ARCH: "32"} diff --git a/scripts/appveyor.py b/scripts/appveyor.py index dfb42d787..06f074457 100755 --- a/scripts/appveyor.py +++ b/scripts/appveyor.py @@ -17,6 +17,7 @@ from glob import glob from pathlib import Path from zipfile import ZipFile +from argparse import ArgumentParser from tempfile import NamedTemporaryFile from urllib.request import urlopen @@ -475,7 +476,7 @@ def print_sha1_hashes(): logger.info("artifacts SHA1 hashes:") os.chdir(opt.package_dir / 'dist') - run_command([which('sha1sum'), '-b', f'psycopg2-*/*']) + run_command([which('sha1sum'), '-b', 'psycopg2-*/*']) def setup_ssh(): @@ -694,7 +695,7 @@ class Options: def py_ver(self): """The Python version to build as 2 digits string.""" rv = os.environ['PY_VER'] - assert rv in ('27', '34', '35', '36', '37', '38'), rv + assert rv in ('27', '34', '35', '36', '37', '38', '39'), rv return rv @property @@ -770,9 +771,11 @@ def vc_dir(self): @property def vs_ver(self): # https://wiki.python.org/moin/WindowsCompilers + # https://www.appveyor.com/docs/windows-images-software/#python # Py 2.7 = VS Ver. 9.0 (VS 2008) # Py 3.3, 3.4 = VS Ver. 10.0 (VS 2010) # Py 3.5--3.8 = VS Ver. 14.0 (VS 2015) + # Py 3.9 = VS Ver. 16.0 (VS 2019) vsvers = { '27': '9.0', '33': '10.0', @@ -781,6 +784,7 @@ def vs_ver(self): '36': '14.0', '37': '14.0', '38': '14.0', + '39': '16.0', } return vsvers[self.py_ver] @@ -846,8 +850,6 @@ def dist_dir(self): def parse_cmdline(): - from argparse import ArgumentParser - parser = ArgumentParser(description=__doc__) g = parser.add_mutually_exclusive_group() From ec39e1e4063ca4e193d2ec59fdba07f40ab88654 Mon Sep 17 00:00:00 2001 From: Jason Erickson Date: Wed, 28 Oct 2020 12:50:57 -0600 Subject: [PATCH 5/7] Add VC 2019 path location --- scripts/appveyor.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/appveyor.py b/scripts/appveyor.py index 06f074457..36ee26a94 100755 --- a/scripts/appveyor.py +++ b/scripts/appveyor.py @@ -763,10 +763,16 @@ def vc_dir(self): """ The path of the Visual C compiler. """ - return Path( - r"C:\Program Files (x86)\Microsoft Visual Studio %s\VC" - % self.vs_ver - ) + if self.vs_ver == '16.0': + path = Path( + r"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build" + ) + else: + path = Path( + r"C:\Program Files (x86)\Microsoft Visual Studio %s\VC" + % self.vs_ver + ) + return path @property def vs_ver(self): From 163dadb6c6d36673cbe36d0d5526fced397e8e0e Mon Sep 17 00:00:00 2001 From: Jason Erickson Date: Wed, 28 Oct 2020 13:15:23 -0600 Subject: [PATCH 6/7] Add Strawberry Perl to the path --- scripts/appveyor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/appveyor.py b/scripts/appveyor.py index 36ee26a94..4b6cc85f7 100755 --- a/scripts/appveyor.py +++ b/scripts/appveyor.py @@ -51,6 +51,7 @@ def setup_build_env(): path = [ str(opt.py_dir), str(opt.py_dir / 'Scripts'), + r'C:\Strawberry\Perl\bin', r'C:\Program Files\Git\mingw64\bin', os.environ['PATH'], ] From 31b37685b7715956f72c1a42410e2022e1cc1b2f Mon Sep 17 00:00:00 2001 From: Jason Erickson Date: Thu, 29 Oct 2020 12:23:16 -0600 Subject: [PATCH 7/7] Settings for Py39/VS2019 builds + OpenSSL update --- .appveyor.yml | 37 ++++++++++++++++++---------------- scripts/appveyor.cache_rebuild | 4 ++-- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index db14dbe05..b79302b80 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,5 @@ version : 2.x.{build} -image: Visual Studio 2019 + clone_folder: C:\Project environment: @@ -11,22 +11,22 @@ environment: matrix: # For Python versions available on Appveyor, see # https://www.appveyor.com/docs/windows-images-software/#python - - {PY_VER: "27", PY_ARCH: "32"} - - {PY_VER: "27", PY_ARCH: "64"} - - {PY_VER: "39", PY_ARCH: "32"} - - {PY_VER: "39", PY_ARCH: "64"} - - {PY_VER: "38", PY_ARCH: "32"} - - {PY_VER: "38", PY_ARCH: "64"} - - {PY_VER: "37", PY_ARCH: "32"} - - {PY_VER: "37", PY_ARCH: "64"} - - {PY_VER: "36", PY_ARCH: "32"} - - {PY_VER: "36", PY_ARCH: "64"} - - {PY_VER: "35", PY_ARCH: "32"} - - {PY_VER: "35", PY_ARCH: "64"} - - {PY_VER: "34", PY_ARCH: "32"} - - {PY_VER: "34", PY_ARCH: "64"} - - OPENSSL_VERSION: "1_1_1g" + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019, PY_VER: "39", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019, PY_VER: "39", PY_ARCH: "64"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "38", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "38", PY_ARCH: "64"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "37", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "37", PY_ARCH: "64"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "36", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "36", PY_ARCH: "64"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "35", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "35", PY_ARCH: "64"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "34", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "34", PY_ARCH: "64"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "27", PY_ARCH: "32"} + - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "27", PY_ARCH: "64"} + + OPENSSL_VERSION: "1_1_1h" POSTGRES_VERSION: "11_4" PSYCOPG2_TESTDB: psycopg2_test @@ -37,6 +37,9 @@ environment: PGPASSWORD: Password12! PGSSLMODE: require + # Add CWD to perl library path for PostgreSQL build on VS2019 + PERL5LIB: . + # Select according to the service enabled POSTGRES_DIR: C:\Program Files\PostgreSQL\9.6\ diff --git a/scripts/appveyor.cache_rebuild b/scripts/appveyor.cache_rebuild index 6b6f781a5..432d68ee5 100644 --- a/scripts/appveyor.cache_rebuild +++ b/scripts/appveyor.cache_rebuild @@ -9,10 +9,10 @@ To invalidate the cache, update this file and check it into git. Currently used modules built in the cache: OpenSSL - Version: 1.1.1d + Version: 1.1.1h PostgreSQL - Version: 11.5 + Version: 11.4 NOTE: to zap the cache manually you can also use: