[issue45103] IDLE: make configdialog font page survive font failures

2021-10-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Bizarre.  The SO OP just reported that deleting FiraCode fixed *his* 3.10 
problem.  There must be some unobvious difference in systems.

--

___
Python tracker 
<https://bugs.python.org/issue45103>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45353] sys.modules: dictionary changed size during iteration

2021-10-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In #13487, Gregory fixed the problem by using .copy().  That seems to have 
worked for 1 1/2 years.  You still have not reported an actual bug in the 
current CPython stdlib.

Perhaps we should mention in 
https://docs.python.org/3/library/sys.html#sys.modules that sys.modules can be 
unexpectedly changed during iteration by lazy imports or other threads, so that 
a copy might be needed.

Gregory, what do you think?

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue45353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45378] Can't find "map" with search on docs.python.org

2021-10-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The iterator classes are not identified as such because being a class instead 
of a function, such as a generator function, is a CPython implementation 
detail, not a language requirement.

Searching for filter seems as bad -- builtin filter is about the 60th hit.  
Builtins should be listed first instead.

--
nosy: +terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45378>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45365] Make concurrent.futures.Future usable outside of executors

2021-10-08 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> test needed
title: concurrent.futures.Future should be suitable for use outside of 
executors -> Make concurrent.futures.Future usable outside of executors
versions: +Python 3.11 -Python 3.10

___
Python tracker 
<https://bugs.python.org/issue45365>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On current 3.9, 3.10, 3.11, on Windows running in IDLE, I see
computing class property ..
computing class property ..
computing class property ..
computing class property ..
computing class property ..
Help ...

--
versions: +Python 3.11 -Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45356>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Randolf, what specific behaviors do you consider to be bugs that should be 
fixed.  What would a test of the the changed behavior look like?

This should perhaps be closed as a duplicate of #44904.  Randolf, please check 
and say what you thing.

--
nosy: +terry.reedy
stage:  -> test needed

___
Python tracker 
<https://bugs.python.org/issue45356>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45353] sys.modules: dictionary changed size during iteration

2021-10-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Do you have an example for which "for m in sys.modules: print(m, end=' ')" 
fails?  In particular, is there code in the stdlib that fails iterating over 
sys.modules?  If not the latter, this should be closed as 'Not a bug'.

Note that questions about using Python should go elsewhere, such as python-list 
or stackoverflow.

--
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue45353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-08 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> needs patch
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45352>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45357] Idle does not check user config for extention configuration

2021-10-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The current configuration design is that user .idlerc config-x.cfg files 
contain changes from the idlelib config-x.def files.  A proposal to change this 
is an enhancement request rather than a bugfix request.  It will make the logic 
more complex, increase maintenance burden, and likely make changes to the 
configuration system harder.

If Python is installed for one user, any changes to config-extensions.def only 
apply to that one user, just as with additions to site-packages.  If Python is 
installed for all users, why shouldn't extensions be available to all, just as 
with additions to site-packages?  Assuming that extensions are by default not 
enabled, users will have to explicitly enable them, just as they have to 
explicitly import added packages.

On a system with non-admin users, such as in a classroom, I can imagine that 
the admin user(s) might not want non-admin users to be able to modify IDLE 
behavior.  I am reluctant to open this can of worms and would not do so by 
myself.

--
stage: patch review -> test needed
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45357] Idle does not check user config for extention configuration

2021-10-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am puzzled by your report. As explained in the top of 
idlelib/confix-extensions.def, the options for four features are still defined 
there for compatibility reasons and user changes to those option *are* stored 
in ~/.idlerc/config-extensions.cfg and read on startup.  At least on Windows 
with 3.9 and 3.11. I also tested changing options for test extension zzdummy 
and that works also.  For instance, click enable, exit dialog, exit IDLE, 
reload, edit something, select Format, and the z options are listed.  The 
default config is not changed.  What tests did you run?

--

___
Python tracker 
<https://bugs.python.org/issue45357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks.  Did the FiraCode font work for you or merely not work without crashing?

--

___
Python tracker 
<https://bugs.python.org/issue45103>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-10-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Steven's list left out the standard way of closing *any* windowed app -- click 
the close button on the title bar.  Works on all major systems.

Its does a little too much when python is started on a command line (by closing 
the console), but beginners, at least on Windows, usually click an icon to 
start Python.

--

___
Python tracker 
<https://bugs.python.org/issue44603>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A similar report, 
https://stackoverflow.com/questions/69466716/python-3-10-idle-does-not-respond-everytime-i-hit-configure-idle-from-options
but with FiraCode font https://github.com/tonsky/FiraCode.  The compatibility 
list includes IDLE as 'does not work' along with some other editors.

--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 
<https://bugs.python.org/issue45103>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45381] IDLE: "restart shell" while receiving output disables program

2021-10-05 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> needs patch
title: IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze 
program. -> IDLE: "restart shell" while receiving output disables program
versions: +Python 3.11 -Python 3.7

___
Python tracker 
<https://bugs.python.org/issue45381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45381] IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze program.

2021-10-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE uses tk/tkinter text widgets for Editor and Shell windows.  A known 
downside of this is that long lines, greater than about 2000 chars, slow down 
scrolling. See #1442493 for instance.

Part of the Squeezer feature was meant to alleviate this by squeezing long 
lines as well as many lines.  This was meant to be documented but the main 
sentence is garbled a bit and needs to be rewritten.  Squeezer can be partly 
deactivated by raising the threshhold to, for instance, 1_000_000_000.

Another feature of IDLE is that is executes user code in a separate process, 
sending user code output back to the GUI process through a socket.  Massive 
amounts of output are noticeably slower than in the terminal/console.  This can 
be eliminated by starting IDLE with -n.

On my machine, 'a'*n takes about 1 second per 133_333 chars, or 12 for 1.6M.  
160M would take 1200 seconds or 20 minutes.  This of course, has nothing to do 
with any normal use of IDLE.

