Skip to content

Fix CI cross-platform coverage and Windows CRT install/run failures#368

Merged
jonathan343 merged 6 commits intodevelopfrom
fix-ci-platform
Feb 5, 2026
Merged

Fix CI cross-platform coverage and Windows CRT install/run failures#368
jonathan343 merged 6 commits intodevelopfrom
fix-ci-platform

Conversation

@jonathan343
Copy link
Contributor

@jonathan343 jonathan343 commented Feb 5, 2026

Overview

This PR makes CI truly run on all OS matrix entries, fixes Windows CRT test execution, and updates dev dependency pins to support newer Python/Windows environments. It also hardens the BaseManager test against spawn/forkserver and restricted socket environments.

Issues

Note

You can look through previous CI failures to see the exact failures I'm referring to.

  1. CI workflows declared an OS matrix but always ran on ubuntu-latest, hiding platform-specific failures.
  2. Windows CRT CI failed to install the wheel with extras because the command used shell=True and single quotes, causing: ERROR: Invalid requirement: "'dist\\s3transfer-0.16.0-py3-none-any.whl[crt]'".
  3. Windows CRT CI failed to run tests because scripts/ci/run-crt-tests attempted to execute a Python script path directly, resulting in: '.../scripts/ci/run-tests' is not recognized as an internal or external command.
  4. macOS spawn/forkserver behavior caused AttributeError: Can't pickle local object '...PIDManager'.
  5. Restricted environments that disallow socket binding caused the BaseManager test to fail before asserting behavior.

Solutions

  1. Honor the OS matrix in CI workflows.
  2. Replace shell=True command strings in CI install scripts with argument lists and sys.executable -m pip to avoid Windows quoting issues.
  3. Execute scripts/ci/run-tests via sys.executable in CRT CI to make it runnable on Windows.
  4. Force fork start method in the BaseManager test for spawn/forkserver environments.
  5. Skip the BaseManager signal-handler test when socket binding is not permitted.

Testing

Important

Our GitHub CI only runs unit and functional tests. I made sure to run integration tests locally to ensure our releases won't break.

Without CRT:

(s3transfer) $ python -m pytest tests/
==================================== test session starts =====================================
platform darwin -- Python 3.9.25, pytest-8.1.1, pluggy-1.5.0
rootdir: /Users/gytndd/dev/GitHub/s3transfer
configfile: pyproject.toml
plugins: cov-5.0.0
collected 752 items

tests/functional/test_copy.py ....................................                     [  4%]
tests/functional/test_crt.py sssssssssssssssssssssssssssss                             [  8%]
tests/functional/test_delete.py .......                                                [  9%]
tests/functional/test_download.py ..............................................       [ 15%]
tests/functional/test_manager.py ........                                              [ 16%]
tests/functional/test_processpool.py ............                                      [ 18%]
tests/functional/test_upload.py ......................................                 [ 23%]
tests/functional/test_utils.py ...                                                     [ 23%]
tests/integration/test_copy.py ...                                                     [ 24%]
tests/integration/test_crt.py ssssssssssssssssssssssssss                               [ 27%]
tests/integration/test_delete.py .                                                     [ 27%]
tests/integration/test_download.py ..........                                          [ 29%]
tests/integration/test_processpool.py ....                                             [ 29%]
tests/integration/test_s3transfer.py ............                                      [ 31%]
tests/integration/test_upload.py ...............                                       [ 33%]
tests/unit/test_bandwidth.py ....................................                      [ 38%]
tests/unit/test_compat.py ........                                                     [ 39%]
tests/unit/test_copies.py .......                                                      [ 40%]
tests/unit/test_crt.py ssssssssssssssssssssss                                          [ 42%]
tests/unit/test_delete.py ..                                                           [ 43%]
tests/unit/test_download.py .......................................................... [ 50%]
..........                                                                             [ 52%]
tests/unit/test_futures.py .........................................................   [ 59%]
tests/unit/test_manager.py .........                                                   [ 61%]
tests/unit/test_processpool.py ...................................................     [ 67%]
tests/unit/test_s3transfer.py ........................................................ [ 75%]
.                                                                                      [ 75%]
tests/unit/test_subscribers.py ........                                                [ 76%]
tests/unit/test_tasks.py ................................                              [ 80%]
tests/unit/test_upload.py ...............................................              [ 86%]
tests/unit/test_utils.py ............................................................. [ 95%]
.....................................                                                  [100%]

======================== 675 passed, 77 skipped in 384.42s (0:06:24) =========================

With CRT:

(s3transfer) $ uv pip install -e ".[crt]"
Resolved 7 packages in 2.13s
      Built s3transfer @ file:///Users/gytndd/dev/GitHub/s3transfer
Prepared 2 packages in 751ms
Uninstalled 1 package in 12ms
Installed 2 packages in 179ms
 + awscrt==0.29.2
 ~ s3transfer==0.16.0 (from file:///Users/gytndd/dev/GitHub/s3transfer)
(s3transfer) $ python -m pytest tests/
==================================== test session starts =====================================
platform darwin -- Python 3.9.25, pytest-8.1.1, pluggy-1.5.0
rootdir: /Users/gytndd/dev/GitHub/s3transfer
configfile: pyproject.toml
plugins: cov-5.0.0
collected 752 items

tests/functional/test_copy.py ....................................                     [  4%]
tests/functional/test_crt.py .............................                             [  8%]
tests/functional/test_delete.py .......                                                [  9%]
tests/functional/test_download.py ..............................................       [ 15%]
tests/functional/test_manager.py ........                                              [ 16%]
tests/functional/test_processpool.py ............                                      [ 18%]
tests/functional/test_upload.py ......................................                 [ 23%]
tests/functional/test_utils.py ...                                                     [ 23%]
tests/integration/test_copy.py ...                                                     [ 24%]
tests/integration/test_crt.py ..........................                               [ 27%]
tests/integration/test_delete.py .                                                     [ 27%]
tests/integration/test_download.py ..........                                          [ 29%]
tests/integration/test_processpool.py ....                                             [ 29%]
tests/integration/test_s3transfer.py ............                                      [ 31%]
tests/integration/test_upload.py ...............                                       [ 33%]
tests/unit/test_bandwidth.py ....................................                      [ 38%]
tests/unit/test_compat.py ........                                                     [ 39%]
tests/unit/test_copies.py .......                                                      [ 40%]
tests/unit/test_crt.py ......................                                          [ 42%]
tests/unit/test_delete.py ..                                                           [ 43%]
tests/unit/test_download.py .......................................................... [ 50%]
..........                                                                             [ 52%]
tests/unit/test_futures.py .........................................................   [ 59%]
tests/unit/test_manager.py .........                                                   [ 61%]
tests/unit/test_processpool.py ...................................................     [ 67%]
tests/unit/test_s3transfer.py ........................................................ [ 75%]
.                                                                                      [ 75%]
tests/unit/test_subscribers.py ........                                                [ 76%]
tests/unit/test_tasks.py ................................                              [ 80%]
tests/unit/test_upload.py ...............................................              [ 86%]
tests/unit/test_utils.py ............................................................. [ 95%]
.....................................                                                  [100%]

============================== 752 passed in 578.15s (0:09:38) ===============================

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@SamRemis SamRemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Thanks, Jonathan

@jonathan343 jonathan343 merged commit 8797cd8 into develop Feb 5, 2026
76 checks passed
@jonathan343 jonathan343 deleted the fix-ci-platform branch February 5, 2026 21:36
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.

2 participants