Chih-Hsuan Yen pushed to branch main at Arch Linux / Packaging / Packages / python-testing.postgresql
Commits: be678b01 by Chih-Hsuan Yen at 2024-04-09T18:09:44+08:00 upgpkg: 1.3.0-10: Python 3.12 rebuilds - - - - - 3 changed files: - + .SRCINFO - PKGBUILD - + ec9ce743a0f51076d7ea2485a6fa58b72ec8e338.patch Changes: ===================================== .SRCINFO ===================================== @@ -0,0 +1,22 @@ +pkgbase = python-testing.postgresql + pkgdesc = Helpers for using temporary PostgreSQL databases in tests + pkgver = 1.3.0 + pkgrel = 10 + url = https://github.com/tk0miya/testing.postgresql + arch = any + license = Apache + checkdepends = python-nose + checkdepends = python-psycopg2 + checkdepends = python-sqlalchemy + makedepends = python-setuptools + depends = python-testing.common.database + depends = python-pg8000 + depends = postgresql + source = python-testing.postgresql-1.3.0.tar.gz::https://github.com/tk0miya/testing.postgresql/archive/1.3.0.tar.gz + source = https://github.com/tk0miya/testing.postgresql/commit/738c8eb19a4b064dd74ff851c379dd1cbf11bc65.patch + source = ec9ce743a0f51076d7ea2485a6fa58b72ec8e338.patch + sha256sums = a8b41501f92103e2da0990ae72962375f6f1d092b0ac7e97a92f17ab8683bc20 + sha256sums = 3fac5ec62af8ec6a1a15c3e8f7c71597de4bd3e9496d632bbdd6ce0d9b8da56e + sha256sums = 6e2b42f0acf4faaeb69af1f1fa238842fdf50121590e49e198ea9e9456819f21 + +pkgname = python-testing.postgresql ===================================== PKGBUILD ===================================== @@ -2,7 +2,7 @@ pkgname=python-testing.postgresql pkgver=1.3.0 -pkgrel=9 +pkgrel=10 pkgdesc='Helpers for using temporary PostgreSQL databases in tests' arch=(any) url='https://github.com/tk0miya/testing.postgresql' @@ -11,15 +11,21 @@ makedepends=(python-setuptools) depends=(python-testing.common.database python-pg8000 postgresql) checkdepends=(python-nose python-psycopg2 python-sqlalchemy) source=("$pkgname-$pkgver.tar.gz"::"https://github.com/tk0miya/testing.postgresql/archive/$pkgver.tar.gz" - https://github.com/tk0miya/testing.postgresql/commit/738c8eb19a4b064dd74ff851c379dd1cbf11bc65.patch) + https://github.com/tk0miya/testing.postgresql/commit/738c8eb19a4b064dd74ff851c379dd1cbf11bc65.patch + ec9ce743a0f51076d7ea2485a6fa58b72ec8e338.patch) sha256sums=('a8b41501f92103e2da0990ae72962375f6f1d092b0ac7e97a92f17ab8683bc20' - '3fac5ec62af8ec6a1a15c3e8f7c71597de4bd3e9496d632bbdd6ce0d9b8da56e') + '3fac5ec62af8ec6a1a15c3e8f7c71597de4bd3e9496d632bbdd6ce0d9b8da56e' + '6e2b42f0acf4faaeb69af1f1fa238842fdf50121590e49e198ea9e9456819f21') prepare() { cd testing.postgresql-$pkgver # fix tests patch -Np1 -i ../738c8eb19a4b064dd74ff851c379dd1cbf11bc65.patch + + # Fix tests with Python 3.12 + # https://github.com/tk0miya/testing.postgresql/pull/44 (unmerged) + patch -Np1 -i ../ec9ce743a0f51076d7ea2485a6fa58b72ec8e338.patch } build() { ===================================== ec9ce743a0f51076d7ea2485a6fa58b72ec8e338.patch ===================================== @@ -0,0 +1,34 @@ +From ec9ce743a0f51076d7ea2485a6fa58b72ec8e338 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" <[email protected]> +Date: Fri, 4 Aug 2023 10:58:08 -0400 +Subject: [PATCH] Replace assertRegexpMatches() with assertRegex() + +This alias was deprecated in Python 3.2 and is removed in Python 3.12. + +Reference: https://docs.python.org/3.12/whatsnew/3.12.html +--- + tests/test_postgresql.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py +index 1fa1116..b2bba20 100644 +--- a/tests/test_postgresql.py ++++ b/tests/test_postgresql.py +@@ -28,7 +28,7 @@ def test_basic(self): + # connect to postgresql (w/ psycopg2) + conn = psycopg2.connect(**pgsql.dsn()) + self.assertIsNotNone(conn) +- self.assertRegexpMatches(pgsql.read_bootlog(), 'is ready to accept connections') ++ self.assertRegex(pgsql.read_bootlog(), 'is ready to accept connections') + conn.close() + + # connect to postgresql (w/ sqlalchemy) +@@ -38,7 +38,7 @@ def test_basic(self): + # connect to postgresql (w/ pg8000) + conn = pg8000.connect(**pgsql.dsn()) + self.assertIsNotNone(conn) +- self.assertRegexpMatches(pgsql.read_bootlog(), 'is ready to accept connections') ++ self.assertRegex(pgsql.read_bootlog(), 'is ready to accept connections') + conn.close() + finally: + # shutting down View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-testing.postgresql/-/commit/be678b01d7c806f99913fab7cd7ecaf92fa66798 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-testing.postgresql/-/commit/be678b01d7c806f99913fab7cd7ecaf92fa66798 You're receiving this email because of your account on gitlab.archlinux.org.