Keyboard Interrupt, Ctrl-C: It is a known CPython (not IDLE) issue (discussed 
on the tracker) that this does not always interrupt execution of user code.  
This may depend on the OS.  On my machine, I see

'a'*1_600_000  # hit ^C during 12 second wait.
[Squeezed text (20001 lines.)] Traceback (most recent call last):
  File "", line 1, in 
'a'*1_600_000
KeyboardInterrupt

This is not supposed to terminate the execution process, but merely to end 
execution of the statement.  A prompt for another statement should be and for 
me is displayed.  For me, following the above with restart Ctrl-F6 works 
normally.

However, Restart during the wait, with or without ^c, puts IDLE into a 
recoverable state.  Since Restart during time.sleep or 'while True: pass' work, 
I suspect the issue is restarting while receiving input.

--
nosy: +taleinat

___
Python tracker 
<https://bugs.python.org/issue45381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19290] Clarify compile and eval interaction.

2021-10-03 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 
<https://bugs.python.org/issue19290>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed

___
Python tracker 
<https://bugs.python.org/issue45341>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset d211e87307bb2a0b80e0a489501e892e61d879fc by Miss Islington (bot) 
in branch '3.9':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687) 
(GH-28689)
https://github.com/python/cpython/commit/d211e87307bb2a0b80e0a489501e892e61d879fc


--

___
Python tracker 
<https://bugs.python.org/issue45341>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 0be338199fd663f020d833a4db185d0c5a0e0078 by Terry Jan Reedy in 
branch 'main':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (#28687)
https://github.com/python/cpython/commit/0be338199fd663f020d833a4db185d0c5a0e0078


--

___
Python tracker 
<https://bugs.python.org/issue45341>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45341] Update "Python Package Index" in Docs

2021-10-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The Python Packaging User Guide, Python Packaging Authority, and 
packaging.python.org are correct and stay as is.  I verified the name at 
pypi.org.  I found 7 occurrences of "Python Packaging Index" in /Doc.

F:\dev\3x\Doc\distributing\index.rst: 34: * the `Python Packaging Index 
<https://pypi.org>`__ is a public
F:\dev\3x\Doc\distributing\index.rst: 130: * `Uploading the project to the 
Python Packaging Index`_
F:\dev\3x\Doc\distributing\index.rst: 137: .. _Uploading the project to the 
Python Packaging Index: \
F:\dev\3x\Doc\distributing\index.rst: 153: * check the Python Packaging Index 
to see if the name is already in use
F:\dev\3x\Doc\installing\index.rst: 47: * The `Python Packaging Index 
<https://pypi.org>`__ is a public
F:\dev\3x\Doc\installing\index.rst: 81: dependencies from the Python Packaging 
Index::
F:\dev\3x\Doc\installing\index.rst: 229: Python Packaging Index, this problem 
is expected to diminish over time,

Working on PR.

--
nosy: +terry.reedy
stage:  -> needs patch
type: enhancement -> behavior

___
Python tracker 
<https://bugs.python.org/issue45341>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45341] Update "Python Package Index" in Docs

2021-10-01 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +27051
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28687

___
Python tracker 
<https://bugs.python.org/issue45341>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45303] ast module classes missing __text_signature__ attribute

2021-10-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I believe that multiple modules have not yet been converted to use argument 
clinic.  (I marked 'test needed' but am not sure if this attribute is tested.)  
I don't think that I would put ast as highest priority, although it might be 
easiest.

--
nosy: +terry.reedy
stage:  -> test needed
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45302] 10 built-in functions need non-None .__text_signature__

2021-10-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree that finishing this would be nice.  In branch main (3.11.0a0), open and 
print now have non-None versions of this attribute.  However,

