[issue35766] Merge typed_ast back into CPython

2019-01-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue35793] round() doesn't return the right value when I put 0.5 in it.

2019-01-20 Thread Ned Deily
Change by Ned Deily : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue35793] round() doesn't return the right value when I put 0.5 in it.

2019-01-20 Thread Dong-hee Na
Dong-hee Na added the comment: Please read the documentation of round builtin function. https://docs.python.org/3/library/functions.html#round For the built-in types supporting round(), values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally c

[issue35793] round() doesn't return the right value when I put 0.5 in it.

2019-01-20 Thread Mingun Pak
New submission from Mingun Pak : It should be 1, but it returns 0. -- components: Library (Lib) files: Screen Shot 2019-01-20 at 9.40.52 PM.png messages: 334112 nosy: Mingun Pak priority: normal severity: normal status: open title: round() doesn't return the right value when I put 0.5 i

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-20 Thread Ned Deily
Ned Deily added the comment: Merged on behalf of Steve. Thanks, Marc! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

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

2019-01-20 Thread Ned Deily
Change by Ned Deily : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue12707] Deprecate addinfourl getters

2019-01-20 Thread Demian Brecht
Change by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue20582] socket.getnameinfo() does not document flags

2019-01-20 Thread Demian Brecht
Demian Brecht added the comment: What if the docs for socket functions that took system-level flag parameters had links to relevant online man pages? I don't think a single entry at the top of the page would be optimal. I know that I tend to skip the preamble and just go directly to the func

[issue20582] socket.getnameinfo() does not document flags

2019-01-20 Thread Demian Brecht
Change by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-01-20 Thread Christopher Hunt
New submission from Christopher Hunt : Currently AbstractEventLoop.run_in_executor is specified as a coroutine, while BaseEventLoop.run_in_executor is actually a non-coroutine that returns a Future object. The behavior of BaseEventLoop.run_in_executor would be significantly different if chang

[issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily

2019-01-20 Thread Demian Brecht
Change by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +11392, 11393, 11394 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +11392 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +11392, 11393 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue35722] disable_existing_loggers does not apply to the root logger

2019-01-20 Thread Cheryl Sabella
Change by Cheryl Sabella : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker ___

[issue35722] disable_existing_loggers does not apply to the root logger

2019-01-20 Thread Cheryl Sabella
Change by Cheryl Sabella : -- stage: -> patch review versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34656] memory exhaustion in Modules/_pickle.c:1393

2019-01-20 Thread Matej Cepl
Matej Cepl added the comment: Does it even make sense to make a security patch for 2.7 for this one? -- nosy: +mcepl ___ Python tracker ___ ___

[issue17005] Add a topological sort algorithm

2019-01-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: (A, B, C, D, E, F) would not be correct as B is order 2 and "C" and "A" is order 1. The correct orders are the inner-group permutations of: [{'A', 'F'}, {'B', 'D', 'E'}, {'C'}] (Assuming that the lower diagram goes from top to bottom) -- ___

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

2019-01-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: You are not using multiprocessing.Value: >>> import multiprocessing >>> x = multiprocessing.Value("i", 0) >>> x.get_lock() -- nosy: +pablogsal ___ Python tracker __

[issue28607] C implementation of parts of copy.deepcopy

2019-01-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hy Rasmus, would you like to make a PR with your patch and adding some tests? Thanks! -- nosy: +pablogsal ___ Python tracker ___ ___

[issue17005] Add a topological sort algorithm

2019-01-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > 2) Topological sorting usually is well-defined on totally connected graphs, > so I do not know what exactly it means to topologically sort two disjoint > graphs. This was one of the main drawbacks of the tuple-based approach, but I > think it may be a good pr

[issue17005] Add a topological sort algorithm

2019-01-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Although I think the API with the dictionary may be cleaner, I still do not like it completely. 1) One of the reasons is that implementing C3 directly with the topological sort is not straightforward as the different nodes that are at the same level

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2019-01-20 Thread Oscar Benjamin
Oscar Benjamin added the comment: Sorry, sent too soon... > Matlab doesn't support even weighted mean as far as I can tell. There > is wmean on the matlab file exchange: https://stackoverflow.com/a/36464881/9450991 This is a separate function `wmean(data, weights)`. It has to be a separate fu

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2019-01-20 Thread Oscar Benjamin
Oscar Benjamin added the comment: > I would find it very helpful if somebody has time to do a survey of > other statistics libraries or languages (e.g. numpy, R, Octave, Matlab, > SAS etc) and see how they handle data with weights. Numpy has only sporadic support for this. The standard mean fu

[issue17005] Add a topological sort algorithm

2019-01-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have updated the PR to receive a dictionary of sets as in Eric V. Smith's package. I have maintained the guts of the current algorithm as it scales much better: >>> test_data = {x:{x+n for n in range(100)} for x in range(1000)} >>> %timeit list(topo

[issue17005] Add a topological sort algorithm

2019-01-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have updated the PR to receive a dictionary of sets as in Eric V. Smith's package. I have maintained the guts of the current algorithm as it scales much better: >>> test_data = {x:{x+n for n in range(100)} for x in range(1000)} >>> %timeit list(topo

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-20 Thread miss-islington
miss-islington added the comment: New changeset 2fa53cfa8960f4bcb36718da4424e980fc305ef5 by Miss Islington (bot) in branch '3.7': bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495) https://github.com/python/cpython/commit/2fa53cfa8960f4bcb36718da4424e980fc305ef5 -

[issue32603] Deprecation warning on strings used in re module

2019-01-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +11389, 11390, 11391 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +11389, 11390 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +11389 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-20 Thread Ned Deily
Ned Deily added the comment: New changeset b2dc4a3313c236fedbd6df664722cd47f3d91a72 by Ned Deily (Marc Schlaich) in branch 'master': bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495) https://github.com/python/cpython/commit/b2dc4a3313c236fedbd6df664722cd47f3d91a72 --

[issue34424] Unicode names break email header

2019-01-20 Thread Jens Troeger
Jens Troeger added the comment: Can somebody please review and merge https://github.com/python/cpython/pull/8803 ? I am still waiting for this fix the become mainstream. -- ___ Python tracker _

[issue35791] Unexpected exception with importlib

2019-01-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: This might be a bug in "py", which uses a vendored version of apipkg that replaces sys.modules["py"] with a lazy loading object. That copy of apipkg does not copy __spec__ into the lazy loading object. If this is indeed consider to be a bug in py I'll file

[issue35791] Unexpected exception with importlib

2019-01-20 Thread Ronald Oussoren
New submission from Ronald Oussoren : Using Python 3.7.2 on macOS 10.14 I get an unexpected exception when calling "importlib.util.find_spec('py')" after importing "py". find_spec works as expected before I import 'py'. See the repl session below: Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 201

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-20 Thread Eric Fahlgren
Eric Fahlgren added the comment: Thanks, I installed 3.7.2 on one of our non-production machines and it appears that gettext has been fixed, so I'm closing this. > python -V Python 3.7.2 > python bpo35785.py --foo usage: bpo35785.py [-h] [--foo FOO] bpo35785.py: error: argument --foo: expecte

[issue35790] Correct a statement about sys.exc_info() values restoration

2019-01-20 Thread Géry
Change by Géry : -- keywords: +patch, patch, patch pull_requests: +11386, 11387, 11388 stage: -> patch review ___ Python tracker ___ ___

[issue35790] Correct a statement about sys.exc_info() values restoration

2019-01-20 Thread Géry
Change by Géry : -- keywords: +patch, patch pull_requests: +11386, 11387 stage: -> patch review ___ Python tracker ___ ___ Python-bu

[issue35790] Correct a statement about sys.exc_info() values restoration

2019-01-20 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +11386 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue35790] Correct a statement about sys.exc_info() values restoration

2019-01-20 Thread Géry
New submission from Géry : In the documentation of the try statement (https://docs.python.org/3/reference/compound_stmts.html#the-try-statement), I think that the sentence: "sys.exc_info() values are restored to their previous values (before the call) when returning from a function that handl

[issue35787] shlex.split inserts extra item on backslash space space

2019-01-20 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that the current behavior makes sense. I think "preserve the literal value of the next character" means the space won't be interpreted as a separator. In the first example (I think better written as shlex.split(r'a \ b')), the first space is a separa

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Samuel Colvin
Samuel Colvin added the comment: Thanks for the explanation David. It would be really useful if this was prominently noted in smtpd, it would have saved me spending my morning fixing these things. There's also (AFAIK) nothing about this being deprecated in the docs. More generally I underst

[issue35789] Typo in unittest.mock docs

2019-01-20 Thread Jim Carroll
Jim Carroll added the comment: Never mindi see this issue has been reported previously and the typo is considered intentional. -- stage: -> resolved status: open -> closed ___ Python tracker __

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread R. David Murray
R. David Murray added the comment: Thanks for being willing to work on this, but smtpd is deprecated in favor of aiosmtpd (which is not part of the stdlib). smtpd should really only be used for internal stdlib testing, but it is retained for backward compatibility reasons. All of these iss

[issue35789] Typo in unittest.mock docs

2019-01-20 Thread Jim Carroll
New submission from Jim Carroll : There is a typo in the unittest.mock documentation found at https://docs.python.org/3/library/unittest.mock.html. There are seven(7) instances of the word assret, where the author clearly intended assert. -- assignee: docs@python components: Document

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Emmanuel Arias
Emmanuel Arias added the comment: > Should I create a new issue(s) for these problems or is there some agreement > that only actual bugs will be fixed in little-used modules like this? I would create new issue for each point to discuss, but I would like listen other opinions -- nosy

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2019-01-20 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi Berker, Thanks for you response. I agree when you say that patch.dict is a simply operation, but I think that this test can be necessary, if for some reason the implementation of patch.dict (or its parts) decide change. > I think the relationship bet

[issue27542] Segfault in gcmodule.c:360 visit_decref

2019-01-20 Thread tjh
tjh added the comment: If you're here looking for a solution, deleting previously installed deps helped me. In my case this was: $ rm -rf ~/.local/lib/python2.7/site-packages/ # path may differ depending where you install these $ pip install cffi -- nosy: +tjh

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch, patch, patch pull_requests: +11381, 11382, 11383 stage: -> patch review ___ Python tracker ___ _

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch, patch pull_requests: +11381, 11382 stage: -> patch review ___ Python tracker ___ ___

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch, patch, patch, patch pull_requests: +11381, 11382, 11383, 11384 stage: -> patch review ___ Python tracker ___ ___

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Samuel Colvin
Change by Samuel Colvin : -- keywords: +patch pull_requests: +11381 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread Samuel Colvin
New submission from Samuel Colvin : smtpd.PureProxy.process_message and smtpd.MailmanProxy.process_message are defined to not receive the extra kwargs which they're called with. They both also expect "data" to be str when it's actually bytes. Thus they're completed broken at the moment. I'd

[issue35787] shlex.split inserts extra item on backslash space space

2019-01-20 Thread Peter Otten
Peter Otten <__pete...@web.de> added the comment: To me the current shlex behaviour makes sense, and the shell (tested with bash) behaves the same way: $ python3 -c 'import sys; print(sys.argv)' a b ['-c', 'a', 'b'] $ python3 -c 'import sys; print(sys.argv)' a \ b ['-c', 'a', ' ', 'b'] ---

[issue35787] shlex.split inserts extra item on backslash space space

2019-01-20 Thread Max
New submission from Max : I believe in both cases below, the ouptu should be ['a', 'b']; the extra ' ' inserted in the list is incorrect: python3.6 Python 3.6.2 (default, Aug 4 2017, 14:35:04) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information.

[issue35785] argparse crashes in gettext when processing missing arguments

2019-01-20 Thread Dong-hee Na
Dong-hee Na added the comment: ➜ cpython.git git:(3.7) ✗ ./python.exe bpo-35785.py --foo test ➜ cpython.git git:(3.7) ✗ ./python.exe bpo-35785.py --foo 1 ➜ cpython.git git:(3.7) ✗ ./python.exe bpo-35785.py --foo usage: bpo-35785.py [-h] [--foo FOO] bpo-35785.py: error: argument --foo: expecte