[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
Change by YoSTEALTH : -- keywords: +patch pull_requests: +5013 stage: -> patch review ___ Python tracker ___

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-11 Thread bbayles
Change by bbayles : -- pull_requests: +5016 ___ Python tracker ___ ___ Python-bugs-list

[issue32534] Speed-up list.insert

2018-01-11 Thread Jeethu Rao
New submission from Jeethu Rao : I've noticed that replacing the for loop in the ins1 function in listobject.c with a memmove when the number of pointers to move is greater than 16 seems to speed up list.insert by about 3 to 4x on a contrived benchmark. # Before

[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-11 Thread bbayles
Change by bbayles : -- keywords: +patch pull_requests: +5015 stage: needs patch -> patch review ___ Python tracker ___

[issue32534] Speed-up list.insert

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are results when set the threshold to 0 or 1? -- nosy: +serhiy.storchaka ___ Python tracker

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide benchmark results to demonstrate the benefits of this change. -- nosy: +serhiy.storchaka ___ Python tracker

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2018-01-11 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +5012 stage: -> patch review ___ Python tracker ___

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
Change by YoSTEALTH : -- pull_requests: -5004 ___ Python tracker ___ ___

[issue32533] SSLSocket read/write thread-unsafety

2018-01-11 Thread Alexey Baldin
New submission from Alexey Baldin : _ssl.c has thread-usafe code in implementation of read, write and other methods. E.g. 'write' method: 2099PySSL_BEGIN_ALLOW_THREADS 2100len = SSL_write(self->ssl, b->buf, (int)b->len); 2101

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread Christian Heimes
Christian Heimes added the comment: I already blocked the PR with a request for benchmarks and proper tests. -- nosy: +christian.heimes ___ Python tracker

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
YoSTEALTH added the comment: Ok, updated the patch to account for: - improved memory usage for bytes io using readinto - still supporting negative length - potential encoding mismatch bug fix while using text io did i miss anything? --

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
Change by YoSTEALTH : -- pull_requests: +5014 ___ Python tracker ___ ___

[issue32533] SSLSocket read/write thread-unsafety

2018-01-11 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +steve.dower ___ Python tracker ___ ___

[issue32534] Speed-up list.insert

2018-01-11 Thread Jeethu Rao
Change by Jeethu Rao : -- keywords: +patch pull_requests: +5017 stage: -> patch review ___ Python tracker ___

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +5008 stage: -> patch review ___ Python tracker ___

[issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s)

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2018-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Honestly I have no strong opinion. Correct code should not be affected, if somebody want to handle task cancellation explicitly -- he already have `except CancelledError` in his code. What are use cases for intentional catching

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +5009 ___ Python tracker ___ ___

[issue28429] ctypes fails to import with grsecurity's TPE

2018-01-11 Thread Bartek Banachewicz
Change by Bartek Banachewicz : -- keywords: +patch pull_requests: +5010 stage: -> patch review ___ Python tracker ___

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
YoSTEALTH added the comment: Martin, your points got me thinking... to make a proper copy of a file, it should be done using bytes! Text IO could easily lead to corrupting your file. for example (current function): with open(old_path, 'r', encoding='latin-1') as

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0a2da50e1867831251fad75377d0f10713eb6301 by Serhiy Storchaka in branch 'master': bpo-31993: Do not create frames for large bytes and str objects (#5114)

[issue17128] OS X system openssl deprecated - installer should build local libssl

2018-01-11 Thread Cosimo Lupo
Cosimo Lupo added the comment: Hello, I see that the official Python.org OSX 10.6+ installers are still linking with OSX outdated OpenSSL (0.9.8zh 14 Jan 2016; I'm using macOS High Sierra 10.13.2). In the installer's README, they motivates this because: > Apple's 0.9.8

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +5007 stage: -> patch review ___ Python tracker ___

[issue32528] Change base class for futures.CancelledError

2018-01-11 Thread Марк Коренберг
Марк Коренберг added the comment: @gvanrossum More real code: async def (): while True: try: result = await download() handle_result(result) except Exception as e: log.warning('Fail..%r', e) await

[issue17799] settrace docs are wrong about "c_call" events

2018-01-11 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be okay to let ValuesView inherit from Collection. Am marking this a 3.7 only because it isn't important to anyone's actual code and there is no known use case. Technically, it isn't even a bug. The __contains__

[issue17799] settrace docs are wrong about "c_call" events

2018-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: Is there any reason not to respond to "c_call" events in trace function? -- nosy: +xiang.zhang ___ Python tracker

[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2018-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Third parties are not python core devs responsibility. I don't aware about existing library with such functionality. -- ___ Python tracker

[issue29240] PEP 540: Add a new UTF-8 mode

2018-01-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset cb3ae5588bd7733e76dc09277bb7626652d9bb64 by Victor Stinner in branch 'master': bpo-29240: Ignore UTF-8 Mode in time module (#5148) https://github.com/python/cpython/commit/cb3ae5588bd7733e76dc09277bb7626652d9bb64

[issue32528] Change base class for futures.CancelledError

2018-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Inheritance from Exception is very annoying, I saw issues with unexpected suppressing CancelledError many times. Even experienced people constantly forget to add a separate `except asyncio.CancelledError` clause everywhere. But

[issue32534] Speed-up list.insert

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In your benchmarks the difference between thresholds is only 4%. It would be not worth to keep a special case for such small benefit. But note that in your benchmarks you inserted in a list with the size up to 5 elements.

[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2018-01-11 Thread Sebastian Bank
Sebastian Bank added the comment: I am not sure about the design vs. code bug distinction, but what makes me think this should be fixed is primarily the broken round-trip (already mentioned above): >>> import io, csv >>> def roundtrip(value, **fmtparams):

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Yahya Abou Imran
Yahya Abou Imran added the comment: Perfect for me. I was about to submit about the same patch as yours after your acceptation; but it's better that way, it's your module! Thanks Raymond. -- ___ Python tracker

[issue32534] Speed-up list.insert

2018-01-11 Thread Jeethu Rao
Jeethu Rao added the comment: I tried it with a couple of different thresholds, twice each, ignoring the results of the first run. 16 seems to be the sweet spot. THRESHOLD = 0 jeethu@dev:cpython (3.7_list_insert_memmove)$ ./python -m timeit -s "l = []" "for _ in

[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2018-01-11 Thread Sebastian Bank
Sebastian Bank added the comment: https://bugs.python.org/issue15927#msg309811 gives sme code examples illustrating why I think this should be backported (and also the documentation should be changed for both Python 2 and 3). -- nosy: +xflr6

[issue12178] csv writer doesn't escape escapechar

2018-01-11 Thread Sebastian Bank
Sebastian Bank added the comment: Hi, is there something we can do to get this going? As the issue breaks round-trip, it currently requires work-arounds like this: https://github.com/cldf/csvw/blob/1324550266c821ef32d1e79c124191e93aefbfa8/csvw/dsv.py#L67-L71

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Bruno Abreu Calfa
New submission from Bruno Abreu Calfa : File msvcr140.dll does not exist after installing Microsoft Visual C++ 2015 Redistributable or Visual Studio 2015. It has been replaced with vcruntime140.dll. See discussion here:

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-11 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- assignee: belopolsky -> ___ Python tracker ___

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
YoSTEALTH added the comment: here is the links to benchmark: https://repl.it/@altendky/timeit-of-proposed-shutilfileobjcopy https://gist.github.com/altendky/ff5ccee2baf9822dce69ae8aa66a0fdf https://paste.pound-python.org/show/urORPXztcbDlqXKTORAj/ # time

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Steve Dower
Steve Dower added the comment: Where is that code? Presumably in distutils, and yet distutils has worked just fine for the 3.5 and 3.6 releases. Perhaps you can clarify the bug report into something we can understand and investigate? That only thing in that thread I

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Bruno Abreu Calfa
Bruno Abreu Calfa added the comment: Steve, I tried building the pyhsmm project (https://github.com/mattjj/pyhsmm) using: python setup.py build -c mingw32 I got a link error saying that -lmsvcr140 could not be found. Then I realized that msvcr140.dlll doesn't exist.

[issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior

2018-01-11 Thread Greg Lindahl
Change by Greg Lindahl : -- nosy: +wumpus ___ Python tracker ___ ___ Python-bugs-list

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Serhiy, I am sorry for a delay, I have recently moved to another country, this is why I have not much time. I will try to work on this weekend. Here are some points where you can be helpful: * Make a short documentation PR for

[issue32533] SSLSocket read/write thread-unsafety

2018-01-11 Thread Steve Dower
Steve Dower added the comment: Almost seems like an unwinnable race here. We need to collect the error numbers before reacquiring the GIL (which could change some of them), but then if we update the object after getting the lock back we could still have raced with

[issue32346] Speed up slot lookup for class creation

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The relative speed up looks nice. But it is just few microseconds per class. You have to create many thousands of classes to gain a significant fraction of second. And the complexity added by this patch is not tiny. I'm not

[issue31113] Stack overflow with large program

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Antoine. I have merged the PR since resolving issue24340 allowed to simplify the code for the stack depth calculation. -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue27643] test_ctypes fails on AIX with xlc

2018-01-11 Thread Michael Felt
Michael Felt added the comment: On 04/08/2016 10:58, Martin Panter wrote: > Martin Panter added the comment: > > Okay, so to be clear, I am assuming XLC supports all of the following fields, > and uses unsigned bit fields by default: > > struct UNSIGNED_BITS { >

[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-01-11 Thread Grzegorz Grzywacz
Grzegorz Grzywacz added the comment: No, this PR originally fix similar but different issue. However it also fix issue29406 as a side effect. -- ___ Python tracker

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can I help? I'm implementing the feature related to pickling classes, and want to implement pickling generic types as an example. But since PEP 560 will change all here, I need to wait this change. --

[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-01-11 Thread Alexander Mohr
Alexander Mohr added the comment: @grzgrzgrz3, does this resolve the issue in https://bugs.python.org/issue29406 ? I'm guessing you based this PR on that issue. If so I'd like it merged ASAP as otherwise our prod services will be incompatible with all future python

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2018-01-11 Thread Alexander Mohr
Alexander Mohr added the comment: my understanding is that the PR in https://bugs.python.org/issue30698 fixes this issue no? If so can we get it merged? -- ___ Python tracker

[issue31113] Stack overflow with large program

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 782d6fe4434381c50e0c7ec94a1ef9c6debbc333 by Serhiy Storchaka in branch 'master': bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)

[issue29992] Expose parse_string in JSONDecoder

2018-01-11 Thread Bob Ippolito
Bob Ippolito added the comment: Generally speaking, parsing some things as decimal or datetime are schema dependent. It's unlikely that you would want to parse every string that looks enough like a decimal as a decimal, or that you would want to pay the cost of checking

[issue29992] Expose parse_string in JSONDecoder

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Bob. -- ___ Python tracker ___

[issue27643] test_ctypes fails on AIX with xlc

2018-01-11 Thread Michael Felt
Michael Felt added the comment: On 30/07/2016 02:51, Martin Panter wrote: > Martin Panter added the comment: > > > ./python -m unittest -v ctypes.test.test_bitfields > > What I am suggesting as a fix is to change line 381 from plain “int” to > “signed int”, and 382 to

[issue24340] co_stacksize estimate can be highly off

2018-01-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32346] Speed up slot lookup for class creation

2018-01-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 11/01/2018 à 20:25, Serhiy Storchaka a écrit : > > I'm not sure how this caching works when change the parent class after > creating the child class. The caching is invalidated at the same place the method cache is invalidated. > Without

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Ned Deily
Change by Ned Deily : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Bruno Abreu Calfa
Bruno Abreu Calfa added the comment: Correct. I installed the x86_64 version from mingw32-w64 (https://mingw-w64.org, v5.0.3). I found this post https://mingwpy.github.io/ucrt.html, which actually references a post of yours. I honestly don't know if UCRT is supported by

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Steve Dower
Steve Dower added the comment: The CRT isn't a simple DLL anymore, and MinGW isn't a fully supported compiler either. You're going to be best to work with the people behind mingwpy to get it working, as there really isn't anything we can do on our end (though I do

[issue32535] msvcr140.dll has been replaced with vcruntime140.dll

2018-01-11 Thread Steve Dower
Steve Dower added the comment: A little bit. You're trying to build with mingw32? Do they support linking against the UCRT? -- ___ Python tracker

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 02556fbade5e1e864dd09d5768a8dbbf5b3a0dac by Raymond Hettinger in branch 'master': bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152)

[issue32467] dict_values isn't considered a Collection nor a Container

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32449] MappingView must inherit from Collection instead of Sized

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2018-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 0c3be9651f4f149f4a78bb7043d26db9e75cabc0 by Raymond Hettinger in branch 'master': bpo-31145: Use dataclasses to create a prioritization wrapper (#5153)

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2018-01-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32533] SSLSocket read/write thread-unsafety

2018-01-11 Thread Alexey Baldin
Alexey Baldin added the comment: I'd gather errno and win error into local variables (or struct) just after SSL call and then pass them to PySSL_SetError. -- ___ Python tracker