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

emaynard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 20af2cd4e Pin virtualenv version to fix python client installation 
issue (#2569)
20af2cd4e is described below

commit 20af2cd4e99ba21e148214c5f5aad7d1544a6d95
Author: Honah (Jonas) J. <[email protected]>
AuthorDate: Mon Sep 15 15:33:46 2025 -0500

    Pin virtualenv version to fix python client installation issue (#2569)
    
    ```
    Package operations: 1 install, 1 update, 0 removals
    
      - Updating virtualenv (20.32.0 -> 20.34.0)
      - Installing pyiceberg (0.10.0): Failed
    
      AttributeError
    
      'PythonInfo' object has no attribute 'tcl_lib'
    
      at 
~/tmp/3/polaris/polaris-venv/lib/python3.13/site-packages/virtualenv/activation/via_template.py:50
 in replacements
           46│             "__VIRTUAL_ENV__": str(creator.dest),
           47│             "__VIRTUAL_NAME__": creator.env_name,
           48│             "__BIN_NAME__": 
str(creator.bin_dir.relative_to(creator.dest)),
           49│             "__PATH_SEP__": os.pathsep,
        →  50│             "__TCL_LIBRARY__": creator.interpreter.tcl_lib or "",
           51│             "__TK_LIBRARY__": creator.interpreter.tk_lib or "",
           52│         }
           53│
           54│     def _generate(self, replacements, templates, to_folder, 
creator):
    ```
    Currently user may get the above error when running `./polaris` for the 
first time. This is caused by an upstream bug in `virtualenv>=20.33.0` and a 
bug in poetry that mistakenly upgrade the package version even if it is not 
compatible: 
https://github.com/python-poetry/poetry/issues/10504#issuecomment-3176923981.
    
    This PR fix the issue by pinning the `virtualenv` version to match what's 
in upstream poetry: 
https://github.com/python-poetry/poetry/blob/a8f0889a54a545ec4f7ceed7bf41f8c2a7677bbb/pyproject.toml#L31
---
 .github/workflows/python-client.yml | 4 ++--
 client/python/pyproject.toml        | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/python-client.yml 
b/.github/workflows/python-client.yml
index 54a8e715e..8ee2d5011 100644
--- a/.github/workflows/python-client.yml
+++ b/.github/workflows/python-client.yml
@@ -38,7 +38,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.9", "3.10", "3.11"]
+        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
 
     steps:
       - name: Checkout Polaris project
@@ -74,6 +74,6 @@ jobs:
         run: |
           make client-integration-test
 
-      - name: Run Polaris Client help maual
+      - name: Run Polaris Client help manual
         run: |
           ./polaris --help
diff --git a/client/python/pyproject.toml b/client/python/pyproject.toml
index bec608d58..7d4af8f1f 100644
--- a/client/python/pyproject.toml
+++ b/client/python/pyproject.toml
@@ -62,6 +62,9 @@ mypy = ">=1.18, <=1.18.1"
 pyiceberg = "==0.10.0"
 pre-commit = "==4.3.0"
 openapi-generator-cli = "==7.11.0.post0"
+# pin virtualenv version to prevent poetry from upgrading to an incompatible 
version
+# see 
https://github.com/python-poetry/poetry/issues/10504#issuecomment-3176923981
+virtualenv = ">=20.26.6,<20.33.0"
 
 [build-system]
 requires = ["poetry-core>=2.0.0,<3.0.0", "openapi-generator-cli==7.11.0.post0"]

Reply via email to