SNOW-2912540: remove _pandas_importer(), dedup mock/_options.py numpy handling - #4317
Closed
sfc-gh-fpawlowski wants to merge 2 commits into
Closed
SNOW-2912540: remove _pandas_importer(), dedup mock/_options.py numpy handling#4317sfc-gh-fpawlowski wants to merge 2 commits into
sfc-gh-fpawlowski wants to merge 2 commits into
Conversation
…as from connector _pandas_importer() predates this whole effort and duplicated resolution the connector already does correctly on both driver generations -- including the "relative imports without dots" DataFrame workaround, now folded into UD's own _common.extras.pandas (confirmed on the not-yet-merged UD PR #1151/#1152; v4's options.py already had it). Add pandas/installed_pandas to the existing IS_V5_DRIVER-gated import block and delete the local resolution entirely. Verified the workaround isn't needed on Snowpark's side by running the exact invocation style its comment called out (pytest with tests/unit/ as cwd) -- no failure, consistent with both driver generations now handling it internally.
….extras mock/_options.py's MissingNumpy/numpy try-except was functionally identical to _common/extras.py's own numpy resolution (confirmed: pure duplicate, no fix to merge, per UD PR #1152's investigation). Import numpy from _common.extras on v5; v4 keeps its own MissingNumpy class since v4's options.py has no numpy handling to delegate to. Does not touch the pandas try/except in this file -- Local Testing deliberately never resolves pyarrow, unlike every other pandas-resolution path in this codebase (commit #1628).
This was referenced Aug 15, 2026
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
sfc-gh-fpawlowski
changed the base branch from
SNOW-2912540-request-id-compat
to
graphite-base/4317
August 15, 2026 12:01
Author
|
Folded into #4314 — the diff was small enough to just be part of the parent PR. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Summary
_internal/utils.py's_pandas_importer()predated this whole effort and duplicated pandas resolution the connector already does correctly on both driver generations, including the "relative imports without dots"DataFrameworkaround (folded into UD's_common.extras.pandasper not-yet-merged UD PR [Local Testing] SNOW-904981 Support Column bitwise operations and unary minus expression #1151/ [Local Testing] SNOW-850263 Support Dataframe case insensitive collect #1152; v4'soptions.pyalready had it). Removed;pandas/installed_pandasnow come from the sameIS_V5_DRIVER-gated import block as the rest of these names.mock/_options.py'sMissingNumpy/numpyhandling was a confirmed pure duplicate of_common.extras's own numpy resolution (per UD PR [Local Testing] SNOW-850263 Support Dataframe case insensitive collect #1152's investigation). Deduped on v5; v4 keeps its ownMissingNumpy, since v4'soptions.pyhas no numpy handling to delegate to. Pandas resolution in this file is untouched — Local Testing deliberately never resolves pyarrow (commit SNOW-1435524: local testing remove pyarrow as dependency #1628), unrelated to this change.Still open: UD PRs #1151 and #1152 are both draft/unreviewed/unmerged. This PR's
IS_V5_DRIVER=Truepath is written against their current source but unverifiable end-to-end (wheel build + install) until they merge.Test plan
DataFrameworkaround isn't needed on Snowpark's side by running the exact invocation style its comment called out (cd tests/unit && pytest test_utils.py test_internal_utils.py) — no failure.modin, missing extra in this env) passes against the real v4.7.2 connector: 2419 passed, 2 skipped, 1 xfailed.🤖 Generated with Claude Code