[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-19 Thread Steve Dower
Steve Dower added the comment: Reminder to myself (or permission for anyone else) to merge this. My phone won't let me actually click the github merge button, unfortunately, but this seems good to go. -- ___ Python tracker

[issue34294] re.finditer and lookahead bug

2019-01-19 Thread Ma Lin
Ma Lin added the comment: Serhiy Storchaka lost his sight. Please stop any work and rest, because your left eye will have more burden, and your mental burden will make it worse. Go to hospital ASAP. If any other core developer want to review this patch, I would like to give a detailed

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Dong-hee Na
Dong-hee Na added the comment: Umm looks like I should pass an argument on cmd to reproduce it. I will try to reproduce it later -- ___ Python tracker ___

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Dong-hee Na
Dong-hee Na added the comment: No crash at Python 3.7.2+ (heads/3.7:47290e7642, Jan 20 2019, 12:22:44) and master branch -- nosy: +corona10 ___ Python tracker ___

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch, patch, patch pull_requests: +11378, 11379, 11380 stage: -> patch review ___ Python tracker ___

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +11378 stage: -> patch review ___ Python tracker ___ ___

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch, patch pull_requests: +11378, 11379 stage: -> patch review ___ Python tracker ___

[issue35775] Add a general selection function to statistics

2019-01-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Rémi. I've read over your patch and have some comments: (1) You call sorted() to produce a list, but then instead of retrieving the item using ``data[i-1]`` you use ``itertools.islice``. That seems unnecessary to me. Do you have a reason for using

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Eric Fahlgren
Eric Fahlgren added the comment: After a bit more digging, it's a side effect of having the locale set with 'Plural-Forms'. I've attached the resulting .mo file, but since it's a binary, I'm not sure it will work cross-platform, so here's how to recreate it. > cat en_US/LC_MESSAGES/foo.po

[issue35766] Merge typed_ast back into CPython

2019-01-19 Thread Anthony Sottile
Anthony Sottile added the comment: > You’d be surprised how tenacious old versions are. heh that's true, at my last job we finally got rid of python2.6 in 2016 :'( anyway -- I don't mean to discourage this, definitely seems valuable to the maintenance of mypy! --

[issue24119] Carry comments with the AST

2019-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: See also issue35766. -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35766] Merge typed_ast back into CPython

2019-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: You’d be surprised how tenacious old versions are. Anywa, I am working on this on my copious spare time — you can follow my progress at https://github.com/gvanrossum/cpython/tree/ast-type-comments?files=1 . --

[issue35786] get_lock() method is not present for Values created using multiprocessing.Manager()

2019-01-19 Thread Lorenzo Persichetti
New submission from Lorenzo Persichetti : According to the documentation of the multiprocessing.Value() class available here https://docs.python.org/3.6/library/multiprocessing.html#multiprocessing.Value Operations like += which involve a read and write are not atomic. So if, for instance,

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Anthony Sottile
Anthony Sottile added the comment: Can you provide a reproducer? I'm having difficulty reproducing with this script: import argparse p = argparse.ArgumentParser() p.add_argument('--foo', nargs=None) args = p.parse_args() $ python3.7 --version Python 3.7.2 $ python3.7 t.py --foo usage:

[issue35766] Merge typed_ast back into CPython

2019-01-19 Thread Anthony Sottile
Anthony Sottile added the comment: Seems also related to https://bugs.python.org/issue24119 with python2 / python3.5 (hopefully) rapidly falling off in usage I would assume the specialized treatment of `# type: ...` comments would become less and less necessary Though I guess there's still

[issue35766] Merge typed_ast back into CPython

2019-01-19 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: > It was discussed before, and there is a closed issue. That is a non-answer. The above patch is correct and achieves an essential goal of the lru_cache to save space when possible (avoid an unnecessary extra tuple per entry). Also, please apply the

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35533] argparse standard error usage for exit / error

2019-01-19 Thread Vinay Badhan
Vinay Badhan added the comment: Add documentation for exit() function -- keywords: +patch nosy: +vinayb21 pull_requests: +11377 stage: -> patch review ___ Python tracker ___

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Eric Fahlgren
New submission from Eric Fahlgren : When argparse is configured with an option that takes arguments, then the script is invoked with the switch but no arguments, a nonsensical exception is raised during gettext processing. In the 3.7.1 source, the error is at line 2077 of argparse.py, where

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-19 Thread Eric Fahlgren
Change by Eric Fahlgren : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-01-19 Thread Tal Einat
Tal Einat added the comment: This is due to the test using a 50ms delay on hover, and checking "immediately" after generating an "" event that it hasn't triggered yet. Note that this isn't actually "immediately": The Tk root's update() is called in between to simulate having a live Tk

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-19 Thread David Heiberg
Change by David Heiberg : -- pull_requests: +11374 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-19 Thread David Heiberg
Change by David Heiberg : -- pull_requests: +11374, 11375 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-19 Thread David Heiberg
Change by David Heiberg : -- pull_requests: +11374, 11375, 11376 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35778] RF: ``pathlib.Path.checksum()`` member

2019-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry, but it does not make sense to me (not would it make sense to add e.g. a JPEG decoder to pathlib). Each project or application would want their own checksumming specification and pathlib does not have to cater to that. -- resolution: ->

[issue35766] Merge typed_ast back into CPython

2019-01-19 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35782] Missing whitespace after comma in randrange raise error

2019-01-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > I previously close this issue is because not sure if someone rely on > exception string to do something, should we consider this? I think this is a valid issue since error messages have been modified in the past. I am not sure if this will be

[issue35507] multiprocessing: seg fault when creating RawArray from numpy ctypes

2019-01-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am closing this with third party as resolution. Feel free to reopen this if it's an issue with multiprocessing and CPython. Thanks for triaging. -- nosy: +xtreak resolution: -> third party stage: -> resolved status: open -> closed

[issue35782] Missing whitespace after comma in randrange raise error

2019-01-19 Thread Louie Lu
Louie Lu added the comment: I previously close this issue is because not sure if someone rely on exception string to do something, should we consider this? -- ___ Python tracker

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Operations with the linked list are atomic (guarded with the GIL), while operations with the cache dict are not. That is why links are removed first from the linked list and added back in case of error. -- ___

[issue35507] multiprocessing: seg fault when creating RawArray from numpy ctypes

2019-01-19 Thread Anthony Sottile
Anthony Sottile added the comment: yes, please do -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If so, then why is the link being moved to the front of the lru_cache -- it > should have remained at the oldest position. It may be unintentionally. In any case, this is a case that should be very rare. > The solution to this is only extract the link

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > After the check for popresult==Py_None, there is the comment that was mostly > copied from the Python version but doesn't match the actual code: Seems the comment was placed at wrong place. And it should be updated since locks are not used, but the GIL.

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > would it be reasonable to emulate the pure python code and return a scalar > instead of a tuple when the tuple length is one and there are no keyword > arguments or typing requirements? It was discussed before, and there is a closed issue. I am not sure

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not PyErr_Print(). Maybe PyErr_WriteUnraisable(). -- ___ Python tracker ___ ___

[issue35784] document that hashlib.new takes kwargs

2019-01-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +christian.heimes, gregory.p.smith versions: +Python 3.7, Python 3.8 ___ Python tracker ___

[issue35784] document that hashlib.new takes kwargs

2019-01-19 Thread Jörn Heissler
New submission from Jörn Heissler : This code works: hashlib.new('blake2b', b'foo', digest_size=7) https://github.com/python/cpython/blob/master/Lib/hashlib.py#L7 documents the function as: new(name, data=b'', **kwargs) But the **kwargs argument is missing in

[issue35779] Print friendly version message in REPL

2019-01-19 Thread Ma Lin
Ma Lin added the comment: It's interesting to see the a Python 1.5.2 from April 1999 :) Thanks for your opinion, let me explain: We only print simplified message in official binary release, any Linux/private builds still using the current message. We know enough information about official

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: - Demonstration of one of the bugs - # The currsize is initially equal to maxsize of 10 # Then we cause an orphan link in a full cache # The currsize drops to 9 and never recovers the full size of 10 from functools import lru_cache once

[issue35782] Missing whitespace after comma in randrange raise error

2019-01-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch pull_requests: +11369, 11370, 11371 stage: needs patch -> patch review ___ Python tracker ___

[issue35782] Missing whitespace after comma in randrange raise error

2019-01-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch, patch pull_requests: +11369, 11370, 11371, 11372 stage: needs patch -> patch review ___ Python tracker ___

[issue35782] Missing whitespace after comma in randrange raise error

2019-01-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch pull_requests: +11369, 11370 stage: needs patch -> patch review ___ Python tracker ___

[issue35782] Missing whitespace after comma in randrange raise error

2019-01-19 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11369 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-01-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: > The “urllib.parse” module generally follows RFC 3986, which does not > allow a literal backslash in the “userinfo” part: And yet the parse() function seems to allow arbitrary unescaped characters. This is from 3.8.0a0: py> from urllib.parse import

[issue35783] incorrect example of fetching messages in imaplib documentation

2019-01-19 Thread Макс Вернер
New submission from Макс Вернер : An example of fetching messages from the mailbox given in "IMAP4 Example" section is incorrect: typ, data = M.fetch(num, '(RFC822)') print('Message %s\n%s\n' % (num, data[0][1])) "fetch" may return server data that was not requested (see "7.4.2. FETCH

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Suggested code for the open question listed above: --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -733,6 +733,15 @@ lru_cache_make_key(PyObject *args, PyObject *kwds, int typed) /* short path, key will match args anyway, which

[issue35507] multiprocessing: seg fault when creating RawArray from numpy ctypes

2019-01-19 Thread Dong-hee Na
Dong-hee Na added the comment: Looks like the numpy PR was merged. We can close this issue? -- nosy: +corona10 ___ Python tracker ___

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-19 Thread Tzu-ping Chung
Change by Tzu-ping Chung : -- nosy: +uranusjr ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: