Skip to content

Commit

Permalink
Merge pull request #3395 from bdarnell/test-313b2
Browse files Browse the repository at this point in the history
process_test: Remove compatibility hack for python 3.13 beta 1
  • Loading branch information
bdarnell authored Jun 12, 2024
2 parents 9cc84da + 456c4ed commit d9a85f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
tox_env: py311-full
- python: '3.12.0'
tox_env: py312-full
- python: '3.13.0-beta.1 - 3.13'
- python: '3.13.0-beta.2 - 3.13'
# Some optional dependencies don't seem to work on 3.13 yet
tox_env: py313
- python: 'pypy-3.8'
Expand Down
11 changes: 0 additions & 11 deletions tornado/test/process_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,11 @@ def term_and_wait(self, subproc):

@gen_test
def test_subprocess(self):
# In Python 3.13.0b1, the new repl logs an error on exit if terminfo
# doesn't exist, the -i flag is used, and stdin is not a tty. This bug may
# have been fixed in beta 2, so for now we disable the new repl in this test
# and the next. Once we've tested with beta 2 we can either remove this env var
# or file a bug upstream if it still exists.
env = dict(os.environ)
env["PYTHON_BASIC_REPL"] = "1"
subproc = Subprocess(
[sys.executable, "-u", "-i"],
stdin=Subprocess.STREAM,
stdout=Subprocess.STREAM,
stderr=subprocess.STDOUT,
env=env,
)
self.addCleanup(lambda: self.term_and_wait(subproc))
self.addCleanup(subproc.stdout.close)
Expand All @@ -170,14 +162,11 @@ def test_subprocess(self):
@gen_test
def test_close_stdin(self):
# Close the parent's stdin handle and see that the child recognizes it.
env = dict(os.environ)
env["PYTHON_BASIC_REPL"] = "1"
subproc = Subprocess(
[sys.executable, "-u", "-i"],
stdin=Subprocess.STREAM,
stdout=Subprocess.STREAM,
stderr=subprocess.STDOUT,
env=env,
)
self.addCleanup(lambda: self.term_and_wait(subproc))
yield subproc.stdout.read_until(b">>> ")
Expand Down

0 comments on commit d9a85f8

Please sign in to comment.