[issue14339] Optimizing bin, oct and hex

2012-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

No, I do not think that any application will significantly speeded up.

In fact, it is not optimization, and getting rid of the apparent pessimization. 
In addition to increasing the speed, memory fragmentation is reduced.

The patch has a minimum size, the new code is not larger and not more complex 
than the old one, it is similar to code already used in this file, there are 
small nonconditional advantages. I see no reason not to accept the changes.

--

___
Python tracker 

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



[issue13507] Modify OS X installer builds to package liblzma for the new lzma module

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0e1177499762 by Ned Deily in branch 'default':
Issue #13507: OS X installer builds now build liblzma for the new
http://hg.python.org/cpython/rev/0e1177499762

--
nosy: +python-dev

___
Python tracker 

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



[issue13507] Modify OS X installer builds to package liblzma for the new lzma module

2012-04-01 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the patch.  Applied to default for 3.3.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue14304] Implement utf-8-bmp codec

2012-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

''.join(c if ord(c) < 0x1 else escape(c) for c in s)

--
nosy: +storchaka

___
Python tracker 

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



[issue14460] In re's positive lookbehind assertion repetition works

2012-04-01 Thread py.user

New submission from py.user :

>>> import re
>>> re.search(r'(?<=a){100,200}bc', 'abc', re.DEBUG)
max_repeat 100 200 
  assert -1 
literal 97 
literal 98 
literal 99 
<_sre.SRE_Match object at 0xb7429f38>
>>> re.search(r'(?<=a){100,200}bc', 'abc', re.DEBUG).group()
'bc'
>>>


I expected "nothing to repeat"

--
components: Regular Expressions
messages: 157264
nosy: ezio.melotti, mrabarnett, py.user
priority: normal
severity: normal
status: open
title: In re's positive lookbehind assertion repetition works
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue14461] In re's positive lookbehind assertion documentation match() cannot match

2012-04-01 Thread py.user

New submission from py.user :

http://docs.python.org/py3k/library/re.html
"Note that patterns which start with positive lookbehind assertions will never 
match at the beginning of the string being searched; you will most likely want 
to use the search() function rather than the match() function:"

>>> re.match(r'(?<=^)abc', 'abc').group()
'abc'
>>> re.match(r'(?<=\b)abc', 'abc').group()
'abc'
>>> re.match(r'(?<=\A)abc', 'abc').group()
'abc'
>>> re.match(r'(?<=\A)abc', 'abc', re.DEBUG).group()
assert -1 
  at at_beginning_string 
literal 97 
literal 98 
literal 99 
'abc'
>>>


in some cases match() can match

--
assignee: docs@python
components: Documentation, Regular Expressions
messages: 157265
nosy: docs@python, ezio.melotti, mrabarnett, py.user
priority: normal
severity: normal
status: open
title: In re's positive lookbehind assertion documentation match() cannot match
versions: Python 3.2

___
Python tracker 

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



[issue14462] In re's named group the name cannot contain unicode characters

2012-04-01 Thread py.user

New submission from py.user :

http://docs.python.org/py3k/library/re.html
"(?P...)

Similar to regular parentheses, but the substring matched by the group is 
accessible within the rest of the regular expression via the symbolic group 
name name. Group names must be valid Python identifiers, and each group name 
must be defined only once within a regular expression."


>>> chr(255)
'ÿ'
>>> 'ÿ'.isidentifier()
True
>>> import re
>>> re.search(r'(?P<ÿ>a)', 'abc')
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/functools.py", line 176, in wrapper
result = cache[key]
KeyError: (, '(?P<ÿ>a)', 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.2/re.py", line 158, in search
return _compile(pattern, flags).search(string)
  File "/usr/local/lib/python3.2/re.py", line 255, in _compile
return _compile_typed(type(pattern), pattern, flags)
  File "/usr/local/lib/python3.2/functools.py", line 180, in wrapper
result = user_function(*args, **kwds)
  File "/usr/local/lib/python3.2/re.py", line 267, in _compile_typed
return sre_compile.compile(pattern, flags)
  File "/usr/local/lib/python3.2/sre_compile.py", line 491, in compile
p = sre_parse.parse(p, flags)
  File "/usr/local/lib/python3.2/sre_parse.py", line 692, in parse
p = _parse_sub(source, pattern, 0)
  File "/usr/local/lib/python3.2/sre_parse.py", line 315, in _parse_sub
itemsappend(_parse(source, state))
  File "/usr/local/lib/python3.2/sre_parse.py", line 552, in _parse
raise error("bad character in group name")
sre_constants.error: bad character in group name
>>>


also:
(?P=name)
(?(name)yes|no)
\g

--
assignee: docs@python
components: Documentation, Regular Expressions
messages: 157266
nosy: docs@python, ezio.melotti, mrabarnett, py.user
priority: normal
severity: normal
status: open
title: In re's named group the name cannot contain unicode characters
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue14463] _decimal.so compile fails in OS X installer builds

2012-04-01 Thread Ned Deily

New submission from Ned Deily :

It may also fail in other builds where the build directory is not the same as 
the source directory.  The problem is in setup.py function _decimal_ext which 
fails to create an absolute path for the libmpdec include source directory.  
Patch follows.

--
assignee: ned.deily
components: Build
messages: 157267
nosy: ned.deily, skrah
priority: normal
severity: normal
status: open
title: _decimal.so compile fails in OS X installer builds
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



[issue14463] _decimal.so compile fails in OS X installer builds

2012-04-01 Thread Ned Deily

Changes by Ned Deily :


--
resolution:  -> fixed
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



[issue14463] _decimal.so compile fails in OS X installer builds

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ac60138522fc by Ned Deily in branch 'default':
Issue #14463: Prevent _decimal.so compile failures in OS X installer builds.
http://hg.python.org/cpython/rev/ac60138522fc

--
nosy: +python-dev

___
Python tracker 

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



[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-01 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

After trying to make a patch I found what current test suite itself has calls 
like (str, shell=False), (bytes, shell=True) and (['shell command'], 
shell=True).

We can:
1. Implement Eric's suggestion with fixing/removing broken tests.
2. Add Pope.shell and Popen.exec as Nick propose.

I don't like former because it changes already existing contracts fixed and 
published by explicit unittests without strong reason. Also Nick pointed 
reasons why user may need existing functionality. Adding new 'safe' shell and 
exec classmethods as prime entrypoints for Popen make sense.

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> But the sleep(0.1) forces a thread switch so I consider that still
> cheating -- nobody in their right mind would consider calling sleep()
> inside __hash__.

Well, cheating is fair game when trying to test borderline cases, isn't
it?

--

___
Python tracker 

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



[issue14440] Close background process if IDLE closes abnormally.

2012-04-01 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

We can install signal handlers for everything what can stop process but I 
prefer to pass IDLE pid to subintepreter and periodically check for prime 
process existing.

--

___
Python tracker 

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



[issue14408] Support ./python -m unittest in the stdlib tests

2012-04-01 Thread Matt Joiner

Matt Joiner  added the comment:

The patch attached, rejigs the TestCase inheritance in test.test_socket so that 
tests run correctly using unittest discovery. Recent changes have made 
test_queue, and test_threading run without similar fixes, so I don't think 
fixes for those are necessary anymore.

--
Added file: 
http://bugs.python.org/file25087/test.test_socket-discoverability.patch

___
Python tracker 

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



[issue14394] missing links on performance claims of cdecimal

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 6ba569924986 by Stefan Krah in branch 'default':
Issue #14394: Use elaborate phrases that boil down to "one to two orders
http://hg.python.org/cpython/rev/6ba569924986

--
nosy: +python-dev

___
Python tracker 

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



[issue13934] sqlite3 test typo

2012-04-01 Thread Thomas Spura

Thomas Spura  added the comment:

It might be good to add some documentation to the sqlite3 module and describe 
that version_info is only the PYSQLITE_VERSION and not the version of the 
sqlite library.

--
nosy: +tomspur

___
Python tracker 

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



[issue14394] Add speed improvement note to the decimal docs.

2012-04-01 Thread Stefan Krah

Stefan Krah  added the comment:

Leaving this open since a "New in version 3.3" speed improvement note
in the docs would be useful.

--
title: missing links on performance claims of cdecimal -> Add speed improvement 
note to the decimal docs.

___
Python tracker 

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



[issue14408] Support ./python -m unittest in the stdlib tests

2012-04-01 Thread Matt Joiner

Matt Joiner  added the comment:

Attached is a patch for test_concurrent_futures, similar to the patch for 
test_socket.

--
Added file: 
http://bugs.python.org/file25088/test_concurrent_futures-unittest-discoverability.patch

___
Python tracker 

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



[issue14387] Include\accu.h incompatible with Windows.h

2012-04-01 Thread Stefan Krah

Stefan Krah  added the comment:

> Should I contact the extension's author(s)/maintainer(s) and tell them about 
> this ordering requirement?

FWIW, it is the recommended way in the docs.



The Python build itself has been fixed. Does the http://code.google.com/p/apsw/ 
module build now?

--

___
Python tracker 

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



[issue14419] Faster ascii decoding

2012-04-01 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



[issue13968] Support recursive globs

2012-04-01 Thread Yuval Greenfield

Yuval Greenfield  added the comment:

I found this comprehensive description of the '**' convention at 
http://www.codeproject.com/Articles/2809/Recursive-patterned-File-Globbing that 
can translate directly to unittests.

I'd like to fix the patch for these specs but should it be in a new rglob 
function or in the existing glob.glob()? I think it should be a new one to 
avoid any edge-case compatibility concerns even though on face value there 
shouldn't be any.

--

___
Python tracker 

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



[issue14464] reference loss in test_xml_etree_c

2012-04-01 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is quite recent.

$ ./python -m test -R 3:2 test_xml_etree_c
[1/1] test_xml_etree_c
beginning 5 repetitions
12345
.
test_xml_etree_c leaked [-2, -2] references, sum=-4

--
assignee: eli.bendersky
components: Library (Lib)
messages: 157279
nosy: eli.bendersky, flox, pitrou
priority: critical
severity: normal
stage: needs patch
status: open
title: reference loss in test_xml_etree_c
type: resource usage
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



[issue13968] Support recursive globs

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I found this comprehensive description of the '**' convention at
> http://www.codeproject.com/Articles/2809/Recursive-patterned-File-Globbing 
> that can translate directly to unittests.
> 
> I'd like to fix the patch for these specs but should it be in a new
> rglob function or in the existing glob.glob()? I think it should be a
> new one to avoid any edge-case compatibility concerns even though on
> face value there shouldn't be any.

I think it should be the existing glob.glob(). We won't introduce a new
function any time we add a new syntactic feature in the glob
mini-language.

--

___
Python tracker 

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



[issue13968] Support recursive globs

2012-04-01 Thread Yuval Greenfield

Yuval Greenfield  added the comment:

I don't have a strong opinion on "rglob vs glob" so whichever way the majority 
here thinks is fine by me.

--

___
Python tracker 

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




[issue14464] reference loss in test_xml_etree_c

2012-04-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

Thanks, I'll try to investigate this ASAP

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Stefan Krah

Stefan Krah  added the comment:

OK, here's a version with a low switch interval. Of course it's also
contrived, but it works.

Generally I'd appreciate the RuntimeError, since it's a hint that 
something needs to be rewritten in an application.


It might be a problem if this started to occur sporadically in a
production app under a high system load. But I haven't managed to
trigger the exception just by increasing the system load. I always
had to use the same low switch interval.

--
Added file: http://bugs.python.org/file25089/hammer_dict_switchinterval.py

___
Python tracker 

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



[issue14449] argparse optional arguments should follow getopt_long(3)

2012-04-01 Thread Ernest N. Mamikonyan

Ernest N. Mamikonyan  added the comment:

Yes, it is incompatible. But that's because the current behavior is 
incompatible with standard (getopt_long(3)) practice. Or perhaps, you 
can add another option that implements the optional argument semantics 
of GNU's getopt_long(3).

In any case, I understand. If you figure out some other way, please let 
me know (or document it).

Thanks much,
Ernest Mamikonyan

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> OK, here's a version with a low switch interval. Of course it's also
> contrived, but it works.

The drawback of using setswitchinterval() is that it makes the test less
reusable by other implementations (or perhaps it will succeed without
actually checking the desired behaviour).

--

___
Python tracker 

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



[issue14098] provide public C-API for reading/setting sys.exc_info()

2012-04-01 Thread Stefan Behnel

Stefan Behnel  added the comment:

This is now implemented in PyPy:

https://bitbucket.org/pypy/pypy/changeset/623bcea85df3

Are there any objections to applying the equivalent patch to CPython?

--

___
Python tracker 

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



[issue13968] Support recursive globs

2012-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

For "**" globbing see http://ant.apache.org/manual/dirtasks.html#patterns .

If we extend pattern syntax of templates, why not implement Perl, Tcl or Bash 
extensions?

--
nosy: +storchaka

___
Python tracker 

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



[issue14464] reference loss in test_xml_etree_c

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The culprit is 0ca32013d77e.

--

___
Python tracker 

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



[issue11668] _multiprocessing.Connection.poll with timeout uses polling under Windows

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is totally outdated by the new Connection implementation in 3.3.

--
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Parent process hanging in multiprocessing if children terminate 
unexpectedly

___
Python tracker 

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



[issue13968] Support recursive globs

2012-04-01 Thread Yuval Greenfield

Yuval Greenfield  added the comment:

On Sun, Apr 1, 2012 at 4:42 PM, Serhiy Storchaka  wrote:
> For "**" globbing see http://ant.apache.org/manual/dirtasks.html#patterns

They mention that "mypackage/test/ is interpreted as if it were 
mypackage/test/**" so that's not really an option. I'm pretty sure we should 
only recurse if "**" appears explicitly.

> If we extend pattern syntax of templates, why not implement Perl, Tcl or
> Bash extensions?
>

I'm not sure what you mean here but if it's that ##{} stuff then it should 
probably be discussed in a separate issue as it's not related to recursive 
globs.

--

___
Python tracker 

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



[issue13019] bytearrayobject.c: refleak

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 03396c9ffe8c by Antoine Pitrou in branch '3.2':
Issue #13019: Fix potential reference leaks in bytearray.extend().
http://hg.python.org/cpython/rev/03396c9ffe8c

New changeset 015c546615ca by Antoine Pitrou in branch 'default':
Issue #13019: Fix potential reference leaks in bytearray.extend().
http://hg.python.org/cpython/rev/015c546615ca

--
nosy: +python-dev

___
Python tracker 

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



[issue13019] bytearrayobject.c: refleak

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d3a82a26c705 by Antoine Pitrou in branch '2.7':
Issue #13019: Fix potential reference leaks in bytearray.extend().
http://hg.python.org/cpython/rev/d3a82a26c705

--

___
Python tracker 

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



[issue13019] bytearrayobject.c: refleak

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks for the patch. Sorry it took so long to be committed...

--
nosy: +pitrou
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
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



[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-01 Thread R. David Murray

R. David Murray  added the comment:

Which just goes to show that using Popen correctly is not obvious, I suppose.

Given that adding these errors *would* break backward compatibility, there 
would have to be a deprecation if it was done.

Personally I don't see the point in adding new class methods (complicating the 
interface) unless we are going to deprecate the current methods...in which case 
why not just deprecate the incorrect way of calling it?  (Note: I say incorrect 
because the 'call a different shell' variant *doesn't work* unless you write a 
custom shell that ignores '-c', and as Chris points out there's no 
functionality *gained* by the windows variation, and there is confusion 
introduced as to exactly what is going on).

So, if we aren't going to deprecate the "incorrect" calls, I vote for just 
closing this issue as "won't fix".

(I suppose that a third alternative exists: make the "incorrect" calls actually 
do something useful while preserving backward compatibility with the existing 
behavior.  That may be difficult, especially doing it in a way that logically 
consistent cross-platform.)

--

___
Python tracker 

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



[issue14464] reference loss in test_xml_etree_c

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c5cf48752d81 by Eli Bendersky in branch 'default':
Removing the test of Element that causes ref-leak in GC (issue #14464).
http://hg.python.org/cpython/rev/c5cf48752d81

--
nosy: +python-dev

___
Python tracker 

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



[issue14065] Element should support cyclic GC

2012-04-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

Re-opening, since GC collection of length-2 cycles cause refleaks (Issue 
#14464).

For now the test was reverted in changeset c5cf48752d81 - it has to be put back 
when this is fixed.

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

___
Python tracker 

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



[issue14464] reference loss in test_xml_etree_c

2012-04-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

For now the refcounts will be clean. Work on the problem will continue in its 
original issue (#14065).

--
resolution:  -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> Element should support cyclic GC

___
Python tracker 

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



[issue14151] multiprocessing.connection.Listener fails with invalid address

2012-04-01 Thread Popa Claudiu

Popa Claudiu  added the comment:

Here are the two diffs. Hope they are good this time.

--
Added file: http://bugs.python.org/file25090/connection.diff

___
Python tracker 

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



[issue14151] multiprocessing.connection.Listener fails with invalid address

2012-04-01 Thread Popa Claudiu

Changes by Popa Claudiu :


Added file: http://bugs.python.org/file25091/test_multiprocessing.diff

___
Python tracker 

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



[issue14465] add feature to prettify XML output

2012-04-01 Thread Tshepang Lekhonkhobe

New submission from Tshepang Lekhonkhobe :

I often miss lxml's "pretty_print=True" functionality. Can you implement 
something similar.

--
components: Library (Lib)
messages: 157299
nosy: eli.bendersky, tshepang
priority: normal
severity: normal
status: open
title: add feature to prettify XML output
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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2012-04-01 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
title: add feature to prettify XML output -> xml.etree.ElementTree: add feature 
to prettify XML output

___
Python tracker 

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



[issue14151] multiprocessing.connection.Listener fails with invalid address

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 273d7502ced1 by Antoine Pitrou in branch '3.2':
Issue #14151: Raise a ValueError, not a NameError, when trying to create
http://hg.python.org/cpython/rev/273d7502ced1

New changeset 42b29aea1c98 by Antoine Pitrou in branch 'default':
Issue #14151: Raise a ValueError, not a NameError, when trying to create
http://hg.python.org/cpython/rev/42b29aea1c98

--
nosy: +python-dev

___
Python tracker 

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



[issue14151] multiprocessing.connection.Listener fails with invalid address

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you!
For the record, the recommended workflow to produce patches is to use 
Mercurial: see 
http://docs.python.org/devguide/setup.html#getting-the-source-code
so that you only have to type e.g. "hg diff" to get a diff of all your local 
changes.

--

___
Python tracker 

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



[issue14151] multiprocessing.connection.Listener fails with invalid address

2012-04-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> fixed
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



[issue14466] Rip out mq instructions

2012-04-01 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The devguide describes a mq-based approach (*) for generating patches, but it 
seems nobody (almost) uses it. We should therefore replace that description 
with a more traditional one ("hg diff").

(*) http://docs.python.org/devguide/patch.html#tool-usage

--
components: Devguide
messages: 157302
nosy: ezio.melotti, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Rip out mq instructions

___
Python tracker 

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



[issue14466] Rip out mq instructions

2012-04-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The devguide is growing exotic documentation about e.g. how to install GNU 
autoconf. I think this should be avoided, or relegated to the FAQ.

--
components: Devguide
messages: 157303
nosy: dmalcolm, eric.araujo, ezio.melotti, pitrou, rosslagerwall
priority: normal
severity: normal
status: open
title: Avoid exotic documentation in the devguide

___
Python tracker 

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



[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Because calling exit() is the right way to end a process. For example,
> it does the following:
> - atexit()-registered finalizers are run
> - stdio streams are flushed and closed (although it could probably
> done by the interpreter)
> - files created with tmpfile() are removed (on POSIX systems, they're
> removed after creation, but you can imagine an implementation where
> they would need to be explicitely removed upon close)
> 
> This would not be performed if the signal is raised.
> Since the user has the possibility of restoring default signal
> handlers with SIG_DFL, I think we could stcik with the current
> behavior.

Ah, ok, I agree with you, then.

--

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Éric Araujo

Éric Araujo  added the comment:

Agreed.  The autoconf doc comes from #7997, which required a FAQ entry.

--

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Éric Araujo

Éric Araujo  added the comment:

asked for*

--

___
Python tracker 

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



[issue14466] Rip out mq instructions

2012-04-01 Thread Éric Araujo

Éric Araujo  added the comment:

Yes please.  We already have text if we look at the history before 
73e11f64a704; we only need to agree on recommending “uncommitted changes in a 
clone” (which is okay to share patches but not for not ideal for more than one 
person working on something), named branches (what was in the previous text, 
because it makes it easy to run hg diff -r default and such commands) or 
bookmarks (lightweight named branches that some people recommend; I’m not sure 
how they’re better, given that in the end we generate a patch and make a new 
commit).

I, for one, use both uncommitted-changes and named branches; the former is 
easiest, but the latter safer: if I screw up a merge in a clone where I use a 
named branch, I can revert and retry the merge, but if I screw up merging 
pulled changes with my uncommitted edits, I risk losing them.

--

___
Python tracker 

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



[issue14466] Rip out mq instructions

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I, for one, use both uncommitted-changes and named branches; the
> former is easiest, but the latter safer: if I screw up a merge in a
> clone where I use a named branch, I can revert and retry the merge,
> but if I screw up merging pulled changes with my uncommitted edits, I
> risk losing them.

I think uncommitted changes is fine for a simple introduction.
hg experts can use whatever they want without needing our help.

--

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

I'm happy to remove the bit about *installing* autoconf altogether.

Do you think the Autoconf section (about regenerating configure) should stay 
where it is or be moved somewhere else?

--

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Do you think the Autoconf section (about regenerating configure)
> should stay where it is or be moved somewhere else?

I think it's a fairly rare thing to do (regenerating configure), so
perhaps it can migrate to a FAQ entry.
(besides, I think most people knowing how to edit a configure script
would also know you have to regenerate it)

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2012-04-01 Thread Éric Araujo

New submission from Éric Araujo :

The devguide recommends using hg update to switch between branches in one 
repository.  This is only practical if you build Python in a custom 
(sub)directory, otherwise you’d need to either do the configure-make-test dance 
when merging/porting patches, or skip testing.  I’ve always used one clone per 
Python version, where I can keep the compiled artifacts; it makes it easy to 
see what a file looks like in any of the three versions, easy to work on 
different things in the different repos (like fixing something in 3.2 that you 
noticed while you were adding something to 3.3), it is cheap thanks to 
hardlinks, fast because you run hg pull instead of hg update to merge a patch 
from 3.2, and is just the simplest thing that works.  I don’t think anyone uses 
the one-clone-with-update approach, so I think we should rewrite the 
instructions to talk about one clone per version.

--
components: Devguide
messages: 157311
nosy: eric.araujo, ezio.melotti, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: Update cloning guidelines in devguide

___
Python tracker 

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



[issue14450] Log rotate cant execute in Windows. (logging module)

2012-04-01 Thread shinta.nakayama

shinta.nakayama  added the comment:

Thank you Armaury.
Allowing your advice,I tried that code on other machine(Windows7 without 
Antivirus).

But it was same result.
Windows says "process cant access to file. that file is using other process.".
And could not rotate the logs.

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread R. David Murray

R. David Murray  added the comment:

Antoine: I don't think the point of this code is to come up with a unit (or 
other) test for the behavior, but to try to determine empirically whether or 
not this error is likely to be an issue in naive production code (whether it is 
existing 3.x code or stuff ported from Python2). Thus the mention of "cheating" 
(doing things production code would not be doing). 

The answer so far appears to be "no", which is good.

Which in the context of this particular issue then raises the question of 
whether there is in fact any additional support beyond the normal threading 
lock facilities that we want to provide in the stdlib.

And the answer to that is thus probably no as well, since code likely to run 
into the error is also likely to need locking around the dict in question 
*anyway*.  

Which is what Guido's intuition was to begin with.

--

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 27be97280cff by Ross Lagerwall in branch 'default':
Issue 14467: Simplify Autoconf section and move it to FAQ.
http://hg.python.org/devguide/rev/27be97280cff

--
nosy: +python-dev

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Antoine: I don't think the point of this code is to come up with a
> unit (or other) test for the behavior, but to try to determine
> empirically whether or not this error is likely to be an issue in
> naive production code (whether it is existing 3.x code or stuff ported
> from Python2). Thus the mention of "cheating" (doing things production
> code would not be doing). 
> 
> The answer so far appears to be "no", which is good.

I find this a bit lacking. Production code is used in all kinds of
settings that we didn't simulate here. Besides, a very sporadic bug is
no better than an easily reproduced one. The tracker already has its
share of people pointing at weird sporadic errors in their log files.

> And the answer to that is thus probably no as well, since code likely
> to run into the error is also likely to need locking around the dict
> in question *anyway*.

Depends on the application really.

--

___
Python tracker 

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



[issue14469] Python 3 documentation links

2012-04-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

"Other resources" links in the Python 3 documentation refer to the Python 2.7 
online documentation. It is also strange that http://python.org/doc (for 
example from issue tracker sidebar) refer to the Python 2.7 documentation.

--
assignee: docs@python
components: Documentation
messages: 157316
nosy: docs@python, storchaka
priority: normal
severity: normal
status: open
title: Python 3 documentation links
versions: Python 3.1, 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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2012-04-01 Thread R. David Murray

Changes by R. David Murray :


--
type:  -> enhancement

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2012-04-01 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Would you like to provide a patch?

--
nosy: +loewis

___
Python tracker 

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



[issue14469] Python 3 documentation links

2012-04-01 Thread R. David Murray

R. David Murray  added the comment:

The FAQ link (and removing the new style class link, but I think there is 
already an issue for that) is the only one I see that should be pointing to 3.x 
that isn't.

python.org/doc and docs.python.org is intentionally the 2.7 docs for now.  We 
haven't decided when we are going to change it.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue14469] Python 3 documentation links

2012-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I think that it would be appropriate to start redirect (HTTP 302) 
http://docs.python.org/something/ to the http://docs.python.org/2.7/something/. 
Today, the situation is Vice versa.

--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2012-04-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

Tshepang,

Frankly, there are a lot of issues to solve in ElementTree (it hasn't been 
given love in a long time...) and such features would be low priority, as I'm 
not getting much help and am swamped already.

As Martin said, patches can go a long way here...

--

___
Python tracker 

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



[issue14470] Remove use of w9xopen in subporcess module

2012-04-01 Thread Andrew Svetlov

New submission from Andrew Svetlov :

As Python 3.3 declare:
Windows 2000 and Windows platforms which set COMSPEC to command.com are no 
longer supported due to maintenance burden.

We need to drop corresponding code from subprocess.

--
keywords: easy
messages: 157321
nosy: asvetlov
priority: normal
severity: normal
status: open
title: Remove use of w9xopen in subporcess module
type: enhancement
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



[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-01 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

BTW we need to drop win9x and win2000 support, see #14470

--

___
Python tracker 

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



[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-01 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

I'm +1 for going though deprecation process for Popen args to make parameters 
combination clean and obvious.

--

___
Python tracker 

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



[issue14467] Avoid exotic documentation in the devguide

2012-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you for doing it :)

--
resolution:  -> fixed
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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2012-04-01 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe  added the comment:

Okay, I will try, even though C scares me.

--

___
Python tracker 

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



[issue14470] Remove use of w9xopen in subporcess module

2012-04-01 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
components: +Library (Lib), Windows
priority: normal -> critical

___
Python tracker 

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



[issue14470] Remove using of w9xopen in subporcess module

2012-04-01 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
title: Remove use of w9xopen in subporcess module -> Remove using of w9xopen in 
subporcess module

___
Python tracker 

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



[issue14300] dup_socket() on Windows should use WSA_FLAG_OVERLAPPED

2012-04-01 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

I already included this fix in my "socket share" patch, see issue 14310.

I think this was a bug that should be checked in to all relevant branches.  The 
reason is this text from msdn documentation for WsaDuplicateSocket:
" Both the source process and the destination process should pass the same 
flags to their respective WSASocket function calls. If the source process uses 
the socket function to create the socket, the destination process _must_ 
[underline KVJ] pass the WSA_FLAG_OVERLAPPED flag to its WSASocket function 
call."

See 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms741565(v=vs.85).aspx

--
nosy: +krisvale

___
Python tracker 

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



[issue14466] Rip out mq instructions

2012-04-01 Thread Ned Deily

Ned Deily  added the comment:

No one uses it?  I'm surprised.  I do and it seems to me by far the easiest and 
safest way to maintain patches in progress when there is constant churn.

--
nosy: +ned.deily

___
Python tracker 

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



[issue14470] Remove using of w9xopen in subprocess module

2012-04-01 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +brian.curtin
title: Remove using of w9xopen in subporcess module -> Remove using of w9xopen 
in subprocess module

___
Python tracker 

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



[issue14300] dup_socket() on Windows should use WSA_FLAG_OVERLAPPED

2012-04-01 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Also, see this: http://support.microsoft.com/kb/179942/EN-US
applies to windows 2000 only, as far as I can tell, though.  Don't know if we 
still support that.

I have scoured the docs, but found yet no reason to _not_ use this attribute.  
I wonder why it is optional at all.

--

___
Python tracker 

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



[issue14471] Buffer oferrun in winreg.c

2012-04-01 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson :

I found this issue with code analyzer in VS2010.
The problem applies to all 3.x versions, but there is no corresponding winreg.c 
file in 2.x.
Since I'm not sure of the maintenance state of the individual branches, I'm 
creating this defect hoping for guidance. Which branches should be fixed?

--
components: Interpreter Core
files: winreg.patch
keywords: patch
messages: 157329
nosy: krisvale
priority: normal
severity: normal
status: open
title: Buffer oferrun in winreg.c
type: crash
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file25092/winreg.patch

___
Python tracker 

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



[issue14471] Buffer overrun in winreg.c

2012-04-01 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
title: Buffer oferrun in winreg.c -> Buffer overrun in winreg.c

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> Well, cheating is fair game when trying to test 
> borderline cases, isn't it?

It is fair game (and necessary) when it comes to
exposing bugs that are hard to reproduce.

I'm wary of the original RuntimeError patch because
* it modifies code that has been stable for over a decade
* in order to "fix" a crasher that no one cares about
* while possibly breaking code that currently works
* and breaking it in a way that is hard to reproduce or diagnose.

--
nosy: +rhettinger

___
Python tracker 

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



[issue14394] Add speed improvement note to the decimal docs.

2012-04-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The correct place for the note is in the "optimizations" section of whatsnew.

--
nosy: +rhettinger

___
Python tracker 

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



[issue14471] Buffer overrun in winreg.c

2012-04-01 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



[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-01 Thread Nick Coghlan

Nick Coghlan  added the comment:

Everyone missed my other argument in favour of alternate constructor
methods: fixing the currently wrong default arguments.

There is no good reason to break working code when beginner confusion can
be better addressed by telling them to avoid calling the Popen constructor
directly in favour of newer APIs that have benefitted from years of
experience with the current API.

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Nick Coghlan

Nick Coghlan  added the comment:

A thought prompted by Raymond's comment: did we ever try just protecting
the retry as a recursive call? If we can stop the stack blowing up, it
seems to me we'd get the best of both worlds (that is, crashes become
RuntimeError, but naive multi-threaded code is unaffected).

--

___
Python tracker 

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



[issue14205] Raise an error if a dict is modified during a lookup

2012-04-01 Thread Guido van Rossum

Guido van Rossum  added the comment:

Was the crasher ever converted into a unittest? I think that should be done 
regardless of the outcome of the ongoing discussion about this issue.

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Guido van Rossum

Guido van Rossum  added the comment:

On Sun, Apr 1, 2012 at 1:58 PM, Raymond Hettinger
 wrote:
[...]
> I'm wary of the original RuntimeError patch because
[...]

I had retorts to most of what you wrote, but decided not to post them.
Instead, I really want to have a serious discussion about this issue,
without falling back on "if it ain't broke don't fix it". There was
definitely *something* wrong with the original code: there was a known
crasher and it had XXX comments in it, and some folks cared enough to
attempt to fix it.

In the end I see this more as a matter of clarifying the semantics and
limitations of dict operations: *should* the language guarantee that
the built-in dict implementation supports correct lookup even if the
in the middle of the lookup the hash table is resized by another
thread? Is this a reasonable guarantee to impose on all Python
implementations? Because I don't see how this can be guaranteed
without a lock; but I haven't tried very hard, so this is not a
rhetorical question.

- - -

On Sun, Apr 1, 2012 at 4:01 PM, Nick Coghlan  wrote:
> A thought prompted by Raymond's comment: did we ever try just protecting
> the retry as a recursive call? If we can stop the stack blowing up, it
> seems to me we'd get the best of both worlds (that is, crashes become
> RuntimeError, but naive multi-threaded code is unaffected).

Hm... We considered a variety of fixes in
http://bugs.python.org/issue14205 but I don't think we tried that.
(The nastiness is that it's strictly a C-level recursion -- lookdict()
calls lookdict().)

Another thing we didn't try was manually eliminating the tail
recursion in lookdict() using a goto (and perhaps some variable
assignments). I don't see the potential for an infinite loop as a
problem, since one could be created just as easily by putting "while
True: pass" inside a user-defined __hash__().

PS. I'm not surprised your originall hammer_dict.py didn't provoke the
problem -- it only overrides __hash__(), but lookdict() never calls
that. It only calls the compare function; the hash is computed once
and passed into it.

Finally, the guard in lookdict() looks fishy to me:

  if (ep0 == mp->ma_table && ep->me_key == startkey) {

Can't this evaluate to true when the dict has shrunk dramatically in
size? I think an extra test for "mask == mp->ma_mask" ought to be
added.

--

___
Python tracker 

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



[issue14471] Buffer overrun in winreg.c

2012-04-01 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The patch looks fine. As it's not a security fix, it should go into 3.2 and 
default.

--

___
Python tracker 

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



[issue14471] Buffer overrun in winreg.c

2012-04-01 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
versions:  -Python 3.1

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Guido van Rossum

Guido van Rossum  added the comment:

Here's a hack that uses goto instead of recursion to restore the original 
behavior, less the stack overflow.  With this, hammer_dict_switchinterval.py 
loops forever (which is I think what it's supposed to do if RuntimeError is 
never raised).

--
keywords: +patch
Added file: http://bugs.python.org/file25093/dictobject.c.patch

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

IIRC, Jython uses concurrent mappings, so this isn't an issue for them.

CPython's dictresize() relies on the GIL to atomically resize the ma_table.  
There are no pure python calls (the existing hash values are reused) and the 
ref counts are neutral.

--

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
Removed message: http://bugs.python.org/msg157338

___
Python tracker 

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



[issue14450] Log rotate cant execute in Windows. (logging module)

2012-04-01 Thread Vinay Sajip

Vinay Sajip  added the comment:

This is not a logging bug. You called basicConfig with a file name, so the file 
is opened using a FileHandler and with file name LOG_FILENAME. You then add a 
RotatingFileHandler with the same name, so the file has two handles referring 
to it. When the time comes to rotate, the file is still open (with the 
FileHandler), which is why the rename fails on Windows (though Linux allows it).

Closing as invalid.

--
nosy: +vinay.sajip
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



[issue14417] dict RuntimeError workaround

2012-04-01 Thread Guido van Rossum

Guido van Rossum  added the comment:

Why delete that?

On Sunday, April 1, 2012, Raymond Hettinger wrote:

>
> Changes by Raymond Hettinger >:
>
>
> --
> Removed message: http://bugs.python.org/msg157338
>
> ___
> Python tracker >
> 
> ___
>

--

___
Python tracker 

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



[issue14466] Rip out mq instructions

2012-04-01 Thread Ezio Melotti

Ezio Melotti  added the comment:

+1
Most of the time "hg diff > issue12345.diff" is all that it's needed to produce 
a patch, and whenever I point someone to the devguide they usually get confused 
because they think they have to use mq.

FWIW I mostly use uncommitted changes, possibly on more clones, and since I 
usually upload the patch to the tracker I don't risk losing it in case I do 
something wrong.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2012-04-01 Thread Ezio Melotti

Ezio Melotti  added the comment:

+1

--

___
Python tracker 

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