[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-25 Thread Inada Naoki


Inada Naoki  added the comment:

@fj92f3jj923f923 Would you update the PR to remove the strdup.c?

--

___
Python tracker 

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



[issue41388] IDLE fails to detect corresponding opening parenthesis

2020-07-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As I at least hinted above, I would rather add the missing line starts than 
delete more.  I am quite sure that their absence degrades overall performance 
in some sense.  A much bigger match problem that this one is that ^0 always 
half fails when the cursor is not on the line with the closer.  See #21756, 
which already has a patch, though not one I was completely happy with last time 
I looked.

I cannot help but think that a proper solution might fix both issues.

I once wrote a fence matcher in C, initially for C, based on a deterministic 
finite state machine but with a push-down stack so it could match indefinite 
nesting.  I am thinking that I should try to rewrite in python and see if it 
will solve both issues.  Find good parse start is not really the right tool, 
because what we want to do with ^0 is to move both back and forward, find the 
first unmatched fence in each direction, and flash them, and add a beep if 
unmatched.  BOF and EOF (begin/end of file) are the backup fences.

Another possible solution might be to use a depleted _synchre for matching and 
an augmented one for any other use where that is better.

--

___
Python tracker 

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



[issue37309] idlelib/NEWS.txt for 3.9.0 and backports

2020-07-25 Thread miss-islington


miss-islington  added the comment:


New changeset b74e53607576ec92c0f319559b8bb1e34ed5c38b by Miss Islington (bot) 
in branch '3.9':
bpo-37309: NEWS for GH-41373 (GH-21612)
https://github.com/python/cpython/commit/b74e53607576ec92c0f319559b8bb1e34ed5c38b


--

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-25 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +20765
pull_request: https://github.com/python/cpython/pull/21624

___
Python tracker 

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



[issue41362] Regenerating parser table fails (windows)

2020-07-25 Thread Constant Marks


Constant Marks  added the comment:

Thanks. I will check it out when I get back in front of my computer.

On Sat, Jul 25, 2020 at 4:22 PM Guido van Rossum 
wrote:

>
> Guido van Rossum  added the comment:
>
> Sorry, I realize what's wrong here. When we switched to the new PEG parser
> (the "pegen" you saw mentioned in the warning) we switched to a new grammar
> file. You have to change Grammar/python.gram instead of Grammar/Grammar.
>
> We couldn't get rid of the Grammar/Grammar file yet because it's mentioned
> in the docs; this is pending a better way of producing
> https://docs.python.org/3.10/reference/grammar.html.
>
> I hope this has informed you sufficiently; I don't think there's a bug
> that needs to be fixed on our end.
>
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41388] IDLE fails to detect corresponding opening parenthesis

2020-07-25 Thread Lewis Ball


Lewis Ball  added the comment:

Okay, on further examination `find_good_parse_start` first looks for a line 
ending with ':\n', and then looks to match _synchre on that line. If it can't 
find any line ending in ':\n' then it will just look for the first occurrence 
of something in _synchre to truncate on. If it can't find anything at that 
point, it just doesn't truncate and the whole code is checked for a bracket 
match.

So the reason that 
```
else
(
else)
```
works is because there is no `:` after the first else, and adding `:` will 
cause the matching to fail.

This seems reasonable, and I was probably too quick to say that the function 
goes back further than it needs to when looking to truncate.

It seems like then that `else` being removed from _synchre will fix this, and 
mean that the only time brackets aren't matched are when invalid code is typed, 
something like:
```
(
def)
```

I can put in a PR for this tomorrow (probably removing `yield` at the same 
time) if this sounds like the right fix.

P.S. Here is an example of the similar `yield` error that Terry alluded to:
```
def f():
for i in range(10):
(
yield x)
```

--

___
Python tracker 

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



[issue39868] Stale Python Language Reference docs (no walrus).

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Congratulations SHANKAR JHA. Thank you for your contribution.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue39868] Stale Python Language Reference docs (no walrus).

2020-07-25 Thread miss-islington


miss-islington  added the comment:


New changeset 616734b6c80e222f16249e9a9ce52588a0b611a7 by Miss Islington (bot) 
in branch '3.9':
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) 
(GH-18851)
https://github.com/python/cpython/commit/616734b6c80e222f16249e9a9ce52588a0b611a7


--

___
Python tracker 

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



[issue39868] Stale Python Language Reference docs (no walrus).

2020-07-25 Thread miss-islington


miss-islington  added the comment:


New changeset 755cb49429581679fc7b12905cb3d3ecf439032c by Miss Islington (bot) 
in branch '3.8':
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) 
(GH-18851)
https://github.com/python/cpython/commit/755cb49429581679fc7b12905cb3d3ecf439032c


--

___
Python tracker 

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



[issue39868] Stale Python Language Reference docs (no walrus).

2020-07-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20764
pull_request: https://github.com/python/cpython/pull/21623

___
Python tracker 

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



[issue39868] Stale Python Language Reference docs (no walrus).

2020-07-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20763
pull_request: https://github.com/python/cpython/pull/21622

___
Python tracker 

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



[issue39868] Stale Python Language Reference docs (no walrus).

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset f117cef25b5ffc4db9fbe373ddb65e14f59f0397 by Shankar Jha in branch 
'master':
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) 
(#18851)
https://github.com/python/cpython/commit/f117cef25b5ffc4db9fbe373ddb65e14f59f0397


--

___
Python tracker 

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



[issue32113] Strange behavior with await in a generator expression

2020-07-25 Thread Bryan Hu


Change by Bryan Hu :


--
versions: +Python 3.8

___
Python tracker 

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



[issue41349] idle not going full screen when I rotate screen 90° on mac

2020-07-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The way to tell if _tkinter is involved or if this is purely tcl/tk issue would 
be for someone open a window directly with tcl/tk commands using either wish or 
maybe tkinter.tcl.  I don't know how.  I think that _tkinter involvement is 
maximize handling is sufficiently unlikely that I would close this as 3rd party.

--
assignee: terry.reedy -> 

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

In general, "4.0" means "never", and for some deprecations that seems totally 
appropriate. I wouldn't worry about it. I'm closing this issue now that all 
three PRs have been merged. Thanks for your contribution!

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

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hm, recursive type aliases are an interesting issue. We may be able to do 
better there for 3.10, even if we can't fix it for 3.9 (or at least not for 
3.9.0).

But in the meantime maybe you can come up with a PR that adds a note to the 
typing docs in 3.10 explaining that `list["int"]` will not be resolved to 
`list[int]`, even though it works for `List["int"]`?

--

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread miss-islington


miss-islington  added the comment:


New changeset fdc91c2e6096f60ddb8b7f72fe7926ccbbf42800 by Miss Islington (bot) 
in branch '3.9':
bpo-41314: fixed annotations __future__ version (GH-21616)
https://github.com/python/cpython/commit/fdc91c2e6096f60ddb8b7f72fe7926ccbbf42800


--

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread miss-islington


miss-islington  added the comment:


New changeset b99f770230e0db390aa80c5135b1053f3be48e19 by Miss Islington (bot) 
in branch '3.8':
bpo-41314: fixed annotations __future__ version (GH-21616)
https://github.com/python/cpython/commit/b99f770230e0db390aa80c5135b1053f3be48e19


--

___
Python tracker 

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



[issue40814] Update typing module documentation based on PEP 585

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Alternatively, we at least need a section of documentation for things like 
`list[int]` and `dict[str, float]`.

--

___
Python tracker 

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



[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

This can be closed. It needs docs though; there's a separate issue for that 
(issue40814).

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

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread YoSTEALTH


YoSTEALTH  added the comment:

@gvanrossum I found couple of odd places where 4.0 is mentioned like 
https://docs.python.org/3/library/array.html for example, should a new issue be 
created? I am not sure how many more there are.

--

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Never mind, Miss Islington failed to backport to 3.7, so let's forget about 
that.

--
versions:  -Python 3.7

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

@ned This will need your assistance to merge the 3.7 backport IIUC.

--
nosy: +ned.deily

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread miss-islington


miss-islington  added the comment:


New changeset 0028c14073109595e7532ec00bb1e8bf39ecfb4d by YoSTEALTH in branch 
'master':
bpo-41314: fixed annotations __future__ version (GH-21616)
https://github.com/python/cpython/commit/0028c14073109595e7532ec00bb1e8bf39ecfb4d


--
nosy: +miss-islington

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20762
pull_request: https://github.com/python/cpython/pull/21621

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20761
pull_request: https://github.com/python/cpython/pull/21620

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

There are some difficulties with removing Grammar/Grammar, since it is used to 
generate the full grammar in the reference docs (Doc/reference/grammar.rst). 
Producing a similar grammar from the PEG grammar is currently painful because 
our PEG grammar contains a number of "invalid_*" rules that just exist to be 
able to produce more useful error messages.

See https://github.com/we-like-parsers/cpython/issues/135.

The continued existence of Grammar/Grammar has confused at least one person, 
see issue41362.

Grepping for Grammar/Grammar in the docs, there are a few other occurrences:

library/token.rst:14:of the parse tree (terminal tokens).  Refer to the file 
:file:`Grammar/Grammar`
library/parser.rst:43::file:`Grammar/Grammar` in the standard Python 
distribution.  The parse trees
library/symbol.rst:15:names.  Refer to the file :file:`Grammar/Grammar` in the 
Python distribution for
reference/grammar.rst:7:.. literalinclude:: ../../Grammar/Grammar

--

___
Python tracker 

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



[issue41362] Regenerating parser table fails (windows)

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sorry, I realize what's wrong here. When we switched to the new PEG parser (the 
"pegen" you saw mentioned in the warning) we switched to a new grammar file. 
You have to change Grammar/python.gram instead of Grammar/Grammar.

We couldn't get rid of the Grammar/Grammar file yet because it's mentioned in 
the docs; this is pending a better way of producing 
https://docs.python.org/3.10/reference/grammar.html.

I hope this has informed you sufficiently; I don't think there's a bug that 
needs to be fixed on our end.

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

___
Python tracker 

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



[issue37082] Assignment expression symbol (walrus) not in built-in help()

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

We might get more help with this issue if the process of updating the help() 
output were better documented. I recently looked into what it would take to add 
"FSTRINGS" to the "topics" list, and it's quite complicated -- I only 
persevered after stepping through pydoc.help() using pdb. I wrote up a few tips 
in issue41045.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-25 Thread Berker Peksag


Change by Berker Peksag :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue18280] Documentation is too personalized

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Marking this as "easy". People are welcome to submit PRs that fix the wording 
in one or a small number of modules called out in Serhiy's list.

--
keywords: +easy
nosy: +gvanrossum

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-25 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 949cf93f8ee27c37650483458f0aa3e295011ef6 by Miss Islington (bot) 
in branch '3.8':
bpo-38731: Fix NameError in command-line interface of py_compile (GH-21617)
https://github.com/python/cpython/commit/949cf93f8ee27c37650483458f0aa3e295011ef6


--

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20760
pull_request: https://github.com/python/cpython/pull/21618

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-25 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 2024d7aca100c3faa9c6730aba3de5f0528750be by Berker Peksag in 
branch '3.9':
bpo-38731: Fix NameError in command-line interface of py_compile (GH-21617)
https://github.com/python/cpython/commit/2024d7aca100c3faa9c6730aba3de5f0528750be


--

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-25 Thread Berker Peksag


Change by Berker Peksag :


--
pull_requests: +20759
pull_request: https://github.com/python/cpython/pull/21617

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-25 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset daff39070e7ea71b0ba49d9150ac7a210a125682 by Gregory Schevchenko 
in branch 'master':
bpo-38731: Add --quiet option to py_compile CLI (GH-17134)
https://github.com/python/cpython/commit/daff39070e7ea71b0ba49d9150ac7a210a125682


--

___
Python tracker 

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



[issue40456] Complete adding silent mode for py_compile

