[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-04-22 Thread Steve Dower
Steve Dower added the comment: > File "C:\Program Files\Python35\lib\asyncio\windows_events.py", line 606, in > _register_with_iocp > _overlapped.CreateIoCompletionPort(obj.fileno(), self._iocp, 0, 0) I don't think there's any case where this is going to work on an actual file -

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-04-22 Thread Gabriel Mesquita Cangussu
New submission from Gabriel Mesquita Cangussu: The documentation of asyncio specifies that the methods connect_read_pipe and connect_write_pipe are available on Windows with the ProactorEventLoop. The documentation then says that those methods accept file-like objects on the pipe parameter.

[issue23806] documentation for no_proxy is missing from the python3 urllib documentation

2016-04-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: no_proxy is applicable to ProxyHandler of the python 3. I've documented this in the corresponding section. -- nosy: +orsenthil resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python

[issue23806] documentation for no_proxy is missing from the python3 urllib documentation

2016-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5424a559ddea by Senthil Kumaran in branch '3.5': Issue23806 - Document the no_proxy environment variable in Python 3 docs. https://hg.python.org/cpython/rev/5424a559ddea New changeset 103fb8be940b by Senthil Kumaran in branch 'default': merge 3.5

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, are you suggesting the following? "If map has a single iterable, call and return as hint, otherwise give up." Or something else? -- nosy: +terry.reedy ___ Python tracker

[issue26773] Shelve works inconsistently when carried over to child processes

2016-04-22 Thread Mark Kellogg
Mark Kellogg added the comment: The gentoo user's version of gdbm is: gdbm-1.11 -- ___ Python tracker ___ ___

[issue23806] documentation for no_proxy is missing from the python3 urllib documentation

2016-04-22 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue12640] test_ctypes seg fault (test_callback_register_double); armv7; gcc 4.5.1

2016-04-22 Thread Berker Peksag
Berker Peksag added the comment: 2.7 now uses libffi 3.1 and our ARM buildbots are quite healthy so I think we can now close this 'out of date'. -- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed ___

[issue26773] Shelve works inconsistently when carried over to child processes

2016-04-22 Thread Mark Kellogg
Mark Kellogg added the comment: I have also been running into this issue. I am using Debian GNU/Linux 8, it was also reproduced on ubuntu by a coworker. It however was not reproducible on Gentoo in our testing. -- nosy: +mkellogg ___ Python

[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-04-22 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker ___ ___

[issue20077] Format of TypeError differs between comparison and arithmetic operators

2016-04-22 Thread Berker Peksag
Berker Peksag added the comment: The exception message has been updated to "TypeError: '<' not supported between instances of 'Color' and 'Color'" in 0238eafb68da. Closing this as 'out of date'. -- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open ->

[issue22359] Remove incorrect uses of recursive make

2016-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 66e40df31fac by Martin Panter in branch '3.5': Issue #22359: Disable running cross-compiled _freeze_importlib and pgen https://hg.python.org/cpython/rev/66e40df31fac New changeset c36b9ef8ff39 by Martin Panter in branch 'default': Issue #22359:

[issue7567] Messed up terminal after calling curses.initscr() twice.

2016-04-22 Thread Berker Peksag
Changes by Berker Peksag : -- stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-22 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker ___ ___

[issue20962] Rather modest chunk size in gzip.GzipFile

2016-04-22 Thread Martin Panter
Martin Panter added the comment: Since there doesn’t seem to be much interest here any more, and the current code has changed and now uses 8 KiB buffering, I am closing this. Although in theory a buffer or chunk size paramter could still be added to the new code if there was a need.

[issue24016] Add a Sprints organization/preparation section to devguide

2016-04-22 Thread Brett Cannon
Brett Cannon added the comment: This should also include a mention of devinabox. -- nosy: +brett.cannon ___ Python tracker ___

[issue26446] Mention in the devguide that core dev stuff falls under the PSF CoC

2016-04-22 Thread Brett Cannon
Brett Cannon added the comment: The python-dev thread more-or-less petered out w/ the basic agreement that adding a short mention in the devguide would be tolerable. When I have a chance I will add a very short mention at the end of the opening page. --

[issue26446] Mention in the devguide that core dev stuff falls under the PSF CoC

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

[issue26831] ConfigParser parsing failures with default_section and ExtendedInterpolation options

2016-04-22 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: ConfigParser fails in interesting ways, when using default_section and ExtendedInterpolation options. Running the attached script results in: ConfigParser() with expected result: global: [('loglevel', 'WARNING'), ('logfile', '-')] section1: [('key_a',

[issue26830] Refactor Tools/scripts/google.py

2016-04-22 Thread Ned Deily
Ned Deily added the comment: FWIW, I'm -0 on removing google.py and +0.5 on the refactoring. It seems like it could still be useful as either an example or a tool. Georg did a cleanup of the Tools directory several years ago (in Issue7962). Rather than removing one script, it might be more

[issue23507] Tuple creation is too slow

2016-04-22 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-04-22 Thread Christian Heimes
Christian Heimes added the comment: The authors of Keccak have released a new version of the Keccak Code Package, http://keccak.noekeon.org/reorganized_code.html . The new package makes it much easier to integrate Keccak in Python. I'm working on a new patch with SHA3 and SHAKE support.

[issue4821] Patches for thread-support in built-in SHA modules

2016-04-22 Thread Christian Heimes
Changes by Christian Heimes : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue26830] Refactor Tools/scripts/google.py

2016-04-22 Thread Berker Peksag
New submission from Berker Peksag: I don't think google.py is useful anymore. I'd prefer to just remove it from the cpython repository. -- components: +Demos and Tools nosy: +berker.peksag stage: -> patch review ___ Python tracker

[issue26249] Change PyMem_Malloc to use pymalloc allocator

2016-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 104ed24ebbd0 by Victor Stinner in branch 'default': Issue #26249: Try test_capi on Windows https://hg.python.org/cpython/rev/104ed24ebbd0 -- ___ Python tracker

[issue26830] Refactor Tools/scripts/google.py

2016-04-22 Thread Francisco Couzo
Changes by Francisco Couzo : -- files: scripts_google.patch keywords: patch nosy: franciscouzo priority: normal severity: normal status: open title: Refactor Tools/scripts/google.py type: enhancement versions: Python 3.6 Added file:

[issue23507] Tuple creation is too slow

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: reuse_argtuples_3.patch: rebased reuse_argtuples_2.patch. -- Added file: http://bugs.python.org/file42571/reuse_argtuples_3.patch ___ Python tracker

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Brett Cannon
Brett Cannon added the comment: And in case my comment wasn't obvious, Herbert is right about the error in the docs. -- ___ Python tracker ___

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Brett Cannon
Brett Cannon added the comment: https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function documents what Herbert discovered wrong in the porting docs. -- keywords: +easy nosy: +brett.cannon ___ Python

[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2016-04-22 Thread R. David Murray
R. David Murray added the comment: I just posted about this on the mentors list, where someone brought this issue up with a question about our policy on type checking. The short version is the better (preserves duck-typing) and more backward compatibile fix is to change the test to be x

[issue26823] Shrink recursive tracebacks

2016-04-22 Thread Emanuel Barry
Emanuel Barry added the comment: New version with tests now, I test both the C and Python implementations. -- assignee: -> ebarry Added file: http://bugs.python.org/file42570/short_tracebacks_3.patch ___ Python tracker

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: Results of the CPython benchmark suite on the revision 6c376e866330 of https://hg.python.org/sandbox/fastcall compared to CPython 3.6 at the revision 496e094f4734. It's surprising than call_simple is 1.08x slower in fastcall. This slowdown is not acceptable

[issue26249] Change PyMem_Malloc to use pymalloc allocator

2016-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68b2a43d8653 by Victor Stinner in branch 'default': PyMem_Malloc() now uses the fast pymalloc allocator https://hg.python.org/cpython/rev/68b2a43d8653 -- nosy: +python-dev ___ Python tracker

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

2016-04-22 Thread Stefan Krah
Stefan Krah added the comment: #14757 has an implementation of inline caching, which at least seemed to slow down some use cases. Then again, whenever someone posts a new speedup suggestion, it seems to slow down things I'm working on. At least Case van Horsen independently verified the

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

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: Maybe we should adopt a difference approach. There is something called "inline caching": put the cache between instructions, in the same memory block. Example of paper on CPython: "Efficient Inline Caching without Dynamic Translation" by Stefan Brunthaler

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Xiang Zhang
Xiang Zhang added the comment: With a careful rereading of PEP3123, I think you are right. Actually the title of the PEP tells what you mean. I do misunderstand. I am quite sorry and feel shamed of making noice here and wasting time of the participants. I will think more seriously from now

[issue26829] update docs: when creating classes a new dict is created for the final class object

2016-04-22 Thread Ethan Furman
New submission from Ethan Furman: https://docs.python.org/3/reference/datamodel.html#creating-the-class-object This section should mention that the final class is created with a new dict(), and all key/value pairs from the dict used during creation are copied over. -- assignee:

[issue26809] `string` exposes ChainMap from `collections`

2016-04-22 Thread Martin Panter
Martin Panter added the comment: I’m not that fussed if the _ChainMap name is backported. I just thought it is safer to not do it; similar reasoning to why I only committed Issue 23883 patches to 3.6. I certainly think backporting __all__ is reasonable. --

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: All this discussion is in the context of the GNU libc allocator, but please remember that Python works on many platforms, including OS X, Windows, the *BSDs... -- ___ Python tracker

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2016-04-22 Thread sorin
Changes by sorin : -- nosy: -sorin ___ Python tracker ___ ___ Python-bugs-list

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-22 Thread Martin Panter
Martin Panter added the comment: Tangentially related: Issue 25156, about using sendfile() to copy files in shutil. -- nosy: +martin.panter ___ Python tracker

[issue23507] Tuple creation is too slow

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: msg264009: Serhiy Storchaka "Could you compare filter(), map() and sorted() performance with your patch and with issue23507 patch?" Here you have the result of bench_builtins.py. The performance look to be the same, even if I expect better performance with

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-22 Thread Martin Panter
Martin Panter added the comment: I found two bugs; see the comments. In Python 2, it looks like the proxy_bypass_etc() functions are defined in urllib and imported into urllib2, so it makes sense to include the tests in test_urllib rather than test_urllib2. Technically I think

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2016-04-22 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: > But note that map() and zip() take several iterables, and we should call > __length_hint__() for every of them (unless found a one with not implemented > __length_hint__()). This can slow down the execution for short sequences. Oh, there is no slot for

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you compare filter(), map() and sorted() performance with your patch and with issue23507 patch? -- ___ Python tracker

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue14126. It makes sense to implement map.__length_hint__() and zip.__length_hint__(). But note that map() and zip() take several iterables, and we should call __length_hint__() for every of them (unless found a one with not implemented

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2016-04-22 Thread STINNER Victor
New submission from STINNER Victor: When I compared the performance of filter() and map() between Python 2.7 and 3.4, I noticed a huge performance drop in Python 3! http://bugs.python.org/issue26814#msg264003 I didn't analyze yet exactly why Python 3 is so much slower (almost 100% slower for

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Herbert
Herbert added the comment: The exact error was: ImportError: dynamic module does not define init function (PyInit_myextension) -- ___ Python tracker ___

[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Herbert
New submission from Herbert: I think PyObject *PyInit_myextention(void) should be PyMODINIT_FUNC PyInit_myextention(void) on https://docs.python.org/3/howto/cporting.html#module-initialization-and-state It didn't work for me until I replaced this with a message in the about 'undefined

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: > We usually wait until syscalls are generally available in common distros and > have bindings in glibc. It makes it easier to test the feature. Usually, yeah. os.urandom() uses syscall() to use the new getrandom() of Linux since it's still not exposed in the

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: For more fun, comparison between Python 2.7 / 3.4 / 3.6 / 3.6 FASTCALL. --+-+++--- Tests |py27 | py34 | py36 |

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-22 Thread Christian Heimes
Christian Heimes added the comment: Thanks, looks interesting. We usually wait until syscalls are generally available in common distros and have bindings in glibc. It makes it easier to test the feature. -- nosy: +christian.heimes ___ Python

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Julian Taylor
Julian Taylor added the comment: which is exactly what malloc is already doing for, thus my point is by using malloc we would fullfill your request. But do you have an actual real work application where this would help? it is pretty easy to figure out, just run the application under perf and

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo, neologix, pitrou ___ Python tracker ___

[issue26826] Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()

2016-04-22 Thread Marcos Dione
New submission from Marcos Dione: copy_file_range() has been introduced in the Linux kernel since version 4.5 (mid march 2016). This new syscall allows to copy data from one fd to another without passing by user space, improving speed in most cases. You can read more about it here:

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: Some microbenchmarks: bench_fast.py. == Python 3.6 / Python 3.6 FASTCALL == --+--+--- Tests | /tmp/default | /tmp/fastcall

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Antti Haapala
Antti Haapala added the comment: mmap is not the problem, the eagerness of munmap is a source of possible problem. The munmap eagerness does not show problems in all programs because the arena allocation heuristics do not work as intended. A proper solution in Linux and other operating

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Julian Taylor
Julian Taylor added the comment: I know one can change the allocator, but the default is mmap which I don't think is a very good choice for the current arena size. All the arguments about fragmentation and memory space also apply to pythons arena allocator itself and I am not convinced that

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: Related issue: issue #23507, "Tuple creation is too slow". -- ___ Python tracker ___

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: Changes of my current implementation, ad4a53ed1fbf.diff. The good thing is that all changes are internals (really?). Even if you don't modify your C extensions (nor your Python code), you should benefit of the new fast call is *a lot* of cases. IMHO the best

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-04-22 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file42566/ad4a53ed1fbf.diff ___ Python tracker ___

[issue26807] mock_open()().readline() fails at EOF

2016-04-22 Thread Robert Collins
Robert Collins added the comment: Thanks Yolanda, that looks sane - could you perhaps add a test for this in Lib/unittest/tests/test_mock/ ? -- ___ Python tracker

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Xiang Zhang
Xiang Zhang added the comment: Noo!! What I am afraid most seems to happen, a lot of noice due to misunderstanding! If that is true I am quite sorry. :-( But before I admit I have to figure it out myself. -- ___ Python tracker

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems you misunderstood PEP3123. The bugs described in the PEP are gone and can't be reappear. The new PyObject_HEAD fixes the problem, it makes casting to PyObject* be defined behaviour. The accessor macros are needed only to write the code compatible with

[issue23507] Tuple creation is too slow

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: Hi, I started to work on a new top-down approach avoiding completly temporary tuple/dict: "FASTCALL", issue #26814. As you may expect, the patch is much larger that Serhiy's patches attached to his issue, but IMHO the final code is much simpler: it doesn't

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Xiang Zhang
Xiang Zhang added the comment: The current code is OK. But if the macro are used with arguments not of PyObject* in the future, the bugs described in PEP3123 can possibly be introduced. The new PyObject_HEAD alone can not fix the problem. It just makes the exception happen: Standard C has

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2016-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg263973 ___ Python tracker ___

[issue19846] Python 3 raises Unicode errors with the C locale

2016-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg263975 ___ Python tracker ___

[issue14621] Hash function is not randomized properly

2016-04-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg263978 ___ Python tracker ___

[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-04-22 Thread Robin Roth
Robin Roth added the comment: Any progress on merging this? The fix is simple, there is a test; anything else I can do to help? Ansible integrated the patch posted here as a workaround of an issue this caused. So there was some external review of the fix. See

[issue7980] time.strptime not thread safe

2016-04-22 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg263977 ___ Python tracker ___

[issue20962] Rather modest chunk size in gzip.GzipFile

2016-04-22 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg263972 ___ Python tracker ___

[issue7980] time.strptime not thread safe

2016-04-22 Thread Eryk Sun
Eryk Sun added the comment: SilentGhost, msg263977 is spam copied from msg206393 to try to fool people into clicking on the link. I've marked all of these messages from editor-buzzfeed as spam. -- nosy: +eryksun ___ Python tracker

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How this can help reduce the possible errors? I afraid that it rather can increase the possibility of error. There is no undefined behaviour in current code. It was in old code (in the casting a pointer to PyObject*), but this was fixed with new

[issue26825] Variable defined in exec(code) unreachable inside function call with visible name in dir() results

2016-04-22 Thread Eryk Sun
Eryk Sun added the comment: In Python 2, using the exec statement makes the compiler disable fast locals: >>> def foo(): pass ... >>> def bar(): exec '' ... >>> foo.__code__.co_flags & inspect.CO_OPTIMIZED 1 >>> bar.__code__.co_flags & inspect.CO_OPTIMIZED 0

[issue26825] Variable defined in exec(code) unreachable inside function call with visible name in dir() results

2016-04-22 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: -larry ___ Python tracker ___ ___ Python-bugs-list

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2016-04-22 Thread SilentGhost
Changes by SilentGhost : -- versions: -Python 3.1, Python 3.3 ___ Python tracker ___

[issue19846] Python 3 raises Unicode errors with the C locale

2016-04-22 Thread SilentGhost
Changes by SilentGhost : -- nosy: +Sworddragon, a.badger, bkabrda, haypo, jwilk, larry, lemburg, loewis, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, terry.reedy ___ Python tracker

[issue14621] Hash function is not randomized properly

2016-04-22 Thread SilentGhost
Changes by SilentGhost : -- nosy: +Arfrever, Bob.Ziuchkovski, Giovanni.Bajo, PaulMcMillan, ReneSac, Vlado.Boza, alex, arigo, benjamin.peterson, bkabrda, camara, christian.heimes, cvrebert, dmalcolm, dstufft, gregory.p.smith, haypo, iElectric, isoschiz, konk,

[issue7980] time.strptime not thread safe

2016-04-22 Thread SilentGhost
SilentGhost added the comment: Lisa, please be careful with nosy list. -- nosy: +Romuald, SilentGhost, William.McBrine, amaury.forgeotdarc, belopolsky, brett.cannon, ccorbacho, ced, cptnwillard, davidfraser, dpalms2011, epu, eric.smith, flox, fredwheeler, kzsolt, mark.dickinson,

[issue26825] Variable defined in exec(code) unreachable inside function call with visible name in dir() results

2016-04-22 Thread Xiang Zhang
Xiang Zhang added the comment: This seems to a behaviour change. In 2.7, return ans compiles to LOAD_NAME so it can find ans. But in 3.x, it compiles to LOAD_GLOBAL which searches ans from global scope. I don't know when this change is introduced. -- components: +Interpreter Core

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that I understood correctly, but if you are proposing to use malloc()/free() instead of mmap()/munmap() to allocate arenas in pymalloc, you have to know that we already different allocators depending on the platform:

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: It is possible to implement type checking in C macros. Example found on the Internet: /* inline type checking - can mix in with other macros more easily using the comma operator, * C11 gives best results here */ #if defined(__STDC_VERSION__) &&

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Xiang Zhang
Xiang Zhang added the comment: My intention of the patch is that it helps reduce the possible errors described in PEP3123. I agree with Serhiy and Martin's opinion but I think the error passing a weird type argument to the macro is easier to find and debug than the undefined behaviour.

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Charles-François Natali
Charles-François Natali added the comment: The heap on Linux is still a linear contiguous *address space*. I agree that MADV_DONTNEED allow's returning committed memory back to the VM subsystem, but it is still using a large virtual memory area. Not everyone runs on 64-bit, or can waste address

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Julian Taylor
Julian Taylor added the comment: glibcs malloc is not obstack, its not a simple linear heap where one object on top means everything below is not freeable. It also uses MADV_DONTNEED give sbrk'd memory back to the system. This is the place where MADV_FREE can now be used now as the latter

[issue14621] Hash function is not randomized properly

2016-04-22 Thread lissacoffey
lissacoffey added the comment: How about Python grows a additional btree implementation in its collections module? I know that it's not going to fix existing code. However in the long run it's the best safeguard against hash collision attacks. I'm thinking about a simple, self balancing btree

[issue7980] time.strptime not thread safe

2016-04-22 Thread lissacoffey
lissacoffey added the comment: On the other hand, the way imports are handled in 3.3 and later is a bit different, and if I run the unit test (which does still fail for me on 2.7 tip) on 3.3 and 3.4 tip it passes. Thanks Lisa - python expert mysite:

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Martin Panter
Martin Panter added the comment: Most of Xiang’s changes are to Py_Check() macros. I would expect them to be called with a generic PyObject pointer, and they do seem to be documented as accepting a PyObject pointer. Py_TYPE() is a macro that uses an unconditional cast. In general, these kinds

[issue19846] Python 3 raises Unicode errors with the C locale

2016-04-22 Thread lissacoffey
lissacoffey added the comment: Using an environment variable is not the holy grail for this. On writing a non-single-user application you can't expect the user to set extra environment variables. If compatibility is the only reason in my opinion it would be much better to include something

[issue26822] itemgetter/attrgetter/methodcaller objects ignore keyword arguments

2016-04-22 Thread Martin Panter
Martin Panter added the comment: This seems like a good change, and the patch looks correct. -- nosy: +martin.panter ___ Python tracker ___

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2016-04-22 Thread lissacoffey
lissacoffey added the comment: This bug is a really annoying one, any chance it will be fixed in 2.7? It's really a matter when you want to deploy a program using distutils (my case), because you cannot really require your clients to edit the registry themselves :/ Thanks

[issue20962] Rather modest chunk size in gzip.GzipFile

2016-04-22 Thread lissacoffey
lissacoffey added the comment: I measured both the total time of the run, the time to process each input records, and time to execute just the seek() call for each record. The bulk of the per-record time was in the call to seek(), so by reducing that time, I sped up my run-times

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: py_refcnt.diff also LGTM, go ahead. -- ___ Python tracker ___ ___

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread STINNER Victor
STINNER Victor added the comment: change_some_macros_using_Py_TYPE.patch LGTM. > Direct access to ob_type is used about 300 times in the source code. Changing > all this case to use the Py_TYPE() macro causes code churn. IHMO change_some_macros_using_Py_TYPE.patch makes the code more readable

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-22 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v5: don't require the proxies argument in proxy_bypass_environment() -- Added file: http://bugs.python.org/file42565/python-urllib-prefer-lowercase-proxies-v5.diff ___ Python tracker

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2016-04-22 Thread Charles-François Natali
Charles-François Natali added the comment: > Julian Taylor added the comment: > > it defaulted to 128kb ten years ago, its a dynamic threshold since ages. Indeed, and that's what encouraged switching the allocator to use mmap. The problem with dynamic mmap threshold is that since the Python

[issue26825] Variable defined in exec(code) unreachable inside function call with visible name in dir() results

2016-04-22 Thread ganix
New submission from ganix: here is a code show what happend: >>> def func(): exec('ans=1') print(dir()) return ans >>> func() ['ans'] Traceback (most recent call last): File "", line 1, in func() File "", line 4, in func return ans

[issue26824] Make some macros use Py_TYPE

2016-04-22 Thread Xiang Zhang
Xiang Zhang added the comment: Good point. I don't think about that. -- ___ Python tracker ___ ___

  1   2   >