8000 gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup by eugenetriguba · Pull Request #119547 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup #119547

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

Merged
merged 19 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix windows
  • Loading branch information
pablogsal committed Jun 11, 2024
commit adb074a374f1cb215db716975d0fddf01bb49c59
6 changes: 4 additions & 2 deletions Lib/test/test_pyrepl/test_pyrepl.py
8000
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import io
import itertools
import os
import pty
import rlcompleter
import select
import subprocess
import sys
import termios
from unittest import TestCase
from unittest.mock import patch
from test.support import force_not_colorized
Expand Down Expand Up @@ -859,6 +857,10 @@ def test_dumb_terminal_exits_cleanly(self):
self.assertNotIn("Traceback", output)

def run_repl(self, repl_input: str | list[str], env: dict | None = None) -> tuple[str, int]:
try:
import pty
except ImportError:
self.skipTest("pty module not available")
master_fd, slave_fd = pty.openpty()
process = subprocess.Popen(
[sys.executable, "-i", "-u"],
Expand Down
Loading
Loading
0