Skip to content

CI: Add Windows unit test job - #3723

Open
qzyu999 wants to merge 3 commits into
apache:mainfrom
qzyu999:add-windows-ci-job
Open

CI: Add Windows unit test job#3723
qzyu999 wants to merge 3 commits into
apache:mainfrom
qzyu999:add-windows-ci-job

Conversation

@qzyu999

@qzyu999 qzyu999 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Rationale

Adds windows-latest to the Python CI workflow, enabling automated testing on Windows.

Depends on:

Changes

Adds a windows-unit-test job to .github/workflows/python-ci.yml that:

  • Runs on windows-latest with Python 3.12
  • Installs all extras except hive-kerberos (requires gssapi.h C library unavailable on Windows)
  • Runs the same marker-filtered test suite as the Linux job

Expected result

Locally verified: 3803 passed, 3 skipped, 0 failures on Windows.

Closes #2477

qzyu999 added 3 commits July 29, 2026 14:57
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

infra: run tests for windows

1 participant