Repository navigation
fix(pyo3): allow pyarrow 24-26 so consumers can clear CVE-2026-92287 #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
252e162
fix(pyo3): allow pyarrow 24-26 so consumers can clear CVE-2026-92287
shiminlin-db 504ea32
style(pyo3): wrap a long assertion message in test_dependency_bounds
shiminlin-db 576f164
fix(pyo3): stage the pyarrow bound change in NEXT_CHANGELOG, declare …
shiminlin-db f321254
ci(pyo3): test the declared pyarrow floor alongside the newest release
shiminlin-db 1168fe0
Merge origin/main into fix/pyarrow-ceiling-26
shiminlin-db 15c08bb
Merge branch 'main' into fix/pyarrow-ceiling-26
vuanhphung dce4e0f
fix(pyo3): address pyarrow compatibility review feedback
vuanhphung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Copyright (c) 2026 Databricks, Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Published dependency bounds of the wheel. | ||
|
|
||
| The pyarrow range is the only dependency metadata end-users resolve | ||
| against, so these tests read the installed distribution's | ||
| ``Requires-Dist`` (what ``maturin develop`` / ``pip`` see) rather than | ||
| ``pyproject.toml``. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import sys | ||
| from importlib.metadata import requires | ||
|
|
||
| import pyarrow | ||
| import pytest | ||
| from packaging.requirements import Requirement | ||
| from packaging.version import Version | ||
|
|
||
| # First pyarrow release without CVE-2026-92287 (apache/arrow#51349). | ||
| PYARROW_CVE_2026_92287_FIXED = Version("26.0.0") | ||
|
|
||
|
|
||
| def pyarrow_requirement() -> Requirement: | ||
| """The pyarrow requirement whose environment marker matches this interpreter.""" | ||
| matching = [ | ||
| req | ||
| for req in (Requirement(r) for r in requires("databricks-sql-kernel") or []) | ||
| if req.name == "pyarrow" and (req.marker is None or req.marker.evaluate()) | ||
| ] | ||
| assert len(matching) == 1, ( | ||
| f"expected one pyarrow requirement for this interpreter, got {matching}" | ||
| ) | ||
| return matching[0] | ||
|
|
||
|
|
||
| def test_installed_pyarrow_satisfies_declared_range(): | ||
| req = pyarrow_requirement() | ||
| assert req.specifier.contains(pyarrow.__version__, prereleases=True), ( | ||
| f"installed pyarrow {pyarrow.__version__} is outside the declared range {req.specifier}" | ||
| ) | ||
|
|
||
|
|
||
| @pytest.mark.skipif(sys.version_info < (3, 10), reason="Python 3.9 caps pyarrow at <19") | ||
| def test_declared_range_admits_pyarrow_clear_of_cve_2026_92287(): | ||
| req = pyarrow_requirement() | ||
| assert req.specifier.contains(PYARROW_CVE_2026_92287_FIXED), ( | ||
| f"declared range {req.specifier} excludes pyarrow {PYARROW_CVE_2026_92287_FIXED}; " | ||
| "consumers could not install a pyarrow clear of CVE-2026-92287" | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.