Skip to content

Replace EOL PyPy 3.9/3.10 with PyPy 3.11 in CI matrix#607

Open
srchilukoori wants to merge 1 commit into
trinodb:masterfrom
srchilukoori:fix/pypy-3.11-ci
Open

Replace EOL PyPy 3.9/3.10 with PyPy 3.11 in CI matrix#607
srchilukoori wants to merge 1 commit into
trinodb:masterfrom
srchilukoori:fix/pypy-3.11-ci

Conversation

@srchilukoori

@srchilukoori srchilukoori commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • Replace EOL pypy-3.9/pypy-3.10 with pypy-3.11 in CI matrix
  • Skip gssapi extra on PyPy — the C extension is CPython-only
  • Remove gssapi_require from tests_require so extras are composable
  • Extract gssapi-specific tests to test_auth_gssapi.py with pytest.importorskip

Fixes #606

Problem

Two issues broke PyPy CI:

  1. cryptography >= 47.0.0 dropped pre-built wheels for PyPy < 3.11. Without a wheel, pip builds from source and fails because PyO3 0.28.3 requires PyPy >= 3.11. Dependency chain: keyringSecretStoragecryptography.

  2. gssapi is CPython-only. On PyPy 3.9 a cached pre-built wheel happened to work. On PyPy 3.11 it builds from source and produces a .so referencing _PyGC_FINALIZED — a CPython internal not present in PyPy:

ImportError: gssapi/raw/creds.pypy311-pp73-x86_64-linux-gnu.so: undefined symbol: _PyGC_FINALIZED

Root cause

The CI install step and setup.py both assumed gssapi is universally installable. tests_require bundled gssapi_require, so even pip install .[tests] pulled CPython-only C extensions on PyPy.

Fix

Layer Change
setup.py Remove gssapi_require from tests_require.[tests] should not pull CPython-only deps
ci.yml Install .[tests,gssapi] on CPython, .[tests] on PyPy
test_client.py Guard kerberos/gssapi imports with try/except; use pytest.param(..., marks=requires_gssapi) for the shared test_authentication_fail_retry
test_auth_gssapi.py (new) Pure gssapi tests with pytest.importorskip("gssapi") — entire module skips cleanly on PyPy

On CPython with .[tests,gssapi], all tests run as before. On PyPy with .[tests], gssapi tests skip with a clear reason.

Test plan

  • CI build (pypy-3.11, latest, ~=1.4.0) passes with gssapi tests skipped

  • All CPython matrix jobs pass with full gssapi test coverage

  • Verified locally: test_client.py — 46 passed, 2 skipped; test_auth_gssapi.py — 1 skipped (module-level importorskip)

  • Yes, this is an AI-assisted PR.

Comment thread tests/unit/test_client.py Outdated

@hashhar hashhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. One question which I maybe didn't understand properly.

Fix gssapi (CPython-only) at the CI/packaging layer instead of
scattering conditional guards through test code:

- Remove gssapi_require from tests_require so .[tests] is
  installable on PyPy without pulling CPython-only C extensions.
- Conditionally install .[tests,gssapi] on CPython, .[tests] on PyPy.
- Extract pure gssapi tests to test_auth_gssapi.py with
  pytest.importorskip for clean module-level skip.
- Guard kerberos/gssapi imports in test_client.py with try/except
  and pytest.mark.skipif for the shared retry test.

Fixes trinodb#606
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

CI: PyPy 3.9/3.10 builds broken — cryptography 47+ dropped pre-built wheels

2 participants