for ob in builtins.__dict__.values():
if (str(ob).startswith('










So there are still some to do.

for ob in builtins.__dict__.values():
if (str(ob).startswith(' test needed
title: basic builtin functions missing __text_signature__ attributes -> 10 
built-in functions need non-None .__text_signature__
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue45302>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-10-01 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue45288>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42813>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37080] Cannot compile Python3.7.3 on Alt-F (ARM)

2021-09-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Jarl, I don't know if we support compiling on such devices, even though the OS 
is linux.  I suggest that you ask on python-list, where someone might have the 
experience to help you.

--

___
Python tracker 
<https://bugs.python.org/issue37080>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42813] Extra spaces cause unexpected EOF error in "compile" function with mode "single"

2021-09-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I believe that this should be closed as not-a-bug.  Ending a file with 
 *is* a syntax error.  Previous, it was assumed that the 
problem, in retrospect, was the 'extra' indent.  But one can equally say that 
the problem is the 'missing' statement after the otherwise legitimate indent.  
Even a newline is enough to make the code legal.  The current message no longer 
guess whether there is too much or too little code.

--
nosy: +pablogsal, terry.reedy

___
Python tracker 
<https://bugs.python.org/issue42813>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45296] IDLE: Better document close and exit.

2021-09-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Unfortunately, I have discovered, the new wording is better but only correct 
for IDLE when Shell is the only window.

On the file menu, I want to:
A. Change 'Close' to 'Close Window', so it is clear that 'Close'/Alt-F4 only 
close the window and not IDLE.
B. Also change 'Exit' to 'Exit IDLE' or maybe 'Quit IDLE', so it is clearer 
that this and Ctrl-Q close all windows and exit IDLE.  Ctrl-Q is the default 
binding for 'close-all-windows', which users can configure.

Also, add a little in the doc entry for these choices.  Or maybe open a 
separate issue to add the option name for all menu entry hotkeys that can be 
rebound.  I don't know how many that is.

For a single window app, like the REPL, when not running in Command Prompt or 
the equivalent, closing the window and exiting the application are the same 
thing.  The same is true when Shell is the only IDLE window.  Closing Shell 
exits IDLE.  After submitting the PR, I discovered that exit() and quit() only 
close Shell but do not exit IDLE if there are other windows.  So the message 
should really be something like the following:

To close Shell, enter 'exit()', 'quit()', or 'Alt-F4'.
To exit IDLE, hit 'Ctrl-Q', hotkey for 'File >= Exit IDLE'.

This requires replacing the __repr__ method.  Someone who rebinds either hotkey 
option, which I expect is rare, will have to remember that they did so if that 
happen to enter either 'exit' or 'quit' without parens.
--

The question of IDLE on Windows and <^Z Return> was discussed some years ago on 
an issue a vaguely remember but could not find.  It was decided to either not 
add it or maybe to remove it, and key cross-platform ^D for closing Shell (and 
only Shell as it does nothing in Editor).  I don't want to change that decision.

--
nosy:  -miss-islington
resolution: fixed -> 
stage: resolved -> 
status: closed -> open
title: IDLE: Change Ctrl-Z note in exit/quit repr on Windows -> IDLE: Better 
document close and exit.

___
Python tracker 
<https://bugs.python.org/issue45296>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed

___
Python tracker 
<https://bugs.python.org/issue45234>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41468] IDLE: "Unrecoverable server exiting" message

2021-09-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: Unrecoverable server exiting -> IDLE: "Unrecoverable server exiting" 
message

___
Python tracker 
<https://bugs.python.org/issue41468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2821] IDLE: unittest.py sys.exit error

2021-09-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: unittest.py sys.exit error -> IDLE: unittest.py sys.exit error

___
Python tracker 
<https://bugs.python.org/issue2821>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17838] Can't assign a different value for sys.stdin in IDLE

2021-09-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed

___
Python tracker 
<https://bugs.python.org/issue17838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In #45297, Steven D'Aprano suggests deleting code immediately followed by 
traceback.  (SyntaxErrors should not be there at all -- another issue.)  But 
should NameError, for instance, be ignore, just because user printed something? 
 Or block removed just because it comes before print statement?

Without more feedback, I believe most would want all code actually run.  If 
there is a Traceback, Add comment with error and message.

UI is a tough issue.  I don't want to add more File menu entries and hot keys.  
We can add to shell context menu as have already done.

Maybe this: after getting the save name, branch on type: .py, code only; 
anything else, full log. Subsequent ^S saves use last save-as name to decide.

--

___
Python tracker 
<https://bugs.python.org/issue11838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21140] Idle: saving Shell or an OutputWindow should default to .txt

2021-09-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

>From #45297, closed as duplicate.
https://discuss.python.org/t/what-is-this-syntax-i-dont-know-how-to-fix-it/10844

--

___
Python tracker 
<https://bugs.python.org/issue21140>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
priority: normal -> high

___
Python tracker 
<https://bugs.python.org/issue11838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This should be easier to do with the new shell with indents fixed.

--
nosy:  -roger.serwy, tlesher
versions: +Python 3.11 -Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue11838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41271] Add support for io_uring to cpython

2021-09-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 
<https://bugs.python.org/issue41271>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +26960
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28577

___
Python tracker 
<https://bugs.python.org/issue45296>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Tal, Paine: should be use exactly the raw REPL message or something that might 
be clearer to beginners, like 'Ctrl-D (end-of-file)'?

--
nosy: +epaine, taleinat

___
Python tracker 
<https://bugs.python.org/issue45296>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45296>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy


New submission from Terry J. Reedy :

On Windows:
>>> exit
'Use exit() or Ctrl-Z plus Return to exit'
>>> quit
'Use quit() or Ctrl-Z plus Return to exit'
>>> exit.eof
'Ctrl-Z plus Return'

On *nix, 'Ctrl-Z plus Return' is 'Ctrl-D (i.e, EOF)'
IDLE uses the latter even on Windows, and Ctrl-Z does not work.

Both exit and quit are instances of _sitebuiltins.Quitter
https://github.com/python/cpython/blob/e14d5ae5447ae28fc4828a9cee8e9007f9c30700/Lib/_sitebuiltins.py#L13-L26
class Quitter(object):
def __init__(self, name, eof):
self.name = name
self.eof = eof
def __repr__(self):
return 'Use %s() or %s to exit' % (self.name, self.eof)
def __call__ [not relevant here]

We just need to replace current exit/quit.eof as indicated above on startup.

--
messages: 402678
nosy: terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Change Ctrl-Z note in exit/quit repr on Windows

___
Python tracker 
<https://bugs.python.org/issue45296>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44892] Configparser fails when the .cfg file contains inline 'comments'

2021-09-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: Configparser fails when the .cfg file contains comments -> Configparser 
fails when the .cfg file contains inline 'comments'

___
Python tracker 
<https://bugs.python.org/issue44892>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44892] Configparser fails when the .cfg file contains comments

2021-09-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Please report back on the pip issue to read more of the doc, about inline 
comments in
https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
like I should have before writing what I did.

--
resolution:  -> not a bug
stage: test needed -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44892>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45279] avoid redundant _commit_removals pending_removals guard

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Antoine, git blame says you added at least many of the lines Thomas proposes to 
remove.

--
nosy: +pitrou, terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45279>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43914] Highlight invalid ranges in SyntaxErrors

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +26941
pull_request: https://github.com/python/cpython/pull/28558

___
Python tracker 
<https://bugs.python.org/issue43914>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45277>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 4c0fc65cd8a6d4c18330505576ccd4b46abeec1c by Terry Jan Reedy in 
branch 'main':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/4c0fc65cd8a6d4c18330505576ccd4b46abeec1c


--

___
Python tracker 
<https://bugs.python.org/issue45277>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +26938
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28555

___
Python tracker 
<https://bugs.python.org/issue45277>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks for the report.  I will fix this.

--
nosy: +terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45277>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45275] Make argparse print description of subcommand when invoke help doc on subcommand

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45275>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45267] New install Python 3.9.7 install of Sphinx Document Generator fails

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45267>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45252] Missing support for Source Specific Multicast

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45252>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45254] HAS_SHMEM detection logic is duplicated in implementation and tests

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +davin, pitrou
versions:  -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue45254>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45251] signal.SIGCLD alias is not available on OSX

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue45251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45249] Update doctect SyntaxErrors for location range

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In 3.10+, end_lineno and end_offset fields were added to SyntaxError objects 
and the args tuple.

>>> try: compile('1 1', '', 'single')
... except SyntaxError as e: print(e.args)
... 
('invalid syntax. Perhaps you forgot a comma?', ('', 1, 1, '1 1', 1, 4))

Here, line 1, offset 4 is the first 1-based column not part of the error.

The builtin default sys.excepthook was modified to read and use this new 
information and mark (end_offset - offset) columns with '^'s.  This default 
prints what it does to sys.stderr.

The syntax error formatting in the traceback module was not altered.  However, 
a new method, TracebackException._format_syntax_error, was extracted from 
TracebackException.format_exception_only so that the former could be overridden 
by software that simulates interaction.

The printed traceback does not come from line 1348.  That *executes* the user 
code, but all Exceptions, including SyntaxError, are caught.  If the exception 
is not expected and the run is not quiet, the exception is output by 
report_unexpected_exception(), as seen above as 'OUTPUT' and the lines that 
follows.
https://github.com/python/cpython/blob/5846c9b71ee9277fe866b1bdee4cc6702323fe7e/Lib/doctest.py#L1264

This calls _exception_traceback(exc_info).
https://github.com/python/cpython/blob/5846c9b71ee9277fe866b1bdee4cc6702323fe7e/Lib/doctest.py#L244
This calls traceback.print_exception, which I believe, for syntax errors, 
ultimately calls TracebackException._format_syntax_error.

I believe that the options for a fix are either
1. Call default sys.excepthook while capturing its output into a StringIO 
instance.
2. Assuming I am correct above about _format_syntax_error being called, 
monkeypatch it.  In line 779,
https://github.com/python/cpython/blob/5846c9b71ee9277fe866b1bdee4cc6702323fe7e/Lib/traceback.py#L779
replace '^' with a field with a calculated number of ^s.

I need to do one of these two for IDLE, and may try both.

--
components: +Library (Lib) -Interpreter Core, Tests
nosy: +terry.reedy
stage:  -> needs patch
title: SyntaxError location range indicator does not work in doctests -> Update 
doctect SyntaxErrors for location range

___
Python tracker 
<https://bugs.python.org/issue45249>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45244] pip not installed with fresh python3.8.10 installation

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If you installed 'py' (the default), you should be able to install pip with 'py 
-3.8 -m ensurepip'.  (I had to do this once.  I wrote the failure off as a 
random glitch and did not think to open an issue.)

--
nosy: +terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45244>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41914] test_pdb fails

2021-09-24 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Léon's message from #45242, which I closed as a duplicate of this.

Leon: please try with 3.11 (best, repository main), 3.10, or at least 3.9.  3.8 
and before only get security fixes.
---

Building Python 3.7, I ran into the same issue reported [here] (only line 
numbers differ):

==
FAIL: test_errors_in_command (__main__.PdbTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_pdb.py", line 1535, in test_errors_in_command
'(Pdb) ',
AssertionError: Lists differ: ['(Pd[283 chars]efined", 'LEAVING RECURSIVE 
DEBUGGER', '(Pdb) ', '\x1b[?1034h'] != ['(Pd[283 chars]efined", 'LEAVING 
RECURSIVE DEBUGGER', '(Pdb) ']

First list contains 1 additional elements.
First extra element 9:
'\x1b[?1034h'

  ['(Pdb) *** SyntaxError: unexpected EOF while parsing',
   '(Pdb) ENTERING RECURSIVE DEBUGGER',
   '*** SyntaxError: unexpected EOF while parsing',
   'LEAVING RECURSIVE DEBUGGER',
   '(Pdb) ENTERING RECURSIVE DEBUGGER',
   '> (1)()',
   "((Pdb)) *** NameError: name 'doesnotexist' is not defined",
   'LEAVING RECURSIVE DEBUGGER',
-  '(Pdb) ',
?  ^

+  '(Pdb) ']
?  ^

-  '\x1b[?1034h']

--
Ran 39 tests in 1.024s

FAILED (failures=1)


I have also managed to determine the cause.  As can be seen, the output from 
this pdb invocation contains an extraneous ANSI control sequence ("interpret 
"meta" key, set eighth bit"). This happens when running the test inside the GNU 
`screen` environment.  Run the test outside `screen`, and the problem goes away.

(By the way, this was the only test that failed when running `make test` inside 
the `screen` environment.)

--
nosy: +terry.reedy
resolution: works for me -> 

___
Python tracker 
<https://bugs.python.org/issue41914>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45242] test_pdb fails

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_pdb fails

___
Python tracker 
<https://bugs.python.org/issue45242>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45240] Add +REPORT_NDIFF option to pdb tests that use doctest

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Lukasz, there is no current doctest expert and I think that this is something 
you could either accept or reject fairly quickly.  Since the enhancement is to 
the tests, it could be backported.

--
nosy: +lukasz.langa, terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45240>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44019] operator.call/operator.__call__

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +terry.reedy
nosy_count: 6.0 -> 7.0
pull_requests: +26934
pull_request: https://github.com/python/cpython/pull/28551

___
Python tracker 
<https://bugs.python.org/issue44019>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45270] Clicking "Add to Custom Colors" adds same colour multiple times

2021-09-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

You added the same file twice.  Once was enough.

To repeat: IDLE has no knowledge of color chooser.  The Custom Colors bar is 
Windows specific.  There is no such thing on macOS.


PS: when responding by email, please delete the quoted message.  It is 
redundant and therefore noise when posted on the web page.

--

___
Python tracker 
<https://bugs.python.org/issue45270>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45270] Clicking "Add to Custom Colors" adds same colour multiple times

2021-09-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE has nothing to do with the operation of the color chooser.  IDLE calls a 
tkinter function that calls a tk functions that calls the OS Window Manager 
color chooser.  The choice you make is returned to IDLE as a color string that 
IDLE can later pass to tkinter and tk.  What you see on Windows, in your image 
is the MS Windows 10 color chooser.  The macOS color chooser is *completely* 
different.

The Windows Custom Color bar presumes that you make a small set of 
distinguishable custom colors.  The main use in IDLE would be if you create a 
custom backgound color that you want to use for multiple foreground/background 
pairs.  The use in Windows would be if you have a custom palette that you want 
to use for multiple applications.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45270>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45270] Clicking "Add to Custom Colors" adds same colour multiple times

2021-09-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


Removed file: https://bugs.python.org/file50297/python bug 1.png

___
Python tracker 
<https://bugs.python.org/issue45270>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41266] IDLE call hints and completions confused by ints and floats

2021-09-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What is your point?  Code without explanation is useless.

--

___
Python tracker 
<https://bugs.python.org/issue41266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for doing this.  When I started setting up the IDLE test suite 8 
years ago, I was a bit confused about the mixture of old ways (test_main) and 
new ways (unittest.main and possibly load_tests) in the test suite.  
Fortunately, Nick C. told me which was which.  Updating the test suite should 
make it better as an example for new unittest users.

--
nosy: +terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45229>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42038] Tracemalloc's format() doc contradictory

2021-09-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue42038>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45178] Support linking unnamed temp files into filesystem on Linux

2021-09-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> test needed
title: Support for linking unnamed temporary files into filesystem on Linux -> 
Support linking unnamed temp files into filesystem on Linux
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45178>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 
<https://bugs.python.org/issue45176>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

0c64569ac7066a97e4482c6d6e4d780806692ae5
a5bc0ffc520e09226f85d5fa8faaa83be0acee68

are ready to be cherrypicked into into the 3.10.0 release branch.  
Once that is done, 'release blocker' can be removed, but issue should remain 
open for a separate fix for 3.9.

--

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 9d76d28867c28bcc881b851547a9cd7ac003ae88 by Terry Jan Reedy in 
branch 'main':
bpo-45193: News for IDLE PR_28343 (GH-28348)
https://github.com/python/cpython/commit/9d76d28867c28bcc881b851547a9cd7ac003ae88


--

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +26761
pull_request: https://github.com/python/cpython/pull/28348

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 1afc7b3219b24c951bb4e6b7e1ead904228de074 by Terry Jan Reedy in 
branch 'main':
bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
https://github.com/python/cpython/commit/1afc7b3219b24c951bb4e6b7e1ead904228de074


--

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 369bf949ccbb689cd4638b29b4c0c12db79b927c by Terry Jan Reedy in 
branch 'main':
bpo-45020: Don't test IDLE with frozen module. (GH-28344)
https://github.com/python/cpython/commit/369bf949ccbb689cd4638b29b4c0c12db79b927c


--

___
Python tracker 
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45200] test_multiprocessing_fork failws with timeout

2021-09-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +26757
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28344

___
Python tracker 
<https://bugs.python.org/issue45200>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45200] test_multiprocessing_fork failws with timeout

2021-09-14 Thread Terry J. Reedy


New submission from Terry J. Reedy :

https://github.com/python/cpython/pull/28344/checks?check_run_id=3605759743
All tests pass until test_multiprocessing_fork timed out after 25 min.  On the 
rerun: refail with timeout.

test_get (test.test_multiprocessing_fork.WithProcessesTestQueue) ... Timeout 
(0:20:00)!
Thread 0x7f176a71ebc0 (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", 
line 261 in wait
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", 
line 349 in wait
  File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", 
line 1001 in test_get
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 549 in 
_callTestMethod
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 593 in run
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 652 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in 
run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in 
run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in 
run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/runner.py", line 206 in 
run
  File "/home/runner/work/cpython/cpython/Lib/test/support/__init__.py", line 
998 in _run_suite
  File "/home/runner/work/cpython/cpython/Lib/test/support/__init__.py", line 
1124 in run_unittest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 261 in _test_module
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 297 in _runtest_inner2
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 340 in _runtest_inner
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 215 in _runtest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 245 in runtest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
337 in rerun_failed_tests
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
715 in _main
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
658 in main
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
736 in main
  File "/home/runner/work/cpython/cpython/Lib/test/__main__.py", line 2 in 

  File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 86 in _run_code
  File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 196 in 
_run_module_as_main

--
components: Library (Lib), Tests
messages: 401808
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: test_multiprocessing_fork failws with timeout
type: behavior
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45200>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45197] IDLE should suppress ValueError for list.remove()

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The offending function is

def event_delete(self, virtual, *sequences):
if virtual not in self.__eventinfo:
return
func, triplets = self.__eventinfo[virtual]
for seq in sequences:
triplet = _parse_sequence(seq)
if triplet is None:
#print("Tkinter event_delete: %s" % seq, 
file=sys.__stderr__)
widget.event_delete(self, virtual, seq)
else:
if func is not None:
self.__binders[triplet[1]].unbind(triplet, func)
triplets.remove(triplet)

The triplets collection is part of *virtual* whereas each triplet is derived 
from a member of sequences. 
The discrepancy seems to be extremely rare.  I will catch the exception until 
such time as I see a plausible, reproducible, and testable reason.

--

___
Python tracker 
<https://bugs.python.org/issue45197>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45020] Freeze all modules imported during startup.

2021-09-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +terry.reedy
nosy_count: 14.0 -> 15.0
pull_requests: +26756
pull_request: https://github.com/python/cpython/pull/28344

___
Python tracker 
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +26755
pull_request: https://github.com/python/cpython/pull/28343

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Pablo, sorry I was not clear. PR_26684 and the line it added, having been 
merged last June, are already in the 3.10.0rc2 release.  What I want to do 
immediately is disable the line with a '#'.  I just posted an explanation on 
#34193.  I am about to make a new PR to do so, and once it is merged and 
backported to 3.10 (but not 3.9), I will ask you to cherrypick it into the 
release branch.

--
priority: release blocker -> normal

___
Python tracker 
<https://bugs.python.org/issue40128>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I will just mention here that winconfig_event also calls update_idletasks, in 
what should be the proper place, and I think that the second call was only 
needed for mac tk 8.6.8 because of the unique-to-IDLE behavior I want to 
delete.  I suspect that if we create the popup the same way we do with the 
others, we will not need the second call even on 8.6.8.  But making sure 3.10.0 
works comes first.

--

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In msg401744 I suggested any of the following for the upcoming 3.10.0 release.

1. Remove the new line.
2. Disable the line by adding '#'.
3. Make it conditional on macOS and 8.6.8.

Thinking more, I am rejecting 3. because the line is not needed for IDLE and tk 
as installed by our macOS.  As things stand now, I an only willing to support 
IDLE with the tk we install.  But I will go with option 2 so that if someone 
tries to run IDLE with a different tk, and the line is needed, they only need 
to remove the '#'.

A version of 3. is needed for 3.9 but this needs more data and discussion.  In 
looking at your no-issue PR_28332, I realized that I would rather make a more 
extensive change than to patch a badly written function for at least the fourth 
time.  I will open an issue for that PR and explain later.

--
nosy: +lukasz.langa, ned.deily, pablogsal
priority: normal -> release blocker

___
Python tracker 
<https://bugs.python.org/issue45193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45199] IDLE: document search (find) and replace better

2021-09-14 Thread Terry J. Reedy


New submission from Terry J. Reedy :

The doc currently just says that the Search, File Search, and Search 
dialogs exist for the corresponding menu entries.
  Add a short section in "Editing and navigation" to say more.

1. Any selection becomes search target, except that S is buggy.
2. Search is only within lines.  .* and \n do not match \n even with RE.
3. [x]RE uses Python re module, not tcl re.  It applies to replace also.  So if 
target RE has capture groups, \1 (and \gname? test) in replacement 
works.(match.expand(repl))
4. Refer to re chapter and RegularExpression HOWTO.

--
assignee: terry.reedy
components: IDLE
messages: 401801
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: document search (find) and replace better
type: enhancement
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45199>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

https://www.tcl.tk/man/tcl8.6/TclCmd/update.html

--

___
Python tracker 
<https://bugs.python.org/issue40128>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Pablo (and Ned) 

PR_26672 (and backports) added one line to idlelib/autocomplete_w.py, 206 or 
209.
  acw.update_idletasks() # Need for tk8.6.8 on macOS: #40128.
NEWs item included "The added update_idletask call should be harmless and 
possibly helpful otherwise. "

This is consistent with https://www.tcl.tk/man/tcl8.6/TclCmd/update.html

At the end of the PR, Tal Einat reports
"this broke completions for me with Tcl/Tk 8.6.11 on Ubuntu 20.04.
Apparently also with Tcl/Tk 8.6.10, which is the current default.
Also broken in my latest install of Python 3.9.7 (not built from source)."

Tal, did you verify that #ing the line fixes your issues?  Can you be more 
specific as to what you see?

I rechecked on my Macbook and the line is definitely needed for 3.9.7 with tk 
8.6.8.  It makes no difference for 3.10.0rc2 with 8.6.11.  (So the bug of 
requiring update_idletasks call to ever see the dropdown box was fixed.)

Assume Tal's report is verified on another machine, we could, before 3.10.0,
1. Remove the line.
2. Disable the line.
3. Make it conditional on macOS and 8.6.8.

It is obviously too late for 3.9.7.

--
nosy: +lukasz.langa, pablogsal
priority: normal -> release blocker

___
Python tracker 
<https://bugs.python.org/issue40128>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45109] pipes seems designed for bytes but is str-only

2021-09-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

guido, you seem to be the only active contributor to the pipes module.  What do 
you think?

--
nosy: +gvanrossum, terry.reedy

___
Python tracker 
<https://bugs.python.org/issue45109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45105] Incorrect handling of unicode character \U00010900

2021-09-10 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +serhiy.storchaka

___
Python tracker 
<https://bugs.python.org/issue45105>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44359] test_ftplib fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2021-09-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This failure in required Ubuntu test is blocking me from merging a totally 
unrelated change in IDLE.  PR-28228.  Please disable the phony failing test.

--
nosy: +lukasz.langa, terry.reedy

___
Python tracker 
<https://bugs.python.org/issue44359>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32955] IDLE crashes when trying to save a file

2021-09-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you Irit.

For any users who stumble on this issue:  Drop down clicks in the dialog are 
handled by tk.  Hence, this was not an IDLE issue, unlikely to be a tkinter 
issue, and most likely a bad tcl/tk version issue.  Hence my first post. My 
response and the web are out of date.  We have fixed the version issue by 
including in each installer what seems to be the best available tcl/tk build.

--
resolution: works for me -> out of date

___
Python tracker 
<https://bugs.python.org/issue32955>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44892] Configparser fails when the .cfg file contains comments

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Make PR branch from main, which I used for testing. I verified issue on 3.10 
and 3.9, so we will backport.

--
stage: needs patch -> test needed
title: Configparser fails when the file contains $ inside a comment -> 
Configparser fails when the .cfg file contains comments
versions: +Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44892>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44892] Configparser fails when the file contains $ inside a comment

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Diego, I repaired the defacement, which included removing you as nosy.

Relevant doc: 
https://docs.python.org/3/library/configparser.html#configparser.BasicInterpolation

To me, the following line implies that % may be used freely in comments.
  gain: 80%%  # use a %% to escape the % sign (% is the only character ...
However, IDLE uses .cfg files and configparser, and when I added #% to my 
C:/Users/Terry/.idlerc/config-main.cfg, IDLE startup fails with the following, 
confirming the behavior.

Traceback (most recent call last):
  File "f:\dev\3x\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
   ^^^
  File "f:\dev\3x\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
^^^
  File "f:\dev\3x\lib\idlelib\__main__.py", line 7, in 
idlelib.pyshell.main()
^^
  File "f:\dev\3x\lib\idlelib\pyshell.py", line 1648, in main
shell = flist.open_shell()
^^
  File "f:\dev\3x\lib\idlelib\pyshell.py", line 335, in open_shell
self.pyshell = PyShell(self)
   ^
  File "f:\dev\3x\lib\idlelib\pyshell.py", line 898, in __init__
OutputWindow.__init__(self, flist, None, None)
^^
  File "f:\dev\3x\lib\idlelib\outwin.py", line 79, in __init__
EditorWindow.__init__(self, *args)
^^
  File "f:\dev\3x\lib\idlelib\editor.py", line 215, in __init__
text['font'] = idleConf.GetFont(self.root, 'main', 'EditorWindow')
   ^^^
  File "f:\dev\3x\lib\idlelib\config.py", line 742, in GetFont
bold = self.GetOption(configType, section, 'font-bold', default=0,
   ^^^
  File "f:\dev\3x\lib\idlelib\config.py", line 229, in GetOption
return self.userCfg[configType].Get(section, option,
   ^
  File "f:\dev\3x\lib\idlelib\config.py", line 61, in Get
return self.getboolean(section, option)
   
  File "f:\dev\3x\lib\configparser.py", line 829, in getboolean
return self._get_conv(section, option, self._convert_to_boolean,
   ^
  File "f:\dev\3x\lib\configparser.py", line 809, in _get_conv
return self._get(section, conv, option, raw=raw, vars=vars,
   
  File "f:\dev\3x\lib\configparser.py", line 804, in _get
return conv(self.get(section, option, **kwargs))
^^^
  File "f:\dev\3x\lib\configparser.py", line 800, in get
return self._interpolation.before_get(self, section, option, value,
   
  File "f:\dev\3x\lib\configparser.py", line 395, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
^^
  File "f:\dev\3x\lib\configparser.py", line 442, in _interpolate_some
raise InterpolationSyntaxError(
^^^
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', 
found: '%'

When changed one of the lines in my file see what a valid interpolation would 
do,
   font-size = 12  # for %(font)s
I got

"Warning: config.py - IdleConf.GetOption -
 invalid 'int' value for configuration option 'font-size'
 from section 'EditorWindow': '12  # for source code pro'"

configparser interpreted the comment as part of the value, and started IDLE 
with the default size 10.
The same happened when I used %%: the bad value was '12  # for %'
And again with just '#'.  Values read as string are also disabled by '#'.
"name = Custom Dark # %(parenstyle)s" resulted in the default light theme.
Conclusion: 1. Comments are currently worse than useless. 2. Test suite is 
deficient.

Diego, good PRs are welcome.  Please sign CLA first.  For this, the problem is 
comments not being recognized and stripped.  Fix that and % in comments will 
not be an issue.

--
nosy: +DiddiLeija, terry.reedy, uranusjr, zach.ware
stage:  -> needs patch
title: [configparser] Module configparser fails when the config file contains a 
"%" inside a commentary -> Configparser fails when the file contains $ inside a 
comment
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue44892>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What I missed before is that duplicating the effect of the first two 
interactive entries (no exception) requires escaping the backslash so that the 
source argument for the explicit compile does not have a null. 

compile("'\\0'", '', 'exec')
 at 0x0214431CAA20, file "", line 1>
compile("#\\0", '', 'exec')
 at 0x0214431CAC30, file "", line 1>

So I did not actually see an exception to the rule.
---

*On Win 10*, I experimented with a version of Armin and Irit's example, without 
and with b'...' and 'wb'.

s = '#\x00\na\nb\n' 
print(len(s))  # 7
with open("f:/Python/a/nulltest.py", 'w') as f:
  f.write(s)
import nulltest

When I ran a local repository build of 3.9, 3.10, or 3.11 with
  f:\dev\3x>python f:/Python/a/nulltest.py
I got Irit's strange NameError instead of the proper ValueError.

When I ran with installed 3.9 or 3.10 with
  py -3.10 -m a.nulltest
I got the null-byte ValueError.

When I ran from IDLE's editor running on either installed or repository python, 
the import gave the null-byte ValueError.

--

___
Python tracker 
<https://bugs.python.org/issue20115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The compile() doc currently says ""This function raises SyntaxError if the 
compiled source is invalid, and ValueError if the source contains null bytes."  
And indeed, in repository 3.9, 3.10, 3.11,

>>> compile('\0','','exec')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: source code string cannot contain null bytes

Ditto when run same in a file from IDLE or command line.  The exception 
sometimes when the null is in a comment or string within the code.

>>> '\0'
'\x00'
>>> #\0
>>> compile('#\0','','single', 0x200)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: source code string cannot contain null bytes
>>> compile('"\0"','','single', 0x200)
ValueError: source code string cannot contain null bytes

I am puzzled because "\0" and #\0 in the IDLE shell are sent as strings 
containing the string or comment to compiled with the call above in codeop.  
There must be some difference in when \0 is interpreted.

--

___
Python tracker 
<https://bugs.python.org/issue20115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If nothing else, I should amend the doc note about font problems to include 
Windows if we verify the report.

--

___
Python tracker 
<https://bugs.python.org/issue45103>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for finding what I could not.

Your previous message, referenced above, reporting a problem that remains in 
8.6.11 on linux, was ...

"For me, this is not limited to special characters. Trying to load anything in 
Tk using the 'JoyPixels' font crashes (sometimes it does load but all 
characters are very random - most are whitespace - and it crashes again after a 
call to `fc-cache`). IDLE crashes when trying to preview the font.

I believe this is what is being experienced on 
https://askubuntu.com/questions/1236488/x-error-of-failed-request-badlength-poly-request-too-large-or-internal-xlib-le
 because they are not using any special characters yet are reporting the same 
problem."

JoyPixels is an emoji font.  There are emoji in the BMP, but not in IDLE's 
initial font sample.  Did you add some, or did problems occur without 
displaying any emoji?
---

I presume that the Phaistos 'font' has glyphs for the unicode phaistos block in 
the first astral plane, U+101D0..101FD.
https://en.wikipedia.org/wiki/Phaistos_Disc_(Unicode_block)

If they include one of those characters in the font name displayed in the font 
list (ugh), then a problem is understandable, and the fix would be to filter 
astral chars (and possibly more) out of font names.  But I won't assume this.

Please try the experiments I outlined if you are so inclined.

--

___
Python tracker 
<https://bugs.python.org/issue45103>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST)

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The doc section in question is
https://docs.python.org/3/library/ast.html#ast.parse

I confirmed that 'break', 'continue', 'yield', and 'return' still parse, with 
the results how having "type_ignores=[]" added.
  'Module(body=[Expr(value=Yield())], type_ignores=[])'
I do not understand Nick's comment about 'await' as 'await' is not a legal 
statement'

The current initial paragraph says:
  "Parse the source into an AST node. Equivalent to compile(source, filename, 
mode, ast.PyCF_ONLY_AST)."

I suggest following this with:
  "If the AST node is compiled to a code object, there are additional syntax 
checks that can raise errors.  "For example, 'return' parses to a node, but is 
not legal outside of a def statement."

Hrvoje's suggested adding something like
  "If source contains a null character ('\0'), ValueError is raised."

I don't think that this is needed as ast.parse is explicitly noted as 
equivalent to a compile call, and the compile doc says "This function raises 
SyntaxError if the compiled source is invalid, and ValueError if the source 
contains null bytes."  (Should not that be 'null characters' given that 
*source* is now unicode?) This statement need not be repeated here.

--
versions: +Python 3.11 -Python 2.7, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue30637>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24893] Tk occasionally mispositions Text() insert cursor on mouse click.

2021-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

https://stackoverflow.com/questions/69038343/mouse-pointer-misaligned-when-using-python-in-idle-on-mac
 reports same issue with 3.9.5.  I have requested details to be posted here.

--
status: pending -> open

___
Python tracker 
<https://bugs.python.org/issue24893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-04 Thread Terry J. Reedy


New submission from Terry J. Reedy :

There were reports on a previous issue that attempting to display some 
characters from some linux fonts in some distributions resulted in crashing 
Python.  The crash reports mentioned XWindows errors about particular 
characters being too complex or something.  I did not open an issue for this 
because it seemed beyond the ability of tkinter/IDLE to predict and handle.

https://stackoverflow.com/questions/68996159/idle-settings-window-wont-appear 
reported that requesting the IDLE settings window resulting in IDLE hanging.  
The user used my print debug suggestion to determine that the problem was in 
configdialog.py at
self.fontpage = FontPage(note, self.highpage)

The user first thought the issue was with a chess font, and then determined 
that the problem font was the phaistos font from 
https://ctan.org/pkg/phaistos?lang=en.  The font has the symbols from the 
Cretan Linear A script on the Disk of Phaistos. This issue is about

1. Try to reproduce the issue by downloading and installing Phaistos.otf (right 
click on the file and click Install).

2. If successful, trace the problem to a specific line within the FontPage 
class.

3. Determine whether Python code can prevent the hang or if it is completely in 
other code.  (Either way, perhaps report to tcl/tk.)

... To remove, "open Control Panel -> Fonts then locate and select Phaistos 
Regular font then proceed with clicking Delete button."

I did not select 'test needed' because we cannot routinely install new fonts 
and I am not sure of how to do an automated test if we could.
However, I would add a note as to how to do a manual test.

font.otf = OpenTypeFont, used on Windows, Linux, macOS.
https://fileinfo.com/extension/otf
It might be good test on other systems after Windows.

--
messages: 401062
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: make configdialog font page survive font failures
type: behavior
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45103>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45034] Improve struct.pack out of range error messages

2021-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Go ahead, with the understanding that there is no guaranteed acceptance of the 
change, even with a good patch.  There may be reasons for the status quo that 
neither Steven nor I are aware of.  I don't think that either of the listed 
experts, added as nosy, are very active.  In any case,  revised or new tests 
will be needed.

--
nosy: +mark.dickinson, meador.inge

___
Python tracker 
<https://bugs.python.org/issue45034>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45086] f-string unmatched ']'

2021-09-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you Eric.  I can see now that the actual process is a somewhat 
complicated mix of the simple options 1 and 2 I imagined above.  It is like 
option 2, except that everything between '{' and '}' is partially parsed enough 
to create a format object.  This is required to ignore quoted braces

>>> f'{"}"'
SyntaxError: f-string: expecting '}'

and detect valid '!' and ':' markers.  In that partial parsing, unmatched 
fences are detected and reported, while other syntax errors are not.  If my 
option 1 above were true, the first example below would instead report the 'a 
a' error.

>>> f'{a a'
SyntaxError: f-string: expecting '}'
>>> f'{a a]'
SyntaxError: f-string: unmatched ']'
>>> f'{a a}'
SyntaxError: f-string: invalid syntax. Perhaps you forgot a comma?

The second plausibly could, but outside of the f-string context, the error is 
the same.
>>> a a]
SyntaxError: unmatched ']'
 
Greg, the fuller answer to your question is that the interpreter is only 
*required* to report that there is an error and some indication of where.  
"SyntaxError: invalid syntax" is the default.  It may have once been all that 
was ever reported.

A lot of recent effort has gone into adding detail into what is wrong and what 
the fix might be.  But both additions sometimes involve choices that may not 
meet a particular person's expectation.  Another person, expecting linear 
rather than nested parsing, might look at the first example above and ask 
whether the interpreter should be complaining about the 'a a' syntax error 
instead of the following lack of '}' f-string error.  And I would not call it a 
bug if it were to do so in the future.

--

___
Python tracker 
<https://bugs.python.org/issue45086>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

-1 also for the reasons given.

Michael, a question asking how would have made a good python-list post. So I 
posted the answers in "How to include insertion order in dict equality"

--
nosy: +terry.reedy
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45093>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



<    1   2   3   4   5   6   7   8   9   10   >