Skip to content

gh-132581: Report why the execution environment was altered - #155294

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:gh-132581-env-changed-reasons
Aug 18, 2026
Merged

gh-132581: Report why the execution environment was altered#155294
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:gh-132581-env-changed-reasons

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

The list of tests which altered the execution environment now includes the reasons, one per line:

1 test altered the execution environment (env changed):
    test_example:
        uncaught thread exception (RuntimeError)
        1 uncollectable object(s)
        os.environ was modified
        sys.path was modified

The final result no longer repeats the same state twice, like ENV CHANGED then ENV CHANGED.

The list of tests which altered the execution environment now includes the
reasons -- an unraisable exception, a modified sys.path, leaked temporary
files, etc -- one per line.

The final result no longer repeats the same state twice, like
"ENV CHANGED then ENV CHANGED".
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 6, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 350fc64 into python:main Aug 18, 2026
59 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka
serhiy-storchaka deleted the gh-132581-env-changed-reasons branch August 18, 2026 07:07
@bedevere-app

bedevere-app Bot commented Aug 18, 2026

Copy link
Copy Markdown

GH-155986 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 18, 2026
@bedevere-app

bedevere-app Bot commented Aug 18, 2026

Copy link
Copy Markdown

GH-155987 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 18, 2026
@bedevere-app

bedevere-app Bot commented Aug 18, 2026

Copy link
Copy Markdown

GH-155988 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 18, 2026
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable LTO + PGO 3.x (tier-3) has failed when building commit 350fc64.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1627/builds/3215) and take a look at the build logs.
  4. Check if the failure is related to this commit (350fc64) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1627/builds/3215

Summary of the results of the build (if available):

Click to see traceback logs
Note: switching to '350fc64fbd0c8ebb6452041b9d09511e7971f524'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 350fc64fbd0c8e gh-132581: Report why the execution environment was altered (GH-155294)
Switched to and reset branch 'main'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3476: clean-retain-profile] Error 1 (ignored)
./Modules/socketmodule.c: In function ‘getsockaddrarg’:
./Modules/socketmodule.c:2664:9: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
 2664 |         strncpy((char *)sa->salg_name, name, sizeof(sa->salg_name));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar: unable to copy file 'libpython3.16.a'; reason: No space left on device
make[2]: *** [Makefile:1164: libpython3.16.a] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:997: profile-gen-stamp] Error 2
make: *** [Makefile:1009: profile-run-stamp] Error 2

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable LTO 3.x (tier-3) has failed when building commit 350fc64.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1654/builds/3181) and take a look at the build logs.
  4. Check if the failure is related to this commit (350fc64) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1654/builds/3181

Summary of the results of the build (if available):

Click to see traceback logs
Note: switching to '350fc64fbd0c8ebb6452041b9d09511e7971f524'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 350fc64fbd0c gh-132581: Report why the execution environment was altered (GH-155294)
Switched to and reset branch 'main'

ar: unable to copy file 'libpython3.16.a'; reason: No space left on device
make: *** [Makefile:1164: libpython3.16.a] Error 1

serhiy-storchaka added a commit that referenced this pull request Aug 18, 2026
…H-155294) (GH-155988)

The list of tests which altered the execution environment now includes the
reasons -- an unraisable exception, a modified sys.path, leaked temporary
files, etc -- one per line.

The final result no longer repeats the same state twice, like
"ENV CHANGED then ENV CHANGED".
(cherry picked from commit 350fc64)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Aug 18, 2026
…H-155294) (GH-155987)

The list of tests which altered the execution environment now includes the
reasons -- an unraisable exception, a modified sys.path, leaked temporary
files, etc -- one per line.

The final result no longer repeats the same state twice, like
"ENV CHANGED then ENV CHANGED".
(cherry picked from commit 350fc64)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants