Skip to content

Cryptic error message about ENV CHANGED #132581

Closed

Description

@serhiy-storchaka

See for example #132535.

When there are leaked resources that emit a resource warning in destructor, and the test was ran with the -Werror option, the warnings are converted to unhandled exceptions, and the error report will contain:

...

== Tests result: ENV CHANGED then ENV CHANGED ==

...

1 test altered the execution environment (env changed):
    test_timeout

...

Total test files: run=467/470 (filtered) env_changed=1 skipped=16 resource_denied=4 rerun=1
Result: ENV CHANGED then ENV CHANGED

...

These "ENV CHANGED then ENV CHANGED" look pretty cryptic for regular user. And "altered the execution environment (env changed)" is not particularly useful at all. Even if "env changed" is repeated in three places, it does not add clarity.

It would be nice to decipher it and provide more details. For every test explain what "environment" was altered in more human words -- leaked files, unhandled exceptions, etc.

Linked PRs

Activity

  1. added
    3.13only security fixes
    3.14bugs and security fixes
    testsTests in the Lib/test dir
    on Apr 16, 2025
  2. hasrat17 commented on Jun 12, 2025

    @hasrat17

    Hi, I’m interested in contributing to this issue. It currently appears to be open and unassigned, with no active pull request. May I take it up and start working on it?

  3. added
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    on Aug 6, 2026
  4. added a commit that references this issue on Aug 7, 2026
  5. added 3 commits that reference this issue on Aug 18, 2026
  6. added a commit that references this issue on Oct 10, 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

    3.13only security fixes3.14bugs and security fixes3.15bugs and security fixes3.16new features, bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions