[issue40640] Tutorial for Continue missing ... line

2020-05-22 Thread Florian Dahlitz


Florian Dahlitz  added the comment:

Please go head @docor...@sonic.net! It's a good one to get familiar with the 
process of contributing. Yes, PR stands for Pull Request.

There is the devguide (https://devguide.python.org/), which documents how to 
contribute. In fact, the quick guide may be sufficient. Feel free to ask any 
further questions, I'm eager to help!

--

___
Python tracker 

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



[issue40648] Test file mode on Windows

2020-05-22 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: File mode is not tested on Windows -> Test file mode on Windows

___
Python tracker 

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



[issue40648] File mode is not tested on Windows

2020-05-22 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
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



[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> The documentation of PyErr_SetObject, PyErr_SetString et al should also be 
> updated to mention exception chaining.

I just posted a PR to do the above:
https://github.com/python/cpython/pull/20329

--

___
Python tracker 

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



[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-22 Thread Chris Jerdonek


Change by Chris Jerdonek :


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

___
Python tracker 

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



[issue37129] Add os.RWF_APPEND flag for os.pwritev

2020-05-22 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.9

___
Python tracker 

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



[issue37129] Add os.RWF_APPEND flag for os.pwritev

2020-05-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

YoSTEALTH, are you both allowed and willing to do so? The patch is not 
completely trivial and you seem to have the needed knowledge.  (I don't.)

--

___
Python tracker 

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



[issue40738] backspace character \b not processed by IDLE

2020-05-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am considering terminal simulation as an option, but there is not exactly a 
standard to emulate.  \b originally meant the same as the typewrite backspace 
and modern US computer keyboard left arrow key <- (move cursor left without 
erasing), which would result in 'delete filed' in insert mode, but sometimes 
now is interpreted the same as modern US computer keyboard backspace (erase and 
move left), as you expect.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE: Document how Shell displays user code output

___
Python tracker 

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



[issue40710] IDLE: Malfunctioning of '\r'

2020-05-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Note that 'sciencecomputer' is a different possible result if \r does not 
switch the simulated terminal from the normal insert mode to overwrite mode.  I 
am considering terminal simulation as an option in IDLE, but there is not 
exactly a standard to emulate.

--
resolution: not a bug -> duplicate
superseder:  -> IDLE: Document how Shell displays user code output
title: Malfunctioning of '\r' (ii) -> IDLE: Malfunctioning of '\r'
versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40640] Tutorial for Continue missing ... line

2020-05-22 Thread Chas Belov


Chas Belov  added the comment:

Um, Python newcomer here. What's a PR? Pull request?

I'm happy to do it if you can point me to the how-to. I know my way around git, 
and not around Python community standards. 

You are also welcome to go ahead and make the change; thank you for asking.

--

___
Python tracker 

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



[issue40708] Clearing the screen of IDLE interactive mode in Windows

2020-05-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

See #23220 for backspace and return behavior.

--
versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40738] backspace character \b not processed by IDLE

2020-05-22 Thread Stan Hendryx


New submission from Stan Hendryx :

The backspace character \b is not processed correctly in IDLE 3.8.2:
>>> print("deleted\b file")
deleted file

Running the interpreter from Terminal, it works:
>>> print("deleted\b file")
delete file

Same result on two systems: MacBook Pro, one on OSX 10.14.6 and another on 
10.13.6.

--
assignee: terry.reedy
components: IDLE
messages: 369685
nosy: stanhx, terry.reedy
priority: normal
severity: normal
status: open
title: backspace character \b not processed by IDLE
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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset dc3239177ff26cb6a12e437a1f507be730fe8ba7 by Miss Islington (bot) 
in branch '3.8':
bpo-40439: Update broken link in lexical analysis docs (GH-20184)
https://github.com/python/cpython/commit/dc3239177ff26cb6a12e437a1f507be730fe8ba7


--

___
Python tracker 

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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset 962c814ca77fb1873908f2daeda59c2637ad3bf1 by Miss Islington (bot) 
in branch '3.9':
bpo-40439: Update broken link in lexical analysis docs (GH-20184)
https://github.com/python/cpython/commit/962c814ca77fb1873908f2daeda59c2637ad3bf1


--

___
Python tracker 

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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset 0af9bef61afffbf128aba76a2e578059621b4f00 by Miss Islington (bot) 
in branch '3.7':
bpo-40439: Update broken link in lexical analysis docs (GH-20184)
https://github.com/python/cpython/commit/0af9bef61afffbf128aba76a2e578059621b4f00


--

___
Python tracker 

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



[issue40439] Error in an external reference

2020-05-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@audpa31, thank you for the report and @Akarys, thank you for the pull request.

--
nosy: +cheryl.sabella
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



[issue40733] Make IDLE doc more visible, mention in main python docs page

2020-05-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree that finding the online doc is slight pain.  It is not listed in the 
Modules index because idlelib, not IDLE, is the stdlib module, and does not 
have a doc page.  I may add one or, if possible, make the page serve as one, as 
part of this issue.  'IDLE' *is* in the Index, and the first link is the 
correct one.

I don't control and would not unilaterally change the main page.  I am hesitant 
because I expect that there are people who would think it unfair or deceptive 
to especially promote IDLE this way versus other stdlib packages and non-stdlib 
IDEs and editors.  I might subscribe to and post on python-ideas to see what 
other users think.

Help => IDLE Help displays an offline copy of idle.html as of the release date 
in a tktinker text window.  Have you noticed that?  Would "IDLE doc" be clearer?

I could also add label with the online url and date above the text.
[https://docs.python.org/3.x/library/idle.html as of ]

--
nosy: +taleinat
stage:  -> needs patch
title: mention IDLE in main python docs page -> Make IDLE doc more visible, 
mention in main python docs page
versions: +Python 3.10, 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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19596
pull_request: https://github.com/python/cpython/pull/20328

___
Python tracker 

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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19595
pull_request: https://github.com/python/cpython/pull/20327

___
Python tracker 

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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19594
pull_request: https://github.com/python/cpython/pull/20326

___
Python tracker 

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



[issue40439] Error in an external reference

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset af23f0d3cf19343512e6ca1fe1d46a5dbe425719 by Matteo Bertucci in 
branch 'master':
bpo-40439: Update broken link in lexical analysis docs (GH-20184)
https://github.com/python/cpython/commit/af23f0d3cf19343512e6ca1fe1d46a5dbe425719


--
nosy: +miss-islington

___
Python tracker 

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



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-05-22 Thread Ned Deily


Ned Deily  added the comment:

Irv, thanks for the feedback and the attempt. I think we had a little bit of a 
misunderstanding on our end so I don't think we need you to try anything more 
for this problem.

Terry, I apologize if I left the impression that there was some doubt about 
whether the double-clicking failure was due to a problem in IDLE. This is 
almost certainly a Tk issue but ultimately we need to be able to address the 
problem for python.org macOS installers. That's what I am working on right at 
the moment. I should have something for you and Tal to look at soon and we can 
proceed from there. Thanks!

--
priority: normal -> critical

___
Python tracker 

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



[issue40552] Enhance for loop and copy example in tutorial

2020-05-22 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

Thanks for the PR Antoine Wecxsteen. I will close this.

--
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



[issue32398] OSX C++ linking workaround in distutils breaks other packages

2020-05-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I'm going to close this as the OP hasn't responded in over 2 years and Ronald 
was -1 on the solution.  If the OP or someone else experiences this same 
problem, either this issue or a new one can be opened to address it.  Thank you!

--
nosy: +cheryl.sabella
resolution:  -> out of date
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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> If you add a Py_INCREF before, the crash disappears.

To be clear: the other crash is still in the reproduced: the one that Petr 
describes in his comment. In PR 20264 I have prepared the changes that I 
proposed previously (including the revert of the hack). Petr, do you mind 
reviewing it?

--

___
Python tracker 

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



[issue40552] Enhance for loop and copy example in tutorial

2020-05-22 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset 6fad3e6b49f6a9f8b8a6635c41371e4451479f86 by Antoine in branch 
'master':
bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)
https://github.com/python/cpython/commit/6fad3e6b49f6a9f8b8a6635c41371e4451479f86


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue26415] Excessive peak memory consumption by the Python parser

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Closing as we have a new parser in 3.9 and the current one will be removed in 
Python 3.10.

--
resolution:  -> rejected
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



[issue38693] Use f-strings instead of str.format within importlib

2020-05-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Did you want this one to land in 3.9?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2020-05-22 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +belopolsky, p-ganssle
versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-05-22 Thread Irv Kalb


Irv Kalb  added the comment:

Thanks Ned and Terry for your responses.

Ned: I am currently teaching a course where my students and I are all using 
Python 3.7 and the current Pygame 1.9.6, so unfortunately, I cannot update to 
the newer development release of 2.0.  I am also writing a book on OOP using 
Pygame, and that is currently dependent on the same Pygame release.

Terry:  I tried following your steps.  I opened the appropriate file 
(idlelib.filelist), and added the line at the appropriate place.  But when I go 
to save, I get a message:

[Errno 13] Permission denied: 
'Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/filelist.py'

So I cannot save the file.

I tried opening the same file a simple text editor, BBEdit, and made the same 
change.  When I went to save I got a message:

Are you sure you want to unlock filelist.py?  You aren't a member of the group 
'wheel'.
  Cancel   Unlock

I chose Unlock, saved and quit.  The Finder shows a new date for the file.  But 
when I double clicked on my Python 3.7 icon, or if I double click on any Python 
file, IDLE no longer opens.  

I went back into BBEdit, removed the new line, saved again.  Now I can open 
IDLE as before.  

I don't have a good feel for what files I am supposed to be "allowed" to edit, 
so I don't know what to try next.  If you have any suggestions about how I can 
add your debugging line successfully, I'm happy to help.

--

___
Python tracker 

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



[issue37129] Add os.RWF_APPEND flag for os.pwritev

2020-05-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

The PR for this issue has been closed, but the issue is now open for someone 
else to make a PR for it.  Please credit the original author in the new PR.

--
keywords:  -patch
nosy: +cheryl.sabella
stage: patch review -> needs patch
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, I found the problem. The problem is that the reproduced does not correctly 
work the reference count of base_class because when construction get tuple of 
bases:

PyObject *bases = PyTuple_New(1);
result = PyTuple_SetItem(bases, 0, base_class);
if (result) return -1;

PyObject *subclass = PyType_FromModuleAndSpec(m, _spec, bases);

"PyTuple_SetItem" steals a reference to base_class but "PyModule_AddObject" 
also does the same, and the refcount is incorrect.

If you add a Py_INCREF before, the crash disappears.

--

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have been playing with the reproducer and I am a bit confused: The reproducer 
crashes in the same way even after reverting PR 19414 so it does not seem 
related to it. This is what I get:

>>> import reproducer
>>> reproducer.Modules/gcmodule.c:114: gc_decref: Assertion "gc_get_refs(g) > 
>>> 0" failed: refcount is too small
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x55cf429e4080
object refcount : 4
object type : 0x55cf418e9c60
object type name: type
object repr : 

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x7fc65d2f8740 (most recent call first):
  File "", line 917 in _find_spec
  File "", line 982 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "/home/pablogsal/github/python/master/Lib/re.py", line 124 in 
  File "", line 228 in _call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "/home/pablogsal/github/python/master/Lib/rlcompleter.py", line 142 in 
attr_matches
  File "/home/pablogsal/github/python/master/Lib/rlcompleter.py", line 89 in 
complete
[1]162397 abort (core dumped)  ./python

This seems to indicate that that reproducer is already implementing incorrectly 
tp_traverse.

--

___
Python tracker 

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



[issue40327] list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration

2020-05-22 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
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



[issue38938] Possible performance improvement for heaqq.merge()

2020-05-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks.  I'll look at this shortly.  We're getting much closer.

Just so that I don't lose other work I've done, am uploading new_merge2.py with 
in-line iterative tree construction of the initial tree.

--
Added file: https://bugs.python.org/file49184/new_merge2.py

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2020-05-22 Thread William Pickard


William Pickard  added the comment:

I'll get to it Saturday.

--

___
Python tracker 

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



[issue40663] Wrong generated annotation on subscripting

2020-05-22 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue40663] Wrong generated annotation on subscripting

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a4d219b35e35f9efc406cd70f2812275bcd989fe by Batuhan Taskaya in 
branch '3.8':
[3.8] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c 
(GH-20156). (GH-20191)
https://github.com/python/cpython/commit/a4d219b35e35f9efc406cd70f2812275bcd989fe


--

___
Python tracker 

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



[issue40663] Wrong generated annotation on subscripting

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 43300148c5f30317ebf767aa8853a957ee5c87fb by Batuhan Taskaya in 
branch '3.7':
[3.7] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c 
(GH-20156). (GH-20192)
https://github.com/python/cpython/commit/43300148c5f30317ebf767aa8853a957ee5c87fb


--

___
Python tracker 

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



[issue40663] Wrong generated annotation on subscripting

2020-05-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +19593
pull_request: https://github.com/python/cpython/pull/20324

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset 1e5cf949ce36b6fe45db0e5e4a26c856c3b44278 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-39631: Adds NEWS entry (GH-20227) (GH-20241)
https://github.com/python/cpython/commit/1e5cf949ce36b6fe45db0e5e4a26c856c3b44278


--

___
Python tracker 

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



[issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")

2020-05-22 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Wouldn't Floyd's or Brent's cycle detection algorithms be better here than the 
allocation of a new set? I believe they might also eliminate the need to 
fast-path the first 100 or however many.

As in: https://en.wikipedia.org/wiki/Cycle_detection

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset 0cc7becde0bfe896fd23b5cb14fedfb8f2066fca by Miss Islington (bot) 
in branch '3.8':
bpo-40214: Fix ctypes WinDLL test with insecure flags (GH-19652)
https://github.com/python/cpython/commit/0cc7becde0bfe896fd23b5cb14fedfb8f2066fca


--

___
Python tracker 

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



[issue40327] list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset 16d07812dd3833295cc001d19eea42eecbdb6ea5 by Miss Islington (bot) 
in branch '3.8':
bpo-40327: Improve atomicity, speed, and memory efficiency of the items() loop 
(GH-19628)
https://github.com/python/cpython/commit/16d07812dd3833295cc001d19eea42eecbdb6ea5


--

___
Python tracker 

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



[issue39073] email incorrect handling of crlf in Address objects.

2020-05-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

There are 3 open PRs for the backport of this to 3.6, 3.7, and 3.8.  It looks 
like they just need to be approved and miss-islington will take care of the 
rest.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue40737] Handle PyModule_AddObject() error correctly in sqlite3

2020-05-22 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +19592
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20323

___
Python tracker 

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



[issue40737] Handle PyModule_AddObject() error correctly in sqlite3

2020-05-22 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

According to the documentation, PyModule_AddObject() only decrements the 
reference count of value on success. The calling code must PyDECREF() manually 
on error.

Fixed by attached patch.

--
components: Library (Lib)
files: 0001-Use-PyModule_AddObject-correctly-in-sqlite3.patch
keywords: patch
messages: 369658
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: Handle PyModule_AddObject() error correctly in sqlite3
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9
Added file: 
https://bugs.python.org/file49183/0001-Use-PyModule_AddObject-correctly-in-sqlite3.patch

___
Python tracker 

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



[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I just want to point out one difference between _PyErr_ChainExceptions and 
PyErr_SetObject that I encountered while working on this issue:
https://bugs.python.org/issue40696

While both functions set the context, only PyErr_SetObject does a check to 
prevent cycles from forming in the context chain (albeit an incomplete check, 
which can lead to hangs, which I mention in the issue linked above).

--

___
Python tracker 

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



[issue40731] CWI url's protocol on LICENSE file from http to https

2020-05-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

It works just fine with http:// (redirects to https).

Thanks for testing our workflow. It works just fine.

--
resolution:  -> not a bug
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



[issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")

2020-05-22 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
stage: patch review -> needs patch
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Good to hear, Mariusz! And thanks for the report!

Also, as discussed above, I'm leaving this issue open (and retitling) until the 
following more general issue is fixed:

try:
raise RuntimeError
except Exception as exc:
print(f'handling: {exc!r}')
exc.__context__ = exc
raise ValueError  # hangs

As I mentioned above, I believe this is because _PyErr_SetObject() only checks 
for cycles that involve the exception being raised. In this case, the cycle 
involves the exception one further down:
ValueError -> RuntimeError -> RuntimeError -> RuntimeError -> ...

--
title: Exception handling with "await" can hang in Python3.9.0b1 -> exception 
chain cycles cause hangs  (was "Exception handling with "await" can hang in 
Python3.9.0b1")

___
Python tracker 

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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:


New changeset 7f77ac463cff219e0c8afef2611cad5080cc9df1 by Miss Islington (bot) 
in branch '3.9':
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
https://github.com/python/cpython/commit/7f77ac463cff219e0c8afef2611cad5080cc9df1


--

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> _PyObject_FunctionString as discussed here ( 
> https://bugs.python.org/issue37645 ) returns a string that also includes the 
> module name where applicable.

By the way, Dennis, regarding the above, one thing I noticed is that Python 
doesn't currently expose a convenient way to get the fully qualified name of a 
class (the "full name" as opposed to the qualified name). It might be worth 
exploring what that would involve. I think it would be useful, personally.

--

___
Python tracker 

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



[issue19756] test_nntplib: sporadic failures, network isses? server down?

2020-05-22 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
nosy:  -chris.jerdonek

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2020-05-22 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
nosy:  -chris.jerdonek

___
Python tracker 

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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19591
pull_request: https://github.com/python/cpython/pull/20322

___
Python tracker 

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



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-22 Thread Chris Jerdonek


New submission from Chris Jerdonek :

This TypeError could be a bit better:

"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", 
line 293, in test_with_statement
if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/re.py", line 
201, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

It just says "expected string or bytes-like object" but could include what type 
it found.

--
components: Library (Lib)
messages: 369652
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: better message for re.search TypeError ("expected string or bytes-like 
object")
type: enhancement
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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread Mariusz Felisiak


Mariusz Felisiak  added the comment:

Chris, many thanks for detailed explanation, extensive investigation, and a fix!

We'll also review Django's code in the next few days.

--

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

See also: https://bugs.python.org/issue40735 (test_with_statement)

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue19756] test_nntplib: sporadic failures, network isses? server down?

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

See also: https://bugs.python.org/issue40735 (test_with_statement)

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue40735] test_nntplib: sporadic failures, NetworkedNNTP_SSLTests.test_with_statement

2020-05-22 Thread Chris Jerdonek


New submission from Chris Jerdonek :

A sporadic failure of test_nntplib.NetworkedNNTP_SSLTests.test_with_statement 
on the CI for macOS:
https://github.com/python/cpython/pull/20321/checks?check_run_id=700729471#step:6:612

See also:
* https://bugs.python.org/issue19613 (test_article_head_body)
* https://bugs.python.org/issue19756 (test_capabilities)

ERROR: test_with_statement (test.test_nntplib.NetworkedNNTP_SSLTests)
--
Traceback (most recent call last):
  File 
"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", 
line 277, in test_with_statement
server = self.NNTP_CLASS(self.NNTP_HOST,
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", 
line 1025, in __init__
super().__init__(host, port, user, password, readermode,
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", 
line 334, in __init__
self.sock = self._create_socket(timeout)
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", 
line 1031, in _create_socket
sock = _encrypt_on(sock, self.ssl_context, self.host)
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/nntplib.py", 
line 292, in _encrypt_on
return context.wrap_socket(sock, server_hostname=hostname)
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/ssl.py", line 
500, in wrap_socket
return self.sslsocket_class._create(
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/ssl.py", line 
1040, in _create
self.do_handshake()
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/ssl.py", line 
1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1097)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", 
line 250, in wrapped
meth(self)
  File 
"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py", 
line 293, in test_with_statement
if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
  File "/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/re.py", line 
201, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

--
components: Tests
messages: 369648
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: test_nntplib: sporadic failures, 
NetworkedNNTP_SSLTests.test_with_statement
type: behavior

___
Python tracker 

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



[issue38490] statistics: add covariance, Pearson's correlation, and simple linear regression

2020-05-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@steven.daprano and @tim.peters, please take a look at the PR as it is just 
waiting on your approval.  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Thanks again, Dennis!

--
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



[issue40679] show class name in method invocation TypeError

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:


New changeset b5cc2089cc354469f12eabc7ba54280e85fdd6dc by Dennis Sweeney in 
branch 'master':
bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)
https://github.com/python/cpython/commit/b5cc2089cc354469f12eabc7ba54280e85fdd6dc


--

___
Python tracker 

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



[issue40734] /usr/bin surprisingly in sys.path under IDLE

2020-05-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +doko

___
Python tracker 

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



[issue40732] New realpath breaks setuptools_scm

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Good news is it looks like the issue with setuptools_scm can be address in a 
relatively straightforward manner 
(https://github.com/pypa/setuptools_scm/issues/436#issuecomment-632899446).

I think that means the answers to the above questions are:

- Downstream users do not need to avoid the use of realpath.
- When using realpath, make sure to do it consistently, especially before 
invoking relpath.

--
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



[issue40733] mention IDLE in main python docs page

2020-05-22 Thread paul rubin


Change by paul rubin :


--
title: mention IDLE in main python ocs page -> mention IDLE in main python docs 
page

___
Python tracker 

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



[issue40734] /usr/bin surprisingly in sys.path under IDLE

2020-05-22 Thread paul rubin


New submission from paul rubin :

This is in the standard python 3.7.3 install under Debian 10.  It's possible 
that this is on purpose, and it's (separately) possible that the Debian 
packagers did this for some reason.  I'm not sure it's a bug but am reporting 
it as it's an oddity that might warrant looking into.

When I look at sys.path in the IDLE shell, the path includes /usr/bin, which is 
not there under the normal python prompt.  Since /usr/bin is not a place where 
python modules usually live, it's a bit strange to find it on the path.  It 
doesn't seem healthy since it could lead to surprises.  But maybe I'm missing 
something.

Feel free to close this if the inclusion is intentional.

--
assignee: terry.reedy
components: IDLE
messages: 369643
nosy: phr, terry.reedy
priority: normal
severity: normal
status: open
title: /usr/bin surprisingly in sys.path under IDLE
type: behavior
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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread Chris Jerdonek


Chris Jerdonek  added the comment:


New changeset 7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e by Chris Jerdonek in 
branch 'master':
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
https://github.com/python/cpython/commit/7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e


--

___
Python tracker 

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



[issue40696] Exception handling with "await" can hang in Python3.9.0b1

2020-05-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +19590
pull_request: https://github.com/python/cpython/pull/20321

___
Python tracker 

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



[issue40732] New realpath breaks setuptools_scm

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

To make matters more complicated, `git rev-parse --show-toplevel` also returns 
the realpath:

```
# git rev-parse --show-toplevel
//vmware-host/Shared Folders/home/code/main/path
```

--

___
Python tracker 

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



[issue40733] mention IDLE in main python ocs page

2020-05-22 Thread Ned Deily


Change by Ned Deily :


--
components: +IDLE
nosy: +terry.reedy

___
Python tracker 

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



[issue40733] mention IDLE in main python ocs page

2020-05-22 Thread paul rubin


New submission from paul rubin :

The IDLE documentation is in https://docs.python.org/3/library/idle.html which 
is not where I'd have thought to look for it, since I think of IDLE as an 
application rather than a library.  So I looked for it on the main docs page, 
docs.python.org, and didn't find it there.  I ended up finding it by web 
search.  

I guess its current location is reasonable, but maybe a link to it could be 
included in docs.python.org's main page left side navigation panel, or IDLE 
could simply be mentioned in the entry for library documentation.

--
assignee: docs@python
components: Documentation
messages: 369640
nosy: docs@python, phr
priority: normal
severity: normal
status: open
title: mention IDLE in main python ocs page
type: enhancement

___
Python tracker 

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



[issue40732] New realpath breaks setuptools_scm

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

It's because on Unix:

```
>>> os.path.relpath('/Users/jaraco/code/main/path/.flake8', '')
'.flake8'
```

But on Windows, relpath raises an error for the comparable call:

```
>>> os.path.relpath('vmware-host\\shared 
>>> folders\\home\\code\\main\\path\\.flake8', '')
ValueError: path is on mount 'vmware-host\\shared folders', start on mount 
'C:'
```

So it seems it may not be a bug in Python, but merely a consequence of Python 
3.8 honoring symlinks in realpath, and exposing the unfortunate weakness of 
resolving relative real paths when root volumes aren't in a shared namespace.

Does Python have any advice for downstream users running into this or similar 
issues? If they want cross-platform compatibility, must they avoid use of 
realpath? Do you have any tips specific to what setuptools_scm is doing?

--

___
Python tracker 

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



[issue40728] UnboundLocalError as a result of except statement variable re-assignment

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I don't think the examples you mention is proof of inconsistent behaviour:

> * list expressions do have their scope and do not overwrite local variables

comprehensions have their own scope in Python 3 and this is documented. General 
blocks (like normal loops, exceptions, with statements...etc don't have their 
own scope).

* with statement does overwrite the variable value but makes it available even 
after with block 

Yeah, but with statements do not have the problem of needing to break reference 
cycles in the exception names, so this does not apply. The same for any other 
"target" variable such as loop assignment (for x in ...).

* except overwrites variable value, but then the value gets cleaned and no 
longer accessible.

This is a consequence of the fact that when you do 'as varname' you are 
voluntary overwriting the previous value, therefore loosing whatever was there 
before. The semantics here are that the variable is not accessible outside the 
except block, which is unique to except blocks but this is needed to avoid 
circular references.

--

___
Python tracker 

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



[issue40103] ZipFile.extractall is not multiprocess safe with regard to directory creation.

2020-05-22 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +serhiy.storchaka, twouters

___
Python tracker 

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



[issue40105] Updating zip comment doesn't truncate the zip file

2020-05-22 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +serhiy.storchaka, twouters

___
Python tracker 

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



[issue40732] New realpath breaks setuptools_scm

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

It seems the underlying reason the behavior fails is the (intended) difference 
resolving the empty path to a realpath when a symlink points to another volume. 
The failing routine invokes realpath early 
(https://github.com/pypa/setuptools_scm/blob/d7c122e14c9eaca96574dec0ea530ad7204965a9/src/setuptools_scm/file_finder.py#L19).

```
path master # pwd
C:\Users\jaraco\code\main\path
path master # py -3.7 -c "import os; print(os.path.realpath(''))"
C:\Users\jaraco\code\main\path
path master # py -3.8 -c "import os; print(os.path.realpath(''))"
\\vmware-host\Shared Folders\home\code\main\path
```

But that doesn't explain why this issue would not have been triggered on 
non-Windows systems.

--

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> What would be the downsides of reverting and documenting that tp_traverse 
> must visit Py_TYPE(self)?

Not much IMHO, I actually would prefer this solution over any automatic 
"hacks". The reason is that any hack will be technically violating the 
contract: if I read the tp_traverse of any of these classes I would say "wait a 
minutethis is wrong: the class owns a strong reference to its parent 
so...why is not visiting it?". But the answer would be that we are hacking 
because we didn't want to force users to migrate once we added the strong 
reference.


Notice that the root of this problem was bpo-35810. In that issue we added a 
guide to the docs: 
https://docs.python.org/3/whatsnew/3.8.html#changes-in-the-c-api. In  there it 
says that you should decref now the parent on tp_dealloc:

static void
foo_dealloc(foo_struct *instance) {
PyObject *type = Py_TYPE(instance);
PyObject_GC_Del(instance);
#if PY_VERSION_HEX >= 0x0308
// This was not needed before Python 3.8 (Python issue 35810)
Py_DECREF(type);
#endif
}

but it forgot about that you should also visit the parent in tp_traverse.

So, I propose to do the following:

* Revert the hack.
* Fix the tp_traverse of all the relevant classes in the stdlib to correctly 
visit its parent.
* Modify the documentation of master, 3.9 and 3.8 to add the missing 
information: You MUST visit the parent in tp_traverse:

What do you think?

--

___
Python tracker 

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



[issue40720] accessing mmap of file that is overwritten causes bus error

2020-05-22 Thread Marten H. van Kerkwijk


Marten H. van Kerkwijk  added the comment:

I should probably have added that the bus error happens on linux. On Windows, 
the opening of the file for writing leads to an error, as the file is still 
opened for reading inside the mmap.

--

___
Python tracker 

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



[issue40506] add support for os.Pathlike filenames in zipfile.ZipFile.writestr

2020-05-22 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +serhiy.storchaka, twouters
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



[issue40732] New realpath breaks setuptools_scm

2020-05-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
nosy: +eryksun

___
Python tracker 

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



[issue40730] Odd sentence in 3.9 What's New

2020-05-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks, @DahlitzFlorian!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing

2020-05-22 Thread Zachary Ware


Change by Zachary Ware :


--
components: +Library (Lib), Tests -asyncio

___
Python tracker 

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



[issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing

2020-05-22 Thread Zachary Ware


Zachary Ware  added the comment:

Adding multiprocessing and concurrent.futures experts.

--
components:  -Tests
nosy: +bquinlan, davin, pitrou
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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-22 Thread Petr Viktorin


Change by Petr Viktorin :


Added file: https://bugs.python.org/file49182/reproducer.c

___
Python tracker 

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



[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-05-22 Thread Petr Viktorin


Petr Viktorin  added the comment:

Ha! I think I found the issue in PySide now. It's different, but it's still a 
CPython issue. It's actually a variant of the "defining class" problem from PEP 
573.


It's legal to get the value of a slot, using PyType_GetSlot.
It's reasonable to assume that what you put in the tp_traverse slot is what 
you'll get out using PyType_GetSlot.
If a type's tp_traverse tries to call its superclass's tp_traverse, you can get 
an infinite loop.
See the situation below or run attached reproducer (build the module, import it 
and exit
the interpreter).

Getting one's superclass is a bit tricky when dealing entirely with FromSpec
types, but it is definitely *possible*. There's a lot of assumptions the code
can reasonably make. In my reproducer, I stored the superclass in a C static
variable (which is perfectly valid if the module cleanly refuses to work with
subinterpreters or interpreter reload).


Base:
- real tp_traverse is PyType_FromSpec_tp_traverse
- user_provided_tp_traverse is the base's original

Subclass:
- real tp_traverse is PyType_FromSpec_tp_traverse
- user_provided_tp_traverse is the subclass' original

So when the subclass is traversed:
- subclass real tp_traverse calls the subclass user_provided_tp_traverse
- subclass user_provided_tp_traverse calls PyType_GetSlot(base, tp_traverse)
  - that is, the base's real tp_traverse
- the base's real tp_traverse calls the **SUBCLASS** user_provided_tp_traverse,
  since that's what's recorded in type(self)



Another issue is that `PyType_FromSpec_Alloc`ated types lie about their size:
`tp->tp_basicsize + Py_SIZE(self) * tp->itemsize` is not the actual
allocated amount. This could technically be solved by redefining `__sizeof__`,
but I'm more worried that it's another edge case of a hack, and There will
probably be other edge cases. Since this is API we want to build on, I'd sleep
easier if it's kept clean.


What would be the downsides of reverting and documenting that tp_traverse
must visit Py_TYPE(self)?
It seems that you visit Py_TYPE(self), it could just end up with unbreakable
reference cycles. We're dealing with modules and classes, which are usually
effectively immortal (and if not, the author probably knows what they're doing).
I don't think it would hurt that much.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue40728] UnboundLocalError as a result of except statement variable re-assignment

2020-05-22 Thread Oleksandr Suvorov


Oleksandr Suvorov  added the comment:

Mark, 
I'm not sure if this is even documented, 
I find this a bit inconsistent when compared to the behavior of other 
statements, 
E.g.: 
* list expressions do have their scope and do not overwrite local variables
* with statement does overwrite the variable value but makes it available even 
after with block 
* except overwrites variable value, but then the value gets cleaned and no 
longer accessible. 

I do understand why this happens, but I find this undesirable. At least some 
consistency will be nice to have, or this should be documented. Otherwise, it 
confuses.

--

___
Python tracker 

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



[issue40654] shutil.copyfile mutates symlink for absolute path

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> Perhaps related...

Now I'm thinking the issue is different, so I've created issue40732 to track 
the realpath issue.

--

___
Python tracker 

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



[issue40732] New realpath breaks setuptools_scm

2020-05-22 Thread Jason R. Coombs


New submission from Jason R. Coombs :

I've encountered an apparent regression on Python 3.8 on Windows when the 
current working directory is in a symlink to another volume and one runs 
`setup.py develop` on a project using setuptools_scm 
(https://github.com/pypa/setuptools_scm/issues/436).

I suspect the issue stems from changes in issue9949 and is likely a 
manifestation of the issues articulated by Eryk in issue9949#msg350138.

--
components: Windows
keywords: 3.8regression
messages: 369629
nosy: jaraco, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: New realpath breaks setuptools_scm
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



[issue40654] shutil.copyfile mutates symlink for absolute path

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> I'll see if `realpath` satisfies the test suite needs for path pie.

I've tried replacing `readlink` with `realpath` and the tests still pass on 
Unix-like OSs, and also passes on Python 3.8 on Windows, but now fails on older 
Pythons on Windows.

Is there a backport of the new realpath for older Pythons? I see there's [one 
here](https://github.com/jaraco/jaraco.windows/blob/1318d7afce2a9257f5bd7342783fdb796462d66b/jaraco/windows/filesystem/backports.py#L7).
 I wonder if that one can be used.

--

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2020-05-22 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2020-05-22 Thread Brett Cannon


Brett Cannon  added the comment:

And now there's https://pypi.org/project/httpcore/ which wraps h2 and h11 into 
a single, low-level API.

--

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2020-05-22 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue23721] Set up a daily test coverage run

2020-05-22 Thread Brett Cannon


Brett Cannon  added the comment:

We have coverage after every push now at https://codecov.io/gh/python/cpython.

--

___
Python tracker 

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



[issue9216] FIPS support for hashlib

2020-05-22 Thread miss-islington


miss-islington  added the comment:


New changeset a08b7c3bb0ef9da32400d23b13f78245cd7a9541 by Miss Islington (bot) 
in branch '3.9':
bpo-9216: hashlib usedforsecurity fixes (GH-20258)
https://github.com/python/cpython/commit/a08b7c3bb0ef9da32400d23b13f78245cd7a9541


--

___
Python tracker 

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



[issue23389] pkgutil.find_loader raises an ImportError on PEP 420 implicit namespace packages

2020-05-22 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue40654] shutil.copyfile mutates symlink for absolute path

2020-05-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Perhaps related, I've encountered another apparent regression on Python 3.8 on 
Windows when the current working directory is in a symlink to another volume 
and one runs `setup.py develop` on a project using setuptools_scm 
(https://github.com/pypa/setuptools_scm/issues/436).

--

___
Python tracker 

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



[issue40726] ast.Call end_lineno is defined and returns None

2020-05-22 Thread David Strobach


David Strobach  added the comment:

> Actually, Xonsh tests show that keyword AST nodes are missing 'lineno' 
> attribute, but that could be our fault.

Yes, our fault. Sorry for the noise.

--

___
Python tracker 

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



[issue9216] FIPS support for hashlib

2020-05-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19589
pull_request: https://github.com/python/cpython/pull/20320

___
Python tracker 

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



  1   2   >