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

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new db6f433d3 chore: remove importlib_resources dependency (#4595)
db6f433d3 is described below

commit db6f433d339557d792dfd2eb7f50331618ee299e
Author: David Li <[email protected]>
AuthorDate: Mon Jul 27 15:21:30 2026 -0700

    chore: remove importlib_resources dependency (#4595)
    
    Closes #4586.
---
 ci/conda_env_python.txt                                          | 1 -
 ci/scripts/python_sdist_test.sh                                  | 2 +-
 ci/scripts/python_wheel_unix_test.sh                             | 2 +-
 ci/scripts/python_wheel_windows_test.bat                         | 2 +-
 dev/release/verify-release-candidate.sh                          | 2 +-
 python/adbc_driver_flightsql/adbc_driver_flightsql/__init__.py   | 5 ++---
 python/adbc_driver_flightsql/pyproject.toml                      | 1 -
 python/adbc_driver_postgresql/adbc_driver_postgresql/__init__.py | 5 ++---
 python/adbc_driver_postgresql/pyproject.toml                     | 1 -
 python/adbc_driver_sqlite/adbc_driver_sqlite/__init__.py         | 5 ++---
 python/adbc_driver_sqlite/pyproject.toml                         | 1 -
 11 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/ci/conda_env_python.txt b/ci/conda_env_python.txt
index c7357a5e0..0b7a213fd 100644
--- a/ci/conda_env_python.txt
+++ b/ci/conda_env_python.txt
@@ -16,7 +16,6 @@
 # under the License.
 
 cython
-importlib-resources
 # libxml2 broke ABI compatibility
 # https://github.com/conda-forge/arrow-cpp-feedstock/issues/1740
 libxml2 <2.14.0
diff --git a/ci/scripts/python_sdist_test.sh b/ci/scripts/python_sdist_test.sh
index 38e71e692..b38d1ddc1 100755
--- a/ci/scripts/python_sdist_test.sh
+++ b/ci/scripts/python_sdist_test.sh
@@ -47,7 +47,7 @@ echo "=== Installing sdists ==="
 for component in ${COMPONENTS}; do
     pip install --no-deps --force-reinstall 
${source_dir}/python/${component}/dist/*.tar.gz
 done
-pip install importlib-resources pytest pyarrow pandas polars protobuf
+pip install pytest pyarrow pandas polars protobuf
 
 echo "=== (${PYTHON_VERSION}) Testing sdists ==="
 test_packages
diff --git a/ci/scripts/python_wheel_unix_test.sh 
b/ci/scripts/python_wheel_unix_test.sh
index e279ef7bf..f028beff2 100755
--- a/ci/scripts/python_wheel_unix_test.sh
+++ b/ci/scripts/python_wheel_unix_test.sh
@@ -55,7 +55,7 @@ for component in ${COMPONENTS}; do
     fi
 done
 
-python -m pip install importlib-resources pytest pyarrow pandas protobuf
+python -m pip install pytest pyarrow pandas protobuf
 if [[ -z "${PYTHON_FLAGS}" ]]; then
     # polars does not support freethreading and will try to build from source
     python -m pip install polars
diff --git a/ci/scripts/python_wheel_windows_test.bat 
b/ci/scripts/python_wheel_windows_test.bat
index 8fafcd3ea..78e60681f 100644
--- a/ci/scripts/python_wheel_windows_test.bat
+++ b/ci/scripts/python_wheel_windows_test.bat
@@ -27,7 +27,7 @@ FOR %%c IN (adbc_driver_manager adbc_driver_flightsql 
adbc_driver_postgresql adb
     )
 )
 
-pip install importlib-resources pytest pyarrow pandas protobuf
+pip install pytest pyarrow pandas protobuf
 
 echo "=== (%PYTHON_VERSION%) Testing wheels ==="
 
diff --git a/dev/release/verify-release-candidate.sh 
b/dev/release/verify-release-candidate.sh
index 3595c4a88..c62dcc703 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -546,7 +546,7 @@ test_python() {
   show_header "Build and test Python libraries"
 
   # Build and test Python
-  maybe_setup_virtualenv cython duckdb pandas polars protobuf pyarrow pytest 
setuptools_scm setuptools importlib_resources || exit 1
+  maybe_setup_virtualenv cython duckdb pandas polars protobuf pyarrow pytest 
setuptools_scm setuptools || exit 1
   maybe_setup_conda --file "${ADBC_DIR}/ci/conda_env_python.txt" || exit 1
 
   if [ "${USE_CONDA}" -gt 0 ]; then
diff --git a/python/adbc_driver_flightsql/adbc_driver_flightsql/__init__.py 
b/python/adbc_driver_flightsql/adbc_driver_flightsql/__init__.py
index 14a086b3a..287213a2a 100644
--- a/python/adbc_driver_flightsql/adbc_driver_flightsql/__init__.py
+++ b/python/adbc_driver_flightsql/adbc_driver_flightsql/__init__.py
@@ -277,15 +277,14 @@ def connect(
 
 @functools.lru_cache
 def _driver_path() -> str:
+    import importlib.resources
     import pathlib
     import sys
 
-    import importlib_resources
-
     driver = "adbc_driver_flightsql"
 
     # Wheels bundle the shared library
-    root = importlib_resources.files(driver)
+    root = importlib.resources.files(driver)
     # The filename is always the same regardless of platform
     entrypoint = root.joinpath(f"lib{driver}.so")
     if entrypoint.is_file():
diff --git a/python/adbc_driver_flightsql/pyproject.toml 
b/python/adbc_driver_flightsql/pyproject.toml
index 71fe5c468..1c002245d 100644
--- a/python/adbc_driver_flightsql/pyproject.toml
+++ b/python/adbc_driver_flightsql/pyproject.toml
@@ -26,7 +26,6 @@ requires-python = ">=3.10"
 dynamic = ["version"]
 dependencies = [
     "adbc-driver-manager",
-    "importlib-resources >=1.3",
 ]
 
 [project.optional-dependencies]
diff --git a/python/adbc_driver_postgresql/adbc_driver_postgresql/__init__.py 
b/python/adbc_driver_postgresql/adbc_driver_postgresql/__init__.py
index 750ba78a2..130817616 100644
--- a/python/adbc_driver_postgresql/adbc_driver_postgresql/__init__.py
+++ b/python/adbc_driver_postgresql/adbc_driver_postgresql/__init__.py
@@ -67,15 +67,14 @@ def connect(
 
 @functools.lru_cache
 def _driver_path() -> str:
+    import importlib.resources
     import pathlib
     import sys
 
-    import importlib_resources
-
     driver = "adbc_driver_postgresql"
 
     # Wheels bundle the shared library
-    root = importlib_resources.files(driver)
+    root = importlib.resources.files(driver)
     # The filename is always the same regardless of platform
     entrypoint = root.joinpath(f"lib{driver}.so")
     if entrypoint.is_file():
diff --git a/python/adbc_driver_postgresql/pyproject.toml 
b/python/adbc_driver_postgresql/pyproject.toml
index 089501c8b..18d502821 100644
--- a/python/adbc_driver_postgresql/pyproject.toml
+++ b/python/adbc_driver_postgresql/pyproject.toml
@@ -26,7 +26,6 @@ requires-python = ">=3.10"
 dynamic = ["version"]
 dependencies = [
     "adbc-driver-manager",
-    "importlib-resources >=1.3",
 ]
 
 [project.optional-dependencies]
diff --git a/python/adbc_driver_sqlite/adbc_driver_sqlite/__init__.py 
b/python/adbc_driver_sqlite/adbc_driver_sqlite/__init__.py
index b85f1fc83..66d833f91 100644
--- a/python/adbc_driver_sqlite/adbc_driver_sqlite/__init__.py
+++ b/python/adbc_driver_sqlite/adbc_driver_sqlite/__init__.py
@@ -62,15 +62,14 @@ def connect(uri: typing.Optional[str] = None) -> 
adbc_driver_manager.AdbcDatabas
 
 @functools.lru_cache
 def _driver_path() -> str:
+    import importlib.resources
     import pathlib
     import sys
 
-    import importlib_resources
-
     driver = "adbc_driver_sqlite"
 
     # Wheels bundle the shared library
-    root = importlib_resources.files(driver)
+    root = importlib.resources.files(driver)
     # The filename is always the same regardless of platform
     entrypoint = root.joinpath(f"lib{driver}.so")
     if entrypoint.is_file():
diff --git a/python/adbc_driver_sqlite/pyproject.toml 
b/python/adbc_driver_sqlite/pyproject.toml
index 8274f2b91..348d6610c 100644
--- a/python/adbc_driver_sqlite/pyproject.toml
+++ b/python/adbc_driver_sqlite/pyproject.toml
@@ -26,7 +26,6 @@ requires-python = ">=3.10"
 dynamic = ["version"]
 dependencies = [
     "adbc-driver-manager",
-    "importlib-resources >=1.3",
 ]
 
 [project.optional-dependencies]

Reply via email to