diff options
author | Holger Hoffstätte <holger@applied-asynchrony.com> | 2023-11-14 17:59:58 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2023-11-14 21:15:16 +0100 |
commit | 7748663ef13c9363c7f25b486fe48c865b4373d1 (patch) | |
tree | 2b57269fc1a2bfdb5d80470af0aff9a28fb10fac /dev-java/java-config | |
parent | dev-python/phonenumbers: Bump to 8.13.25 (diff) | |
download | gentoo-7748663ef13c9363c7f25b486fe48c865b4373d1.tar.gz gentoo-7748663ef13c9363c7f25b486fe48c865b4373d1.tar.bz2 gentoo-7748663ef13c9363c7f25b486fe48c865b4373d1.zip |
dev-java/java-config: update PYTHON_COMPAT: remove 3.9, add 3.12
Also add a fix for deprecated test methods which would fail with 3.12.
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/33823
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/java-config')
-rw-r--r-- | dev-java/java-config/files/2.3.2-fix-deprecated-test-methods.patch | 82 | ||||
-rw-r--r-- | dev-java/java-config/java-config-2.3.2.ebuild | 4 | ||||
-rw-r--r-- | dev-java/java-config/java-config-9999.ebuild | 2 |
3 files changed, 86 insertions, 2 deletions
diff --git a/dev-java/java-config/files/2.3.2-fix-deprecated-test-methods.patch b/dev-java/java-config/files/2.3.2-fix-deprecated-test-methods.patch new file mode 100644 index 000000000000..4bc4eb04fbc1 --- /dev/null +++ b/dev-java/java-config/files/2.3.2-fix-deprecated-test-methods.patch @@ -0,0 +1,82 @@ +From bc36c65ae319bd36b51ecbb7fd2ff3271ba08b05 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com> +Date: Tue, 14 Nov 2023 18:27:18 +0100 +Subject: [PATCH] update deprecated test methods for python-3.12 compatibility +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> +--- a/tests/testsuite/EnvironmentManager.py ++++ b/tests/testsuite/EnvironmentManager.py +@@ -11,7 +11,7 @@ def setUp(self): + def test_load_packages(self): + self.em.packages = {} + self.em.load_packages() +- self.assertEquals(len(self.em.get_packages()), 11) ++ self.assertEqual(len(self.em.get_packages()), 11) + + def test_get_package(self): + self.em.get_package('ant-cores') +--- a/tests/testsuite/VersionManager.py ++++ b/tests/testsuite/VersionManager.py +@@ -38,28 +38,28 @@ def test_get_vm(self): + + def test_filter_depend_vanilla(self): + os.environ["USE"] = "" +- self.assertEquals(self.verman.filter_depend(self.example_dep_vanilla), self.example_dep_vanilla) ++ self.assertEqual(self.verman.filter_depend(self.example_dep_vanilla), self.example_dep_vanilla) + + def test_filter_depend_or(self): + # Oh you only realise how ugly things are once you write unittests. + os.environ["USE"] = "" + rmatch = "|| =virtual/jdk-1.5 =virtual/jdk-1.4 dev-java/ant-core java-virtuals/jaf" +- self.assertEquals(self.verman.filter_depend(self.example_dep_or), rmatch) ++ self.assertEqual(self.verman.filter_depend(self.example_dep_or), rmatch) + + def test_filter_depend_use_enabled(self): + os.environ["USE"] = "java" + rmatch = ">=virtual/jdk-1.5* dev-java/ant-core java-virtuals/jaf" +- self.assertEquals(self.verman.filter_depend(self.example_dep_use), rmatch) ++ self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch) + + def test_filter_depend_use_disabled(self): + os.environ["USE"] = "" + rmatch = "dev-java/ant-core java-virtuals/jaf" +- self.assertEquals(self.verman.filter_depend(self.example_dep_use), rmatch) ++ self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch) + + def test_filter_depend_use_unset(self): + del os.environ["USE"] + rmatch = self.example_dep_use +- self.assertEquals(self.verman.filter_depend(self.example_dep_use), rmatch) ++ self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch) + + def test_version_satisfies(self): + vm = self.em.get_vm('sun-jdk-1.6') +@@ -88,13 +88,13 @@ def test_version_satisfies(self): + + def test_get_lowest(self): + target = self.verman.get_lowest(">=virtual/jdk-1.4") +- self.assertEquals(target, '1.4') ++ self.assertEqual(target, '1.4') + + target = self.verman.get_lowest(self.example_dep_vanilla) +- self.assertEquals(target, '1.5') ++ self.assertEqual(target, '1.5') + + target = self.verman.get_lowest(self.example_dep_or) +- self.assertEquals(target, '1.4') ++ self.assertEqual(target, '1.4') + + def test_get_lowest_with_package_dep(self): + pass +@@ -108,7 +108,7 @@ def test_get_lowest_with_package_dep(self): + #def test_matches(self): + + def test_version_cmp(self): +- self.assertEquals(self.verman.version_cmp('1.5.2', '1.5.2'), 0) ++ self.assertEqual(self.verman.version_cmp('1.5.2', '1.5.2'), 0) + self.assertTrue(self.verman.version_cmp('1.5', '1.5.1') < 0) + self.assertTrue(self.verman.version_cmp('1.5.1', '1.5') > 0) + diff --git a/dev-java/java-config/java-config-2.3.2.ebuild b/dev-java/java-config/java-config-2.3.2.ebuild index adc444cdbd70..001b3d072062 100644 --- a/dev-java/java-config/java-config-2.3.2.ebuild +++ b/dev-java/java-config/java-config-2.3.2.ebuild @@ -4,7 +4,7 @@ EAPI=8 # jython depends on java-config, so don't add it or things will break -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..12} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 prefix @@ -27,6 +27,8 @@ RDEPEND=" sys-apps/portage[${PYTHON_USEDEP}] " +PATCHES=( "${FILESDIR}/2.3.2-fix-deprecated-test-methods.patch" ) + python_configure_all() { # setup.py fails to update this file eprefixify src/launcher.bash diff --git a/dev-java/java-config/java-config-9999.ebuild b/dev-java/java-config/java-config-9999.ebuild index 95a5c2abb069..852afb28806a 100644 --- a/dev-java/java-config/java-config-9999.ebuild +++ b/dev-java/java-config/java-config-9999.ebuild @@ -4,7 +4,7 @@ EAPI=8 # jython depends on java-config, so don't add it or things will break -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..12} ) DISTUTILS_USE_PEP517=setuptools inherit distutils-r1 prefix |