Skip to content

Commit da66a12

Browse files
authored
Prune dependency upper bounds (#3586)
This PR removes as many upperbounds restrictions as possible from our dependencies. Why remove unnecessary upper bounds: - Makes PyIceberg easier to install alongside applications that already use newer compatible dependency versions. - Reduces resolver conflicts and forced downgrades for downstream users, while keeping caps where there is a real compatibility boundary or known bad version. We already removed upperbound for pyarrow in #2258 And theres a request to remove upperbound for cachetools in #3214 Closes #3214 Changes: - Removes upper bounds that passed local validation, while keeping the remaining compatibility caps. - Refreshes `uv.lock` with upgraded packages. - Updates tests for newer Moto and PyArrow behavior exposed by the lockfile refresh. Validation: - `make test PYTHON=3.12` (`3736 passed, 1534 deselected`)
1 parent da66533 commit da66a12

4 files changed

Lines changed: 2148 additions & 1686 deletions

File tree

pyproject.toml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ classifiers = [
3232
"Programming Language :: Python :: 3.14",
3333
]
3434
dependencies = [
35-
"mmh3>=4.0.0,<6.0.0",
36-
"requests>=2.20.0,<3.0.0",
37-
"click>=7.1.1,<9.0.0",
38-
"rich>=10.11.0,<16.0.0",
39-
"strictyaml>=1.7.0,<2.0.0", # CVE-2020-14343 was fixed in 5.4.
35+
"mmh3>=4.0.0",
36+
"requests>=2.20.0",
37+
"click>=7.1.1",
38+
"rich>=10.11.0",
39+
"strictyaml>=1.7.0", # CVE-2020-14343 was fixed in 5.4.
4040
"pydantic>=2.0,<3.0,!=2.4.0,!=2.4.1,!=2.12.0,!=2.12.1", # 2.4.0, 2.4.1, 2.12.0, 2.12.1 has a critical bug
4141
"fsspec>=2023.1.0",
42-
"pyparsing>=3.1.0,<4.0.0",
43-
"tenacity>=8.2.3,<10.0.0",
44-
"pyroaring>=1.0.0,<2.0.0",
45-
"cachetools>=5.5,<8.0",
46-
"zstandard>=0.13.0,<1.0.0"
42+
"pyparsing>=3.1.0",
43+
"tenacity>=8.2.3",
44+
"pyroaring>=1.0.0",
45+
"cachetools>=5.5",
46+
"zstandard>=0.13.0"
4747
]
4848

4949
[project.urls]
@@ -62,23 +62,23 @@ pandas = [
6262
"pyarrow>=17.0.0",
6363
]
6464
duckdb = [
65-
"duckdb>=0.5.0,<2.0.0",
65+
"duckdb>=0.5.0",
6666
"pyarrow>=17.0.0",
6767
]
6868
ray = [
69-
"ray>=2.10.0,<3.0.0",
69+
"ray>=2.10.0",
7070
"pyarrow>=17.0.0",
7171
"pandas>=1.0.0",
7272
]
7373
bodo = ["bodo>=2025.7.4"]
7474
daft = ["daft>=0.7.10"]
75-
polars = ["polars>=1.21.0,<2"]
76-
snappy = ["python-snappy>=0.6.0,<1.0.0"]
77-
hive = ["thrift>=0.13.0,<1.0.0"]
75+
polars = ["polars>=1.21.0"]
76+
snappy = ["python-snappy>=0.6.0"]
77+
hive = ["thrift>=0.13.0"]
7878
hive-kerberos = [
79-
"thrift>=0.13.0,<1.0.0",
79+
"thrift>=0.13.0",
8080
"thrift-sasl>=0.4.3",
81-
"kerberos>=1.3.1,<2",
81+
"kerberos>=1.3.1",
8282
]
8383
s3fs = ["s3fs>=2023.1.0"]
8484
glue = ["boto3>=1.24.59"]
@@ -103,18 +103,18 @@ geoarrow = ["geoarrow-pyarrow>=0.2.0"]
103103
dev = [
104104
"pytest==9.1.1",
105105
"pytest-checkdocs==2.14.0",
106-
"prek>=0.2.1,<0.5",
106+
"prek>=0.2.1",
107107
"pytest-lazy-fixtures==1.4.0",
108108
"fastavro==1.12.2",
109-
"coverage[toml]>=7.4.2,<8",
109+
"coverage[toml]>=7.4.2",
110110
"requests-mock==1.12.1",
111-
"moto[server]>=5.0.2,<6",
111+
"moto[server]>=5.0.2",
112112
"typing-extensions==4.15.0",
113113
"pytest-mock==3.15.1",
114114
"pyspark[connect]==4.0.1",
115115
"protobuf==6.33.5", # match Spark Connect's gencode
116116
"cython>=3.0.0",
117-
"deptry>=0.14,<0.26",
117+
"deptry>=0.14",
118118
"docutils!=0.21.post1",
119119
"mypy-boto3-glue>=1.28.18",
120120
"mypy-boto3-dynamodb>=1.28.18",
@@ -178,6 +178,8 @@ filterwarnings = [
178178
"ignore:subprocess.*is still running:ResourceWarning",
179179
# Ignore google-crc32c C extension missing warning (common on Python 3.14+)
180180
"ignore:As the c extension couldn't be imported:RuntimeWarning:google_crc32c",
181+
# Ignore Spark 4.0.1 pandas conversion warning under pandas 3.0
182+
"ignore:The copy keyword is deprecated and will be removed in a future version.*",
181183
]
182184

183185
[tool.mypy]

tests/catalog/test_glue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def _db_as_dict_with_federated(self): # type: ignore
7272
# warehouse location.
7373
_original_table_init = FakeTable.__init__
7474

75-
def _table_init_with_location(self, database_name, table_name, table_input, catalog_id): # type: ignore
75+
def _table_init_with_location(self, database_name, table_name, table_input, *args, **kwargs): # type: ignore
7676
if table_input.get("Parameters", {}).get("format") == "ICEBERG" and "StorageDescriptor" not in table_input:
7777
table_input = {
7878
**table_input,
@@ -84,7 +84,7 @@ def _table_init_with_location(self, database_name, table_name, table_input, cata
8484
"SerdeInfo": {},
8585
},
8686
}
87-
_original_table_init(self, database_name, table_name, table_input, catalog_id)
87+
_original_table_init(self, database_name, table_name, table_input, *args, **kwargs)
8888

8989
monkeypatch.setattr(FakeTable, "__init__", _table_init_with_location)
9090

tests/integration/test_writes/test_writes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ def test_spark_writes_orc_pyiceberg_reads(spark: SparkSession, session_catalog:
768768

769769
# Verify PyIceberg data types are correct
770770
assert pyiceberg_df["id"].dtype == "int64"
771-
assert pyiceberg_df["name"].dtype == "object" # string
771+
assert pd.api.types.is_string_dtype(pyiceberg_df["name"].dtype)
772772
assert pyiceberg_df["age"].dtype == "int64"
773773
assert pyiceberg_df["is_active"].dtype == "bool"
774774

0 commit comments

Comments
 (0)