[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would use different test, not depending on outer stack depth. -- keywords: +patch nosy: +serhiy.storchaka stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file42156/test_walk_stack.patch

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2016-03-13 Thread Martin Panter
Martin Panter added the comment: Since this was apparenly only a bug in 3.2, can we close it as being out of date? -- nosy: +martin.panter ___ Python tracker

[issue22854] Documentation/implementation out of sync for IO

2016-03-13 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker ___ ___

[issue747320] rfc2822 formatdate functionality duplication

2016-03-13 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue747320] rfc2822 formatdate functionality duplication

2016-03-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee64faffd46a by Berker Peksag in branch 'default': Issue #747320: Use email.utils.formatdate() to avoid code duplication https://hg.python.org/cpython/rev/ee64faffd46a -- nosy: +python-dev ___ Python

[issue16181] cookielib.http2time raises ValueError for invalid date.

2016-03-13 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4 ___ Python tracker

[issue16181] cookielib.http2time raises ValueError for invalid date.

2016-03-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 838f68a76ea1 by Berker Peksag in branch '3.5': Issue #16181: cookiejar.http2time() now returns None if year is higher than datetime.MAXYEAR https://hg.python.org/cpython/rev/838f68a76ea1 New changeset 8b7de03261f5 by Berker Peksag in branch

[issue23890] assertRaises increases reference counter

2016-03-13 Thread Robert Collins
Robert Collins added the comment: I don't think we make any guarantees for or against references, but - we attempt to free references already (see how we call clear_frames), so this is a bug, pure and simple. -- ___ Python tracker

[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Hmm, this is a little surprising, but - why are you raising AssertionError like that - thats what assertRaises is for. -- stage: -> needs patch ___ Python tracker

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-03-13 Thread Robert Collins
Robert Collins added the comment: The context manager errors if *nothing* matches, not if *everything* matches, which is very different to catch_warnings because the filters are used to *exclude* warnings, and excess warnings are errors there. Because of that, there's little if any reason to

[issue20556] Use specific asserts in threading tests

2016-03-13 Thread Robert Collins
Robert Collins added the comment: @Serhiy care to commit it? -- ___ Python tracker ___ ___ Python-bugs-list

[issue25520] unittest load_tests protocol not working as documented

2016-03-13 Thread Robert Collins
Robert Collins added the comment: What version of python are you testing with? unittest 2.7 has a number of bugs vis-a-vis namespaces and discovery. If you're testing with less than 3.5, or perhaps 3.6, please try with unittest2, which has the same fixes as the stdlib unittest. --

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Can we just stop running the test suite directly? python -m unittest test.test_traceback should work fine and as quickly, ... I'd like to delete all the __main__ in the test suite as cruft TBH. The patch would be ok if ugly, its a bit of a magic number

[issue25690] Replacement for unittest.mock.mock_open

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Hmm, I haven't looked closely, but some high level thoughts. I'm worried about making mock too complex here. We already say folk should use a VFS for complex file based tests, and there's quite a chunk of code you're adding - perhaps better to just use a VFS?

[issue24780] unittest assertEqual difference output foiled by newlines

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Thanks for the patch; reviewed in rietvald. -- ___ Python tracker ___ ___

[issue19217] Calling assertEquals for moderately long list takes too long

2016-03-13 Thread Robert Collins
Robert Collins added the comment: The new output seems ok to me? -- ___ Python tracker ___ ___

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2016-03-13 Thread Robert Collins
Robert Collins added the comment: I think we should close this again: if you subclass something you need to implement the full public API. raw has been in that API since 2010!. It's a shame that folk have been implementing just-enough, rather than the actual API, but I don't see that has all

[issue22625] When cross-compiling, don’t try to execute binaries

2016-03-13 Thread Martin Panter
Martin Panter added the comment: Thanks Robert. Russell also pointed out on python-dev that the patches at Issue 23670 show how he is doing cross compilation, via a new high-level iOS/Makefile file. Here is a cut-down version of the parts that I find relevant: # Build for the native build

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2016-03-13 Thread Robert Collins
Robert Collins added the comment: @mbussonn - I don't see an updated non-tty-checking patch from you? -- ___ Python tracker ___

[issue26481] unittest discovery process not working without .py source files

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Sorry, I missed the little footnote on case 4 about still supporting source-less distributions. I guess in that context we do still need to support this. However - please check that this does indeed happen on Python master - 3.6. unittest does evolve and if

[issue26481] unittest discovery process not working without .py source files

2016-03-13 Thread Robert Collins
Robert Collins added the comment: Python has stopped supporting .pyc-only distributions - see https://www.python.org/dev/peps/pep-3147/#case-3-pycache-foo-magic-pyc-with-no-source - and so, while what you are seeing is inconsistent with import in some older python's, it is not a bug in newer

[issue25900] unittest ignores the first ctrl-c when it shouldn't

2016-03-13 Thread Robert Collins
Robert Collins added the comment: I'd rather make this super simple: just terminate the test run immediately. We can catch KeyBoardInterrupt in the UI layer to still permit outputting summary information. That removes one more source of global state that makes testing fragile. --

[issue22625] When cross-compiling, don’t try to execute binaries

2016-03-13 Thread Robert Collins
Robert Collins added the comment: So in general: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/System-Type.html#System-Type and https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html There are three platforms in

[issue8232] webbrowser.open incomplete on Windows

2016-03-13 Thread Brandon Milam
Brandon Milam added the comment: I've tested the new patch and it is still able to properly find both chrome and firefox and is able to differentiate between new window and new tab for those two browsers so it is still working. Would someone review the patch? --

[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-03-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Define BufferedIOBase.read1(-1) to read and return an arbitrary number > of bytes, more than zero unless none are available due to EOF or > non-blocking mode. Maybe suggest that it would return the current > buffered data or try to read a full buffer of

[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-03-13 Thread Julien
Julien added the comment: Daily meditations: - This table is nice to show that there's various operations common to int and float (and does it well), not to list rounding methods (it happen to have only rounding methods, but that's a coincidence). - A coma separated list like

[issue26552] Failing ensure_future still creates a Task

2016-03-13 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds like an easy fix. Could you submit a patch? -- ___ Python tracker ___

[issue26549] co_stacksize is calculated from unoptimized code

2016-03-13 Thread Brett Cannon
Brett Cannon added the comment: I also suspect you're right, Antti, that the stack size is calculated prior to the bytecode being passed to through the peepholer which would have made the built tuple a value in the const array. Off the top of my head I don't remember where the stack size

[issue26549] co_stacksize is calculated from unoptimized code

2016-03-13 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, yselivanov ___ Python tracker ___

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-03-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: GPS: priority low, feel free to drop if it you want. SS: But for now status quo is good to me. Marking as closed. Feel free to open a separate tracker item if you want to pursue the use of Modules/hashtable.c. -- resolution: -> rejected status:

[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-03-13 Thread Martin Panter
Martin Panter added the comment: Calling BufferedReader.read1(sys.maxsize) gives me a MemoryError. Making read1(-1) equivalent to read1(sys.maxsize) only makes sense where the return value already has a predetermined size, and only a limited buffer needs to be allocated. Another

[issue26551] Regex.finditer infinite loops with certain input

2016-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is known issue. Some regular expressions has quadratic or even exponential complexity. Existing implementation can't be easy fixed. You can try an regular expressions engine that use completely different algorithms, i.e. re2

[issue26552] Failing ensure_future still creates a Task

2016-03-13 Thread Damien Nicolas
New submission from Damien Nicolas: When calling asyncio.ensure_future() on a coroutine, and if the loop is closed, ensure_future() will raise a RuntimeError. However, it still creates a Task, which will generate a RuntimeWarning that we can’t fix since there is no way to cancel the Task.

[issue26499] http.client.IncompleteRead from HTTPResponse read after part reading file

2016-03-13 Thread SilentGhost
SilentGhost added the comment: Updated patch addresses the rietveld comments. -- Added file: http://bugs.python.org/file42155/issue26499_5.diff ___ Python tracker

[issue26551] Regex.finditer infinite loops with certain input

2016-03-13 Thread Alan Mislove
Alan Mislove added the comment: Thanks for the quick reply, Serhiy! You're right -- after letting it run for even longer, it does complete. Sorry for the trouble. I have two quick followup questions: 1. Would this be considered a performance bug? On my machine, it runs for over 20

[issue26551] Regex.finditer infinite loops with certain input

2016-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is finite loop. Your script just needs too much time to finish. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue26551] Regex.finditer infinite loops with certain input

2016-03-13 Thread Alan Mislove
New submission from Alan Mislove: I found a regex and input that causes re.finditer() to appear to get into an infinite loop. Please see the attached minimal python script that triggers the behavior. I've verified the bug exists on 2.7.6, 3.4.0, and 3.5.1; I haven't yet be able to test

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-03-13 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > > Since interned strings table can only grow and contains exact strings, > other data structure may be more appropriate (for example > Modules/hashtable.c). > FYI this module is not well optimized. I took code and then

[issue26250] no document for sqlite3.Cursor.connection

2016-03-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti stage: -> patch review ___ Python tracker

[issue26176] EmailMessage example doesn't work

2016-03-13 Thread Ezio Melotti
Ezio Melotti added the comment: #26426 has been marked as duplicate of this, and contains more information about the error. -- nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker

[issue24918] Docs layout bug

2016-03-13 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch(es)! -- assignee: docs@python -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24918] Docs layout bug

2016-03-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 78e9c18d3e5b by Ezio Melotti in branch '3.5': #24918: fix CSS for code blocks when a side box is present. Patch by Manvi B. https://hg.python.org/cpython/rev/78e9c18d3e5b New changeset 444d80ae123e by Ezio Melotti in branch 'default': #24918:

[issue26512] Vocabulary: Using "integral" in library/stdtypes.html

2016-03-13 Thread Martin Panter
Martin Panter added the comment: Julien: I tend to keep doc strings rather concise. Just mention the main points, not all the obscure corner cases or examples. In this case I would probably just change “int” to “integer” (lowercase) or “numbers.Integral” if you want to be specific. You might