[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-26 Thread Lucas Maystre

Lucas Maystre added the comment:

Is there something I can do something to move this forward?

--

___
Python tracker 

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



[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2012-11-26 Thread Catalin Iacob

Changes by Catalin Iacob :


--
nosy: +catalin.iacob

___
Python tracker 

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



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-26 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Since Steven is not responding, I think I can commit it at some point. Thanks 
for the remainder :)

--
assignee:  -> petri.lehtinen

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread anatoly techtonik

anatoly techtonik added the comment:

',' makes lists less readable, directly the opposite of what the *indent* 
option is for. The *separators* variable is a insufficient solution, because it 
was not designed to work with indents.

Therefore the original solution to strip trailing space when indent is active 
is a perfect intuitive default.

--

___
Python tracker 

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



[issue11218] pattern=None when following documentation for load_tests and unittest.main()

2012-11-26 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue16548] os.system won't run any command and there is no error message when memory cannot be allocated

2012-11-26 Thread R. David Murray

R. David Murray added the comment:

Agree with the rejection.  os.system is intended to be a minimal wrapper around 
the system call, as are most things in the os module, and as such mirroring the 
behavior of the system call (by returning -1) is less surprising than raising 
an exception, even though the normal Python pattern would otherwise be to raise 
an exception.  Given that, and given that this is an API of long standing, and 
given that Popen is the real Python interface to this functionality, I agree 
that this should not be changed.

--
nosy: +r.david.murray
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16557] PEP 380 isn't reflected in the Functional Programming HOWTO

2012-11-26 Thread Masami HIRATA

New submission from Masami HIRATA:

Although PEP 380 says:
> 2. In a generator, the statement ::
> 
> return value
> 
> is semantically equivalent to ::
> 
> raise StopIteration(value)

Functional Programming HOWTO (Doc/howto/functional.rst) says:
> ``return`` with a value, such as ``return 5``, is a syntax error inside a 
> generator function.

--
assignee: docs@python
components: Documentation
messages: 176407
nosy: docs@python, msmhrt
priority: normal
severity: normal
status: open
title: PEP 380 isn't reflected in the Functional Programming HOWTO
versions: Python 3.3

___
Python tracker 

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



[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2012-11-26 Thread Masami HIRATA

Masami HIRATA added the comment:

Is there any progress on this issue?

--

___
Python tracker 

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



[issue1466065] base64 module ignores non-alphabet characters

2012-11-26 Thread Lukasz Taczuk

Lukasz Taczuk added the comment:

Could someone update the docs for python 2.7.3?

This ticket is marked as closed and b64decode still silently ignores non base64 
chars, but the documentation (for 2.7.3) still states that while calling 
b64decode "A TypeError is raised if (...) or if there are non-alphabet 
characters present in the string.".
http://docs.python.org/2.7/library/base64.html

--
nosy: +ltaczuk

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: 
http://bugs.python.org/file28121/json_indent_separators_default.patch

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Changing note about YAML is not needed, JSON lefts 
YAML-compatible even with identation.

--
Added file: 
http://bugs.python.org/file28128/json_indent_separators_default.patch

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> ',' makes lists less readable, directly the opposite of what the *indent* 
> option is for.

',' used by default only when indentation used. It increases readability.

--

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Of course, this is a new feature and should be only in 3.4.

--
nosy: +pitrou, rhettinger
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue16554] The description of the argument of MAKE_FUNCTION and MAKE_CLOSURE is incorrect

2012-11-26 Thread Andrew Svetlov

Andrew Svetlov added the comment:

The patch is better than current doc.
Would you like to replace textual description of stack layout with some kind of 
ascii-art or table? I think it can be more readable.

--
nosy: +asvetlov

___
Python tracker 

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



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-26 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The patch needs documentation, though, right?

http://docs.python.org/dev/library/argparse.html#filetype-objects

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue15587] IDLE is pixelated on the Macbook Pro with Retina Display

2012-11-26 Thread Kevin Walzer

Kevin Walzer added the comment:

This can probably be fixed by setting this key in the app's info.plist file: 

NSHighResolutionCapable


Under the hood, Tkinter/Tk-Cocoa uses CoreText to render text, and I understand 
this to adapt to high-res displays out of the box--as long as the proper key is 
set in the plist file. 

Only pixmaps/images require special developer handling to display properly on 
Retina displays. As IDLE does not use any such graphics, it should be fine. 

Can someone file a patch for the info.plist file, or at try editing the app's 
info.plist file and then testing on a high-res display? I do not have access to 
a Retina display machine on my system. Here are more details on how to enable 
the key and test it:

http://apple.stackexchange.com/questions/53717/how-does-eclipse-work-on-new-retina-macbook-pros

--
nosy: +wordtech

___
Python tracker 

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



[issue16558] multiprocessing fails to raise exception with parameters

2012-11-26 Thread Brian Candler

New submission from Brian Candler:

Probably best demonstrated by example.


import multiprocessing

class Myerror(ValueError):
def __init__(self,a):
self.a = a
def __str__(self):
return repr(self.a)

def foo(arg):
raise Myerror(arg)

#foo("1")   #<= this works fine, raises exception as expected

#But this breaks:
pool = multiprocessing.Pool(2)
pool.map(foo, ["1","2","3"])


The result seen:


Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 353, in 
_handle_results
task = get()
TypeError: ('__init__() takes exactly 2 arguments (1 given)', , ())


At this point the application hangs. Worse: pressing ctrl-C shows a traceback 
and KeyboardInterrupt, but the worker keeps getting restarted, so it's 
impossible to stop. You have to go to another shell and do somthing like

killall python

to terminate the program.

A real-world example (which caused me to track this down) is a 
CalledProcessError raised by subprocess.check_call


import multiprocessing
import subprocess

def foo(arg):
subprocess.check_call("nonexistent", shell=True)
#raise subprocess.CalledProcessError(127, "nonexistent")

pool = multiprocessing.Pool(2)
pool.map(foo, ["1","2","3"])


which fails in the same way:


Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 353, in 
_handle_results
task = get()
TypeError: ('__init__() takes at least 3 arguments (1 given)', , ())


Behaviour tested on:
python 2.7.3 on Ubuntu 12.04
python 2.7.1 on OSX 10.7.5

Workaround: re-raise a parameter-less exception instead.

try:
...
except Exception as e:
raise RuntimeError

--
components: Library (Lib)
messages: 176416
nosy: candlerb
priority: normal
severity: normal
status: open
title: multiprocessing fails to raise exception with parameters
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue1827] svnversion_init() doesn't support svn urls in sandbox/trunk

2012-11-26 Thread Christian Heimes

Christian Heimes added the comment:

I'm closing this issue as `YAGNI anymore`.

--
resolution:  -> out of date
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py)

2012-11-26 Thread Christian Heimes

Christian Heimes added the comment:

For Python 3.3 and 3.4 make smelly still lists two exported symbols.

asdl_int_seq_new
asdl_seq_new


Do we have to check the modules, too? Some of them like _ctypes and _decimal 
export a lot of symbols. Here is a small shell snippet for Makefile.

   for MOD in `find $(srcdir)/build -name '*.s[ol]' ` ; do \
   EXPORT=`nm -p $$MOD | sed -n "/ [TDB] /s/.* //p" | \
   grep -E -v "^_*Py|^_init|^_fini" | sort -u`; \
   if [ -n "$$EXPORT" ]; then \
   echo $$MOD; \
   echo $$EXPORT; \
   fi \
   done

--
versions: +Python 3.3, Python 3.4 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue1540] Refleak tests: test_doctest and test_gc are failing

2012-11-26 Thread Christian Heimes

Changes by Christian Heimes :


--
stage:  -> patch review
type:  -> behavior
versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.0

___
Python tracker 

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



[issue2039] Pymalloc patch for int and float objects

2012-11-26 Thread Christian Heimes

Christian Heimes added the comment:

The patch is no longer required. floatobject.c no longer uses the old block 
allocation way and uses Python's internal memory manager.

--
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue1977] Python reinitialization test

2012-11-26 Thread Christian Heimes

Christian Heimes added the comment:

Antoine, is the test still required? #10914 has introduced tests for the 
subinterpreter.

--
assignee:  -> pitrou
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The json module tests contain testcases from the official testsuite 
(http://json.org/JSON_checker/test.zip). At the moment these testcases differ 
slightly and the proposed patch updates testcases to conform with the current 
official testsuite (which was changed 2007-10-05 last time).

I think tests updating can be applied to old Python versions.

--
components: Tests
files: json_tests.patch
keywords: patch
messages: 176421
nosy: ezio.melotti, pitrou, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Update JSON tests
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28129/json_tests.patch

___
Python tracker 

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



[issue16558] multiprocessing fails to raise exception with parameters

2012-11-26 Thread R. David Murray

R. David Murray added the comment:

This is probably related to #1692335.  It looks like that fix was not 
backported.  Can you test if your example works now in 3.3?

--
nosy: +r.david.murray, sbt

___
Python tracker 

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



[issue14097] Improve the "introduction" page of the tutorial

2012-11-26 Thread Ezio Melotti

Ezio Melotti added the comment:

I started working on this.  Attached there's a work in progress patch with 
changes done on the first half of the tutorial.
The changes are not definitive, and I'm trying to get some early feedback on 
rietveld before moving on the second half.

--
Added file: http://bugs.python.org/file28130/issue14097-1.diff

___
Python tracker 

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



[issue15587] IDLE is pixelated on the Macbook Pro with Retina Display

2012-11-26 Thread Tyler Crompton

Tyler Crompton added the comment:

I can confirm that this works. The underscore does not appear when using the 
default font settings (Courier, size 10). I changed it to Courier New and all 
is fine. One may also want to increase the font size to 12 as the font is 
difficult to read when the property list has been fixed. I have no idea where 
to begin on the patch, though.

--
resolution: invalid -> 
status: closed -> pending

___
Python tracker 

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



[issue15587] IDLE is pixelated on the Macbook Pro with Retina Display

2012-11-26 Thread Ned Deily

Ned Deily added the comment:

Tahnks for the suggestion, Kevin, and for testing, Tyler.  I'll work up a 
proper patch and may ask you to test it, Tyler, as I also do not have access to 
a Retina display at the moment.

--
assignee:  -> ned.deily
stage: committed/rejected -> needs patch
status: pending -> open

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests used distorted official testcases for testing non-standard Python json 
module features. Now it is extracted in separate tests.

--
Added file: http://bugs.python.org/file28131/json_tool_tests_2.patch

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file28129/json_tests.patch

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oops. I attached patch for other issue. Here is a right one.

--
Added file: http://bugs.python.org/file28132/json_tests_2.patch

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file28131/json_tool_tests_2.patch

___
Python tracker 

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



[issue16493] Document the 'optimize' argument to compile()

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16560] Python sighandlers delayed for no reason

2012-11-26 Thread Zdenek Pavlas

New submission from Zdenek Pavlas:

Quoting from "signal" module docs:

# Although Python signal handlers are called asynchronously as far as the 
Python user is concerned, they can only occur between the “atomic” instructions 
of the Python interpreter.

Yes, that's reasonable.

# This means that signals arriving during long calculations implemented purely 
in C (such as regular expression matches on large bodies of text) may be 
delayed for an arbitrary amount of time.

IMO, A does not imply B.  Long computation in C with GIL released does not need 
to be atomic, as it happens "between" Python instructions.  

The thunk that's called asynchronously should preempt the C computation and 
issue a Python callback when possible.  Otherwise, Python handlers are useless 
when interfacing C code.

--
components: Interpreter Core
files: trip-signal.patch
keywords: patch
messages: 176428
nosy: zdenek.pavlas
priority: normal
severity: normal
status: open
title: Python sighandlers delayed for no reason
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file28133/trip-signal.patch

___
Python tracker 

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



[issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16496] Simplify and optimize random_seed()

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16495] bytes_decode() unnecessarily examines encoding

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16538] The docs doesn't describe MAKE_CLOSURE correctly

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16551] Cleanup the pure Python pickle implementation

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16549] regression: -m json.tool module is broken

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
assignee: ezio.melotti -> 
nosy: +jcea
stage: patch review -> needs patch
versions: +Python 3.1 -Python 3.4

___
Python tracker 

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



[issue16549] regression: -m json.tool module is broken

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
assignee:  -> ezio.melotti
stage: needs patch -> patch review
versions: +Python 3.4 -Python 3.1

___
Python tracker 

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



[issue12370] Use of super overwrites use of __class__ in class namespace

2012-11-26 Thread Daniel Urban

Daniel Urban added the comment:

I tried to implement Nick's idea with the separate scope for __class__. It 
seems to work, I'm attaching a patch. The patch basically causes the following 
class statement:

class C(A, B, metaclass=meta):
def f(self):
return __class__

To be compiled approximately like this:

def _outer_C(*__args__, **__kw__):
class _inner_C(*__args__, **__kw__):
def f(self):
return __class__
__class__ = _inner_C
return _inner_C
C = _outer_C(A, B, metaclass=meta)

It also includes some tests.

(The patch also changes the magic number in Lib/importlib/_bootstrap.py. This 
caused Python/importlib.h to be regenerated, but I didn't included those 
changes in the patch, because its a lot, and not very human-readable. Please 
tell me if I need to include them.)

--
components: +Interpreter Core
keywords: +needs review, patch
stage: needs patch -> patch review
versions: +Python 3.4
Added file: http://bugs.python.org/file28134/class_super_1.patch

___
Python tracker 

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



[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea
resolution: invalid -> 
status: closed -> open

___
Python tracker 

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



[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e092ff374721 by Ezio Melotti in branch '2.7':
#16559: Add more tests for the json module.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/e092ff374721

New changeset 4f21a9b7decf by Ezio Melotti in branch '3.2':
#16559: Add more tests for the json module.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/4f21a9b7decf

New changeset 139a8cbca94e by Ezio Melotti in branch '3.3':
#16559: merge with 3.2.
http://hg.python.org/cpython/rev/139a8cbca94e

New changeset a5b3eb62311e by Ezio Melotti in branch 'default':
#16559: merge with 3.3.
http://hg.python.org/cpython/rev/a5b3eb62311e

--
nosy: +python-dev

___
Python tracker 

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



[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2012-11-26 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I am reopening this issue because 26bbff4562a7 only dealt with objects which 
cannot be pickled.  But CalledProcessError instances *can* be pickled: the 
problem is that the resulting data cannot be unpickled.

Note that in Python 3.3 CalledProcessError can be pickled then unpickled 
because of the fix for #1692335.  But there are other types which will still 
produce "corrupt" pickles.

--
assignee:  -> sbt
resolution: fixed -> 
stage: committed/rejected -> needs patch
status: closed -> open
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16462] smtpd should return greeting

2012-11-26 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

The trivial approach would be to add a new "set_helo_string()" method to 
"SMTPServer" class, and be called before "process_message()". User subclasses 
would be inherit it.

--

___
Python tracker 

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



[issue16558] multiprocessing fails to raise exception with parameters

2012-11-26 Thread Richard Oudkerk

Richard Oudkerk added the comment:

The example works correctly on 3.3 because of #1692335.  I am not sure if it is 
appropriate to backport it though.

This is a duplicate of #9400 which I have assigned to myself.  (I had thought 
it was already fixed.)

--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> multiprocessing.pool.AsyncResult.get() messes up exceptions

___
Python tracker 

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



[issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set

2012-11-26 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Victor, any progress on this?

--

___
Python tracker 

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



[issue14631] Instance methods and WeakRefs don't mix.

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16555] Add es_cu to locale library.

2012-11-26 Thread Leiser Fernández Gallo

Leiser Fernández Gallo added the comment:

In the file locale.py there is a var locale_alias that map the locale names, 
es_cu isn't there.

--
versions: +Python 2.7 -Python 3.4

___
Python tracker 

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



[issue14631] Instance methods and WeakRefs don't mix.

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
superseder:  -> Instance methods and WeakRefs don't mix.

___
Python tracker 

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



[issue813299] Weak references and bound functions interact in a bad way

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
superseder:  -> Instance methods and WeakRefs don't mix.

___
Python tracker 

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



[issue14631] Instance methods and WeakRefs don't mix.

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
superseder: Instance methods and WeakRefs don't mix. -> 

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set

2012-11-26 Thread STINNER Victor

STINNER Victor added the comment:

> Victor, any progress on this?

We have two options, I don't know which one is the best (safer). Does
the terminal handle non-ASCII characters with a C locale on FreeBSD or
Solaris?

--

___
Python tracker 

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



[issue16560] Python sighandlers delayed for no reason

2012-11-26 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Not sure if this would be a feature request or a bugfix, specially in the 
python 2.7 case :).

--
nosy: +jcea
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16560] Python sighandlers delayed for no reason

2012-11-26 Thread Charles-François Natali

Charles-François Natali added the comment:

> Not sure if this would be a feature request or a bugfix

That would rather be a bug injection.

This patch isn't safe: the reason why signal handlers are called synchronously 
from the main loop is because you can't call arbitrary called on behalf of a 
signal handler: the must be async safe.

The proper way to do that would be to have a thread dedicated to signal 
management (like the Java VM does).

This patch is invalid (as is the issue).

--
nosy: +neologix

___
Python tracker 

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



[issue16216] Arithmetic operations with NULL

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue16215] Possible double memory free in str.replace

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2012-11-26 Thread Andrew McNabb

Andrew McNabb added the comment:

The --no-user-cfg option works for me in Python 2.7, but it does not seem to be 
in Python 3.2 or 3.3:

error: option --no-user-cfg not recognized

Am I doing something wrong, or was this feature only added to Python 2.7?

--
nosy: +amcnabb

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread anatoly techtonik

anatoly techtonik added the comment:

> ',' used by default only when indentation used. It increases readability.

Do you mean that when indentation is used, the separator only appears on line 
ends? Otherwise I can see how,is,that,more readable, than, that.

> Of course, this is a new feature and should be only in 3.4.

No of course. =) Trailing whitespace is a usability bug. It doesn't affect 
anything. Produced JSON stays JSON.

--
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12370] Use of super overwrites use of __class__ in class namespace

2012-11-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

The ability to close over __args__ and __kw__ in class methods is undesirable.

--

___
Python tracker 

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



[issue15472] Itertools doc summary table misdocuments some arguments

2012-11-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I would like to stick with "seq" because another other variant is less readable 
or understandable IMO.

--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue15472] Itertools doc summary table misdocuments some arguments

2012-11-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Also note that the "seq[0], seq[1], ..." notation only makes sense for objects 
that are indexable.   It is very slightly misleading but does a good job of 
communicating what the itertools do.

--
priority: normal -> low

___
Python tracker 

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



[issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered

2012-11-26 Thread Lukas Lueg

Lukas Lueg added the comment:

Switching to ActiveState's TCL fixes the problem on MacOS 10.6

I won't be able to produce a trace for a debug-build on Windows; attaching a 
semi-useless trace anyway.

--
Added file: http://bugs.python.org/file28135/backtrace_windows.txt

___
Python tracker 

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



[issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered

2012-11-26 Thread Lukas Lueg

Lukas Lueg added the comment:

On windows, IDLE only crashes if executed via pythonw.exe; if executed under 
python.exe, the attached traceback is dumped to stderr

--
Added file: http://bugs.python.org/file28136/excp_traceback.txt

___
Python tracker 

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



[issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered

2012-11-26 Thread Roger Serwy

Roger Serwy added the comment:

Lukas, thank you for your persistence in trying to resolve this issue. 

The Windows traceback is interesting. I am wondering if a "race" condition may 
be causing this bug. Callbacks from the Tcl interpreter eventloop back into 
Python may be ordered improperly.

Also, IDLE crashing with pythonw.exe is due to issue13582.

--

___
Python tracker 

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



[issue16559] Update JSON tests

2012-11-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It's always nice to see more tests, thank you!

--

___
Python tracker 

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



[issue1977] Python reinitialization test

2012-11-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ah, funny. I ended up doing the same thing as you without remembering about it!

--
status: pending -> closed
superseder:  -> Python sub-interpreter test

___
Python tracker 

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



[issue16561] Windows installer doesn't use UAC, then crashes

2012-11-26 Thread Redoute

New submission from Redoute:

Windows installers crash without useful explanation, when Python is located in 
/Program Files/Python27 and the installer is started without admin rights/UAC. 
I experienced this with Windows 8 and installers for packages pandas and rtree.

a) show error message instead of crash

As I don't use distutils for packaging, I am just guessing it would make sense 
to:

b) let bdist_wininst --user-access-control default to 'auto'

--
assignee: eric.araujo
components: Distutils
messages: 176449
nosy: Redoute, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Windows installer doesn't use UAC, then crashes
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I agree with Serhiy, this should be going in 3.4 only. The reason is that 
people might rely on exact output and it's not nice to break their code in a 
bugfix release.

--

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2012-11-26 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered

2012-11-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy:  -serhiy.storchaka

___
Python tracker 

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



[issue16333] Trailing whitespace in json dump when using indent

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For older Python we need add in in the documentation the suggestion to use 
"separators=(',', ': ')" when indentation used.

--

___
Python tracker 

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



[issue16547] IDLE segfaults in tkinter after fresh file's text has been rendered

2012-11-26 Thread Lukas Lueg

Lukas Lueg added the comment:

self.io is set to null before the colorization is finished. When IDLE's 
text-window is closed, the AttributeErrors printed to stderr cause IDLE to 
crash due to #13582.

One can also trigger the exceptions on any other OS as described in OP. While 
#13582 is an issue of it's own, this is still a race condition to be considered 
:-)

--

___
Python tracker 

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



[issue16561] Windows installer doesn't use UAC, then crashes

2012-11-26 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis

___
Python tracker 

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



[issue16562] Optimize dict equality test

2012-11-26 Thread Raymond Hettinger

New submission from Raymond Hettinger:

The code for dict_equal() in Objects/dictobject.c currently loops over the 
key/value pairs in self and uses PyDict_GetItem() to check for the 
corresponding key/value pair in the other dictionary.  This causes an 
unnecessary call to PyObject_Hash().

Instead, the code should loop over the key/value/hash triplets in self and do a 
direct lookup in the other dictionary with " ep = 
(otherdict->ma_lookup)(otherdict, key, hash)".   The reuses the known hash 
value for the key; thereby avoiding the potentially slow call to 
PyObject_Hash().

See _PyDict_Contains() for an example of how to do a lookup when the hash value 
is already known.

Note, the optimized path should be used only when PyDict_CheckExact() is true.

--
components: Interpreter Core
keywords: easy
messages: 176453
nosy: rhettinger
priority: low
severity: normal
status: open
title: Optimize dict equality test
type: performance
versions: Python 3.4

___
Python tracker 

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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2012-11-26 Thread Jon Henry

Changes by Jon Henry :


--
nosy: +jhenry82

___
Python tracker 

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



[issue16562] Optimize dict equality test

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue15472] Itertools doc summary table misdocuments some arguments

2012-11-26 Thread Ezio Melotti

Ezio Melotti added the comment:

The line before the second table says "sequence". That could be changed to 
"iterable".  Specifying "it" in parentheses just after "iterable" and use it 
consistently in the examples could make it clearer.
I agree that using [0] and [1] is OK even if not 100% correct though.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue4945] json checks True/False by identity, not boolean value

2012-11-26 Thread Ezio Melotti

Ezio Melotti added the comment:

I'm not sure the documentation should be changed.  While boolean values are 
accepted, user should prefer True/False, so the fact that you can pass other 
things shouldn't be documented/advertized IMHO.
The patch has a couple of other changes that could be included though.

--

___
Python tracker 

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



[issue16562] Optimize dict equality test

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a simple patch.

> Note, the optimized path should be used only when PyDict_CheckExact() is true.

Actually this is not needed. dict_equal() uses the same code for dict 
subclasses.

--
keywords: +patch
nosy: +serhiy.storchaka
stage:  -> patch review
Added file: http://bugs.python.org/file28137/dict_equal_hash_reuse.patch

___
Python tracker 

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



[issue4945] json checks True/False by identity, not boolean value

2012-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Docstrings already changed to "true/false" instead "True/False". Almost, some 
places were forgotten. The patch mainly changes the ReST documentation to 
conform docstrings.

--

___
Python tracker 

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



[issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py)

2012-11-26 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: test needed -> patch review

___
Python tracker 

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



[issue16563] re.match loops forever on simple regexp

2012-11-26 Thread L. Peter Deutsch

New submission from L. Peter Deutsch:

I've read a number of reports of exponential-time regexp matching, but this 
regexp uses no unusual features, requires no backtracking, and only loops 
"forever" on certain input strings.

I listed the Python version # as 2.6; I actually observed the behavior in 2.5.1 
and 2.5.2, but I'm almost certain it's still there, because I saw the same 
behavior in a very recent build of Google's V8 interpreter, which I believe 
uses the same regexp engine.

Here's the test case:

import re
re_utf8 = 
r'^([\x00-\x7f]+|[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xf0-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf])*$'
s = 
"\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x14\x00\x00\x00\x01\x00\x00,`\x00\x00\x004\x00\x01\x8d"
print re.match(re_utf8, s)

If you pass s[0:34] or s[34:35] as the argument of re.match, it returns the 
correct answer, but the code above loops apparently forever.

--
components: Regular Expressions
messages: 176458
nosy: ezio.melotti, lpd, mrabarnett
priority: normal
severity: normal
status: open
title: re.match loops forever on simple regexp
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue16563] re.match loops forever on simple regexp

2012-11-26 Thread Tim Peters

Tim Peters added the comment:

There's actually enormous backtracking here.  Try this much shorter regexp and 
you'll see much the same behavior:

re_utf8 = r'^([\x00-\x7f]+)*$'

That's the original re_utf8 with all but the first alternative removed.

Looks like passing s[0:34] "works" because it eliminates the trailing \x8d that 
prevents the regexp from matching the whole string.  Because the regexp cannot 
match the whole string, it takes a very long time to try all the futile 
combinations implied by the nested quantifiers.  As the much simpler re_utf8 
above shows, it's not the alternatives in the regexp that matter here, it's the 
nested quantifiers.

--
nosy: +tim_one

___
Python tracker 

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



[issue16563] re.match loops forever on simple regexp

2012-11-26 Thread Ezio Melotti

Ezio Melotti added the comment:

I think the problem is the first '+', but I'm not sure if this is similar to 
other problems (I remember something similar to (x+)* causing problems).

(On a side note: the regex matches non-valid utf-8, see table 3-7 on 
http://www.unicode.org/versions/Unicode6.0.0/ch03.pdf).

--

___
Python tracker 

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



[issue16563] re.match loops forever on simple regexp

2012-11-26 Thread Tim Peters

Tim Peters added the comment:

Yes, if you remove the first "+", the example quickly prints None (i.e., 
reports that the regexp cannot match the string).

--

___
Python tracker 

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



[issue5066] IDLE documentation for Unix obsolete/incorrect

2012-11-26 Thread Todd Rovito

Todd Rovito added the comment:

This patch is an extensive refactoring of help.txt and idle.rst. The first 
thing I did was merge issue5066.patch from jesstess into the current idle.rst 
file, because the original patch from jesstess was so old it had to be merged 
by hand into the 3.4 source code.  Then I compared what the merge document said 
with the actual menus of IDLE and made several corrections because of missing 
menu options.  Finally I refactored the help.txt based on idle.rst and created 
the resulting patch. Several capitalization's were fixed along with many 
inconsistencies between the two files.  

I have not tested on 2.7 only 3.4.  My plan is to test with 2.7 and create 
another patch by end of the week 12/2/2012.

--
versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3
Added file: 
http://bugs.python.org/file28138/5066IDLEocumentationforUnixObsoleteIncorrect.patch

___
Python tracker 

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



[issue5066] IDLE documentation for Unix obsolete/incorrect

2012-11-26 Thread Roger Serwy

Roger Serwy added the comment:

The original help.txt and the patched version still mixes tabs and spaces. This 
is a minor point, but perhaps all the tabs should be expanded.

Also, the section on running IDLE without a subprocess should not be removed 
until version 3.5. See #16123.

--
nosy: +serwy

___
Python tracker 

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



[issue16500] Add an 'afterfork' module

2012-11-26 Thread Graham Dumpleton

Changes by Graham Dumpleton :


--
nosy: +grahamd

___
Python tracker 

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



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-11-26 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Right, good point. Lucas, could you fix the documentation too?

--

___
Python tracker 

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



[issue16563] re.match loops forever on simple regexp

2012-11-26 Thread L. Peter Deutsch

L. Peter Deutsch added the comment:

It never occurred to me that the regexp package would be so poorly designed 
that a pattern that so clearly never requires backtracking could require 
exponential time. I'll change the pattern (taking out the + has no effect on 
what strings it matches) and leave it up to others to decide whether the 
performance issue is worth addressing. And thanks for the pointer to the table 
in the Unicode standard.

--

___
Python tracker 

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