Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1039f39c
Commit
1039f39c
authored
Aug 26, 2019
by
Terry Jan Reedy
Committed by
GitHub
Aug 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37824: Properly handle user input warnings in IDLE shell. (GH-15500)
Cease turning SyntaxWarnings into SyntaxErrors.
parent
73e05497
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
Lib/idlelib/NEWS.txt
Lib/idlelib/NEWS.txt
+6
-0
Lib/idlelib/pyshell.py
Lib/idlelib/pyshell.py
+3
-14
Misc/NEWS.d/next/IDLE/2019-08-26-00-41-53.bpo-37824.YY5jAI.rst
...NEWS.d/next/IDLE/2019-08-26-00-41-53.bpo-37824.YY5jAI.rst
+2
-0
No files found.
Lib/idlelib/NEWS.txt
View file @
1039f39c
...
@@ -3,6 +3,12 @@ Released on 2019-10-20?
...
@@ -3,6 +3,12 @@ Released on 2019-10-20?
======================================
======================================
bpo-37824: Properly handle user input warnings in IDLE shell.
Cease turning SyntaxWarnings into SyntaxErrors.
bpo-37929: IDLE Settings dialog now closes properly when there is no
shell window.
bpo-37849: Fix completions list appearing too high or low when shown
bpo-37849: Fix completions list appearing too high or low when shown
above the current line.
above the current line.
...
...
Lib/idlelib/pyshell.py
View file @
1039f39c
...
@@ -394,7 +394,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
...
@@ -394,7 +394,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
self
.
tkconsole
=
tkconsole
self
.
tkconsole
=
tkconsole
locals
=
sys
.
modules
[
'__main__'
].
__dict__
locals
=
sys
.
modules
[
'__main__'
].
__dict__
InteractiveInterpreter
.
__init__
(
self
,
locals
=
locals
)
InteractiveInterpreter
.
__init__
(
self
,
locals
=
locals
)
self
.
save_warnings_filters
=
None
self
.
restarting
=
False
self
.
restarting
=
False
self
.
subprocess_arglist
=
None
self
.
subprocess_arglist
=
None
self
.
port
=
PORT
self
.
port
=
PORT
...
@@ -665,8 +664,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
...
@@ -665,8 +664,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
"Extend base class method: Stuff the source in the line cache first"
"Extend base class method: Stuff the source in the line cache first"
filename
=
self
.
stuffsource
(
source
)
filename
=
self
.
stuffsource
(
source
)
self
.
more
=
0
self
.
more
=
0
self
.
save_warnings_filters
=
warnings
.
filters
[:]
warnings
.
filterwarnings
(
action
=
"error"
,
category
=
SyntaxWarning
)
# at the moment, InteractiveInterpreter expects str
# at the moment, InteractiveInterpreter expects str
assert
isinstance
(
source
,
str
)
assert
isinstance
(
source
,
str
)
#if isinstance(source, str):
#if isinstance(source, str):
...
@@ -677,14 +674,9 @@ class ModifiedInterpreter(InteractiveInterpreter):
...
@@ -677,14 +674,9 @@ class ModifiedInterpreter(InteractiveInterpreter):
# self.tkconsole.resetoutput()
# self.tkconsole.resetoutput()
# self.write("Unsupported characters in input\n")
# self.write("Unsupported characters in input\n")
# return
# return
try
:
# InteractiveInterpreter.runsource() calls its runcode() method,
# InteractiveInterpreter.runsource() calls its runcode() method,
# which is overridden (see below)
# which is overridden (see below)
return
InteractiveInterpreter
.
runsource
(
self
,
source
,
filename
)
return
InteractiveInterpreter
.
runsource
(
self
,
source
,
filename
)
finally
:
if
self
.
save_warnings_filters
is
not
None
:
warnings
.
filters
[:]
=
self
.
save_warnings_filters
self
.
save_warnings_filters
=
None
def
stuffsource
(
self
,
source
):
def
stuffsource
(
self
,
source
):
"Stuff source in the filename cache"
"Stuff source in the filename cache"
...
@@ -763,9 +755,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
...
@@ -763,9 +755,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
if
self
.
tkconsole
.
executing
:
if
self
.
tkconsole
.
executing
:
self
.
interp
.
restart_subprocess
()
self
.
interp
.
restart_subprocess
()
self
.
checklinecache
()
self
.
checklinecache
()
if
self
.
save_warnings_filters
is
not
None
:
warnings
.
filters
[:]
=
self
.
save_warnings_filters
self
.
save_warnings_filters
=
None
debugger
=
self
.
debugger
debugger
=
self
.
debugger
try
:
try
:
self
.
tkconsole
.
beginexecuting
()
self
.
tkconsole
.
beginexecuting
()
...
...
Misc/NEWS.d/next/IDLE/2019-08-26-00-41-53.bpo-37824.YY5jAI.rst
0 → 100644
View file @
1039f39c
Properly handle user input warnings in IDLE shell. Cease turning
SyntaxWarnings into SyntaxErrors.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment