Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-120678: pyrepl: Include globals from modules passed with -i #120904

Merged
merged 9 commits into from
Jul 17, 2024

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jun 23, 2024

In order to fix the regression caused by #119547, this PR goes back to the original fix that was proposed in the early commits of #119547.

The REPL must use the globals from sys.modules["__main__"] in case a different module has been run as __main__ using -i; in order to prevent globals from _pyrepl.__main__ from leaking into the global namespace, we move the vast majority of the globals out of __main__.py instead of running the REPL with an entirely fresh set of globals.

Some small filtering of globals is additionally done in Lib/_pyrepl/simple_interact.py, so that we're able to import functions and classes in _pyrepl.__main__ without these globals leaking into the REPL environment. (This filtering only works for things with __module__ attributes, though, so it's still best to keep _pyrepl/__main__.py as minimal as possible.)

This still doesn't exactly match the behaviour of the old REPL for some dunders:

~/dev/cpython (repl-globals)⚡ % cat foo.py           
"""For fooey things"""
FOO: int = 42
~/dev/cpython (repl-globals)⚡ % PYTHON_BASIC_REPL=1 ./python.exe -i foo.py
>>> __doc__
'For fooey things'
>>> exit()
~/dev/cpython (repl-globals)⚡ % ./python.exe -i foo.py                    
>>> __doc__
>>> 

I'm not really sure why that is!

@AlexWaygood
Copy link
Member Author

Cc. @eryksun if you're interested!

Copy link
Contributor

@eryksun eryksun left a comment

Choose a reason for hiding this comment

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

Thank you. LGTM 🚀

@ambv
Copy link
Contributor

ambv commented Jun 26, 2024

Sorry, didn't notice this was the same as gh-121054 as I looked at the root cause, which was gh-118908.

Let's keep this for additional test you added, and the __main__ comment to not add things there.

@ambv
Copy link
Contributor

ambv commented Jun 26, 2024

The reason why __cached__, __file__, __package__, __spec__, and __doc__ are wrong is that PyREPL is also a package now, and it's started after the fact in the same namespace. So it effectively overwrites those attributes from what was previously set:

>>> __package__
'_pyrepl'
>>> __name__
'__main__'
>>> __spec__
ModuleSpec(name='_pyrepl.__main__', loader=<_frozen_importlib_external.SourceFileLoader object at 0x103a020c0>, origin='/Volumes/RAMDisk/cpython/Lib/_pyrepl/__main__.py')
>>> __file__
'/Volumes/RAMDisk/cpython/Lib/_pyrepl/__main__.py'

We'd need to work around that.

@@ -487,6 +489,18 @@ def prepare_reader(self, events):
reader.can_colorize = False
return reader

def test_stdin_is_tty(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

This was helpful to me when debugging weird behavior so I decided to keep it.

@@ -549,7 +597,7 @@ pymain_repl(PyConfig *config, int *exitcode)
*exitcode = (run != 0);
return;
}
int run = pymain_run_module(L"_pyrepl", 0);
int run = pymain_start_pyrepl_no_main();
Copy link
Contributor

Choose a reason for hiding this comment

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

My first intuition was to simply PyImport_ImportModule("_pyrepl.__main__") but then the entire shell session is a side-effect of an on-going import, which was ugly and caused some funny edge cases (a non-zero exit was technically an ImportError).

So instead we do the full dance of running _pyrepl.main.interactive_console(). While doing that I'm smuggling PYTHONSTARTUP support because:

  • you can always remove PYTHONSTARTUP from your environment to not have it;
  • but previously you could not get PYTHONSTARTUP to be executed even if you wanted.

Modules/main.c Outdated Show resolved Hide resolved
@AlexWaygood
Copy link
Member Author

Thanks for picking this up @ambv!

@ambv
Copy link
Contributor

ambv commented Jul 17, 2024

It's team work: I push the shoddy changes, you get the git blame!

Copy link
Member Author

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

I can't give an approving review (since this is strictly speaking still "my PR" 😄), but from what I can tell this all LGTM! (With the caveat that I'm far from the world's greatest C programmer, so I could easily have missed something)

