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

kou 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 28982c2c4 build(python/adbc_driver_manager): fix type declarations 
(#3049)
28982c2c4 is described below

commit 28982c2c47d88bb2fc33478da984bf719c24da33
Author: David Li <[email protected]>
AuthorDate: Fri Jun 27 18:35:17 2025 +0900

    build(python/adbc_driver_manager): fix type declarations (#3049)
    
    We must also pin to Sphinx >=8.2 due to
    https://github.com/sphinx-doc/sphinx/issues/13178.
    
    Fixes #3048.
---
 ci/conda_env_docs.txt                                   | 2 +-
 docs/source/conf.py                                     | 1 +
 python/adbc_driver_manager/adbc_driver_manager/_lib.pyi | 5 +++--
 python/adbc_driver_manager/adbc_driver_manager/dbapi.py | 5 +++--
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ci/conda_env_docs.txt b/ci/conda_env_docs.txt
index 9badc3f31..72a59e18e 100644
--- a/ci/conda_env_docs.txt
+++ b/ci/conda_env_docs.txt
@@ -23,7 +23,7 @@ nodejs
 numpydoc
 polars
 pytest
-sphinx>=8.1
+sphinx>=8.2
 sphinx-autobuild
 sphinx-copybutton
 sphinx-design
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 3e261c131..c23a7468e 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -147,6 +147,7 @@ intersphinx_mapping = {
     "arrow": ("https://arrow.apache.org/docs/";, None),
     "pandas": ("https://pandas.pydata.org/docs/";, None),
     "polars": ("https://docs.pola.rs/api/python/stable/";, None),
+    "python": ("https://docs.python.org/3";, None),
 }
 
 # Add env vars like ADBC_INTERSPHINX_MAPPING_adbc_java = url;path
diff --git a/python/adbc_driver_manager/adbc_driver_manager/_lib.pyi 
b/python/adbc_driver_manager/adbc_driver_manager/_lib.pyi
index 6f10874ba..33d234e82 100644
--- a/python/adbc_driver_manager/adbc_driver_manager/_lib.pyi
+++ b/python/adbc_driver_manager/adbc_driver_manager/_lib.pyi
@@ -18,10 +18,11 @@
 # NOTE: generated with mypy's stubgen, then hand-edited to fix things
 
 import typing_extensions
-from typing import Any, ClassVar, Dict, List, Literal, Optional, Tuple, Union
+from typing import Any, ClassVar, List, Literal, Optional, Tuple, Union
 
 from typing import overload
 import enum
+import pathlib
 import typing
 
 INGEST_OPTION_MODE: str
@@ -71,7 +72,7 @@ class AdbcConnection(_AdbcHandle):
     def set_options(self, **kwargs: Union[bytes, float, int, str, None]) -> 
None: ...
 
 class AdbcDatabase(_AdbcHandle):
-    def __init__(self, **kwargs: str) -> None: ...
+    def __init__(self, **kwargs: Union[str, pathlib.Path]) -> None: ...
     def close(self) -> None: ...
     def get_option(
         self,
diff --git a/python/adbc_driver_manager/adbc_driver_manager/dbapi.py 
b/python/adbc_driver_manager/adbc_driver_manager/dbapi.py
index ac4e19c21..3b2302b04 100644
--- a/python/adbc_driver_manager/adbc_driver_manager/dbapi.py
+++ b/python/adbc_driver_manager/adbc_driver_manager/dbapi.py
@@ -41,6 +41,7 @@ under pytest, or when the environment variable
 import abc
 import datetime
 import os
+import pathlib
 import threading
 import time
 import typing
@@ -182,9 +183,9 @@ else:
 
 def connect(
     *,
-    driver: str,
+    driver: Union[str, pathlib.Path],
     entrypoint: Optional[str] = None,
-    db_kwargs: Optional[Dict[str, str]] = None,
+    db_kwargs: Optional[Dict[str, Union[str, pathlib.Path]]] = None,
     conn_kwargs: Optional[Dict[str, str]] = None,
     autocommit=False,
 ) -> "Connection":

Reply via email to