Skip to content

Commit 05d0b99

Browse files
committed
Remove redundant code for Python <= 3.6
1 parent 8216b67 commit 05d0b99

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/prompt_toolkit/application/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def _enable_breakpointhook(self) -> Generator[None, None, None]:
999999
manager. (We will only install the hook if no other custom hook was
10001000
set.)
10011001
"""
1002-
if sys.version_info >= (3, 7) and sys.breakpointhook == sys.__breakpointhook__:
1002+
if sys.breakpointhook == sys.__breakpointhook__:
10031003
sys.breakpointhook = self._breakpointhook
10041004

10051005
try:

src/prompt_toolkit/application/current.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,8 @@ def create_app_session(
145145
Create a separate AppSession.
146146
147147
This is useful if there can be multiple individual `AppSession`s going on.
148-
Like in the case of an Telnet/SSH server. This functionality uses
149-
contextvars and requires at least Python 3.7.
148+
Like in the case of an Telnet/SSH server.
150149
"""
151-
if sys.version_info <= (3, 6):
152-
raise RuntimeError("Application sessions require Python 3.7.")
153-
154150
# If no input/output is specified, fall back to the current input/output,
155151
# whatever that is.
156152
if input is None:

0 commit comments

Comments
 (0)