[issue9325] Add an option to pdb/trace/profile to run library module as a script

2013-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9325 ___

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___

[issue19099] struct.pack fails first time with unicode fmt

2013-09-27 Thread Musashi Tamura
New submission from Musashi Tamura: C:\python Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit AMD64)] on win32 Type help, copyright, credits or license for more information. import struct struct.pack(u'B',1) Traceback (most recent call last): File stdin, line 1, in module

[issue19100] Use backslashreplace in pprint

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently pprint.pprint() fails on unencodable characters. $ LANG=en_US.utf8 ./python -c import pprint; pprint.pprint('\u20ac') '€' $ LANG= ./python -c import pprint; pprint.pprint('\u20ac') Traceback (most recent call last): File string, line 1, in

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Larry Hastings
New submission from Larry Hastings: Can you fix this before I tag 3.4a3 please? -- assignee: pitrou components: Build keywords: buildbot messages: 198466 nosy: larry, pitrou priority: high severity: normal stage: needs patch status: open title: make touch broke x86 Ubuntu Shared 3.x

[issue19102] Add tests for CLI of the tabnanny module

2013-09-27 Thread Berker Peksag
New submission from Berker Peksag: I was trying to use the argparse module instead of getopt and I couldn't find any tests for CLI of the tabnanny module. -- components: Tests files: test_tabnanny.diff keywords: patch messages: 198467 nosy: berker.peksag priority: low severity: normal

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: pprint.pprint() produces more human readable output than print(repr()) which is used in sys.displayhook(). The proposed patch changes sys.displayhook in site.py. You still can access original displayhook as sys.__displayhook__. -- files:

[issue19009] Enhance HTTPResponse.readline() performance

2013-09-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: A new patch set, in response to Serhiy's comments on Rietveld. -- Added file: http://bugs.python.org/file31884/httpresponse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19009

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: When pointing to a buildbot, please remember posting a URL, it makes things easier :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Larry Hastings
Larry Hastings added the comment: Sorry, here: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Haha, thank you. So, this is the exact same problem that running hg touch on the buildbots was supposed to prevent :-) Well, at least the fix should be next to trivial. -- components: +Demos and Tools -Build keywords: +easy versions: +Python 2.7,

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: ac5343148fb3 -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The documentation says: The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter. But #since issue17150 long lines are splitted on shorter lines without continuation

[issue19105] pprint doesn't use all width

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: pprint not only adds indentation, but also increases right margin for nested items. pprint.pprint([' '.join(str(i) for i in range(30))]*2) ['0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ' '28 29', '0 1 2 3 4 5 6 7 8 9 10 11

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: This should be fixed in 2.7 too. -- assignee: pitrou - benjamin.peterson status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In second patch the COLUMNS environment variable is used to determine pprint's width. -- Added file: http://bugs.python.org/file31885/displayhook_pprint_2.patch ___ Python tracker rep...@bugs.python.org

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread R. David Murray
R. David Murray added the comment: FYI this defect was mentioned (by Antoine) in Issue17530, though that issue is about bytes. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19104

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2.7 doesn't have hgtouch. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue17530] pprint could use line continuation for long bytes literals

2013-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you David. In any case this is worth a separate issue. Here is a patch. Personally I prefer to add continuation backslash even for inner wrapped lines, but I'm not sure that most core developers will agreed with it. -- keywords: +patch stage:

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Use backslashreplace in pprint, pprint produces invalid output for long strings ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19103

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-27 Thread Martijn Pieters
Martijn Pieters added the comment: Note: there is a comment explaining the point of _RouteClassAttributeToGetattr right above the Enum.name and Enum.value methods you changed (now at line 474). You may want to update that comment now. -- nosy: +mjpieters

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
New submission from Eli Bendersky: Background: we'd like to enable running 'make touch' on the bots before 'make -jN', to avoid problems with scripts that auto-generate code for the Python build (bootstrapping). pydev thread:

[issue19107] CSV output of benchmark runner tries to write to binary file

2013-09-27 Thread Stefan Behnel
New submission from Stefan Behnel: The perf.py script opens the file for CSV output in binary mode, which no longer works in Py3: Index: perf.py === --- perf.py (Revision 80409) +++ perf.py (Arbeitskopie) @@ -2443,7

[issue19107] CSV output of benchmark runner tries to write to binary file

2013-09-27 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +brett.cannon, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19107 ___ ___

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac19ff225280 by Eli Bendersky in branch 'default': Fix .hgtouch to list the dependencies for auto-generated AST code correctly. http://hg.python.org/cpython/rev/ac19ff225280 -- nosy: +python-dev ___

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- Removed message: http://bugs.python.org/msg198484 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19016 ___

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
Eli Bendersky added the comment: .hgtouch fixed in ac19ff225280 (I specified the issue number incorrectly so this one wasn't notified). Curiously, `make touch` seems to think there's still things to do even after the first round of touching: $ touch Parser/asdl_c.py $ make touch hg --config

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Michael Foord
Michael Foord added the comment: I dislike adding namedtuple specific code to mock. How many different types should we special case here and in other places? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19016

[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-09-27 Thread Stefan Behnel
New submission from Stefan Behnel: In changeset 88b6ef9aa9e9, a new function ported_lib() was added that crashes on error reporting in Py3 because it tries to do this: raise RuntimeError(Benchmark died: + err) err is a bytes object that comes straight from the subprocess pipe. The

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: According to PEP 8, parentheses should be used for multi-line expressions, not backslashes: The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
Eli Bendersky added the comment: Ooh, I think that's because the # try processing all rules in topological order in do_touch doesn't actually topo-sort. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19106

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Second path uses parentheses. It is more complicated than first patch. I prefer first patch, because it is simple, because second variant wastes more width, because parentheses looks too similar to tuple, and because implicit string literal concatenation

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
Eli Bendersky added the comment: The problem in this case is different, actually. It's the comparison: if o_time = i_time: # generated file is older, touch need_touch = True In check_rule. The script is pretty quick so when it touches both Python-ast.h and .c

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: implicit string literal concatenation considered harmful Both patches rely on implicit string literal concatenation. Another possibility is not fixing this issue, and deciding it is normal behaviour. It is trivial to add parentheses if you need them.

[issue19094] urljoin should raise a TypeError if URL is not a string

2013-09-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't mind the AttributeError - that's a reasonable exception when passing invalid types in, and that's in fact the current behavior. The example of (['a'], []) does bother me though. Those inputs are also seemingly invalid, though somewhat more compatible

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both patches rely on implicit string literal concatenation. But with backslash it *looks* less implicit. Another possibility is not fixing this issue, and deciding it is normal behaviour. It is trivial to add parentheses if you need them. It would be

[issue19089] Windows: Make Ctrl-D exit key combination cross-platform

2013-09-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Brain Curtin] Ctrl-Z and Ctrl-D simply have different meanings on the different platforms, outside of what Python does. We already can't make Ctrl-Z on Windows do what it does on Linux, and Ctrl-D is not natural to Windows users. I concur. It would be

[issue19089] Windows: Make Ctrl-D exit key combination cross-platform

2013-09-27 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- priority: normal - low type: - enhancement versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue19086] Make fsum usable incrementally.

2013-09-27 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19086 ___

[issue19089] Windows: Make Ctrl-D exit key combination cross-platform

2013-09-27 Thread Eric V. Smith
Eric V. Smith added the comment: Closing as rejected. -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089 ___

[issue19086] Make fsum usable incrementally.

2013-09-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the reason for __builtin__.sum() having a start argument was so that it could change the base datatype: sum(iterable, start=Fraction(0)). [Oscar Benjamin] Although fsum is internally very accurate it always discards information on output. A

[issue19109] 'TestTCPServer' is not defined

2013-09-27 Thread Larry Hastings
New submission from Larry Hastings: The Win32 buildbots just started failing: http://buildbot.python.org/all/waterfall?category=3.x.stable They fail with this traceback: test test_logging crashed -- Traceback (most recent call last): File ../lib/test/regrtest.py, line 1269, in runtest_inner

[issue19053] read1() from zipfile returns empty data

2013-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 460b0ccbab7f by Serhiy Storchaka in branch '3.3': Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty http://hg.python.org/cpython/rev/460b0ccbab7f New changeset f1c6e7f86bbc by Serhiy Storchaka in branch 'default': Issue

[issue19053] read1() from zipfile returns empty data

2013-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19053

[issue18314] Have os.unlink remove junction points

2013-09-27 Thread Kim Gräsman
Kim Gräsman added the comment: _delete_junction_point currently shells out to a command-line tool, junction.exe, from SysInternals. That ran fine on XP. As I understand it, RemoveDirectoryW on XP also takes care of junction points, but I'll find a machine to verify. --

[issue5710] ctypes should return composite types from callbacks

2013-09-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: theller - versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5710 ___

[issue5710] ctypes should return composite types from callbacks

2013-09-27 Thread Mason Bially
Mason Bially added the comment: I agree with Amaury that this is purely a user side concern. While I think it's important to note the behaviour of ctypes in the case that Thomas describes, I believe it's more important to fully support the range of behaviours allowed by C function callbacks.

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another possibility is not fixing this issue, and deciding it is normal behaviour. It is trivial to add parentheses if you need them. It would be safer just do not wrap long line on first level. That would defeat the whole point of pprint(). --

[issue19109] 'TestTCPServer' is not defined

2013-09-27 Thread Vinay Sajip
Vinay Sajip added the comment: It's to do whether threading is available or not (not Windows related, AFAICT) ... I have corrected the code and it now seems to be OK - the few buildbots that are red seem to be failing on other things. I'll leave it to you to verify this and close this issue,

[issue19068] Some built-in complex docstrings are not PEP-8 compatible

2013-09-27 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19068 ___ ___

[issue19069] Built-in float docstrings are not PEP-8 compatible

2013-09-27 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19069 ___ ___

[issue19067] Built-in range docstrings are not PEP-8 compatible

2013-09-27 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19067 ___ ___

[issue19069] Built-in float docstrings are not PEP-8 compatible

2013-09-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please don't flood the tracker with these individual reports. Present a single consolidated patch in Issue 19069. -- nosy: +rhettinger resolution: - duplicate status: open - closed ___ Python tracker

[issue19067] Built-in range docstrings are not PEP-8 compatible

2013-09-27 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19067 ___ ___

[issue19011] Enum should have a __getattr__ that makes all the instances available from an instance

2013-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47fb6b078b5f by Ethan Furman in branch 'default': Close #19011: Add documentation on some of the non-standard Enum behavior. http://hg.python.org/cpython/rev/47fb6b078b5f -- nosy: +python-dev resolution: - fixed stage: patch review -