CI: Add Windows unit test job - #3723
Open
qzyu999 wants to merge 3 commits into
Open
Conversation
On Windows, Python's urlparse treats paths like 'C:\Users\...' as having scheme='c', which causes 'Unrecognized filesystem type in URI: c' errors. This adds a platform-guarded predicate that detects single-character alphabetic schemes on Windows and remaps them to 'file', enabling correct local filesystem routing. Fixes all three parse sites (_infer_file_io_from_scheme, PyArrowFileIO.parse_location, FsspecFileIO._get_fs_from_uri) and includes platform-conditional tests. Related: apache#2477, apache#1005
Enable the full unit test suite to pass on Windows (3803 passed, 0 failures). Changes: - Reduce RANDOM_LENGTH from 20 to 8 to stay under Windows MAX_PATH (260 chars) - Use warehouse.as_posix() in SQLite URIs for cross-platform path formatting - Close file handles before temp directory cleanup (Windows file locking) - Use os.path.abspath() in path assertions instead of hardcoded POSIX paths - Use raw paths instead of file: URIs in pyarrow test fixtures - Relax Rich box-drawing assertions to check content not formatting - Skip Kerberos tests on Windows (puresasl C lib unavailable) - Relax error message assertion ([Errno 2] vs [WinError 2]) Depends on apache#3721. Related: apache#2477
Adds a windows-latest job that runs the unit test suite on Python 3.12. Installs all extras except hive-kerberos (requires gssapi C library unavailable on Windows). Closes apache#2477
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rationale
Adds
windows-latestto the Python CI workflow, enabling automated testing on Windows.Depends on:
Changes
Adds a
windows-unit-testjob to.github/workflows/python-ci.ymlthat:windows-latestwith Python 3.12hive-kerberos(requiresgssapi.hC library unavailable on Windows)Expected result
Locally verified: 3803 passed, 3 skipped, 0 failures on Windows.
Closes #2477