This is an automated email from the ASF dual-hosted git repository. XiaoHongbo-Hope pushed a commit to branch release-2.1 in repository https://gitbox.apache.org/repos/asf/paimon.git
commit e59835052544e17f2fa2f89ae936f7aa39eb1ae0 Author: QuakeWang <[email protected]> AuthorDate: Tue Oct 13 13:46:10 2026 +0800 [python] Fix readerwriterlock compatibility on Python 3.6/3.7 (#10532) (cherry picked from commit 405d6d699efb03c0ee1f411808b6e7967d2d7b7d) --- paimon-python/dev/test_packaging.py | 17 +++++++++++++++++ paimon-python/pyproject.toml | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/paimon-python/dev/test_packaging.py b/paimon-python/dev/test_packaging.py index e9d0e5ea52..6c98a36af2 100644 --- a/paimon-python/dev/test_packaging.py +++ b/paimon-python/dev/test_packaging.py @@ -163,6 +163,23 @@ class PackagingTest(unittest.TestCase): self.active_requirements( metadata.get_all("Requires-Dist"), environment)) + def test_readerwriterlock_python_compatibility(self): + _, metadata, _ = wheel_contents(self.wheel) + requirements = [Requirement(value) for value in metadata.get_all("Requires-Dist")] + locks = [requirement for requirement in requirements + if canonicalize_name(requirement.name) == "readerwriterlock"] + for python_version, supports_1_0_10 in (("3.6", False), ("3.7", False), ("3.8", True), ("3.13", True)): + with self.subTest(python=python_version): + environment = default_environment() + environment.update(python_version=python_version, + python_full_version=python_version + ".0", extra="") + active = [requirement for requirement in locks + if requirement.marker is None or requirement.marker.evaluate(environment)] + self.assertEqual(1, len(active)) + self.assertIn("1.0.9", active[0].specifier) + self.assertEqual(supports_1_0_10, "1.0.10" in active[0].specifier) + self.assertNotIn("2.0", active[0].specifier) + def test_dev_group_reuses_product_extras(self): resolve = runpy.run_path(str(self.source / "dev/install.py"))["resolve_group"] requirements = [Requirement(value) for value in resolve( diff --git a/paimon-python/pyproject.toml b/paimon-python/pyproject.toml index d39be4f839..73c1372157 100644 --- a/paimon-python/pyproject.toml +++ b/paimon-python/pyproject.toml @@ -67,7 +67,9 @@ dependencies = [ "pyroaring<=0.3.3; python_version < '3.7'", "pyroaring<=0.4.5; python_version == '3.7'", "pyroaring>=1.0.0; python_version >= '3.8'", - "readerwriterlock>=1,<2", + # readerwriterlock 1.0.10 uses positional-only syntax requiring Python 3.8. + "readerwriterlock>=1,<1.0.10; python_version < '3.8'", + "readerwriterlock>=1,<2; python_version >= '3.8'", "requests>=2.21.0,<3", "urllib3>=1.26,<3", "zstandard>=0.19,<1",
