Skip to content

fix(tests): two tests fail on free-threaded CPython 3.14t, likely from context-aware warnings #1731

Closed

Description

@JarryShaw

Describe the bug
On free-threaded CPython 3.14t, the experimental leg added by #1725 fails two tests (job 115915976088, run on 296ad6b71):

  • tests/protocols/misc/test_pcapng_unit.py::PCAPNGNegativeLengthTests::test_the_captured_len_vector_parses_under_a_memory_cap, failing at :4802 with AssertionError: 1 != 0.
  • tests/protocols/test_trial_parse_warnings_1580_unit.py::TestTrialParseWarnings::test_hold_is_local_to_its_context, failing at :392 with Lists differ: [] != ['another context'].

Every other test passes.

Reproduction
Run those two tests on a 3.14t interpreter (setup-python 3.14t).

Expected behavior
Both pass, so the 3.14t leg can be promoted to blocking (#1660, option 1).

Unverified hypothesis: free-threaded builds default sys.flags.context_aware_warnings (and thread_inherit_context) to on. warnings.catch_warnings then records per context. The second test checks which context sees a held warning, and the first counts warnings, so one cause may explain both. A worker should confirm it, or rule it out, before fixing.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 14, 2026
  2. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 14, 2026
  3. added this to the PyPCAPKit v1.5 milestone on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions