Skip to content

Commit 376bca4

Browse files
committed
INTPYTHON-609 Add support for PyArrow 20
1 parent 4321bb0 commit 376bca4

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

bindings/python/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
---
55

6+
# Changes in Version 1.8.0 (2025/MM/YY)
7+
8+
- Add support for PyArrow 20.0.
9+
610
# Changes in Version 1.7.2 (2025/04/23)
711

812
- Fix handling of empty embedded arrays.

bindings/python/pymongoarrow/types.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ class _BsonArrowTypes(enum.Enum):
6767

6868

6969
class BSONExtensionScalar(ExtensionScalar):
70-
def as_py(self):
70+
def as_py(self, *args, **kwargs):
7171
if self.value is None:
7272
return None
73-
return self._bson_class(self.value.as_py())
73+
return self._bson_class(self.value.as_py(*args, **kwargs))
7474

7575

7676
class ObjectIdScalar(BSONExtensionScalar):
@@ -101,10 +101,10 @@ def __arrow_ext_deserialize__(self, storage_type, serialized):
101101

102102

103103
class Decimal128Scalar(ExtensionScalar):
104-
def as_py(self):
104+
def as_py(self, *args, **kwargs):
105105
if self.value is None:
106106
return None
107-
return Decimal128.from_bid(self.value.as_py())
107+
return Decimal128.from_bid(self.value.as_py(*args, **kwargs))
108108

109109

110110
class Decimal128Type(ExtensionType):
@@ -131,11 +131,11 @@ def __arrow_ext_deserialize__(self, storage_type, serialized):
131131

132132

133133
class BinaryScalar(ExtensionScalar):
134-
def as_py(self):
134+
def as_py(self, *args, **kwargs):
135135
value = self.value
136136
if value is None:
137137
return None
138-
return Binary(self.value.as_py(), self.type.subtype)
138+
return Binary(self.value.as_py(*args, **kwargs), self.type.subtype)
139139

140140

141141
class BinaryType(ExtensionType):

bindings/python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ requires = [
66
# Needed for numpy headers.
77
"numpy>=2.0",
88
# Must be kept in sync with "project.dependencies" below.
9-
"pyarrow>=19.0,<19.1.0",
9+
"pyarrow>=20.0,<20.1.0",
1010
]
1111

1212
[project]
@@ -37,7 +37,7 @@ readme = "README.md"
3737
requires-python = ">=3.9"
3838
dependencies = [
3939
# Must be kept in sync with "build_sytem.requires" above.
40-
"pyarrow >=19.0,<19.1",
40+
"pyarrow >=20.0,<20.1",
4141
"pymongo >=4.4,<5",
4242
"pandas >=1.3.5,<3",
4343
"packaging >=23.2",

0 commit comments

Comments
 (0)