[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Brett Cannon
Brett Cannon added the comment: If you run hg.python.org/benchmarks on Linux it has a flag to measure memory. -- ___ Python tracker ___

[issue26098] PEP 510: Specialize functions with guards

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: FIXME: sys.getsizecode(func) doesn't include specialized code and guards. -- ___ Python tracker ___

[issue26224] Add "version added" for documentation of asyncio.timeout for documentation of python 3.4, 3.5, 3.6

2016-01-27 Thread Udi Oron
New submission from Udi Oron: It seems like `asyncio.timeout` is going to be added in 3.4.5, 3.5.2 and 3.6. The current live documentation of python 3.4 and python 3.5.1 does not include a comment regarding it is not yet available in the current released versions of python. The documentation

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: If I understand correctly, this change requires to wait until the PEP 509 is accepted, right? Well, I'm not really suprised, since global cache is mentioned as an use case of the PEP 509, and other global cache patches are mentioned in Prior Art. --

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Stefan Krah
Stefan Krah added the comment: The spec was the only reasonable choice at the time decimal.py was written. Incidentally, it is basically IEEE-754-2008 with arbitrary precision extensions; this isn't surprising since Mike Cowlishaw was on the IEEE committee and wrote the spec at the same time.

[issue26225] New misleading wording in execution model documenation

2016-01-27 Thread Andrew Barnert
New submission from Andrew Barnert: In #24129, the wording describing class local bindings in 4.2.2 "Resolution of names" was changed for Python 3.4, 3.5, and 3.6. The new version is a lot clearer for classes--but now it's misleading for `exec`/`eval`. --- > Class definition blocks and

[issue26225] New misleading wording in execution model documenation

2016-01-27 Thread Andrew Barnert
Changes by Andrew Barnert : -- type: -> enhancement ___ Python tracker ___ ___

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-27 Thread Steve Dower
Steve Dower added the comment: VS 2015 won't cause this (I also work on that product as my day job, so I know exactly what it does and doesn't do), but the registry corruption probably did. The pip support that's in the 2.7 installer is not the most robust code, and it can easily run into

[issue17394] Add slicing support to collections.deque

2016-01-27 Thread Josh Rosenberg
Josh Rosenberg added the comment: It seems odd to have a slice of a deque return a list. Are there any other examples of non-buffer protocol objects behaving like this in the standard library/built-ins? Only examples I can come up with are mmap objects and ctypes arrays (which are making raw

[issue26225] New misleading wording in execution model documenation

2016-01-27 Thread Eryk Sun
Eryk Sun added the comment: The class example defines "i" as a local variable, which means the CPython operation used for unoptimized code (class or module/exec) is LOAD_NAME, which searches locals, globals, and builtins. The result differs from the exec example because a class is executed

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Can you suggest a sentence to insert into the docs and a place where to insert it? (As you can imagine I'm pretty blind for such issues myself.) -- ___ Python tracker

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: The decimal module strives to exactly follow the spec even when our sensibilities suggest otherwise. Perhaps, we can add a note to the current docs describing the situation. The API itself is a settled issue, that ship sailed a very long time ago (the

[issue26226] Various test suite failures on Windows

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: For the test_httpservers failure, can you please try the following commands on your PC? >>> socket.gethostname() 'selma' >>> socket.gethostbyaddr(socket.gethostname()) ('selma', [], ['2a01:e34:ec8d:4c70:3ea9:f4ff:fe65:c0c', 'fe80::3ea9:f4ff:fe65:c0c'])

[issue26226] Various test suite failures on Windows

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: I'm surprised by the test_codecencodings_iso2022 failures. Example: == FAIL: test_incrementaldecoder (test.test_codecencodings_iso2022.Test_ISO2022_KR)

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

2016-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: My only aversion to raising an exception is that it goes against the original intent of maxlen as giving an automatic-pop-to-make-room behavior. Rather that introduce a discontinuity, I like the "smoothness" of letting d.insert(len(d), obj) follow the

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

2016-01-27 Thread Josh Rosenberg
Josh Rosenberg added the comment: I agree with Tim that arbitrarily deciding that insert should behave more like appendleft is surprising. This really feels like guessing at what the user wants, silently doing something that really isn't predictable. Any of the following seem nicer (not

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-27 Thread Steve Dower
Steve Dower added the comment: That's true, though if you use the embeddable distribution of Python 3.5 you automatically get the equivalent behavior because of a new option (the "applocal" option in pyvenv.cfg, which is enabled in that distro by default). --

[issue26226] Various test suite failures on Windows

2016-01-27 Thread Emanuel Barry
Changes by Emanuel Barry : -- stage: -> needs patch versions: +Python 3.6 ___ Python tracker ___

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: FYI I created the issue #26227 to change the encoding used to decode hostnames on Windows. UTF-8 doesn't seem to be the right encoding, it fails on non-ASCII hostnames. I propose to use the ANSI code page. Sorry, I didn't read this issue, but it looks like

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2016-01-27 Thread Martin Panter
Martin Panter added the comment: I agree with all the changes you made. I made one review comment. It would be nice to add a test case to expose the problem. Correct me if I am wrong, but it doesn’t look like pty.spawn() is tested at all. FWIW on Linux, reading from the master end seems to

[issue26220] Unicode HOWTO references a question mark that isn't in snippet

2016-01-27 Thread Martin Panter
Martin Panter added the comment: Thanks for the report Quentin. -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue26226] Various test suite failures on Windows

2016-01-27 Thread Emanuel Barry
New submission from Emanuel Barry: Compiled latest master and ran test suite (Py_DEBUG build). A few failures here and there, and some tests skipped. I haven't yet looked into getting the proper libraries to make some of the skipped tests execute, I'm trying to make the whole test suite pass

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-27 Thread paul j3
paul j3 added the comment: There are 2 issues parsing - how to reserve one or more arguments for use by following 'positionals'. Fixes have been proposed in other bug/issues, but aren't trivial. usage formatting - the stock formatter displays all optionals first, followed by all

[issue26226] Various test suite failures on Windows

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7.11: >>> import socket >>> socket.gethostname() '\xc9manuel-PC' This one works on Python 3 because the Python function is implemented with a call to the Windows native API. >>> socket.gethostbyaddr(socket.gethostname()) ('\xc9manuel-PC.home', [],

[issue17394] Add slicing support to collections.deque

2016-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Returning a deque is preferred. For this stage, I just want to review the code and make sure it algorithmically correct (slicing is complicated and has a lot of cases). -- ___ Python tracker

[issue26226] Various test suite failures on Windows

2016-01-27 Thread Emanuel Barry
Emanuel Barry added the comment: Well, it has a non-ASCII character in it, so I wouldn't be surprised if this was the issue :) Latest master (3.6): >>> import socket >>> socket.gethostname() 'Émanuel-PC' >>> socket.gethostbyaddr(socket.gethostname()) Traceback (most recent call last): File

[issue26220] Unicode HOWTO references a question mark that isn't in snippet

2016-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63c1c7cdad0f by Martin Panter in branch '3.5': Issue #26220: Remove outdated comment about a question mark https://hg.python.org/cpython/rev/63c1c7cdad0f New changeset dbf90175ea50 by Martin Panter in branch 'default': Issue #26220: Merge Unicode

[issue26215] Make GC_Head a compile-time option

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: Could you please try to elaborate a little bit the issue? > I permanently use gc.disable() but CPython create object with GC_Head. it's use big memory. You propose to remove GC_Head for everywhere? Or do you want a configure option? What do you mean by "big

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Serge Stroobandt
Serge Stroobandt added the comment: An emphasized version of the exact quote is here now: http://stackoverflow.com/a/35045233/2192488 -- ___ Python tracker

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

2016-01-27 Thread Tim Peters
Tim Peters added the comment: My opinion doesn't change: I'd rather see an exception. I see no use case for inserting "into the middle" of a full bounded queue. If I had one, it would remain trivial to force the specific behavior I intended. --

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: Yes, this patch depends on PEP 509. -- ___ Python tracker ___ ___

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-27 Thread STINNER Victor
New submission from STINNER Victor: On Windows, socket.gethostbyaddr() must decode the hostname from the ANSI code page, not from UTF-8. See for example this issue: https://bugs.python.org/issue26226#msg259077 Attached patch changes the socket module to decode hostnames from the ANSI code

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2016-01-27 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file41734/gethostbyaddr_encoding.patch ___ Python tracker

[issue26173] test_ssl.bad_cert_test() exception handling

2016-01-27 Thread Martin Panter
Martin Panter added the comment: There are more mistakes in the history of test_nonexisting_cert(). In revision 8a281bfc058d (Python 2.6), the method was added as testWrongCert(), with an existing but non-matching certificate file. But when this was ported to Python 3 in r66311, the

[issue26173] test_ssl.bad_cert_test() exception handling

2016-01-27 Thread Martin Panter
Martin Panter added the comment: wrong-cert-py3.patch is similar but also adds the wrongcert.pem file from Python 2. -- keywords: -buildbot stage: needs patch -> patch review Added file: http://bugs.python.org/file41736/wrong-cert-py3.patch ___

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

2016-01-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file41732/full_deque2.diff ___ Python tracker ___

[issue26214] textwrap should minimize breaks

2016-01-27 Thread Tuomas Salo
New submission from Tuomas Salo: This code: import textwrap textwrap.wrap("123 123 1234567", width=5) currently* produces this output: ['123', '123 1', '23456', '7'] I would expect the textwrap module to only break words when absolutely necessary. That is, I would have expected

[issue26214] textwrap should minimize number of breaks in extra long words

2016-01-27 Thread Tuomas Salo
Changes by Tuomas Salo : -- title: textwrap should minimize breaks -> textwrap should minimize number of breaks in extra long words ___ Python tracker

[issue26214] textwrap should minimize number of breaks in extra long words

2016-01-27 Thread SilentGhost
Changes by SilentGhost : -- nosy: +georg.brandl versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

2016-01-27 Thread Yannick Duchêne
Yannick Duchêne added the comment: The documentation says: > Reset the instance. Loses all unprocessed data. How can parsing go ahead with all unprocessed data lost? This is the “Loses all unprocessed data” which made me believe it is to stop it. May be the documentation is unclear. By the

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-27 Thread Yannick Duchêne
Yannick Duchêne added the comment: `reset` is called to stop the parser. If really `reset` should not be called during parser hooks execution, then the documentation should says so and an error should be raised when `reset` is invoked. -- ___

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8de6f19afc86 by Victor Stinner in branch '3.5': Fix resize_compact() https://hg.python.org/cpython/rev/8de6f19afc86 -- nosy: +python-dev ___ Python tracker

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: Hum, it looks like resize_compact() clears wstr, but don't reset wstr_length to 0. Attached patch should fix that. -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file41728/wstr_len.patch ___

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry
New submission from Emanuel Barry: I compiled CPython from latest trunk on GitHub (revision a587bc1eea903dfac94a85324cc6ab39755769a8), compiled with Py_DEBUG and went to run the test suite. Here's the (rather long) output: E:\GitHub\cpython\PCbuild\win32>python_d -m test == CPython 3.6.0a0

[issue26218] Set PrependPath default to true

2016-01-27 Thread Wallison Resende Santos
New submission from Wallison Resende Santos: Please, set the PrependPath configuration to true. It's a good option for console developers on windows. -- components: Installation messages: 259028 nosy: Wallison Resende Santos priority: normal severity: normal status: open title: Set

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry
Emanuel Barry added the comment: This fixed it, thanks! -- stage: -> patch review ___ Python tracker ___ ___

[issue26217] Fatal error when importing ``test.test_os`` in debug mode on Windows

2016-01-27 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26229] Make number serialization ES6/V8 compatible

2016-01-27 Thread Anders Rundgren
New submission from Anders Rundgren: ECMA has in their latest release defined that JSON elements must be ordered during serialization. This is easy to accomplish using Python's OrderedDict. What is less trivial is that numbers have to be formatted in a certain way as well. I have tested

[issue26034] venv documentation out of date

2016-01-27 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Dan. Most of the docs has already been updated in c3c188a0325a. I've updated the remaining ones. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior

[issue20598] argparse docs: '7'.split() is confusing magic

2016-01-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't feel that strongly about it. -- ___ Python tracker ___ ___

[issue26002] make statistics.median_grouped more efficient

2016-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: This code looks good and will certainly reduce the number of comparisons in non-trivial cases. FWIW, It looks like the index functions are lifted directly from the bisect docs. Steven, any objections? -- nosy: +rhettinger stage: -> patch review

[issue25868] test_eintr.test_sigwaitinfo() hangs on "AMD64 FreeBSD CURRENT 3.x" buildbot

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: > This would also be avoided by blocking SIGUSR1. Sorry, I'm lost on this old and complex issue. Can you please propose a patch? If it doesn't break test_eintr on Linux and FreeBSD, we can just push it and take a look sometimes at FreeBSD buildbots ;-)

[issue26218] Set PrependPath default to true

2016-01-27 Thread Bruno Salvino
Bruno Salvino added the comment: Please, set the PrependPath configuration to true. -- nosy: +Bruno Salvino ___ Python tracker ___

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34ca24fa1b4a by Terry Jan Reedy in branch '2.7': Issue #25507: revert incorrect movement of idleConf import in a37ea1d56e98. https://hg.python.org/cpython/rev/34ca24fa1b4a New changeset 86105a109830 by Terry Jan Reedy in branch '3.5': Issue #25507:

[issue26220] Unicode HOWTO references a question mark that isn't in snippet

2016-01-27 Thread Quentin Pradet
New submission from Quentin Pradet: >From https://docs.python.org/3.6/howto/unicode.html#the-string-type: > The following examples show the differences:: > > >>> b'\x80abc'.decode("utf-8", "strict") #doctest: +NORMALIZE_WHITESPACE > Traceback (most recent call last): > ... >

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

2016-01-27 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2016-01-27 Thread R. David Murray
R. David Murray added the comment: So fixing distutils to use RawConfigParser? How likely is that to break currently working python3-only code? I'm imagining from what you wrote that your answer is "very close to zero', but I'd like explicit confirmation :) --

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Changes by Yury Selivanov : -- assignee: yselivanov components: Interpreter Core nosy: yselivanov priority: normal severity: normal stage: patch review status: open title: implement per-opcode cache in ceval type: performance versions: Python 3.6

[issue25675] doc for BaseEventLoop.run_in_executor() says its a coroutine, but it is not

2016-01-27 Thread Ian Kelly
Ian Kelly added the comment: The asyncio docs also have this note, so this is technically not a bug: Note: In this documentation, some methods are documented as coroutines, even if they are plain Python functions returning a Future. This is intentional to have a freedom of tweaking the

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-01-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.4 ___ Python tracker ___ ___

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-01-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ouch. Moving the idleConf import was a blunder. It disabled printing in 2.7.11, 3.4.4, and 3.5.1. When I revert, I will also augment the htest to test the printing and save-as functions. Still have to remember to run it though. This sort of functional

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread Ian Kelly
New submission from Ian Kelly: I was playing around with this class for adapting regular iterators to async iterators using BaseEventLoop.run_in_executor: import asyncio class AsyncIteratorWrapper: def __init__(self, iterable, loop=None, executor=None): self._iterator =

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-01-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Problem was reported here https://stackoverflow.com/questions/35021370/i-cant-print-from-python-idle-in-windows-10 -- ___ Python tracker

[issue26215] Make GC_Head a compile-time option

2016-01-27 Thread Brett Cannon
Changes by Brett Cannon : -- title: remove gc from CPython -> Make GC_Head a compile-time option ___ Python tracker ___

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue10401] Globals / builtins cache

2016-01-27 Thread INADA Naoki
Changes by INADA Naoki : -- nosy: +naoki ___ Python tracker ___ ___ Python-bugs-list

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Brett Cannon
New submission from Brett Cannon: I assume there's going to be a patch or more of a description of what your idea is? :) -- nosy: +brett.cannon ___ Python tracker

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: What are you trying to do here? Can you post a simple example of an iterator that you would like to use with this? Without that it just raises my hackles -- it seems totally wrong to run an iterator in another thread. (Or is the iterator really a

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: Yeah, I needed a URL of the issue for my email to python-dev ;) Here's a link to the email, that explains a lot about this patch: https://mail.python.org/pipermail/python-dev/2016-January/142945.html The patch is also attached (opcache1.patch). --

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +haypo, ncoghlan ___ Python tracker ___ ___

[issue26222] Missing code in linux_distribution python 2.7.11

2016-01-27 Thread Rasmus Rynning Rasmussen
New submission from Rasmus Rynning Rasmussen: During the transition from python 2.7.10 to 2.7.11 some code seems to have been lost. platform.linux_distribution() is not able to recognise Debian based distributions in python 2.7.11. The following code was present in platform.py, python 2.7.10,

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

2016-01-27 Thread Brett Cannon
Brett Cannon added the comment: If someone wants to try and fix this, I would look at how the warning for the 'with' statement was handled (it will either be in the compiler while generating bytecode or somewhere in the parser, but I'm fairly certain it's the compiler). -- nosy:

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-27 Thread Tom Parker
Tom Parker added the comment: FYI, I ran into this same issue, I believe this was caused by my selecting Python tools when installing Visual Studio 2015 Community edition. But I removed it and the issued didn't go away. Then I deleted some empty python registry keys and voila the installer

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

2016-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: The expected behavior should be "insert normally as if the deque were unbounded and then pop-off the rightmost element to restore the maxlen invariant". The applied fix does that for non-negative indices but gives the wrong result for negative indicies:

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed. And, since any API change would just be a 3.6+ change, this would increase the difficulty of moving between 2.7 and 3.x. Which is not something we want. -- ___ Python tracker

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: > If you run hg.python.org/benchmarks on Linux it has a flag to measure memory. Great. I'll re-run the benchmarks. BTW, the latest results are here: https://gist.github.com/1st1/aed69d63a2ff4de4c7be -- ___ Python

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread Ian Kelly
Ian Kelly added the comment: The idea is that the wrapped iterator is something potentially blocking, like a database cursor that doesn't natively support asyncio. Usage would be something like this: async def get_data(): cursor.execute('select * from stuff') async for row in

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: StopIteration has a special meaning. Don't use set_exception() with it. You probably need a more roundabout way to do this. Instead of submitting each __next__() call to the executor separately, you should submit something to the executor that pulls the

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Serge Stroobandt
New submission from Serge Stroobandt: In https://docs.python.org/2/library/string.html#formatstrings the proprietary (IBM) specifcation "Decimal Arithmetic Specification" http://www.gobosoft.com/eiffel/gobo/math/decimal/daconvs.html is incorrectly being heralded as "the" specifiaction for

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Changes by Yury Selivanov : -- dependencies: +Speedup method calls 1.2x ___ Python tracker ___

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Changes by Yury Selivanov : -- dependencies: +PEP 509: Add ma_version to PyDictObject ___ Python tracker ___

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread Serge Stroobandt
Serge Stroobandt added the comment: @rhettinger I completely agree with not creating a backward incompatibility at this point in time. The real issue is that decimal.to_eng_string() was written to a (unfortunately chosen) proprietary specification which does not entirely correspond to the

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

2016-01-27 Thread Tim Peters
Tim Peters added the comment: I'd raise an exception when trying to insert into a bounded deque that's already full. There's simply no way to guess what was _intended_; it's dead easy for the user to implement what they _do_ intend (first make room by deleting the specific item they no

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-27 Thread David Heffernan
David Heffernan added the comment: Thanks for following up Steve, and thanks for changing resolution to dupe. As for 3.5 and embedding the docs are much the same as 2.7 in that the example code at https://docs.python.org/3/extending/embedding.html doesn't explicitly set Python home.

[issue26221] asynco run_in_executor swallows StopIteration

2016-01-27 Thread Ian Kelly
Ian Kelly added the comment: Fair enough. I think there should be some documentation though to the effect that coroutines aren't robust to passing StopIteration across coroutine boundaries. It's particularly surprising with PEP-492 coroutines, since those aren't even iterators and intuitively

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-01-27 Thread SilentGhost
Changes by SilentGhost : -- versions: +Python 3.6 -Python 2.7 ___ Python tracker ___ ___

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

2016-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if implement the bahavior described by Raymond for index -len(d) <= i < len(d), but raise an exception if the index is out of this range? The result of deque('abc', maxlen=3).insert(i, 'X') would be: -4: error -3: ['X', 'a', 'b'] -2: ['a', 'X', 'b']

[issue26219] implement per-opcode cache in ceval

2016-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: BTW, there are a couple of unit-tests that fail. Both can be easily fixed. To really move this thing forward, we need to profile the memory usage. First, it would be interesting to see how much additional memory is consumed if we optimize every code object.

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-27 Thread Tom Parker
Tom Parker added the comment: Ah OK :) I had done a W10 reset to wipe my PC before reinstalling VS so I could't imagine where else the python registry keys could have come from. My install sequence was: SQL Server 2012 Developer Visual Studio 2015 Community Edition Office 365 Inkscape -

[issue26215] remove gc from CPython

2016-01-27 Thread yuriy_levchenko
New submission from yuriy_levchenko: I permanently use gc.disable() but CPython create object with GC_Head. it's use big memory. I suggest add define to a few file that remove use GC_Head and allocate extra memory. -- messages: 259013 nosy: yuriy_levchenko priority: normal severity:

[issue26215] remove gc from CPython

2016-01-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue24841] Some test_ssl network tests fail if svn.python.org is not accessible.

2016-01-27 Thread Martin Panter
Martin Panter added the comment: The two changes to test_ssl.py look okay to me, although they will need updating since the Issue 24841 changeover to pythontest.net. But I don’t think it is a good idea to add ENOTCONN to the list of errors ignored by all transient_internet() tests. In most

[issue26107] PEP 511: code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16f60cd918e0 by Victor Stinner in branch 'default': PEP 511 https://hg.python.org/peps/rev/16f60cd918e0 -- ___ Python tracker

[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16f60cd918e0 by Victor Stinner in branch 'default': PEP 511 https://hg.python.org/peps/rev/16f60cd918e0 -- ___ Python tracker

[issue26173] test_ssl.bad_cert_test() exception handling

2016-01-27 Thread Martin Panter
Changes by Martin Panter : -- keywords: +patch Added file: http://bugs.python.org/file41725/bad-cert-py3.patch ___ Python tracker

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

2016-01-27 Thread Anish Shah
Changes by Anish Shah : -- nosy: +anish.shah ___ Python tracker ___ ___

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

2016-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But the postcondition d[i] == newitem is broken if i is negative. >>> d = deque('ABC', maxlen=3) >>> d.insert(-1, None) >>> d deque(['A', None, 'B'], maxlen=3) I would expected ['A', 'B', None]. -- resolution: fixed -> status: closed -> open

[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

2016-01-27 Thread Yannick Duchêne
Yannick Duchêne added the comment: Thanks Xiang, for the clear explanations. So an error should be triggered when `reset` is invoked while it should not. And remains the issue about how to stop the parser: should an exception be raised and caught at an outer invocation level? Something like

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

2016-01-27 Thread STINNER Victor
STINNER Victor added the comment: > -1 is the position before the last element ('C'). After popping-off extra > element the result can be ['A', 'B', None] or ['B', None, 'C']. Oh ok :-) Now I'm confused, I don't know what is the expected behaviour :-) --

[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

2016-01-27 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, I don't know whether I am right or not. Let's wait for a core member to clarify. If I am wrong, I am quite sorry. I don't think invoking reset when parsing should raise an error(and I don't know how to achieve that). When to invoke a subroutine is

  1   2   >