Chih-Hsuan Yen pushed to branch main at Arch Linux / Packaging / Packages / python-sure
Commits: 92deebf3 by Chih-Hsuan Yen at 2024-04-06T14:58:07+08:00 Fix tests for Python 3.12 - - - - - 82410e07 by Chih-Hsuan Yen at 2024-04-06T14:59:27+08:00 upgpkg: 2.0.1-4 - - - - - 3 changed files: - + .SRCINFO - PKGBUILD - + python-3.12.diff Changes: ===================================== .SRCINFO ===================================== @@ -0,0 +1,20 @@ +pkgbase = python-sure + pkgdesc = An idiomatic testing library for python with powerful and flexible assertions + pkgver = 2.0.1 + pkgrel = 4 + url = https://github.com/gabrielfalcao/sure + arch = any + license = GPL + checkdepends = python-pytest + checkdepends = python-nose + makedepends = python-setuptools + makedepends = git + depends = python-six + source = git+https://github.com/gabrielfalcao/sure.git#commit=84a45bf91fde2e4b922fb126a9f45651be9393fb + source = use-unittest-mock.diff + source = python-3.12.diff + sha512sums = afe1fd4698f7386d40c0a138fb3d3e824549669bfb74b97f336743b7f25278302ab0cb45fb4b8ee18b5709895c623bd885896b984a131c51d7c899113a44b073 + sha512sums = ad17f0bc171058cc488f844a55bd0cf2f83b391c6c47b4ac1864b5de0d0842eb086dd1413c249a05684a45c67542c15eadfa2a7cdff095669e327d0e80f09183 + sha512sums = 4849170d433a71a88469009591a2097e17ee9cb3bf85491bc637b26c36982fc8960153bbb33c45ff969e3838447388e408f555e2a45b1f19b13fcf9bca9bac5a + +pkgname = python-sure ===================================== PKGBUILD ===================================== @@ -4,7 +4,7 @@ pkgname=python-sure pkgver=2.0.1 _commit=84a45bf91fde2e4b922fb126a9f45651be9393fb -pkgrel=3 +pkgrel=4 pkgdesc="An idiomatic testing library for python with powerful and flexible assertions" arch=('any') url="https://github.com/gabrielfalcao/sure" @@ -14,9 +14,11 @@ makedepends=('python-setuptools' 'git') # python-nose is still imported in some tests https://github.com/gabrielfalcao/sure/issues/182 checkdepends=('python-pytest' 'python-nose') source=("git+https://github.com/gabrielfalcao/sure.git#commit=$_commit" - "use-unittest-mock.diff") -sha512sums=('SKIP' - 'ad17f0bc171058cc488f844a55bd0cf2f83b391c6c47b4ac1864b5de0d0842eb086dd1413c249a05684a45c67542c15eadfa2a7cdff095669e327d0e80f09183') + "use-unittest-mock.diff" + "python-3.12.diff") +sha512sums=('afe1fd4698f7386d40c0a138fb3d3e824549669bfb74b97f336743b7f25278302ab0cb45fb4b8ee18b5709895c623bd885896b984a131c51d7c899113a44b073' + 'ad17f0bc171058cc488f844a55bd0cf2f83b391c6c47b4ac1864b5de0d0842eb086dd1413c249a05684a45c67542c15eadfa2a7cdff095669e327d0e80f09183' + '4849170d433a71a88469009591a2097e17ee9cb3bf85491bc637b26c36982fc8960153bbb33c45ff969e3838447388e408f555e2a45b1f19b13fcf9bca9bac5a') prepare() { export LC_CTYPE=en_US.UTF-8 @@ -25,6 +27,13 @@ prepare() { # Based on the first two commits in https://github.com/gabrielfalcao/sure/pull/161 patch -Np1 -i ../use-unittest-mock.diff + # unittest.TestCase.assertEquals is removed in Python 3.12 [1], and thus nose.tools no longer exports assert_equals [2] + # Upstream completely drops nose in 3.x pre-releases [3]. Here is just a quick-and-dirty workaround. + # [1] https://docs.python.org/3/whatsnew/3.12.html#id3 + # [2] https://github.com/nose-devs/nose/blob/master/nose/tools/trivial.py#L33 + # [1] https://github.com/gabrielfalcao/sure/commit/b65631f9bf2074702d2e582a7702307353cf447e + patch -Np1 -i ../python-3.12.diff + sed -i 's#--cov=sure##' setup.cfg } ===================================== python-3.12.diff ===================================== @@ -0,0 +1,13 @@ +diff --git a/tests/test_old_api.py b/tests/test_old_api.py +index 5b0b37b..2f5fad5 100644 +--- a/tests/test_old_api.py ++++ b/tests/test_old_api.py +@@ -24,7 +24,7 @@ import sure + from sure.deprecated import that + from sure.magic import is_cpython + from sure import VariablesBag, expect +-from nose.tools import assert_equals, assert_raises ++from nose.tools import assert_equal as assert_equals, assert_raises + from sure.compat import compat_repr, safe_repr, text_type_name + + View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-sure/-/compare/db80135c0c675aa4ed911f4f5a9e5dc022df1eea...82410e0726d76a9c61b7303d423172c3455cbf13 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-sure/-/compare/db80135c0c675aa4ed911f4f5a9e5dc022df1eea...82410e0726d76a9c61b7303d423172c3455cbf13 You're receiving this email because of your account on gitlab.archlinux.org.