@ambv ambv merged commit ac07451 into python:main Jul 17, 2024
44 checks passed
@miss-islington-app
Copy link

Thanks @AlexWaygood for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2024
pythonGH-120904)

(cherry picked from commit ac07451)

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 17, 2024

GH-121916 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 Jul 17, 2024
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Ubuntu NoGIL 3.x has failed when building commit ac07451.

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/1225/builds/2684) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/1225/builds/2684

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot ARM Raspbian 3.x has failed when building commit ac07451.

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/424/builds/7678) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/424/builds/7678

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot s390x SLES 3.x has failed when building commit ac07451.

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/540/builds/9493) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/540/builds/9493

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot s390x Debian 3.x has failed when building commit ac07451.

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/49/builds/9540) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/49/builds/9540

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

ambv added a commit that referenced this pull request Jul 17, 2024
…i` (GH-120904) (#121916)

(cherry picked from commit ac07451)

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]>
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Ubuntu NoGIL 3.13 has failed when building commit 3d9692d.

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/1422/builds/284) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1422/builds/284

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/ubuntu/buildarea/3.13.itamaro-ubuntu-aws.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot s390x SLES 3.13 has failed when building commit 3d9692d.

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/1437/builds/356) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1437/builds/356

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.13.edelsohn-sles-z/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot ARM Raspbian 3.13 has failed when building commit 3d9692d.

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/1435/builds/346) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1435/builds/346

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/workers/3.13.gps-raspbian.nondebug/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot s390x Debian 3.13 has failed when building commit 3d9692d.

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/1485/builds/353) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1485/builds/353

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.13.edelsohn-debian-z/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot x86-64 MacOS Intel ASAN NoGIL 3.x has failed when building commit ac07451.

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/1366/builds/1670) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/1366/builds/1670

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot x86-64 MacOS Intel NoGIL 3.x has failed when building commit ac07451.

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/1258/builds/2373) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/1258/builds/2373

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@AlexWaygood AlexWaygood deleted the repl-globals branch July 17, 2024 15:22
@bedevere-bot
Copy link

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

Hi! The buildbot ARM64 MacOS M1 NoGIL 3.13 has failed when building commit 3d9692d.

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/1408/builds/287) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1408/builds/287

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.13.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Debian root 3.13 has failed when building commit 3d9692d.

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/1441/builds/318) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1441/builds/318

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Ubuntu Shared 3.x has failed when building commit ac07451.

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/506/builds/8352) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/506/builds/8352

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot x86-64 MacOS Intel ASAN NoGIL 3.13 has failed when building commit 3d9692d.

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/1460/builds/322) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1460/builds/322

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.13.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Debian root 3.x has failed when building commit ac07451.

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/345/builds/8507) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/345/builds/8507

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot x86-64 MacOS Intel NoGIL 3.13 has failed when building commit 3d9692d.

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/1449/builds/323) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1449/builds/323

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.13.itamaro-macos-intel-aws.nogil/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.x has failed when building commit ac07451.

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/469/builds/8577) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/469/builds/8577

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows10 3.x has failed when building commit ac07451.

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/146/builds/9086) and take a look at the build logs.
  4. Check if the failure is related to this commit (ac07451) 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/146/builds/9086

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_pyrepl\test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Ubuntu Shared 3.13 has failed when building commit 3d9692d.

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/1450/builds/273) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1450/builds/273

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.13.bolen-ubuntu/build/Lib/test/test_pyrepl/test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows10 3.13 has failed when building commit 3d9692d.

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/1501/builds/301) and take a look at the build logs.
  4. Check if the failure is related to this commit (3d9692d) 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/1501/builds/301

Failed tests:

  • test_pyrepl

Failed subtests:

  • test_stdout_is_tty - test.test_pyrepl.test_pyrepl.TestPyReplOutput.test_stdout_is_tty

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.13.bolen-windows10\build\Lib\test\test_pyrepl\test_pyrepl.py", line 500, in test_stdout_is_tty
    if os.isatty(sys.stdout.fileno()):
                 ~~~~~~~~~~~~~~~~~^^
io.UnsupportedOperation: fileno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-repl Related to the interactive shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants