[issue28472] SystemTap usage examples in docs are incorrect

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c21df505684 by Benjamin Peterson in branch '3.6': always use double quotes for SystemTap string literals (closes #28472) https://hg.python.org/cpython/rev/5c21df505684 New changeset dc10bd89473b by Benjamin Peterson in branch 'default': merge 3.6 (

[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

[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2016-10-18 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- title: PyUnicode_FromFromat interger format handling different from printf about zeropad -> PyUnicode_FromFormat integer format handling different from printf about zeropad ___ Python tracker

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

2016-10-18 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 23188 (referenced above) covers making this a public API for 3.7. I think it's a good idea, but it's too late to add it to 3.6, and getting the documentation right is going to require some discussion (as using this new API isn't necessary if you're already

[issue28465] python 3.5 magic number

2016-10-18 Thread 曹忠
曹忠 added the comment: I try, still the same: On debian 9 and python 3.5.2: >>> importlib.util.MAGIC_NUMBER b'\x17\r\r\n' On windows and python 3.5.2 >>> importlib.util.MAGIC_NUMBER b'\x16\r\r\n' -- ___ Python tracker

[issue28472] SystemTap usage examples in docs are incorrect

2016-10-18 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lukasz.langa versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2016-10-18 Thread Tim Mitchell
Tim Mitchell added the comment: Am now working from tip of default in mercurial (Python 3.6). * Removed all changes to subprocess.rst. subprocess.__doc__ * Trimmed down even further - removed function signatures. * added note to see Python docs for complete description. Exception docs * just l

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

2016-10-18 Thread INADA Naoki
INADA Naoki added the comment: I think _WaitCancelFuture can do same thing by overriding callers of _schedule_callbacks. Attached patch does it, and make _schedule_callbacks private by renaming it to __schedule_callbacks. -- Added file: http://bugs.python.org/file45139/dont-override-sc

[issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files

2016-10-18 Thread R. David Murray
R. David Murray added the comment: I just checked, and nhm 1.3 produces a warning for case 1 and either fails to interpret anything past a token that starts with a '-' or it hangs. You should report the invalid sequence problem to claws mail. -- resolution: -> third party stage: -> r

[issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files

2016-10-18 Thread R. David Murray
R. David Murray added the comment: What do you mean by "crashes"? I'm sure you don't mean a segfault. Can you paste the traceback? Neither of those two cases are valid in mh, as far as I know, so I'm not sure there is anything to fix here. -- nosy: +r.david.murray type: crash -> beh

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Yury Selivanov
Yury Selivanov added the comment: Maybe we should fix asyncio. Maybe if a user passes an existing socket object into loop.create_connection, it should duplicate the socket. -- ___ Python tracker _

[issue26685] Raise errors from socket.close()

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: > My proposal: ignore EBADF in socket.close(). It means that the socket is > closed already. It doesn't matter why. As Martin explained, getting EBAD means that your code smells. Your code may close completely unrelated file descriptor... Say hello to race co

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Yury Selivanov
Yury Selivanov added the comment: My proposal: ignore EBADF in socket.close(). It means that the socket is closed already. It doesn't matter why. -- ___ Python tracker ___ ___

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Yury Selivanov
Yury Selivanov added the comment: Another example: some asyncio (run with uvloop) code: conn, _ = lsock.accept() f = loop.create_task( loop.connect_accepted_socket( proto_factory, conn)) # More code loop.run_forever() conn.clos

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Martin Panter
Martin Panter added the comment: If libuv closes the FD (step 3), won’t you get the same sort of problem if the uvloop user tries to do something else with the Python socket object, e.g. call getpeername()? I see the fileno=... parameter for sockets as a parallel to the os.fdopen() function,

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Martin Panter
Martin Panter added the comment: I think your code example is not very robust, because the “sock” object refers to a freed file descriptor, and could easily close an unrelated file: $ python3.5 -q >>> import socket >>> sock0 = socket.socket() >>> sock = socket.socket(fileno=sock0.fileno()) >>>

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Yury Selivanov
Yury Selivanov added the comment: IOW, what is happening in uvloop: 1. A user has a Python socket object and passes it asyncio (run with uvloop) API. 2. uvloop extracts the FD of the socket, and passes it to low-level libuv. 3. At some point of time, libuv closes the FD. 4. When user tries t

[issue26685] Raise errors from socket.close()

2016-10-18 Thread Yury Selivanov
Yury Selivanov added the comment: I think this patch should be reverted. It breaks backwards compatibility: import socket sock0 = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) sock = socket.socket( socket.AF_INET, socket.SOCK_STREAM, 0, sock0.fileno()) sock0.clos

[issue28473] mailbox.MH crashes on certain Claws Mail .mh_sequences files

2016-10-18 Thread Garrett Nievin
New submission from Garrett Nievin: Using Claws Mail, and mailbox.MH crashes on two different conditions: 1) sequence spans lines, suchly: unseen: 1-222 225-300 990-1024 1048-2048 Not Pythonic, but I fixed it with this update: def get_sequences(self): """Return a name-to-key-list d

[issue28472] SystemTap usage examples in docs are incorrect

2016-10-18 Thread Roman Podoliaka
New submission from Roman Podoliaka: There are a couple of errors in SystemTap examples from "Instrumenting CPython with DTrace and SystemTap" page (https://docs.python.org/dev/howto/instrumentation.html): 1) in SystemTap double quotes are used to denote string literals. As is examples fail w

[issue28441] Change sys.executable to include executable suffix

2016-10-18 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I agree to add the suffix to solve ambiguous path on Cygwin. And I think the patch should apply to all platforms having executable suffix. Therefore, I modified your patch to remove #if directive for Cygwin, and I changed title to spread covered platforms.

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

2016-10-18 Thread Martin Panter
Martin Panter added the comment: Thanks for tackling this one Tim. I agree with Berker that the :const:`True` changes are out of scope (some introduce errors and inaccuracies). class CalledProcessError(SubprocessError): -"""Raised when a check_call() or check_output() process returns non-z

[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'm curious. I tested in release mode, the example does crash: Well, since the GIL wasn't properly acquired, it's only a matter of time until something else crashes. -- ___ Python tracker

[issue24381] Got warning when compiling ffi.c on Mac

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: of course, I will do it. Thank for your review -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue28334] netrc does not work if $HOME is not set

2016-10-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue24381] Got warning when compiling ffi.c on Mac

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: Modules/_ctypes/libffi_osx/ffi.c comes from libffi, can you please propose a bugfix upstream? * https://sourceware.org/libffi/ * https://github.com/libffi/libffi I'm not sure where is the upstream. -- nosy: +haypo

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

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: I'm curious. I tested in release mode, the example does crash: $ ./python x.py Segmentation fault (core dumped) I'm able to get a Python traceback using PYTHONMALLOC=debug: $ PYTHONMALLOC=debug ./python x.py Fatal Python error: Python memory allocator calle

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

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: re_cache_ordered_dict_popitem.patch: LGTM, it can be pushed to the default branch. -- "This is unlikely possible with current API of lru_cache. Testing flags before looking up in a cache adds an overhead." Oh wait, I looked at the code and this case is compl

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

2016-10-18 Thread Ned Deily
Changes by Ned Deily : -- priority: release blocker -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[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: > In release mode, the check is disabled by default (can be enabled at runtime), and I don't think that the code can crash. It actually crashed in release mode for me. Maybe the exact location of SF was different, but whatever... Anyways, closing the issue. T

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

2016-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b5b233d4c98 by Yury Selivanov in branch '3.6': Issue #28471: Fix crash (GIL state related) in socket.setblocking https://hg.python.org/cpython/rev/4b5b233d4c98 New changeset 554fb699af8c by Yury Selivanov in branch 'default': Merge 3.6 (issue #2847

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

2016-10-18 Thread STINNER Victor
STINNER Victor added the comment: > Fatal Python error: Python memory allocator called without holding the GIL Oh, I didn't expect that my new check would catch such bug. Nice. In release mode, the check is disabled by default (can be enabled at runtime), and I don't think that the code can cra

[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: 3.5 is not affected by the crasher. I only added the error check to default (3.6). -- ___ Python tracker ___

[issue28334] netrc does not work if $HOME is not set

2016-10-18 Thread Dimitri Merejkowsky
Dimitri Merejkowsky added the comment: During review SilentGhost suggested that maybe a test was not essential. In any case, I think patching documentation about the new behavior won't hurt. Do you want me to do that? -- ___ Python tracker

[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: > LGTM, thanks Yury! NP :) Should this be committed to 3.6/default, or in 3.5 too? -- ___ Python tracker ___ _

[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: LGTM, thanks Yury! -- stage: -> patch review type: -> crash versions: +Python 3.7 ___ Python tracker ___ ___

[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: Attaching a patch to fix this. Please review. -- keywords: +patch Added file: http://bugs.python.org/file45136/issue28471.patch ___ Python tracker _

[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: It's my fault. I added the "goto error" w/o realizing that I forgot to re-acquire the GIL. -- ___ Python tracker ___

[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 ___ ___ Python-bugs-list mailing l

[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 (msg=0x

[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 pytest_

[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 ___ ___ Python-bugs-list mailing list Unsubscr

[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",

[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 in

[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 asyncio.open_connect

[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 _

[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 sensel

[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 enhancements.

[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 t

[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 ___ __

[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 > reliable

[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 ___ ___ Pytho

[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* reli

[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 ___ ___ Python-bug

[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

[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:

[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 (p

[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 ->

[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, it

[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

[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 __

[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 comment

[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, I

[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 won't

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue26010] document CO_* constants

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

[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 it

[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 ___

[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 timei

[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: 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" synta

[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 with

[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 (nanosecond

[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

[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 th

[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 ___ ___ Python-bugs-list mailing list Unsubscr

[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 ___ ___ Python-bugs-list mailing list Unsubscr

[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) \n[

[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

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- assignee: -> haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[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 5,

[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 ___ ___ Python-bugs-

[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.

[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 ___ ___ Python-bugs-list mailing list Unsubscri

[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

[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

[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

[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

[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 fo

[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 ___ ___

[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 __set_name_

[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 function

[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

[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

[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 the

[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 ___ __

[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 ins

[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 ___ _

[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. -- _

  1   2   >