Skip to content

Commit 0a5bbbf

Browse files
authored
Merge branch '3.13' into backport-cbfd392-3.13
2 parents 3f403f0 + 288a069 commit 0a5bbbf

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
check_abi:
4444
name: 'Check if the ABI has changed'
45-
runs-on: ubuntu-latest
45+
runs-on: ubuntu-22.04
4646
needs: check_source
4747
if: needs.check_source.outputs.run_tests == 'true'
4848
steps:

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9696
doctest:
9797
name: 'Doctest'
98-
runs-on: ubuntu-latest
98+
runs-on: ubuntu-22.04
9999
timeout-minutes: 60
100100
steps:
101101
- uses: actions/checkout@v4

Lib/site.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,14 @@ def register_readline():
503503
if PYTHON_BASIC_REPL:
504504
CAN_USE_PYREPL = False
505505
else:
506-
import _pyrepl.readline
507-
import _pyrepl.unix_console
508-
from _pyrepl.main import CAN_USE_PYREPL
506+
original_path = sys.path
507+
sys.path = [p for p in original_path if p != '']
508+
try:
509+
import _pyrepl.readline
510+
import _pyrepl.unix_console
511+
from _pyrepl.main import CAN_USE_PYREPL
512+
finally:
513+
sys.path = original_path
509514
except ImportError:
510515
return
511516

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove the current directory from ``sys.path`` when using PyREPL.

0 commit comments

Comments
 (0)