Skip to content

CI: [diagnostic, do not merge] Test standalone import after pip install - #709

Closed
echoix wants to merge 1 commit into
mainfrom
ci-diag/standalone-import-after-pip
Closed

echoix wants to merge 1 commit into
mainfrom
ci-diag/standalone-import-after-pip

Conversation

@echoix

@echoix echoix commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Purpose

Eighth diagnostic. Ruled out with hard binary/metadata evidence so far:

  • GDAL, curl, OpenSSL, libjpeg-turbo, expat, PROJ -- all dumpbin-clean.
  • msvcrt2019 -- bit-identical version (14.2-2) across every run.
  • The MSVC _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR mutex-hack -- checked
    directly in the binaries (not relying on git commit timestamps,
    since OSGeo4W's build server may apply changes to production before
    committing them): both old and new gdal313.dll import
    _Mtx_init_in_situ/_Cnd_init_in_situ from MSVCP140.dll at the
    identical hint values, so the hack's effect is identical in both
    builds.
  • MSYS2 mingw-w64 toolchain downgrade -- still crashes.
  • pytest-xdist/execnet, pytest-timeout, pytest-randomly, colorama --
    none declare a pywin32 dependency (checked via PyPI metadata), ruling
    out a duplicate-pywin32-install DLL conflict (the scenario pywin32's
    own README blames for this exact generic Windows error text).

The crash reproduces identically via bare pytest and via
python -m pytest, with or without -n/xdist -- but not via a
plain python -c "from grass.pygrass import utils" import, nor a
sequential import of all grass.lib.* submodules, both run before the
"Install additional python packages" pip-install step.

What this PR does

Repeats the same plain standalone import, but now placed after the
pip-install step (right before "Run pytest with multiple workers in
parallel"), to cleanly separate two remaining explanations:

  • If it still succeeds, the crash is specific to pytest's own
    import/collection machinery (not xdist, not the exe launcher stub --
    both already ruled out), not anything the pip install itself changes
    in the environment.
  • If it now crashes too, something the pip install does to the
    environment is the actual trigger, independent of pytest's import
    mechanics.

This PR is for CI investigation only and is not meant to be merged.

🤖 Generated with Claude Code

A plain `python -c "from grass.pygrass import utils"` run before the
"Install additional python packages" step succeeds (see
ci-diag/standalone-import-test), but pytest/python -m pytest collecting
the same import after that step crashes with "Windows fatal exception:
code 0xc0000139" (see ci-diag/no-xdist-single-process and
ci-diag/python-m-pytest-vs-exe). None of pytest/pytest-xdist/execnet/
pytest-timeout/pytest-randomly/colorama declare a pywin32 dependency
(checked via PyPI metadata), so this isn't a duplicate pywin32 install
conflict, a scenario pywin32's own README explicitly blames for this
same generic Windows error text ("The specified procedure could not
be found").

This repeats the plain standalone import again, but now after pip has
installed pytest and friends, to isolate whether the crash is tied to
something the pip install changes in the environment, or specifically
to pytest's own import/collection machinery.

Temporary, for CI investigation only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@echoix echoix closed this Sep 30, 2026
@echoix
echoix deleted the ci-diag/standalone-import-after-pip branch September 30, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant