[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
TypeError: Struct() argument 1 must be string, not unicode
 struct.pack(u'B',1)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: Struct() argument 1 must be string, not unicode
 struct.pack('B',1) # this is ok
'\x01'
 struct.pack(u'B',1)
'\x01'

--
components: Unicode
messages: 198464
nosy: ezio.melotti, miwa
priority: normal
severity: normal
status: open
title: struct.pack fails first time with unicode fmt
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 module
  File /home/serhiy/py/cpython/Lib/pprint.py, line 56, in pprint
printer.pprint(object)
  File /home/serhiy/py/cpython/Lib/pprint.py, line 137, in pprint
self._format(object, self._stream, 0, 0, {}, 0)
  File /home/serhiy/py/cpython/Lib/pprint.py, line 274, in _format
write(rep)
UnicodeEncodeError: 'ascii' codec can't encode character '\u20ac' in position 
1: ordinal not in range(128)

This is a regression from Python 2 in which repr() always returns ascii string.

$ LANG= python2.7 -c import pprint; pprint.pprint(u'\u20ac')
u'\u20ac'

Perhaps pprint() should use the backslashreplace error handler (as 
sys.displayhook()). With the proposed patch:

$ LANG= ./python -c import pprint; pprint.pprint('\u20ac')
'\u20ac'

--
components: Library (Lib), Unicode
files: pprint_unencodable.patch
keywords: patch
messages: 198465
nosy: ezio.melotti, fdrake, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use backslashreplace in pprint
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31881/pprint_unencodable.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19100
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 buildbot
type: crash
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19101
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
stage: patch review
status: open
title: Add tests for CLI of the tabnanny module
versions: Python 3.4
Added file: http://bugs.python.org/file31882/test_tabnanny.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: displayhook_pprint.patch
keywords: patch
messages: 198468
nosy: fdrake, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use pprint in displayhook
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31883/displayhook_pprint.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19103
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19101
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 character and the result can't be used as input to the interpreter.

 pprint.pprint('abc '*20)
'abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc '\
'abc '

--
components: Library (Lib)
keywords: easy
messages: 198474
nosy: fdrake, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: pprint produces invalid output for long strings
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 '
 '28 29']
 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 12 13 14 15 16 17 18 19 20 '
'21 22 23 24 25 26 27 28 29'

As you can see in second example there is a place for at least '21 22 23 ' at 
the right. In case of multiline representation of nested items pprint can 
reserve space only at the end of last line and continue inner lines to full 
width.

--
components: Library (Lib)
messages: 198475
nosy: fdrake, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: pprint doesn't use all width
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19105
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue19103
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: needs patch - patch review
Added file: http://bugs.python.org/file31886/pprint_str_evaluable.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19030
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/pipermail/python-dev/2013-September/128992.html

A couple of issues are prerequisites:

1. Fix the asdl dependencies in .hgtouch:

Include/ast.h: Parser/Python.asdl Parser/asdl.py Parser/asdl_c.py
Python/Python-ast.c: Include/ast.h

The file Include/ast.h is not, in fact, auto-generated. But 
Include/Python-ast.h *is*, and it does not appear in this file.

2. Make sure 'hg touch' itself runs on Python 2.4 because that's what some bots 
have (and other older systems like RHEL 5)

--
assignee: eli.bendersky
components: Build
messages: 198482
nosy: eli.bendersky, ezio.melotti, loewis, pitrou
priority: normal
severity: normal
status: open
title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 +2448,7 @@
 raise ValueError(Invalid output_style: %r % options.output_style)
 
 if options.csv:
-with open(options.csv, wb) as f:
+with open(options.csv, w) as f:
 writer = csv.writer(f)
 writer.writerow(['Benchmark', 'Base', 'Changed'])
 for name, result in results:

--
components: Benchmarks
messages: 198483
nosy: scoder
priority: normal
severity: normal
status: open
title: CSV output of benchmark runner tries to write to binary file
type: behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19107
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19016
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 extensions.touch=Tools/hg/hgtouch.py touch -v
Touching Include/Python-ast.h
Touching Python/Python-ast.c
$ make touch
hg --config extensions.touch=Tools/hg/hgtouch.py touch -v
Touching Python/Python-ast.c

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 reason why I noticed this is because the new function assumes that it can 
run python with the -c option and pass an arbitrary Python command string. 
That may not be true if it is actually executing some wrapper script (as we do 
for Cython, for example). Currently, the only requirement for the external 
Python command is that it can run a Python script that it receives on the 
command line. We shouldn't unnecessarily extend that interface.

I'm not sure how to best fix this, but the only way I can currently see is to 
run an external Python script that prints the requested information.

--
components: Benchmarks
messages: 198487
nosy: brett.cannon, pitrou, scoder
priority: normal
severity: normal
status: open
title: Benchmark runner tries to execute external Python command and fails on 
error reporting
type: behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 multiple lines by wrapping expressions in parentheses. These should be 
used in preference to using a backslash for line continuation.

Also, please note that in both cases it adds a character to the lines, which 
must be taken into account in the algorithm.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 considered harmful[1].

http://comments.gmane.org/gmane.comp.python.ideas/20525

--
Added file: http://bugs.python.org/file31887/pprint_str_evaluable_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 they get the same stat time exactly. In the next run, then, this 
comparison succeeds and .c is touched again.

I'm not sure what's the right way to go about this? Changing the comparison to 
 may theoretically miss cases in which the input was updated an epsilon after 
it auto-generated its output, and the change will go unnoticed. A different 
solution would be to introduce a micro-wait between each 'touch' to make sure 
that transitive dependencies don't need to be revisited in the future.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 from a 'urljoin' perspective than two different 
types.

You've given me reason to re-consider your patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19094
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 safer just do not wrap long line on first level.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 a mistake to violate the O/S standards and norms.
I recommend this issue be closed.

--
assignee:  - rhettinger
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19089
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue19089
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 start argument won't help you, because you will discard information on 
input.  A sequence like [1E100, 0.1, -1E100, 0.1] wouldn't work when split into 
subtotal=fsum([1E100, 0.1]) and fsum([-1E100, 0.1], start=subtotal).

 My motivation for this is that I want to be able to write 
 an efficient sum function that is accurate for a mix of ints
 and floats

FWIW, fsum() already works well with integers as long as they don't exceed 
53bits of precision.  For such exotic use cases, the decimal module would be a 
better alternative.  Now that the decimal module has a C implementation, there 
is no reason not to use it for high precision applications.

It is possible to extent the current fsum() implementation to separately track 
integers and combine it with the float results at the end.   That said, the 
probability that any user (other than yourself) will need this can only be 
expressed as a denormal number ;-)

I'm not rejecting the request; rather, I'm questioning the need for it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19086
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
the_module = importlib.import_module(abstest)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\importlib\__init__.py,
 line 95, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File frozen importlib._bootstrap, line 1613, in _gcd_import
  File frozen importlib._bootstrap, line 1594, in _find_and_load
  File frozen importlib._bootstrap, line 1561, in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 607, in _check_name_wrapper
  File frozen importlib._bootstrap, line 1056, in load_module
  File frozen importlib._bootstrap, line 926, in load_module
  File frozen importlib._bootstrap, line 274, in _call_with_frames_removed
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_logging.py,
 line 1365, in module
class SocketHandlerTest(BaseTest):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_logging.py,
 line 1369, in SocketHandlerTest
server_class = TestTCPServer
NameError: name 'TestTCPServer' is not defined

I took a quick look at it and the code seemed fine... but obviously there's 
something going on.

Can you try to fix this before I cut 3.4a3 tomorrow?

--
assignee: vinay.sajip
components: Tests
keywords: buildbot
messages: 198498
nosy: larry, vinay.sajip
priority: high
severity: normal
stage: needs patch
status: open
title: 'TestTCPServer' is not defined
type: crash
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19109
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 #19053: ZipExtFile.read1() with non-zero argument no more returns empty
http://hg.python.org/cpython/rev/f1c6e7f86bbc

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19053
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18314
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

I see the use cases for complex return types that don't fall under the concerns 
raised by Thomas as the following:

* Returning a pointer to already existing memory.
* Returning complex value types (structs of ints, doubles, chars, ect). This is 
especially important from a compatibility standpoint for C libraries which 
expect such return types.

Because I need this for my current project I will work on writing a patch.

--
nosy: +Mason.Bially

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5710
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19104
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, but will try to keep 
an eye out for any further information on this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19109
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue19069
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19011
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com