[issue28465] python 3.5 magic number

2016-10-18 Thread Zachary Ware
Zachary Ware added the comment: I suspect Debian 9's Python 3.5.2 has patches beyond v3.5.2, including the patch from #27286 (34d24c51eab6). What problem is this causing for you? -- nosy: +doko, serhiy.storchaka, zach.ware ___ Python tracker

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Removed item 3 from updated patch. -- Added file: http://bugs.python.org/file45127/object-__format__-2.patch ___ Python tracker

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread Eryk Sun
Changes by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden versions: +Python 3.7 ___ Python tracker

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Christian Heimes
New submission from Christian Heimes: #1322 has deprecated platform.linux_distribution(). The feature is going to be removed without replacement functions in the stdlib. It's no longer possible to detect the Linux distribution from stdlib. Let's add a function to read /etc/os-release [1]

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >From msg214162: > This is basically the definition of object.__format__: > > def __format__(self, specifier): > if len(specifier) == 0: > return str(self) > raise TypeError('non-empty format string passed to object.__format__') This simple algorithm

[issue28115] Use argparse for the zipfile module

2016-10-18 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Christian Heimes
Christian Heimes added the comment: I'm not suggesting a generic platform detection function but rather a limited function just for os-release. On platforms without /etc/os-release the function should obviously fail and raise an exception. /etc/os-release is available on distributions without

[issue23782] Leak in _PyTraceback_Add

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b3be9f38f2a by Serhiy Storchaka in branch '3.5': Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception https://hg.python.org/cpython/rev/6b3be9f38f2a New changeset 2d352bf2b228 by Serhiy Storchaka in branch '3.6': Issue

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread John Taylor
New submission from John Taylor: The python-3.6.0b2-amd64.exe binary installs the 64-bit version of python, but the binary itself is only 32-bit. I would like this to be a 64-bit binary so that Python can easily be installed on Windows Server 2016 Nano Server. Since this OS version will

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: and for the older distributions without Systemd ? What do you suggest ? -- nosy: +matrixise ___ Python tracker ___

[issue28448] C implemented Future doesn't work on Windows

2016-10-18 Thread INADA Naoki
INADA Naoki added the comment: > I'm not so sure about this. Maybe we can just fix _WaitCancelFuture somehow? @haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() instead of self.add_done_callback(self._unregister_wait_cb)? _unregister_wait_cb must be called after all

[issue23782] Leak in _PyTraceback_Add

2016-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch uses C API added in issue28410. It preserves the traceback of original exception: Traceback (most recent call last): File "issue28214.py", line 3, in __set_name__ 1/0 ZeroDivisionError: division by zero The above exception was the direct

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Serhiy, I don't find the _PyErr_FormatFromCause function in the code of CPython. Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o -lpthread -ldl -lutil -lm Objects/typeobject.o: In function `set_names':

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- assignee: -> zach.ware nosy: +zach.ware ___ Python tracker ___

[issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2016-10-18 Thread Kubilay Kocak
Kubilay Kocak added the comment: Ping. All branches on the koobs-freebsd-current buildbot are still failing due to this issue I could recreate the entire worker environment from scratch, but: a) I'm not sure it will resolve the issue b) I'd rather fix the root cause --

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: We need a fallback in the case where /etc/os-release does not exists, or just use hasattr on `platform` if hasattr(platform, 'linux_os_release'): print(platform.linux_os_release()) else: ... or just raise an exception if platform.linux_os_release is

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: zach.ware -> steve.dower ___ Python tracker ___

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-10-18 Thread Zachary Ware
Zachary Ware added the comment: The Mac installer still needs to be updated, which is Ned's department. -- assignee: -> ned.deily stage: needs patch -> patch review ___ Python tracker

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ok, thank you Zach for this comment. -- ___ Python tracker ___ ___

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread R. David Murray
R. David Murray added the comment: I hate systemd. So does the company I'm currently doing most of my work for. We're using centos6 because it doesn't have systemd. I personally use gentoo without systemd. That said, I don't use the platform module, so this doesn't actually affect me.

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for testing Stéphane. Ignore this failure, the test should be fixed by updated patch in issue28410. -- ___ Python tracker

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread Steve Dower
Steve Dower added the comment: Last time I spoke with the Nano Server team (admittedly this was 6-12 months ago) they had no plans to support MSI at all. Even though our installer is an exe, under the covers it is installing MSIs. We discussed this and decided the best approach would be to

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed error message in tests. -- Added file: http://bugs.python.org/file45132/_PyErr_FormatFromCause-2.patch ___ Python tracker

[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2016-10-18 Thread Nick Coghlan
Nick Coghlan added the comment: Via issue 28410, Serhiy is adding a private "_PyErr_FormatFromCause" helper API to make explicit C level exception chaining easier within the implementation of CPython (this helps resolve issue 28214, an exception reporting problem in the new PEP 487

[issue19795] Formatting of True/False/None in docs

2016-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45130/doc_none3-3.6.patch ___ Python tracker ___

[issue19795] Formatting of True/False/None in docs

2016-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45131/doc_none3-3.5.patch ___ Python tracker ___

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Matthias Klose
Matthias Klose added the comment: -1 This is not available everywhere, not even on Linux distributions. Why would you implement something which only works on 50% of existing Linux distributions? Who would even use that? And for what would you use it? You have a distro module available now

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: "This is not available everywhere, not even on Linux distributions. Why would you implement something which only works on 50% of existing Linux distributions?" According to http://0pointer.de/blog/projects/os-release systemd requires /etc/os-release. Since

[issue27838] test_os.test_chown() failure on koobs-freebsd-current

2016-10-18 Thread Kubilay Kocak
Kubilay Kocak added the comment: All builders (branches) are failing, not just 3.x DEBUG. Failures also appear no longer random or intermittent -- title: test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot -> test_os.test_chown() failure on

[issue28208] update sqlite to 3.14.2

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Maybe we could merge the patch of Mariatta and close this issue. -- nosy: +matrixise ___ Python tracker ___

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @zach maybe we can close this issue if you have updated openssl ? -- nosy: +matrixise ___ Python tracker ___

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Christian Heimes
Christian Heimes added the comment: ETOOMUCHBIKESHEDDING and another uncalled systemd flame wars. -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue27896] Allow passing sphinx options to Doc/Makefile

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87aced4a9cf5 by Victor Stinner in branch '3.5': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/87aced4a9cf5 -- ___ Python tracker

[issue27896] Allow passing sphinx options to Doc/Makefile

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b22c99535d0 by Victor Stinner in branch '2.7': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/3b22c99535d0 -- ___ Python tracker

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First apply the patch from issue28410. -- ___ Python tracker ___ ___

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Matthias Klose
Matthias Klose added the comment: "Since all major Linux distribution now use systemd, it makes sense to me to add such function." I'm not aware of any embedded Linux distro using systemd (no, I don't consider Raspian an embedded Linux distro). --

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Christian Heimes
Christian Heimes added the comment: Please read the title of this issue. It is "Add platform.linux_os_release()". The name of the function clearly indicats that the function only works on Linux with a os-release file. -- ___ Python tracker

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Serhiy, I have a failed test with test_capi. I have applied the patch from #28410 and set_name_chain_error_cause_2.patch. stephane@sg1 ~/s/p/cpython> ./python -m test test_capi Run tests sequentially 0:00:00 [1/1] test_capi test test_capi failed -- Traceback

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread R. David Murray
R. David Murray added the comment: Sorry, it wasn't my intent to (re)start a flame war, just to point out that there are linux platforms in wide use that do not support systemd. But I don't have an opinion on whether or not adding this function is a good idea or not. --

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Nick Coghlan
Nick Coghlan added the comment: The patch looks good to me Serhiy, but I don't think it makes sense to apply this to 3.5 - it touches quite a few places in the code, and there's no reason to risk introducing a regression into a 3.5 maintenance release for a pure maintainer convenience

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Can you elaborate the expected API? /etc/os-release is not a single line, but a list of variables. Example on my Fedora 24: --- $ cat /etc/os-release NAME=Fedora VERSION="24 (Workstation Edition)" ID=fedora VERSION_ID=24 PRETTY_NAME="Fedora 24 (Workstation

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Matthias Klose
Matthias Klose added the comment: "The name of the function clearly indicats that the function only works on Linux with a os-release file." No, it does not. That would be linux_distribution_with_os_release_file(). -- ___ Python tracker

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread John Taylor
John Taylor added the comment: python-3.6.0b2-embed-amd64.zip will load the interpreter as is easy to install. The Python Embedded Distribution documentation mentions needing ucrtbase.dll, which is already installed on Nano Server. One small pain point is that ctrl-z seems to exit/suspend

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: patch review -> commit review ___ Python tracker ___

[issue26010] document CO_* constants

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: patch review -> needs patch ___ Python tracker ___

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread Maciej Fijalkowski
Changes by Maciej Fijalkowski : -- nosy: -fijall ___ Python tracker ___ ___

[issue28463] Email long headers parsing/serialization

2016-10-18 Thread Константин Волков
Константин Волков added the comment: But message ID have its own syntax https://www.ietf.org/rfc/rfc2822.txt: 3.6.4. Identification fields message-id = "Message-ID:" msg-id CRLF msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] 3.2.3. Folding white space and

[issue28468] Add platform.linux_os_release()

2016-10-18 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Also there is an external project now aiming to provide this functionality: https://github.com/nir0s/distro -- nosy: +cstratak ___ Python tracker

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45128/_PyErr_FormatFromCause-3.5.patch ___ Python tracker ___

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: > For now default timeit run takes from 0.8 to 8 sec. Adding yet 5 sec makes a > user more angry. See the issue #28469 "timeit: use powers of 2 in autorange(), instead of powers of 10" for a simple fix to reduce the total duration of the worst case (reduce

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: "131072 loops" in a report looks not human friendly. I would prefer using a sequence of round numbers: 1, 2, 5, 10, 20, 50, 100, ... -- ___ Python tracker

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: I'm disappointed by the discussion on minumum vs average. Using the perf module (python3 -m perf timeit), it's very easy to show that the average is more reliable than the minimum. The perf module runs 20 worker processes by default: with so many processes,

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: patch review -> commit review ___ Python tracker ___

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d611957732b by Victor Stinner in branch 'default': timeit: enhance format of raw timings (in verbose mode) https://hg.python.org/cpython/rev/4d611957732b New changeset c3a93069111d by Victor Stinner in branch 'default': timeit: add nsec

[issue28467] Installer should be a 64-bit executable

2016-10-18 Thread Steve Dower
Steve Dower added the comment: You can also modify the "python36._pth" file in the embedded distro to include "import site" if you want all the stuff that comes with that. The intent of the embeddable distribution is to be a private dependency of a larger application, where you typically

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Emanuel Barry
Emanuel Barry added the comment: I see the function is private; is there any concern with extending the PyErr_* API? I think it'd make sense to expose it, since it's a convenient way to do in C what can already be done easily in Python, but I don't actually have a good reason :) Other than

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Steven D'Aprano: >> * Don't disable the garbage collector anymore! Disabling the GC is not >> fair: real applications use it. > But that's just adding noise: you're not timing code snippet, you're timing code snippet plus garbage collector. > > I disagree

[issue26010] document CO_* constants

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have reviewed your patch, but could you add the doc for CO_ASYNC_GENERATOR ? Thank you -- nosy: +matrixise ___ Python tracker

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: >> * autorange: start with 1 loop instead of 10 for slow benchmarks like >> time.sleep(1) > This is good if you run relatively slow benchmark, but it makes the result > less reliable. You always can specify -n1, but on your own risk. Sorry,

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: > "131072 loops" in a report looks not human friendly. In my perf module, I use 2^n syntax for numbers larger than 1024. Syntax accepted in command line arguments. -- ___ Python tracker

[issue26436] Add the regex-dna benchmark

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: The performance project is now hosted on GitHub. I created a pull request from Serhiy's patch: https://github.com/python/performance/pull/17 So I now close this issue. Let's continue the discussion there. -- resolution: -> third party status: open ->

[issue28463] Email long headers parsing/serialization

2016-10-18 Thread R. David Murray
R. David Murray added the comment: It is a bug, but it is not a bug that the message-id body gets put on a second line. The old (compat32) folder introduces an extra space while folding, which then gets preserved when the re-parsing is done. The new folder (policy=default) folds correctly

[issue28463] Email long headers parsing/serialization

2016-10-18 Thread Mariusz Masztalerczuk
Mariusz Masztalerczuk added the comment: I think that it is not bug. It is just rfc ;) Due to https://www.ietf.org/rfc/rfc2822.txt, A message consists of header fields, optionally followed by a message body. Lines in a message MUST be a maximum of 998 characters excluding the CRLF, but

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Steven D'Aprano: >> * Display large number of loops as power of 10 for readability, ex: >> "10^6" instead of "100". Also accept "10^6" syntax for the --num >> parameter. > > Shouldn't we use 10**6 or 1e6 rather than bitwise XOR? :-) Hum, with "10**6"

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-18 Thread STINNER Victor
New submission from STINNER Victor: In the issue #28240, I changed the default repeat from 3 to 5 in timeit. Serhiy wrote (msg277157): "For now default timeit run takes from 0.8 to 8 sec. Adding yet 5 sec makes a user more angry." I propose to use powers to 2, instead of powers of 10, in

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure about the function name. Does anybody want to suggest better name? -- ___ Python tracker ___

[issue28470] configure.ac -g debug compiler option when not Py_DEBUG

2016-10-18 Thread Chris Byers
New submission from Chris Byers: The configure.ac file adds the "-g" debug compiler option to both debug and non-debug builds, so debug information is built for production builds. This seems likely a bug, unless there was a specific reason to do this. Around line 1480 of configure.ac:

[issue28448] C implemented Future doesn't work on Windows

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: INADA Naoki added the comment: > @haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() > instead > of self.add_done_callback(self._unregister_wait_cb)? > _unregister_wait_cb must be called after all callbacks are called? Oh no. I tried to

[issue15369] pybench and test.pystone poorly documented

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: I'm closing the issue again. Again, pybench moved to http://github.com/python/performance : please continue the discussion there if you consider that we still need to do something on pybench. FYI I reworked deeply pybench recently using the new perf 0.8 API.

[issue28256] Cleanup Modules/_math.c

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8999d702ac29 by Victor Stinner in branch 'default': Issue #28256: Cleanup _math.c https://hg.python.org/cpython/rev/8999d702ac29 -- nosy: +python-dev ___ Python tracker

[issue28256] Cleanup Modules/_math.c

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the review Serhiy and Christian, it seems like a review was needed :-D I pushed my fix to Python 3.7. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have read and executed the tests and for me the patch is good. -- nosy: +matrixise ___ Python tracker ___

[issue26436] Add the regex-dna benchmark

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: I created https://github.com/python/performance/issues/15 -- ___ Python tracker ___

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 975df4c13db6 by Victor Stinner in branch 'default': timeit: remove --clock and --time options https://hg.python.org/cpython/rev/975df4c13db6 -- ___ Python tracker

[issue28340] [py2] TextIOWrapper.tell extremely slow

2016-10-18 Thread STINNER Victor
Changes by STINNER Victor : -- title: TextIOWrapper.tell extremely slow -> [py2] TextIOWrapper.tell extremely slow ___ Python tracker

[issue28293] Don't completely dump the regex cache when full

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Can't we redesign the function to reuse @functools.lru_cache(_MAXCACHE) but take care of the debug flag? For example, split the function in smaller parts. -- nosy: +haypo ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: hash(tuple of attributes) is what I'm using in all my projects. Here is a patch for the doc. -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file45133/hash_doc.patch ___ Python tracker

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3aba5552b976 by Victor Stinner in branch 'default': timeit: start autorange with 1 iteration, not 10 https://hg.python.org/cpython/rev/3aba5552b976 New changeset 2dafb2f3e7ff by Victor Stinner in branch 'default': timeit: change default repeat to

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- assignee: -> haypo ___ Python tracker ___ ___

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-18 Thread Christian Heimes
Christian Heimes added the comment: ACK! -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue11632] difflib.unified_diff loses context

2016-10-18 Thread Steve Newcomb
Steve Newcomb added the comment: Context reporting is still buggy in Python 3.5.2: >>> [ x for x in difflib.unified_diff( "'on'\n", "'on'\n\n\n")] ['--- \n', '+++ \n', '@@ -3,3 +3,5 @@\n', ' n', " '", ' \n', '+\n', '+\n'] >>> import sys >>> sys.version '3.5.2 (default, Sep 10 2016, 08:21:44)

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Sorry, I don't understand how running 1 iteration instead of 10 makes the > benchmark less reliable. IMO the reliability is more impacted by the number > of repeatitions (-r). I changed the default from 3 to 5 repetitions, so > timeit should be *more*

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Christian Heimes: > ACK! Does it mean that my patch LGTY? -- ___ Python tracker ___

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It may be worth to emit a warning in case of using timeit for too short code. -- ___ Python tracker ___

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: > The perf module doesn't report the number of loops by default. Right, it's hidden by default. I consider that it's not an useful information for end users. If you want more details (see the number of inner and outer loops), use --verbose ("python3 -m perf

[issue28130] Document that time.tzset updates time module globals

2016-10-18 Thread Lisa Roach
Lisa Roach added the comment: Will this simple update be enough? Or should more documentation be added for clarification? -- keywords: +patch nosy: +lisroach Added file: http://bugs.python.org/file45135/tzset_doc.patch ___ Python tracker

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: >> Sorry, I don't understand how running 1 iteration instead of 10 makes the >> benchmark less reliable. IMO the reliability is more impacted by the number > Caches. Not high-level caching that can make the measurement

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "It may be worth to emit a warning in case of using timeit for too short code." I suggest to simply warn users that timeit is not reliable at all :-) By the way, I close this issue, so I suggest you to open new issues if you want further

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The perf module doesn't report the number of loops by default. -- ___ Python tracker ___

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: > This is a senseless example. 0.0339 usec is not a time of executing "pass", > it is an overhead of the iteration. You can't use timeit for measuring the > performance of the code that takes such small time. You just can't get the >

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-10-18 Thread Stefan Krah
Stefan Krah added the comment: Raymond: "code area" meant literally that -- all code under Modules/_decimal/* is by myself. It is well understood that you and many people (e.g. Mark Dickinson) have a stake in Decimal. This however does not warrant reassigning an issue in which I had already

[issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL"

2016-10-18 Thread Yury Selivanov
New submission from Yury Selivanov: The following Python program causes a segfault in Python 3.6b2: import socket import asyncio loop = asyncio.get_event_loop() sock = socket.socket() sock.close() async def client(): reader, writer = await

[issue28293] Don't completely dump the regex cache when full

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is unlikely possible with current API of lru_cache. Testing flags before looking up in a cache adds an overhead. -- ___ Python tracker

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-18 Thread Tim Mitchell
Tim Mitchell added the comment: hg patch with changes forthcoming -- ___ Python tracker ___ ___

[issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL"

2016-10-18 Thread Ned Deily
Ned Deily added the comment: Fatal Python error: Python memory allocator called without holding the GIL Current thread 0x7fffb043b3c0 (most recent call first): File "/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py",

[issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL"

2016-10-18 Thread Ned Deily
Ned Deily added the comment: And here's an OS X debug-build stack trace using the system malloc (current 3.6 tip, a218260334c4): Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 pytest_10.120x00010256b794 PyObject_Call + 404 (abstract.c:2245) 1

[issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL"

2016-10-18 Thread Christian Heimes
Christian Heimes added the comment: internal_setblocking() sets an exception w/o holding the GIL. #0 0x7711f6f5 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x771212fa in __GI_abort () at abort.c:89 #2 0x0042935f in Py_FatalError

[issue28471] Python 3.6b2 crashes with "Python memory allocator called without holding the GIL"

2016-10-18 Thread Yury Selivanov
Yury Selivanov added the comment: I have a patch already, writing a unittest. -- ___ Python tracker ___ ___

  1   2   >