diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b2622055..8c20bc4e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ build: - asdf install uv latest - asdf global uv latest install: - - cd bindings/python && uv sync --no-install-project --group docs + - cd bindings/python && uv sync --no-install-project --frozen --group docs build: html: - - cd bindings/python && uv run --no-project sphinx-build -c docs -T -b html docs $READTHEDOCS_OUTPUT/html + - cd bindings/python && uv run --no-project --frozen sphinx-build -c docs -T -b html docs $READTHEDOCS_OUTPUT/html diff --git a/bindings/python/CHANGELOG.md b/bindings/python/CHANGELOG.md index d709f213..f573844a 100644 --- a/bindings/python/CHANGELOG.md +++ b/bindings/python/CHANGELOG.md @@ -3,6 +3,10 @@ --- +# Changes in Version 1.8.0 (2025/MM/YY) + +- Add support for PyArrow 20.0. + # Changes in Version 1.7.2 (2025/04/23) - Fix handling of empty embedded arrays. diff --git a/bindings/python/justfile b/bindings/python/justfile index b63cc816..9d3f3b45 100644 --- a/bindings/python/justfile +++ b/bindings/python/justfile @@ -7,7 +7,7 @@ default: @just --list build-libbson: - uv sync --no-install-project --dev + uv sync --no-install-project --dev --frozen bash build-libbson.sh import-check: @@ -27,18 +27,18 @@ test *args: uv run pytest {{args}} lint: - uv sync --no-install-project --dev + uv sync --no-install-project --dev --frozen uv run --no-project pre-commit run --hook-stage manual --all-files uv run --no-project check-manifest -v docs: - uv sync --no-install-project --group docs + uv sync --no-install-project --group docs --frozen uv run --no-project sphinx-build -T -b html {{sphinx_opts}} {{docs_build}}/html docs-serve: - uv sync --no-install-project --group docs --group dev + uv sync --no-install-project --group docs --group dev --frozen urn run --no-project sphinx-autobuild --watch ./pymongoarrow docs {{docs_build}}/html docs-linkcheck *args: - uv sync --no-install-project --group docs + uv sync --no-install-project --group docs --frozen PYTHONHASHSEED=0 uv run --no-project python -m sphinx -q -b linkcheck docs {{docs_build}}/linkcheck {{args}} diff --git a/bindings/python/pymongoarrow/types.py b/bindings/python/pymongoarrow/types.py index 9e24df5e..89e14444 100644 --- a/bindings/python/pymongoarrow/types.py +++ b/bindings/python/pymongoarrow/types.py @@ -67,10 +67,10 @@ class _BsonArrowTypes(enum.Enum): class BSONExtensionScalar(ExtensionScalar): - def as_py(self): + def as_py(self, *args, **kwargs): if self.value is None: return None - return self._bson_class(self.value.as_py()) + return self._bson_class(self.value.as_py(*args, **kwargs)) class ObjectIdScalar(BSONExtensionScalar): @@ -101,10 +101,10 @@ def __arrow_ext_deserialize__(self, storage_type, serialized): class Decimal128Scalar(ExtensionScalar): - def as_py(self): + def as_py(self, *args, **kwargs): if self.value is None: return None - return Decimal128.from_bid(self.value.as_py()) + return Decimal128.from_bid(self.value.as_py(*args, **kwargs)) class Decimal128Type(ExtensionType): @@ -131,11 +131,11 @@ def __arrow_ext_deserialize__(self, storage_type, serialized): class BinaryScalar(ExtensionScalar): - def as_py(self): + def as_py(self, *args, **kwargs): value = self.value if value is None: return None - return Binary(self.value.as_py(), self.type.subtype) + return Binary(self.value.as_py(*args, **kwargs), self.type.subtype) class BinaryType(ExtensionType): diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index ec4cf490..8a007fca 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -6,7 +6,7 @@ requires = [ # Needed for numpy headers. "numpy>=2.0", # Must be kept in sync with "project.dependencies" below. - "pyarrow>=19.0,<19.1.0", + "pyarrow>=20.0,<20.1.0", ] [project] @@ -37,7 +37,7 @@ readme = "README.md" requires-python = ">=3.9" dependencies = [ # Must be kept in sync with "build_sytem.requires" above. - "pyarrow >=19.0,<19.1", + "pyarrow >=20.0,<20.1", "pymongo >=4.4,<5", "pandas >=1.3.5,<3", "packaging >=23.2",