[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Anish Shah
Anish Shah added the comment: I would like to work on this, if it is okay with Marco? I look at the history of parsetok.c file and I think I can solve this issue. Also, I have a doubt - PEP 492 says that "async and await names will be softly deprecated in CPython 3.5 and 3.6". What exactly

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-02-02 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Jesse, could you please update your patch with a detailed comment summarizing your research? Also it would be great if you can provide a separate patch for 2.7. -- nosy: +yselivanov ___ Python tracker

[issue26268] Update python.org installers to use OpenSSL 1.0.2f

2016-02-02 Thread Zachary Ware
New submission from Zachary Ware: http://openssl.org/news/secadv/20160128.txt -- components: Build, Macintosh, Windows messages: 259422 nosy: ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open

[issue26079] Build with Visual Studio 2015 using PlatformToolset=v120

2016-02-02 Thread Zachary Ware
Zachary Ware added the comment: Perhaps the ideal approach here would be to pass TMP_DIR and OUT_DIR into the Tcl/Tk builds, so we can tell them where to put stuff. However, that would require major surgery to Tix's makefile to get it to build. I'd be +1 on doing so (since we're pretty much

[issue26219] implement per-opcode cache in ceval

2016-02-02 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, Thanks for the initial review. I'll work on the patch sometime later next week. As for test_vicious_descriptor_nonsense -- yeah, I saw that too. I know what's going on there and I know how to fix that. FWIW that test tests a very

[issue26256] Fast decimalisation and conversion to other bases

2016-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: Not really the same, since that issue was more about fast division. But it's the same spirit. It looks like I was more enthusiastic back then; now I'm older and grumpier. It's great to have this stuff, but I don't think it belongs in core Python: I'd much

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue24780] unittest assertEqual difference output foiled by newlines

2016-02-02 Thread Anish Shah
Anish Shah added the comment: The problem is in `difflib.ndiff` function. When the string does not have a trailing newline, we get an unreadable output. After applying my patch, the following is the output of test2.py (submitted by Elena.Oat).

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread SilentGhost
SilentGhost added the comment: Well, you seem to suggest we add something to documentation to accommodate people who don't read it in the first place. -- ___ Python tracker

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: Ok no problem, it was just a suggestion. In asyncio, we try to document behaviour change but asyncio is different. Major functions are still modified, asyncio API is still provisional, but people rely on tehe exact API. --

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2016-02-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Brett Cannon
Brett Cannon added the comment: I'm not quite sure what you mean by "do not know how to check if the deprecation warning are enabled". Do you mean how do you make sure you don't emit a DeprecationWarning if someone hasn't turned warnings on? If that's the case then if you look at some example

[issue26233] select.epoll.poll() should avoid calling malloc() each time

2016-02-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Aside of the performance, my colleague also told me that heavy pressure on > the memory allocator can slowly create framgmentation of the heap memory, > which is true. Right, but there are so many other things which contribute to the memory fragmentation..

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Any change that increases the cache or branch predictor footprint of the evaluation loop may make the interpreter slower, even if the change doesn't seem related to a particular benchmark. That may be the reason here. --

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread Timo Furrer
Changes by Timo Furrer : -- nosy: +tuxtimo ___ Python tracker ___ ___ Python-bugs-list

[issue26269] zipfile should call lstat instead of stat if available

2016-02-02 Thread Patrik Dufresne
New submission from Patrik Dufresne: To mirror the behavior in tarfile, zipfile should make a call to stat instead of lstat if available. Failure to do so resolved into an "IOError No such file or directory" if the filename is a symbolik link being broken. As such, the creation of the archive

[issue25774] [benchmarks] Adjust to allow uploading benchmark data to codespeed

2016-02-02 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue26270] Support for read()/write()/select() on asyncio

2016-02-02 Thread Paulo Costa
New submission from Paulo Costa: I want to read from file descriptors from async coroutines. I currently use `loop.add_reader(fd, callback)` and `loop.remove_reader(fd)` It works, but IMO using callbacks feels completely alien in the middle of a coroutine. I suggest adding new APIs to handle

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: (Crap. I sent an incomplete message, sorry about that.) > Hum, it looks like jemalloc uses *more* memory than libc memory allocators. I > don't know if it's a known I don't know if it's a known issue/property of jemalloc. --

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Brett Cannon
Brett Cannon added the comment: I don't know what "softly deprecate" means. Hopefully someone involved with the PEP can answer that question. -- nosy: +gvanrossum ___ Python tracker

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Yury Selivanov
Yury Selivanov added the comment: > I don't know what "softly deprecate" means. Hopefully someone involved with > the PEP can answer that question. I actually thought about emitting DeprecationWarnings in 3.6 for async/await NAME tokens. I think it's a reasonable thing to do to prepare for

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread Andrew Barnert
New submission from Andrew Barnert: Most real-world code that uses the UUID module wants either the standard format '{12345678-1234-5678-1234-567812345678}', or the same thing without the braces. There are a number of different documented accessors, but none of them give you either of these.

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread Andrew Barnert
Andrew Barnert added the comment: > The docs seem to clearly show a str(x) as the way to produce the desired form > (without braces). https://docs.python.org/3/library/uuid.html#example Please read the last paragraph of the original message. -- ___

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread SilentGhost
SilentGhost added the comment: The docs seem to clearly show a str(x) as the way to produce the desired form (without braces). https://docs.python.org/3/library/uuid.html#example -- nosy: +SilentGhost ___ Python tracker

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2016-02-02 Thread Ent
Changes by Ent : -- status: open -> languishing ___ Python tracker ___ ___

[issue26256] Fast decimalisation and conversion to other bases

2016-02-02 Thread Stefan Krah
Stefan Krah added the comment: Jurjen, this is very nice! -- Like Mark, I'm not sure if this should be in CPython. Decimal (Python >= 3.3) has sneaked in a couple of fast bignum algorithms, so calculating and converting the latest Mersenne prime takes a couple of seconds: from decimal import

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-02 Thread Gedai Tamás Bence
Gedai Tamás Bence added the comment: Antti, would you like to provide a patch? If you don't want to work on it, I can give it a try. -- nosy: +beng94 ___ Python tracker

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2016-02-02 Thread Joseph Hackman
Changes by Joseph Hackman : -- nosy: +Joseph.Hackman ___ Python tracker ___ ___

[issue26079] Build with Visual Studio 2015 using PlatformToolset=v120

2016-02-02 Thread Steve Dower
Steve Dower added the comment: Go ahead. Feel free to add toolsets to cover ICC if you need them. At one point I was passing through those directories for the build and it was not really trivial. A few too many places where it needed to be handled, but with patches against Tix it's probably

[issue26188] Provide more helpful error message when `await` is called inside non-`async` method

2016-02-02 Thread Martin Panter
Martin Panter added the comment: I’m not that familiar with the parser either. Maybe I remember a flag or something saying “we are inside an async def function”, which changes “await” from a user identifier into a reserved keyword. But I can’t imagine how that flag will help much with this

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-02 Thread Zach Byrne
Zach Byrne added the comment: I took another look at this, and tried applying it to 3.6 and running the latest benchmarks. It applied cleanly, and the benchmark results were similar, this time unpack_sequence and spectral_norm were slower. Spectral norm makes sense, it's doing lots of FP

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-02 Thread Yury Selivanov
Yury Selivanov added the comment: unpack_sequence contains 400 lines of this: "a, b, c, d, e, f, g, h, i, j = to_unpack". This code doesn't even touch BINARY_SUBSCR or BINARY_ADD. Zach, could you please run your benchmarks in rigorous mode (perf.py -r)? I'd also suggest to experiment with

[issue26229] Make number serialization ES6/V8 compatible

2016-02-02 Thread Anders Rundgren
Anders Rundgren added the comment: In ES6/V8-compatible implementations which include "node.js", Chrome, Firefox, Safari and (of course) my Java reference implementation you can take a cryptographic hash of a JSON object with a predictable result. That is, this request is in no way limited to

[issue26233] select.epoll.poll() should avoid calling malloc() each time

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "I'm not sure that it is worth to apply this optimization. The patch adds half a hundred lines of complex code for only 80 ns benefit. On my computer just incrementing an integer takes 100 ns." Yury Selivanov: "(...) Right, but there are so

[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2016-02-02 Thread Łukasz Langa
Łukasz Langa added the comment: If you're affected, there's a workaround. Use the following script to rewrite paths in your .zip file to be zipimport-compatible: https://gist.github.com/ambv/909d38bdac4f3e719b7c It preserves the preamble and all file metadata. A little context why this is

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread Georg Brandl
Georg Brandl added the comment: Andrew is right, this should be documented "properly". -- nosy: +georg.brandl ___ Python tracker ___

[issue25774] [benchmarks] Adjust to allow uploading benchmark data to codespeed

2016-02-02 Thread Brett Cannon
Brett Cannon added the comment: Patch LGTM, although I'm not sure why the upload script needs to be in the benchmark repo itself. -- assignee: brett.cannon -> zach.ware ___ Python tracker

[issue26267] UUID docs should say how to get "standard form"

2016-02-02 Thread Andrew Barnert
Andrew Barnert added the comment: No, I suggest we add something for users who don't think that a comment in an example is the place to look for documentation, but do think that actual documentation of a class or method is. -- ___ Python tracker

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: Yury: "Please use -r flag for perf.py" Oh, I didn't know this flag. Sure, I can do that. New benchmark using --rigorous to measure the performance of attached pymem.patch. It always seems faster, newer slower. Report on Linux smithers 4.3.3-300.fc23.x86_64

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-02-02 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: Second patch with a comment about how we know Mac OS 10.5+'s getaddrinfo is thread-safe. I'll wait for this to be merged before submitting another for Python 2.7. -- Added file:

[issue26271] freeze.py makefile uses the wrong flags variables

2016-02-02 Thread Daniel Shaulov
New submission from Daniel Shaulov: Tools/Freeze/makemakefile.py uses CFLAGS, LDFLAGS and CPPFLAGS instead of the PY_ prefixed versions. This makes flags passed to ./configure ineffective. The patch makes the trivial fix of adding PY_ when needed. -- components: Build files:

[issue26098] PEP 510: Specialize functions with guards

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: Patch version 6: I inlined PyFunction_GetSpecializedCode() into fast_function() of Python/ceval.c. It reduces *a little bit* the overhead of the patch when specialization is not used, but it also avoids to expose this function. I don't think that it's worth

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: > Test with jemalloc using the shell script "python.jemalloc": > --- > #!/bin/sh > LD_PRELOAD=/usr/lib64/libjemalloc.so /home/haypo/prog/python/default/python > "$@" > --- "perf.py -m" doesn't work with such bash script, but it works using exec: --- #!/bin/sh

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-02 Thread Yury Selivanov
Yury Selivanov added the comment: I'm assigning this patch to myself to commit it in 3.6 later. -- assignee: -> yselivanov components: +Interpreter Core stage: -> patch review versions: +Python 3.6 -Python 3.5 ___ Python tracker

[issue26209] TypeError in smtpd module with string arguments

2016-02-02 Thread Lorenzo Ancora
Lorenzo Ancora added the comment: (msg259229) Terry J. Reedy i Suggest that a standard and globally accepted scheme to manage IPv4 addresses is: "Host:PortNumber" --> (host, PortNumber) "Host"--> (host, DefaultPortNumber) "IP:PortNumber" --> (host, PortNumber) "IP"

[issue26265] errors during static build on OSX

2016-02-02 Thread David Beck
David Beck added the comment: Thanks, I’ve done that (a couple of times). I posted this not so much because of my problems with PyQt, but because the output of the Python build when I used those two options asked me to report this as a bug. cheers, David > On Feb 2, 2016, at 9:27 AM, Ned

[issue16764] Make zlib accept keyword-arguments

2016-02-02 Thread Martin Panter
Martin Panter added the comment: See Issue 8706 discussing adding keyword support to library functions in general. Functions the first patch affects: * zlib.compress(data, level=...): still relevant; see Issue 26243 * compressobj(memlevel=...): fixed in documentation in revision fdb5d84f9948

[issue26136] DeprecationWarning for PEP 479 (generator_stop)

2016-02-02 Thread Martin Panter
Martin Panter added the comment: Have you tried running the test suite? I suspect there are tests that will fail. E.g. the tests in revision 2771a0ac806b would need to be changed over to DeprecationWarning as well. -- stage: needs patch -> patch review

[issue26229] Make number serialization ES6/V8 compatible

2016-02-02 Thread Anders Rundgren
Anders Rundgren added the comment: An easier fix than mucking around in the pretty complex number serializer code would be adding an "ES6Format" option to the "json.dump*" methods which could use the supplied conversion code as is. For JSON parsing in an ES6-compatible way you must anyway use

[issue26238] httplib use wrong hostname in https request with SNI support

2016-02-02 Thread Martin Panter
Martin Panter added the comment: I still cannot reproduce any problem. When using set_tunnel(), this is the request sent to the proxy: b'CONNECT 128.6.42.21:8088 HTTP/1.0\r\n' b'\r\n' This is the SNI and request sent through the proxy to the end server: >>> wrapped =

[issue26219] implement per-opcode cache in ceval

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: I'm concerned by the test_descr failure. == ERROR: test_vicious_descriptor_nonsense (test.test_descr.ClassPropertiesAndMethods)

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-02-02 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: needs patch -> patch review ___ Python tracker ___

[issue26265] errors during static build on OSX

2016-02-02 Thread David Beck
New submission from David Beck: I'm working on an iMac (27" mid 2010) running OSX 10.11.3. I'm trying to build Python3.5.0 for use with pyqtdeploy. If I build python without specifying "--enable-universalsdk", I get multiple warnings "clang: warning: no such sysroot directory:

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: > Why have two sets of functions doing exactly the same thing? I have no idea. -- ___ Python tracker ___

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: Test with jemalloc using the shell script "python.jemalloc": --- #!/bin/sh LD_PRELOAD=/usr/lib64/libjemalloc.so /home/haypo/prog/python/default/python "$@" --- Memory consumption: python3 -u perf.py -m ../default/python ../default/python.jemalloc Report on

[issue26229] Make number serialization ES6/V8 compatible

2016-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: > For JSON parsing in an ES6-compatible way you must anyway use an > "OrderedDict" hook option to get the right (=original) property order. Why? From the JSON spec: "An object is an *unordered* set of name/value pairs." (emphasis mine). What do you mean by

[issue26233] select.epoll.poll() should avoid calling malloc() each time

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: @Yury, Serhiy: Do you think that it's worth to avoid malloc in epoll? Aside of the performance, my colleague also told me that heavy pressure on the memory allocator can slowly create framgmentation of the heap memory, which is true. --

[issue26238] httplib use wrong hostname in https request with SNI support

2016-02-02 Thread lirenke
Changes by lirenke : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list

[issue26244] zlib.compressobj level default value documentation

2016-02-02 Thread Martin Panter
Martin Panter added the comment: I also made a small change to the compressobj() doc string. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24780] unittest assertEqual difference output foiled by newlines

2016-02-02 Thread Anish Shah
Anish Shah added the comment: I would like to work on this.. -- nosy: +anish.shah ___ Python tracker ___ ___

[issue26229] Make number serialization ES6/V8 compatible

2016-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: > An easier fix than mucking around in the pretty complex number serializer > code would be adding an "ES6Format" option to the "json.dump*" methods > which could use the supplied conversion code as is. Certainly if this were added we'd want to do it in a

[issue26110] Speedup method calls 1.2x

2016-02-02 Thread Florin Papa
Changes by Florin Papa : -- nosy: +florin.papa ___ Python tracker ___ ___

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-02-02 Thread Martin Panter
Martin Panter added the comment: FYI Raymond, your revision 0731f097157b didn’t actually merge the 3.5 branch (It only had one parent). Also, the default branch never got any NEWS entry in 58266f5101cc, so maybe it needs to be added? -- nosy: +martin.panter

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-02 Thread Jonas Brunsgaard
Jonas Brunsgaard added the comment: You are right that get_nowait() is the correct api for my use case, using get_nowait() nothing is pushed to the internal _getters deque. The reason for my us of get() is that job futures are created one place in the code and then thrown in a processing

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: FYI benchmark result to compare Python with and without pymalloc (fast memory allocator for block <= 512 bytes). As expected, no pymalloc is slower, up to 30% slower (and it's never faster). Report on Linux smithers 4.3.3-300.fc23.x86_64 #1 SMP Tue Jan 5

[issue26266] add classattribute to enum to handle non-Enum attributes

2016-02-02 Thread Ethan Furman
New submission from Ethan Furman: The rules for what objects in an Enum become members and which do not are fairly straight-forward: __double_underscore__ do not (but is reserved for Python) _single_underscore_ do not (but is reserved for Enum itself) any descriptored object (such as

[issue26265] errors during static build on OSX

2016-02-02 Thread Ned Deily
Ned Deily added the comment: I can't speak to issues with PyQt5 since that is not part of the Python standard library but you shouldn't need additional configure options just to build Python itself. Make sure you have installed the latest version of Xcode for your release via the App Store

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2016-02-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 542b5744ddc3 by Serhiy Storchaka in branch '3.5': Issue #25945: Fixed bugs in functools.partial. https://hg.python.org/cpython/rev/542b5744ddc3 New changeset 33109176538d by Serhiy Storchaka in branch 'default': Issue #25945: Fixed bugs in

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: >> It looks like some benchmarks are up to 4% faster: > What this says is that some internals uses of PyMem_XXX should be replaced > with PyObject_XXX. Why not changing PyMem_XXX to use the same fast allocator than PyObject_XXX? (as proposed in this issue)

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 02/02/2016 15:48, STINNER Victor a écrit : >> What this says is that some internals uses of PyMem_XXX should be replaced >> with PyObject_XXX. > > Why not changing PyMem_XXX to use the same fast allocator than PyObject_XXX? (as proposed in this issue) Why

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 02/02/2016 15:47, STINNER Victor a écrit : > > ### 2to3 ### > Mem max: 43100.000 -> 220.000: 195.9091x smaller > > ### chameleon_v2 ### > Mem max: 367276.000 -> 224.000: 1639.6250x smaller > > ### django_v3 ### > Mem max: 24136.000 -> 284.000: 84.9859x

[issue26256] Fast decimalisation and conversion to other bases

2016-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is this the same algorithm as in issue3451? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: > These figures are not even remotely believable. To be honest, I didn't try to understand them :-) Are they the number of kB of the RSS memory? Maybe perf.py doesn't like my shell script? -- ___ Python tracker

[issue26243] zlib.compress level as keyword argument

2016-02-02 Thread Berker Peksag
Berker Peksag added the comment: There is an outdated patch in issue 16764 for zlib.compress(), zlib.decompress(), zlib.flush() and other functions. Perhaps we can close it as a duplicate of this one. -- nosy: +berker.peksag ___ Python tracker

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hum, the point of PyMem_Malloc() is that it's distinct from PyObject_Malloc(), right? Why would you redirect one to the other? -- nosy: +pitrou ___ Python tracker

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: About heap memory fragmentation, see also my attached two "benchmarks" in Python and C: python_memleak.py and tu_malloc.c. -- Added file: http://bugs.python.org/file41778/python_memleak.py ___ Python tracker

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: > Hum, the point of PyMem_Malloc() is that it's distinct from > PyObject_Malloc(), right? Why would you redirect one to the other? For performances. > (of course, we might question why we have two different families of > allocation APIs...) That's the real

[issue26263] Serialize array.array to JSON by default

2016-02-02 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules -Interpreter Core nosy: +ezio.melotti, pitrou, rhettinger ___ Python tracker

[issue23200] Deprecate the zlib decompressor’s flush() method

2016-02-02 Thread Martin Panter
Martin Panter added the comment: New version of the patch merged with current code and cleaning up the zipfile EOF detection. -- Added file: http://bugs.python.org/file41780/deprecate-flush.v2.patch ___ Python tracker

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: > FYI Raymond, your revision 0731f097157b didn’t actually merge the 3.5 branch > (It only had one parent). Also, the default branch never got any NEWS entry > in 58266f5101cc, so maybe it needs to be added? Maybe it's also worth to document the change in

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: So, I ran ssh://h...@hg.python.org/benchmarks with my patch. It looks like some benchmarks are up to 4% faster: $ python3 -u perf.py ../default/python.orig ../default/python.pymem INFO:root:Automatically selected timer: perf_counter [ 1/10] 2to3...

[issue26110] Speedup method calls 1.2x

2016-02-02 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It looks like some benchmarks are up to 4% faster: What this says is that some internals uses of PyMem_XXX should be replaced with PyObject_XXX. -- ___ Python tracker

[issue26188] Provide more helpful error message when `await` is called inside non-`async` method

2016-02-02 Thread Nicholas Chammas
Nicholas Chammas added the comment: Related discussions about providing more helpful syntax error messages: * http://bugs.python.org/issue1634034 * http://bugs.python.org/issue400734 * http://bugs.python.org/issue20608 >From the discussion on issue1634034, it looks like providing better

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-02-02 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: Great, how do we ensure this gets merged soon? -- ___ Python tracker ___

[issue26182] Deprecation warnings for the future async and await keywords

2016-02-02 Thread Marco Buttu
Marco Buttu added the comment: The check for the 'with' statement was handled in the parser (parsetok.c), and in Python 2.5 the warnings were enabled by default. I do not know how to check if the deprecation warning are enabled, otherwise I would have tried to fix the problem. --

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-02-02 Thread Guido van Rossum
Guido van Rossum added the comment: Find an active developer who cares -- e.g. Martin Panter, Serhiy, Yury. On Tue, Feb 2, 2016 at 5:46 AM, A. Jesse Jiryu Davis wrote: > > A. Jesse Jiryu Davis added the comment: > > Great, how do we ensure this gets merged soon? > >

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reopened. Otherwise Martin's comments can be lost in spam. > Maybe it's also worth to document the change in Python 3.5 and 3.6 > documentation with a ".. versionchanged::"? I don't think this is needed. This isn't new feature, this is just a bugfix, old

[issue23252] Add support of writing to unseekable file in zipfile

2016-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently the zipfile module requires seekable stream to read a list of entries from central directory at the end of ZIP file, and for reding their content in arbitrary order. The support of unseekable stream needs to design a new API. This is separate

[issue26136] DeprecationWarning for PEP 479 (generator_stop)

2016-02-02 Thread Anish Shah
Anish Shah added the comment: I have submitted a patch. I have replace `PyExc_PendingDeprecationWarning` to `PyExc_DeprecationWarning` in Objects/genobject.c Can anyone please review? -- keywords: +patch Added file: http://bugs.python.org/file41783/issue26136.patch

[issue26233] select.epoll.poll() should avoid calling malloc() each time

2016-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that it is worth to apply this optimization. The patch adds half a hundred lines of complex code for only 80 ns benefit. On my computer just incrementing an integer takes 100 ns. -- ___ Python

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2016-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Nick and Raymond for your reviews. -- ___ Python tracker ___

[issue26270] Support for read()/write()/select() on asyncio

2016-02-02 Thread Martin Panter
Martin Panter added the comment: Maybe I misunderstand the asyncio protocols, transports, streams, etc too :) but last time I looked they all seemed to buffer your write data and send it in the background. E.g. in the echo-client-using-streams example, there is a writer.write() call that does

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-02-02 Thread Martin Panter
Martin Panter added the comment: Hello Jesse. Maybe Yury might be more qualified here than me to handle OS X stuff (correct me if I’m wrong). I mainly just work with Linux. But reading around socketmodule.c, it sounds like we want to be able to build it on newer OS versions, but still have it

[issue26265] build errors on OS X 10.11 with --enable-universalsdk

2016-02-02 Thread Ned Deily
Ned Deily added the comment: OK, thanks for reporting it. A couple of things. I'm not sure why the PyQt5 build is looking for the MacOSX10.10.sdk as you report. There do seem to be some issues building a universal Python when using a current default Xcode SDK; I'm going to leave this issue

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-02 Thread Jonas Brunsgaard
Jonas Brunsgaard added the comment: Okay I thoroughly read the code again. Can you describe the architectural changes to the code regarding a patch, I will do a proposal. But I have to know we are on the same page, so I do not waste my and your time :) --

[issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue.

2016-02-02 Thread Guido van Rossum
Guido van Rossum added the comment: First, you wrote "The easy solution was to check if the queue was empty and skip the read (get call) if there was nothing in the queue" -- which is exactly what get_nowait() does. As to a patch, I think you should just describe how you would change the code,

[issue26098] PEP 510: Specialize functions with guards

2016-02-02 Thread STINNER Victor
STINNER Victor added the comment: Results of the "The Grand Unified Python Benchmark Suite" on specialize-6.patch. I'm skeptical, I don't understand how my patch can make a benchmark faster :-) The result of regex_v8 is bad :-/ $ python3 -u perf.py --rigorous ../default/python.orig

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: (of course, we might question why we have two different families of allocation APIs...) -- ___ Python tracker ___

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-02 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file41779/tu_malloc.c ___ Python tracker ___

  1   2   >