2020-07-25 Thread Berker Peksag


Berker Peksag  added the comment:

This is a duplicate of issue 38731. The inline patch in msg373791 is incorrect. 
I'll fix the error in maintenance releases by partially reverting commit 
2e33ecd7c9b0cac3efc6fcbdd4547fd086b4e2d1.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> bad input crashes py_compile library

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread YoSTEALTH


Change by YoSTEALTH :


--
versions: +Python 3.7

___
Python tracker 

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



[issue41388] IDLE fails to detect corresponding opening parenthesis

2020-07-25 Thread Lewis Ball


Lewis Ball  added the comment:

So it looks like `pyparse.Parser.find_good_parse_start` is responsible for 
truncating the code to only look for the matching bracket in the current 
statement, which uses _synchre.

Testing it out, it sometimes will go to the most recent match of _synchre, but 
will sometimes go back to an even earlier match in the code, which is why 
something like
```
else
(
else)
```
manages to match without an issue. The `find_good_parse_start` will truncate at 
the first `else` in this case, instead at the second one.

Removing `else` from the _synchre regex did solve this problem for me though, 
as `find_good_parse_start` will then try to truncate even earlier when looking 
for the start of the statement, which will be before the opener. Although, I 
haven't checked what else would be affected by this change. I am not sure why 
this worked for me and did not work for you Terry.

Also, even with this fix it seems like 'find_good_parse_start` goes back 
further than it needs to. Fixing that may not change much, but would offer a 
slight performance increase.

--

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread YoSTEALTH


Change by YoSTEALTH :


--
keywords: +patch
nosy: +YoSTEALTH
nosy_count: 5.0 -> 6.0
pull_requests: +20758
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/21616

___
Python tracker 

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



[issue41349] idle not going full screen when I rotate screen 90° on mac

2020-07-25 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I can somewhat reproduce the problem with both IDLE and tkinter.Tk() in 3.9b3 
and an external monitor.

What I did:
- Start IDLE (or a shell running tkinter.Tk()
- Maximize window without changing monitor settings: OK
- Revert to regular window
- Rotate monitor 90 degrees in the Display settings (monitor itself not rotated)
- Maximize window again and revert back to regular size
- Revert changes to monitor settings

When I maximise the window with a rotated display the window grows to cover 
most of the display, but not all of it: There is a blank area between the menu 
bar and the top of the window. The height of that area is about that of the 
titlebar of the window. 


The window grows to the right size if I first rotate the screen and then start 
tkinter.Tk(). But then window won't go full-size when the screen is rotated 
back, some space is left between the righthand side of the window and the edge 
of the screen (again about the same amount of pixels as the height of the title 
bar).

Issues like this tend to be problems with the macOS port of Tk itself, I expect 
that to be the case in this instance as well. 


System:
- Python 3.9b3 (python.org installer)
- macOS 10.15.6

--

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Waiting for someone to submit a PR.

--

___
Python tracker 

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



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-07-25 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-25 Thread wyz23x2


wyz23x2  added the comment:

Ping?

--

___
Python tracker 

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



[issue41396] pystate.c:_PyCrossInterpreterData_Release() does not clear py exception on error

2020-07-25 Thread Tomasz Pytel


New submission from Tomasz Pytel :

The call to _PyInterpreterState_LookUpID() may generate a Python exception but 
it is not explicitly cleared on error and no indicator is returned to signal 
failure. This can lead to a "a function returned a result with an error set" 
fatal error, and does in fact do so in a case I encountered in 
Modules/_xxsubinterpreters.c:channel_destroy().

--
components: Interpreter Core
messages: 374270
nosy: Tomasz Pytel
priority: normal
severity: normal
status: open
title: pystate.c:_PyCrossInterpreterData_Release() does not clear py exception 
on error
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue41395] pickle and pickletools cli interface doesn't close input and output file.

2020-07-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41395] pickle and pickletools cli interface doesn't close input and output file.

2020-07-25 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

pickle and pickletools use argparse with FileType which is not automatically 
closed. Other cli interfaces like json [0], ast [1] use context manager to 
close filetype objects.

pickle : 
https://github.com/python/cpython/blob/af08db7bac3087aac313d052c1a6302bee7c9c89/Lib/pickle.py#L1799

mypickle

>>> import pickle
>>> with open("mypickle", "wb") as f: pickle.dump({"a": 1}, f)

./python -Wall -m pickle mypickle
{'a': 1}
sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='mypickle'>

pickletools : 
https://github.com/python/cpython/blob/af08db7bac3087aac313d052c1a6302bee7c9c89/Lib/pickletools.py#L2850-L2855

./python -Wall -m pickletools mypickle -o mypickle.py
sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='mypickle'>
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='mypickle.py' 
mode='w' encoding='UTF-8'>


[0] 
https://github.com/python/cpython/blob/af08db7bac3087aac313d052c1a6302bee7c9c89/Lib/json/tool.py#L61
[1] 
https://github.com/python/cpython/blob/af08db7bac3087aac313d052c1a6302bee7c9c89/Lib/ast.py#L1510

--
components: Library (Lib)
messages: 374269
nosy: alexandre.vassalotti, xtreak
priority: normal
severity: normal
status: open
title: pickle and pickletools cli interface doesn't close input and output file.
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41392] SyntaxError rather than NameError

2020-07-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

As an example of why it's not possible for the compiler to treat this as a 
syntax error: I use python for my config files. Before I load these files, I 
inject names into the builtins, so that the config files can reference them. 
Some of these are constants, others are callbacks. "false" or anything else 
could be one of the injected names.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41394] Document '_' in interpreter in shell tutorial

2020-07-25 Thread wyz23x2


Change by wyz23x2 :


--
nosy: +xtreak

___
Python tracker 

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



[issue41394] Document '_' in interpreter in shell tutorial

2020-07-25 Thread wyz23x2


wyz23x2  added the comment:

But there's nothing in https://docs.python.org/3/tutorial/interpreter.html. It 
should be stated there.

--
components:  -Interpreter Core
nosy:  -xtreak
title: Make '_' behavior in shell more clear -> Document '_' in interpreter in 
shell tutorial

___
Python tracker 

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



[issue41394] Make '_' behavior in shell more clear

2020-07-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

There is also some docs for _ at 
https://docs.python.org/3/reference/lexical_analysis.html#reserved-classes-of-identifiers

--
nosy: +xtreak

___
Python tracker 

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



[issue41393] Fix FAQ example to use __import__('functools').reduce

2020-07-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree that the example is okay as-is.

Plus, I can't see us using __import__ in examples. "import" is the preferred 
way to load modules.

Although now that I think about it, maybe __import__ would fit in with the 
subject "Is it possible to write obfuscated one-liners in Python?"!

--
nosy: +eric.smith

___
Python tracker 

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



[issue41394] Make '_' behavior in shell more clear

2020-07-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

I haven't checked to see what's documented. I'm sure we'd accept a patch that 
improves the documentation if it's lacking.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41394] Make '_' behavior in shell more clear

2020-07-25 Thread wyz23x2


wyz23x2  added the comment:

I think this should be documented more clearly. Or else users might feel 
surprised:
>>> print(123)
123
>>> _
Traceback (most recent call last):  
  
File "", line 1, in  
  
NameError: name '_' is not defined 
>>> # There is an expression!?

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
title: Behiavior of '_' strange in shell -> Make '_' behavior in shell more 
clear

___
Python tracker 

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



[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

This behaviour is documented at 
https://docs.python.org/3/library/sys.html#sys.displayhook.

--

___
Python tracker 

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



[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi wyz23x2, did you do that from a clean interpreter?

_ is set to the last non-None result: 
https://github.com/python/cpython/blob/dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0/Python/sysmodule.c#L690-L696

So what you are seeing is that (None and True) is None, but _ is set to some 
value that you got from a previous input.

I think the component for this report is "Interpreter core".

--
components: +Interpreter Core
nosy: +remi.lapeyre

___
Python tracker 

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



[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread wyz23x2


New submission from wyz23x2 :

>>> (None and True)
>>> print(_)
False
>>> print((None and True))  # Not same?!
None
>>> 

This isn't right.

P.S. What component should this be? IDLE? It's the shell, not just IDLE. Core? 
Not that deep!

--
messages: 374260
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Behiavior of '_' strange in shell
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41393] Fix FAQ example to use __import__('functools').reduce

2020-07-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41393] Fix FAQ example to use __import__('functools').reduce

2020-07-25 Thread Henk-Jaap Wagenaar


Henk-Jaap Wagenaar  added the comment:

It doesn't raise an error when you run the whole example, it has "from 
functools import reduce" at the top.

--
nosy: +cryvate

___
Python tracker 

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



[issue41393] Fix FAQ example to use __import__('functools').reduce

2020-07-25 Thread wyz23x2


New submission from wyz23x2 :

https://docs.python.org/3/faq/programming.html#is-it-possible-to-write-obfuscated-one-liners-in-python
https://github.com/python/cpython/blob/3.8/Doc/faq/programming.rst
The 3rd raises a NameError because reduce was moved into functools. 
__import__('functools').reduce should fix this.

--
assignee: docs@python
components: Documentation
messages: 374258
nosy: docs@python, wyz23x2
priority: normal
severity: normal
status: open
title: Fix FAQ example to use __import__('functools').reduce
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue41392] SyntaxError rather than NameError

2020-07-25 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The compiler cannot know if "false" is an existing name when compiling. 

One example is that the name might refer to the name of a builtin.

--
nosy: +ronaldoussoren
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue41362] Regenerating parser table fails (windows)

2020-07-25 Thread Constant Marks


Constant Marks  added the comment:

Maybe I am doing something wrong.  I fetched the 3.10 alpha release, made a 
simple edit to line 93 in Grammer. 

pass_stmt: 'pass' | 'proceed'

Ran: 
>build.bat -d --regen

Successfully compiles with:
warning : Pegen updated. You will need to rebuild pythoncore to see the changes.

So I run:
> build.bat -d

But after all this I still get the runtime Name error that 'proceed' is not 
defined.

I have tried build.bat -t:cCleanAll bit it still does not work.  

Are there some extra steps with the new PEG parser?

--

___
Python tracker 

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



[issue41384] tkinter raises TypeError when it's supposed to raise TclError

2020-07-25 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> behavior
versions: +Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41392] SyntaxError rather than NameError

2020-07-25 Thread wyz23x2


Change by wyz23x2 :


--
title: SyntaxError rather than NameError error -> SyntaxError rather than 
NameError

___
Python tracker 

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



[issue41392] SyntaxError rather than NameError error

2020-07-25 Thread wyz23x2


wyz23x2  added the comment:

There is nothing *wrong* with the syntax; it's just a regular assignment.
It's not something like `False = 4` or `while = 6` which '=' is invalid.

--
nosy: +wyz23x2
title: Syntax error rather than run time error -> SyntaxError rather than 
NameError error

___
Python tracker 

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



[issue41349] idle not going full screen when I rotate screen 90° on mac

2020-07-25 Thread Tim Z


Tim Z  added the comment:

idle shell window
https://imgur.com/zuyuOaS

--

___
Python tracker 

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



[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2020-07-25 Thread Edward K Ream


Edward K Ream  added the comment:

Hello all,

This is a "sideways" response to this issue. I have been dithering about 
whether to give you a heads up. I hope you won't mind...

I have just announced the leoAst.py on python-announce-list. You can read the 
announcement here: 

https://github.com/leo-editor/leo-editor/issues/1565#issuecomment-654904747

Imo, leoAst.py solves many of the concerns mentioned in the first comment of 
this thread. leoAst.py is certainly a different approach.

Also imo, the TOG and TOG in leoAst.py plug significant holes in python's ast 
and tokenize modules. These classes might be candidates for python's ast 
module. If you're interested, I will be willing to do further work. If not, I 
completely understand.

As shown in the project's history, a significant amount of invention and 
discovery was required. The root of much of my initial confusion and 
difficulties was the notion that "real programmers don't use tokens". In fact, 
I discovered that the reverse is true. Tokens contain the ground truth. In many 
cases, the parse tree doesn't.

I would be interested in your reactions.

--
nosy: +edreamleo

___
Python tracker 

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



[issue41392] Syntax error rather than run time error

2020-07-25 Thread Philip R Brenan


New submission from Philip R Brenan :

a = false

# Traceback (most recent call last):
#   File "test.py", line 1, in 
# a = false
# NameError: name 'false' is not defined
# Compilation finished successfully.

Please make this a syntax error rather than a run time error as the user 
intention is obvious and there cannot possibly be a variable called 'false' yet.

--
components: Build
messages: 374252
nosy: philiprbre...@gmail.com
priority: normal
severity: normal
status: open
title: Syntax error rather than run time error
type: compile error

___
Python tracker 

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



[issue41390] Errors and warnings on generate bytecode files

2020-07-25 Thread Tomasz Kloczko


Tomasz Kloczko  added the comment:

Issue is that this command ends with non-zero exit code.

--

___
Python tracker 

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



[issue41387] Escape needed in the email documentation example

2020-07-25 Thread Antonio Gutierrez


Antonio Gutierrez  added the comment:

>
> OK, I will do that.
>
>

--

___
Python tracker 

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



[issue41391] Make test_unicodedata pass when running without network

2020-07-25 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


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

___
Python tracker 

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



[issue41391] Make test_unicodedata pass when running without network

2020-07-25 Thread Chih-Hsuan Yen


New submission from Chih-Hsuan Yen :

I setup a buildbot worker to test Python 3.x on Android monthly. This month 
network in the Android emulator is broken and I got an additional test failure:

0:05:28 load avg: 1.21 [376/423/11] test_unicodedata failed
test test_unicodedata failed -- Traceback (most recent call last):
  File "/data/local/tmp/lib/python3.10/urllib/request.py", line 1342, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
socket.gaierror: [Errno 7] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/local/tmp/lib/python3.10/test/test_unicodedata.py", line 329, in 
test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
urllib.error.URLError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/local/tmp/lib/python3.10/test/test_unicodedata.py", line 335, in 
test_normalization
self.fail(f"Could not retrieve {TESTDATAURL}")
AssertionError: Could not retrieve 
http://www.pythontest.net/unicode/13.0.0/NormalizationTest.txt

I propose wrapping the test in socket_helper.transient_internet() so that this 
test is skipped if the Internet is not available.

--
components: Tests
messages: 374249
nosy: yan12125
priority: normal
severity: normal
status: open
title: Make test_unicodedata pass when running without network
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-25 Thread Nico


Nico  added the comment:

Yeah I see the point.

To me it does make no sense because even in the windows API they seam to not 
know whether to use a ulong or a uint nor does this reflect the actual 
depiction within the program. 

However it is probably not worth implementing a flag for that nor to change the 
behavior entirely. This will create more problems than it would fix ambiguity. 

Thanks for taking the time and sorry for the inconvenience.

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

___
Python tracker 

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



[issue41344] SharedMemory crash when size is 0

2020-07-25 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


Removed file: https://bugs.python.org/file49339/-.txt

___
Python tracker 

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



[issue41344] SharedMemory crash when size is 0

2020-07-25 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


Removed file: https://bugs.python.org/file49338/lose.html

___
Python tracker 

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



[issue41344] SharedMemory crash when size is 0

2020-07-25 Thread 5YN15T3R_742 SeT1aP DeTiK


Change by 5YN15T3R_742 SeT1aP DeTiK :


Added file: https://bugs.python.org/file49339/-.txt

___
Python tracker 

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



[issue41344] SharedMemory crash when size is 0

2020-07-25 Thread 5YN15T3R_742 SeT1aP DeTiK


Change by 5YN15T3R_742 SeT1aP DeTiK :


Added file: https://bugs.python.org/file49338/lose.html

___
Python tracker 

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