This is an automated email from the ASF dual-hosted git repository.

JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 038269e6ac [test] Fix Python 3.13 test compatibility issues
038269e6ac is described below

commit 038269e6acc30a362f43832b77ed7ca851c7dc25
Author: JingsongLi <[email protected]>
AuthorDate: Mon May 25 09:26:54 2026 +0800

    [test] Fix Python 3.13 test compatibility issues
    
    - Add pytest.importorskip for lumina_data (no macOS arm64 wheel available)
    - Replace deprecated assertEquals with assertEqual (removed in Python 3.13)
    - Skip zstd manifest test on Python 3.13+ (fastavro 1.12 bundles zstd in 
compiled extension)
---
 paimon-python/pypaimon/tests/lumina_vector_index_test.py       |  3 +++
 paimon-python/pypaimon/tests/manifest/manifest_manager_test.py | 10 ++++++----
 paimon-python/pypaimon/tests/write/table_write_test.py         |  4 ++--
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/paimon-python/pypaimon/tests/lumina_vector_index_test.py 
b/paimon-python/pypaimon/tests/lumina_vector_index_test.py
index d1a4ed7550..ca25ef6917 100644
--- a/paimon-python/pypaimon/tests/lumina_vector_index_test.py
+++ b/paimon-python/pypaimon/tests/lumina_vector_index_test.py
@@ -22,6 +22,9 @@ import shutil
 import tempfile
 import unittest
 
+import pytest
+
+lumina_data = pytest.importorskip("lumina_data")
 from lumina_data import LuminaBuilder
 
 from pypaimon.globalindex.global_index_meta import GlobalIndexIOMeta
diff --git a/paimon-python/pypaimon/tests/manifest/manifest_manager_test.py 
b/paimon-python/pypaimon/tests/manifest/manifest_manager_test.py
index c962292981..80cb7ed3d6 100644
--- a/paimon-python/pypaimon/tests/manifest/manifest_manager_test.py
+++ b/paimon-python/pypaimon/tests/manifest/manifest_manager_test.py
@@ -336,8 +336,8 @@ class ManifestListManagerTest(_ManifestManagerSetup):
         'PyPI backports.zstd only supports Python 3.9–3.13',
     )
     @unittest.skipIf(
-        sys.version_info >= (3, 14),
-        'fastavro uses stdlib compression.zstd on Python 3.14+, not 
backports.zstd',
+        sys.version_info >= (3, 13),
+        'fastavro >= 1.12 bundles zstd in compiled extension on Python 3.13+',
     )
     def test_zstd_manifest_list_fastavro_requires_backports_zstd(self):
         """Child venv runs ``manifest_list_zstd_read_subprocess`` (argv: 
warehouse, table id, list file name).
@@ -363,7 +363,8 @@ class ManifestListManagerTest(_ManifestManagerSetup):
         isolated_venv_python = _manifest_zstd_read_subprocess_venv_python()
         pip_install_env = _subprocess_env_for_pip()
         subprocess.run(
-            [isolated_venv_python, '-m', 'pip', 'uninstall', '-y', 
'backports.zstd'],
+            [isolated_venv_python, '-m', 'pip', 'uninstall', '-y',
+             'backports.zstd', 'zstandard'],
             stdout=subprocess.DEVNULL,
             stderr=subprocess.DEVNULL,
             env=pip_install_env,
@@ -389,7 +390,8 @@ class ManifestListManagerTest(_ManifestManagerSetup):
         self.assertIn('backports.zstd', stderr_and_stdout)
 
         subprocess.check_call(
-            [isolated_venv_python, '-m', 'pip', 'install', '-q', 
'backports.zstd'],
+            [isolated_venv_python, '-m', 'pip', 'install', '-q',
+             'backports.zstd', 'zstandard'],
             env=pip_install_env,
         )
         read_with_zstd_backend = subprocess.run(
diff --git a/paimon-python/pypaimon/tests/write/table_write_test.py 
b/paimon-python/pypaimon/tests/write/table_write_test.py
index 96abfb73ae..7c31778c17 100644
--- a/paimon-python/pypaimon/tests/write/table_write_test.py
+++ b/paimon-python/pypaimon/tests/write/table_write_test.py
@@ -94,8 +94,8 @@ class TableWriteTest(unittest.TestCase):
 
         # snapshot
         snapshot_json: str = 
JSON.to_json(table.snapshot_manager().get_latest_snapshot())
-        self.assertEquals(True, snapshot_json.__contains__("baseManifestList"))
-        self.assertEquals(False, snapshot_json.__contains__("nextRowId"))
+        self.assertEqual(True, snapshot_json.__contains__("baseManifestList"))
+        self.assertEqual(False, snapshot_json.__contains__("nextRowId"))
 
     def test_multi_prepare_commit_ao(self):
         schema = Schema.from_pyarrow_schema(self.pa_schema, 
partition_keys=['dt'])

Reply via email to