[issue16036] simplify int() signature docs

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Attaching patch updated for backport to 2.7.

In cases where the 2.7 language was substantively different, I preserved the 
2.7 language (e.g. I preserved the reference to plain and long integers).  I 
also added the lone 0 prefix for octals, which is a difference from 3.x: 
``0o``/``0O``/``0``.

--
Added file: http://bugs.python.org/file27351/issue-16036-5-27.patch

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



[issue16092] test_recursion_limit in test_threading fails on Mac OS X in 3.2

2012-09-30 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The test_threading.ThreadingExceptionTests.test_recursion_limit test fails on 
Mac OS X with the standard compilation command:

$ ./configure --with-pydebug  make -j2

Python 3.2.3+ (3.2:247d3e3c08ca, Sep 29 2012, 23:45:43) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)] on darwin
Mac OS X Lion 10.7.5

==
FAIL: test_recursion_limit (test.test_threading.ThreadingExceptionTests)
--
Traceback (most recent call last):
  File .../cpython/Lib/test/test_threading.py, line 774, in 
test_recursion_limit
self.assertEqual(p.returncode, 0, Unexpected error:  + stderr.decode())
AssertionError: -10 != 0 : Unexpected error: 

--

This seems very similar to issue 14184 (copying the nosy list).

--
components: Library (Lib)
messages: 171613
nosy: chris.jerdonek, dk, meador.inge, ned.deily
priority: normal
severity: normal
status: open
title: test_recursion_limit in test_threading fails on Mac OS X in 3.2
type: behavior
versions: Python 3.2

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



[issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/

2012-09-30 Thread Georg Brandl

Georg Brandl added the comment:

I've gone through the PEP; I've found a few typos and fixed them, but no 
missing but.  Sorry, but without a more specific location I don't think it's 
sensible to keep this open.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue16093] Documentation: links to 3.3

2012-09-30 Thread Stefan Krah

New submission from Stefan Krah:

A couple of links still need to be updated:

http://docs.python.org/

   Python 3.3 says in development and points to 3.4.


http://docs.python.org/dev/

   Python 3.3 is missing.

--
assignee: docs@python
components: Documentation
messages: 171615
nosy: docs@python, skrah
priority: normal
severity: normal
status: open
title: Documentation: links to 3.3
type: behavior
versions: Python 3.3, Python 3.4

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



[issue16091] changing sidebar links in http://docs.python.org/

2012-09-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eac9a50a2bdd by Georg Brandl in branch 'default':
Closes #16091: fix the references to 3.3/3.4 in the Doc sidebar.
http://hg.python.org/cpython/rev/eac9a50a2bdd

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue16093] Documentation: links to 3.3

2012-09-30 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
resolution:  - duplicate
status: open - closed
superseder:  - changing sidebar links in http://docs.python.org/

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



[issue16092] test_recursion_limit in test_threading fails on Mac OS X in 3.2

2012-09-30 Thread Ned Deily

Ned Deily added the comment:

As far as I know, this is currently only an issue if you use the llvm-gcc-4.2 
compiler on OS X to do a debug mode build.  That compiler is no longer 
maintained by Apple and is known to miscompile Python 3.3 builds.  There are 
checks in configure.ac for 3.3 to avoid using it.  With Xcode 4, use clang 
instead (./configure ... CC=clang); for Xcode 3, use the standard gcc-4.2 
(CC=gcc-4.2).

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

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



[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Serhiy, would you be OK with me also including this patch in the bz2file 
 package?

Yes, of course. We can even speed up 1.5 times the reading of small chunks, if 
we inline _check_can_read() and _read_block().

The same approach is applied for LZMAFile.

--

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
components: +XML
nosy: +eli.bendersky, flox

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Stefan Krah

Stefan Krah added the comment:

I can't reproduce this, so just a wild guess: Does the segfault still
happen if you replace Py_XDECREF() with Py_CLEAR() in xmlparser_gc_clear()?

--
nosy: +skrah

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



[issue15533] subprocess.Popen(cwd) documentation

2012-09-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset abfaa4368263 by Chris Jerdonek in branch '3.2':
Issue #15533: Clarify docs and add tests for subprocess.Popen()'s cwd argument.
http://hg.python.org/cpython/rev/abfaa4368263

New changeset f66ff96f0030 by Chris Jerdonek in branch '3.3':
Issue #15533: Merge fix from 3.2.
http://hg.python.org/cpython/rev/f66ff96f0030

New changeset 37f4aa15a1c6 by Chris Jerdonek in branch 'default':
Issue #15533: Merge fix from 3.3.
http://hg.python.org/cpython/rev/37f4aa15a1c6

--
nosy: +python-dev

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



[issue15533] subprocess.Popen(cwd) documentation

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I will commit to 2.7 separately.

--
versions: +Python 3.2, Python 3.4

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



[issue15533] subprocess.Popen(cwd) documentation

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Two of the tests fail on at least some of the Windows bots.  I am investigating.

==
ERROR: test_cwd_with_relative_arg (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py, 
line 222, in test_cwd_with_relative_arg
self._assert_cwd(python_dir, rel_python, cwd=python_dir)
  File D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py, 
line 195, in _assert_cwd
**kwargs)
  File D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py, line 745, in 
__init__
restore_signals, start_new_session)
  File D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py, line 964, in 
_execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

==
ERROR: test_cwd_with_relative_executable (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py, 
line 240, in test_cwd_with_relative_executable
cwd=python_dir)
  File D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py, 
line 195, in _assert_cwd
**kwargs)
  File D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py, line 745, in 
__init__
restore_signals, start_new_session)
  File D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py, line 964, in 
_execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.2/builds/210

--

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



[issue11798] Test cases not garbage collected after run

2012-09-30 Thread Tom Wardill

Tom Wardill added the comment:

Patch attached using setting test to None after execution.

--
keywords: +patch
nosy: +tomwardill
Added file: http://bugs.python.org/file27352/11798.patch

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



[issue15505] unittest.installHandler incorrectly assumes SIGINT handler is set.

2012-09-30 Thread Tom Wardill

Changes by Tom Wardill t...@howrandom.net:


--
nosy: +michael.foord

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



[issue11770] inspect.dir_static

2012-09-30 Thread Tom Wardill

Changes by Tom Wardill t...@howrandom.net:


--
versions: +Python 3.4 -Python 3.3

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



[issue13476] Simple exclusion filter for unittest autodiscovery

2012-09-30 Thread Tom Wardill

Changes by Tom Wardill t...@howrandom.net:


--
versions: +Python 3.4 -Python 3.3

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-30 Thread Peter Inglesby

Peter Inglesby added the comment:

Ok, I've now attached a patch with tests.

--
Added file: http://bugs.python.org/file27353/issue16055-fix-with-tests.patch

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Christian Heimes

Christian Heimes added the comment:

No, it doesn't make a difference when I replace Py_XDECREF() with Py_CLEAR(). 
I've also replaced Py_(X)DECREF() in the other *_gc_clear() methods without 
success.

--

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



[issue8800] add threading.RWLock

2012-09-30 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Yes, any blocking on the internal lock is not semantic blocking due to the 
use of the Shared lock itself, but merely a technical aspect, not semantically 
visible to the program.  It is equivalent to the operating system pausing the 
thread, a techical detail opaque to the user program and somethign it cannot 
affect or influence.

Blocking in the sense of the lock is due to the semantic use of the lock 
itself and the resources that it protects.

--

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



[issue16094] Tuple extraction in lambda isn't supported with more than one argument

2012-09-30 Thread GlitchMr

New submission from GlitchMr:

Tuple extraction in lambda isn't supported with more than one argument.

--
components: 2to3 (2.x to 3.x conversion tool)
files: lambda.py
messages: 171627
nosy: GlitchMr
priority: normal
severity: normal
status: open
title: Tuple extraction in lambda isn't supported with more than one argument
versions: Python 2.7
Added file: http://bugs.python.org/file27354/lambda.py

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



[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-30 Thread Nadeem Vawda

Nadeem Vawda added the comment:

 Yes, of course.

Awesome. I plan to do a new release for this in the next couple of days.


 We can even speed up 1.5 times the reading of small chunks, if we inline 
 _check_can_read() and _read_block().

Interesting idea, but I don't think it's worthwhile. It looks like this is only 
a noticeable improvement if size is 10 or 1, and I don't think these are common 
cases (especially not for users who care about performance). Also, I'm 
reluctant to have two copies of the code for _read_block(); it makes the code 
harder to read, and increases the chance of introducing a bug when changing the 
code.


 The same approach is applied for LZMAFile.

Of course. I'll apply these optimizations to LZMAFile next weekend.

--

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Stefan Krah

Stefan Krah added the comment:

I'm now able to reproduce the issue with a non-debug build. As
Christian says, using Py_CLEAR() does not help (though I wonder
if it shouldn't be used anyway).

Reverting part of 20b8f0ee3d64 fixes the segfault, see the
attached diff. I don't know the code well enough to say if this
is a valid possibility.

--
keywords: +patch
Added file: http://bugs.python.org/file27355/issue16089-pseudo-fix.diff

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
nosy: +georg.brandl

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Christian Heimes

Christian Heimes added the comment:

I can confirm that Stefan's fix works. I ran the SimpleTAL test suite about 
hundred times in a loop without a segfault. But I don't understand why the 
change fixes the issue. Could the alteration just lead to another code path so 
the erroneous code isn't triggered?

+1 for Py_CLEAR()

--

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



[issue15862] IDLE not working when due to wrong Hard Drive point of os.path.expanduser

2012-09-30 Thread Cemal Duman

Cemal Duman added the comment:

Hi,

yes exactly...

I changed my home by using below commands.
C:\Python27set HOME=C:\
C:\Python27python -m idlelib.idle

it is working. But if i reboot my computer HOME changes again to network drive. 
I think sth abour corporate programs rewrites this paramters. 

Thanks / Cemal

--
status: pending - open

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



[issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/

2012-09-30 Thread mani and ram

mani and ram added the comment:

When I find it I will open it.

On 30 September 2012 12:26, Georg Brandl rep...@bugs.python.org wrote:


 Georg Brandl added the comment:

 I've gone through the PEP; I've found a few typos and fixed them, but no
 missing but.  Sorry, but without a more specific location I don't think
 it's sensible to keep this open.

 --
 nosy: +georg.brandl
 resolution:  - fixed
 status: open - closed

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16090
 ___


--
nosy: +maniandram

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



[issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/

2012-09-30 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Somehow my name is displayed as mani and ram when replying by email (I 
changed my email name from that to Ramchandra Apte)
Just so that you know that mani and ram is the same person as Ramchandra 
Apte

--

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



[issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/

2012-09-30 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
resolution: fixed - postponed

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



[issue16094] Tuple extraction in lambda isn't supported with more than one argument

2012-09-30 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Python 2.7 and earlier are in bug-fix mode (means no new features)
Tuple unpacking is not there in Python 3.
Please close this bug as invalid.

--
nosy: +ramchandra.apte
type:  - enhancement

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



[issue16094] Tuple extraction in lambda isn't supported with more than one argument

2012-09-30 Thread Mark Dickinson

Mark Dickinson added the comment:

Works for me (Python 2.7.3):

 x = lambda (a, b), c: a + b + c
 x((2, 3), 4)
9

What issue are you seeing?

--
nosy: +mark.dickinson

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



[issue16094] Tuple extraction in lambda isn't supported with more than one argument

2012-09-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The issue is in lib2to3. tuple_params does not work with lambdas. I confirm the 
bug.

$ ./python -m lib2to3 -f tuple_params lambda_tuple_params.py 
RefactoringTool: Refactored lambda_tuple_params.py
--- lambda_tuple_params.py  (original)
+++ lambda_tuple_params.py  (refactored)
@@ -1,3 +1,3 @@
 lambda (a, b), c: a + b + c
-def f((a, b), c): return a + b + c
+def f(xxx_todo_changeme, c): (a, b) = xxx_todo_changeme; return a + b + c
 
RefactoringTool: Files that need to be modified:
RefactoringTool: lambda_tuple_params.py

--
nosy: +benjamin.peterson, storchaka
stage:  - needs patch
type: enhancement - behavior
versions: +Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27356/lambda_tuple_params.py

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



[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Also, I'm reluctant to have two copies of the code for _read_block(); it 
 makes the code harder to read, and increases the chance of introducing a bug 
 when changing the code.

Recursive inline _check_can_read() will be enough. Now this check calls 4 
Python functions (_check_can_read(), readable(), _check_non_closed(), closed). 
Recursive inlining only readable() in _check_can_read() is achieved significant 
but less (about 30%) effect.

--

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



[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese

Sam Breese added the comment:

Looking into this now. Should have a patch either later today or tommorow.

--
nosy: +Sam.Breese

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



[issue8800] add threading.RWLock

2012-09-30 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 I've added a new patch, that implements a shared/exclusive lock as 
 described in my comments above, for the threading and multiprocessing 
 module.

The patch does not seem to touch the threading mode and does not come with 
tests.  I doubt the multiprocessing version is actually picklable since 
self._requirement is a lambda function.

Also it would be best to avoid making multiprocessing.synchronize depend on 
ctypes.  (See implementation of multiprocessing.Barrier or Issue #14953.)


Personally, I would prefer to make the shared and exclusive locks attributes of 
the same object, so one could do

   with selock.shared:
  ...

   with selock.exclusive:
  ...

--
nosy: +sbt

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



[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese

Sam Breese added the comment:

Also, would you mind posting an example? I'm having trouble replicating.

--

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



[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese

Sam Breese added the comment:

Nevermind, replicated it. Changing start = max(start, 1) to start = max(start, 
0) DOES fix. Writing a test case now.

--

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Eli Bendersky

Eli Bendersky added the comment:

I'm currently somewhat offline for a while (cross-continental move), but I'll 
do my best to try to recreate my setup to test this problem and the proposed 
solution.

--

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



[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese

Sam Breese added the comment:

Here's a patch. Very, very simple, just changed that one line in inspect.py and 
wrote a highly primitive test case for inspect.getframeinfo. The test isn't 
actually testing the primary functionality right now, just this one bug. I can 
probably write more expansive coverage later, but in the interest of an 
expeditious reply I'm submitting now.

--
keywords: +patch
Added file: http://bugs.python.org/file27357/inspect_getframeinfo_line1.patch

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Stefan Krah

Stefan Krah added the comment:

Do note that the patch is somewhat cargo-cult. I don't understand yet why
it works; it may very well just silence the real problem.

--

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



[issue16055] incorrect error text for int(base=1000, x='1')

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

A few comments on the patch:

1) You should also check the exception type (e.g. by using 
PyErr_ExceptionMatches()).

2) If the exception doesn't match, you should restore the original exception so 
that the pure Python test framework will in turn raise it and the caller can 
inspect it.  Currently, the caller will find out only that it doesn't match but 
not why.  Take a look at CHECK_INVALID() to see an example of this pattern 
being used.

3) I would expose the functionality that checks an exception's type and text as 
a helper function so that it can be used throughout _testcapimodule.c.  The 
function is nontrivial enough that we wouldn't want to be copying and pasting 
it throughout if we want to check exception texts for other parts of the C API.

--

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



[issue9650] format codes in time.strptime docstrings

2012-09-30 Thread Mike Hoy

Mike Hoy added the comment:

Changed docstring for timemodule.c to include format codes listed here: 
http://bugs.python.org/msg169193

--
keywords: +patch
Added file: http://bugs.python.org/file27358/issue9650-format-codes.diff

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



[issue14503] docs: yield from breaks Pygments syntax coloring in doc examples

2012-09-30 Thread Georg Brandl

Georg Brandl added the comment:

I've updated the version of Pygments used by 3.3 and 3.4 branches, which fixes 
this and the raise from issue.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed
versions: +Python 3.4 -Python 2.7, Python 3.2

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



[issue13801] The Python 3 Docs don't highlight nonlocal

2012-09-30 Thread Georg Brandl

Georg Brandl added the comment:

Pygments is now updated to 1.5pre.

--
resolution:  - fixed
status: open - closed

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



[issue15533] subprocess.Popen(cwd) documentation

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

So it seems the cwd argument to Popen() currently works differently on Windows 
from Mac OS X.  For example, the following doesn't work on Windows (but does on 
Mac).  Windows doesn't look for arg0 relative to arg_cwd:

def test_cwd(arg0, arg_cwd):
os.chdir('foo')  # Make sure we're in a different directory from arg0.
p = subprocess.Popen([arg0, -c,
  import os, sys; 
  sys.stdout.write(os.getcwd()); 
  sys.exit(47)],
  stdout=subprocess.PIPE,
  cwd=arg_cwd)
p.wait()
print(stdout:  + p.stdout.read().decode(utf-8))
print(return_code: %s % p.returncode)

python_path = os.path.realpath(sys.executable)
python_dir, python_base = os.path.split(python_path)
rel_python = os.path.join(os.curdir, python_base)

# Raises: WindowsError: [Error 2] The system cannot find the file specified
test_cwd(rel_python, python_dir)

I'm going to mark the two tests as skipped on Windows pending a resolution.

--
keywords:  -easy

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



[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-09-30 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
title: Tuple extraction in lambda isn't supported with more than one argument 
- Tuple extraction in a lambda isn't supported by 2to3

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



[issue16095] urllib2 failing with squid proxy and digest authentication

2012-09-30 Thread Pietro Battiston

New submission from Pietro Battiston:

If you run the following code:

#! /usr/bin/python
import urllib2

MyHTTPPasswordMgr = urllib2.HTTPPasswordMgr
proxy = urllib2.ProxyHandler({'http': 'http://proxybiblio2.si.unimib.it:8080'})
auth = urllib2.ProxyDigestAuthHandler(MyHTTPPasswordMgr())
auth.add_password(None, proxybiblio2.si.unimib.it, a, b )
opener = urllib2.build_opener(proxy, auth, urllib2.HTTPHandler)
urllib2.install_opener(opener)
conn = urllib2.urlopen('http://webofknowledge.com')

an HTTP Error 407: Proxy Authentication Required is raised, and under the 
hood here's what's happening:
- the request is made without authentication
- the server replies it must be made with digest authentication, and gives the 
nonce
- the error is raised.

Instead, urllib2 should now try to connect with the username and password, and 
do so up to 5 times (as hardcoded in urllib2.http_error_auth_reqed), and then 
raise a HTTP Error 401: digest auth failed. And it's indeed what it does if 
you replace the line MyHTTPPasswordMgr = urllib2.HTTPPasswordMgr with


class MyHTTPPasswordMgr(urllib2.HTTPPasswordMgr):
def find_user_password(self, realm, authuri):
return a, b


So the problem is in HTTPPasswordMgr, which is apparently unable to match the 
authentication data with the realm. Some tests¹ suggest that this can vary 
according to the proxy engine and to the proxy address format (works with 
apache, but doesn't if then you add http://; in front of the proxy address).

This reminds a bit bug 680577, and in particular I noticed that (possibly 
unrelated) the behaviour reported in the following message:
http://bugs.python.org/msg1
has not changed:

In [1]: import urllib2

In [2]: urllib2.HTTPPasswordMgr().is_suburi(/foo/spam, /foo/eggs)Out[2]: 
True


This affects also python 3.2, you can try the following:

#! /usr/bin/python
from urllib import request
MyHTTPPasswordMgr = request.HTTPPasswordMgr
proxy = request.ProxyHandler({'http': 'http://proxybiblio2.si.unimib.it:8080'})
auth = request.ProxyDigestAuthHandler(MyHTTPPasswordMgr())
auth.add_password(None, proxybiblio2.si.unimib.it, a, b )
opener = request.build_opener(proxy, auth, request.HTTPHandler)
request.install_opener(opener)
conn = request.urlopen('http://webofknowledge.com')


¹ http://lists.python.it/pipermail/python/2012-September/013309.html (in 
Italian)

--
components: Library (Lib)
messages: 171650
nosy: toobaz
priority: normal
severity: normal
status: open
title: urllib2 failing with squid proxy and digest authentication
type: behavior
versions: Python 2.7

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



[issue16095] urllib2 failing with squid proxy and digest authentication

2012-09-30 Thread Pietro Battiston

Changes by Pietro Battiston m...@pietrobattiston.it:


--
versions: +Python 3.2

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



[issue16082] xml.etree.ElementTree.tostringlist does conform to it's documentation

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue16089] _elementtree causes segfault in GC

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue15533] subprocess.Popen(cwd) documentation

2012-09-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8d52b5b4bc2 by Chris Jerdonek in branch '3.2':
Issue #15533: Skip test_cwd_with_relative_*() tests on Windows pending 
resolution of issue.
http://hg.python.org/cpython/rev/d8d52b5b4bc2

New changeset 17d709f0b69b by Chris Jerdonek in branch '3.3':
Issue #15533: Merge update from 3.2.
http://hg.python.org/cpython/rev/17d709f0b69b

New changeset d10a7c1ac3a7 by Chris Jerdonek in branch 'default':
Issue #15533: Merge update from 3.3.
http://hg.python.org/cpython/rev/d10a7c1ac3a7

--

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



[issue16007] Improved Error message for failing re expressions

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16007
___
___
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-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue16074] bad error message in os.rename

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue9650] format codes in time.strptime docstrings

2012-09-30 Thread Ezio Melotti

Ezio Melotti added the comment:

The patch contains non-ascii apostrophes: s/Locale’s/Locale's/

--
nosy: +ezio.melotti

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



[issue16095] urllib2 failing with squid proxy and digest authentication

2012-09-30 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


--
assignee:  - orsenthil
nosy: +orsenthil

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



[issue8800] add threading.RWLock

2012-09-30 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

I can't say that I'm that familiar with multiprocessing to comment on that in 
particular.
But I do find your approach strange, to create two lock-like objects, in 
stead of the more familiar construct of having a RWLock (this is known from 
other languages) with two ways of claiming it.

Attached is a new patch.  I've adopted the name SharableLock perhaps it is 
bad.  It uses your idea of returning lock-like objects that do either shared 
or exclusive locking.

There are two implementations: SharableLock is much like the original patch, 
with two conditions and writer priority.
SimpleSharableLock drops all that, and uses a single condition and ad-hoc 
priority. I've added unittests that show that writer-starvation does not appear 
to be a problem.

Createing a Multiprocessing lock using the SharableLockBase should pose no 
difficulties.

The use of the SharableLock with Condition objects is forced to be Exclusive, 
since Condition objects typcially rely on their associated lock to synchronize 
internal state.

--
Added file: http://bugs.python.org/file27359/sharablelock.patch

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



[issue14783] Make int() and str() docstrings correct

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The change for issue 15831 contains a number of places where a single signature 
line was converted to multiple -- but in the docs and not the docstrings.  
Those instances can also be examined for this issue.

The signature line for str() was not updated in that patch, however.

--
stage: commit review - needs patch
versions: +Python 2.7, Python 3.4

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



[issue16086] tp_flags: Undefined behaviour with 32 bits long

2012-09-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, I'm not Martin, but I'll try to answer. An ABI pertains to the interfaces 
exposed by compiled object code, not source code. With C, function signatures 
in compiled code don't keep any type information (*), and they obviously 
doesn't know about macros either. So I'd answer No to both questions :-)

(*) it would be different with C++, because of name mangling

--
nosy: +pitrou

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



[issue13028] python wastes linux users time by checking for dylib on each dynamic library load

2012-09-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Which was the command run under strace exactly?

--
nosy: +brett.cannon, ncoghlan, pitrou
versions: +Python 3.4 -Python 2.7

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-09-30 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

In several places such dungerous code used to check the integer overflow:

  size = n * itemsize;
  if (size / itemsize != n) raise exception...

Because these values are signed, this results in undefined behavior.

The proposed patches replace similar unsafe code to safe one. Note that the 
patches for the different versions are substantially different.

--
components: Extension Modules, Interpreter Core
files: size_overflow-3.3.patch
keywords: patch
messages: 171657
nosy: mark.dickinson, storchaka
priority: normal
severity: normal
status: open
title: Get rid of dangerous integer overflow tricks
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27360/size_overflow-3.3.patch

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-09-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file27361/size_overflow-3.2.patch

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-09-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file27362/size_overflow-2.7.patch

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



[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It looks slightly better, but it would also violate there is one obvious way 
to do it.

--
nosy: +gvanrossum, pitrou

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



[issue8800] add threading.RWLock

2012-09-30 Thread Sebastian Noack

Sebastian Noack added the comment:

I was just waiting for a comment pointing out, that my patch comes without 
tests. :) Note that we are still discussing the implementation and this patch 
is just a proof of concept. And since the way it is implemented and the API it 
provides could still change, its quite pointless to write tests, until we at 
least agreed on the API.

I have uploaded a new patch. The way it is implemented now, is more like the 
Barrier is implemented. The common code is shared in the threading module and 
the shared/exclusive lock objects can be pickled now. I have also fixed a bug 
related to acquiring locks in non-blocking mode.

However the code still uses c_uint, but ctypes (and 
multiprocessing.sharedtypes) is only imported when ShrdExclLock is called. So 
it is just a lazy dependency, now. However the reason why I am using ctypes 
instead of python integers for threading and a BufferWrapper for 
multiprocessing (as the Barrier does) is, because of 2 of the 4 counters need 
to be continuously incremented, and c_uint has the nice feature that it can 
overflow, in contrast to python integers and integers in arrays. Also that way 
the implementation is simpler and it seems that there isn't much difference 
under the hood between using BufferWrapper() and RawValue().

A shared/exclusive lock isn't one lock but two locks, which are synchronized, 
but must be acquired separately. Similar to a pipe, which isn't one file, but 
one file connected to another file that reads whatever you have written into 
the first file. So it isn't strange to create two lock objects, as it also 
isn't strange that os.pipe() returns two file descriptors.

Also having a separate lock object for the shared and exclusive lock, each 
providing the same API (as Lock and RLock), gives you huge flexibility. You can 
acquire both locks using the with statement or pass them separately around. So 
for example when you have a function, thread or child process, that should only 
be able to acquire either the shared or the exclusive lock, you don't have to 
pass both locks. That also means that existing code that expects a lock-like 
object will be compatible with both the shared and exclusive lock.

--
Added file: 
http://bugs.python.org/file27363/Added-ShrdExclLock-to-threading-and-multiprocessing-2.patch

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



[issue9650] format codes in time.strptime docstrings

2012-09-30 Thread Mike Hoy

Mike Hoy added the comment:

Updated patch as per Ezio's comment.

--
Added file: http://bugs.python.org/file27364/issue9650-format-codes_v2.diff

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



[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-30 Thread Stefan Krah

Stefan Krah added the comment:

For once a Linux bot shows the failure that is the topic of this
issue:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/3101/steps/test/logs/stdio

==
FAIL: test_circular_imports (test.test_threaded_import.ThreadedImportTests)
--
Traceback (most recent call last):
  File 
/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_threaded_import.py,
 line 205, in test_circular_imports
self.assertEqual(set(results), {'a', 'b'})
AssertionError: Items in the second set but not the first:
'b'
'a'

--

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



[issue14783] Make int() and str() docstrings correct

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 So (a) there is precedent for multiple signatures in docstrings

For the record, this is also true of 2.7:

http://hg.python.org/cpython/file/15fd0b4496e0/Objects/bytearrayobject.c#l2870

--

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



[issue9674] make install DESTDIR=/home/blah fails when the prefix specified is /

2012-09-30 Thread Éric Araujo

Éric Araujo added the comment:

A unit test is needed.

--
versions: +Python 3.4

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



[issue15923] Building from a fresh clone breaks on Parser/asdl_c.py

2012-09-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f07ab82de92 by Ezio Melotti in branch '2.7':
#15923: fix a mistake in asdl_c.py that resulted in a TypeError after 
2801bf875a24 (see #15801).
http://hg.python.org/cpython/rev/8f07ab82de92

New changeset cb988d601803 by Ezio Melotti in branch '3.2':
#15923: fix a mistake in asdl_c.py that resulted in a TypeError after 
2801bf875a24 (see #15801).
http://hg.python.org/cpython/rev/cb988d601803

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

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

--
nosy: +python-dev

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



[issue15801] Weird string interpolation behaviour

2012-09-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f07ab82de92 by Ezio Melotti in branch '2.7':
#15923: fix a mistake in asdl_c.py that resulted in a TypeError after 
2801bf875a24 (see #15801).
http://hg.python.org/cpython/rev/8f07ab82de92

New changeset cb988d601803 by Ezio Melotti in branch '3.2':
#15923: fix a mistake in asdl_c.py that resulted in a TypeError after 
2801bf875a24 (see #15801).
http://hg.python.org/cpython/rev/cb988d601803

--

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



[issue15923] Building from a fresh clone breaks on Parser/asdl_c.py

2012-09-30 Thread Ezio Melotti

Ezio Melotti added the comment:

This is now fixed.

self.emit(default: % name, 2) worked until #15801 got fixed,
Since asdl_c.py is executed using the system Python, this was failing only when 
the system Python included the fix.

--
assignee:  - ezio.melotti
components: +Build
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - behavior
versions: +Python 2.7, Python 3.2, Python 3.4

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



[issue8800] add threading.RWLock

2012-09-30 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

A shared/exclusive lock isn't one lock but two locks, which are synchronized, 
but must be acquired separately. Similar to a pipe, which isn't one file, but 
one file connected to another file that reads whatever you have written into 
the first file. So it isn't strange to create two lock objects, as it also 
isn't strange that os.pipe() returns two file descriptors

That's one way to look at it.  Another (and the more common) is to say that it 
is one lock, which can be in two different states.  The original patch is 
modeled on seveal such constructs that exist in the field, such as for example 
the SRW locks in windows: 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa904937(v=vs.85).aspx

(In fact, I am rather leaning back towards the RWLock name again, since that 
seems to be the most commonly used on other platforms.  Oh, how tempting it is 
to bikeshed about such trivialities.)

Note that in my last patch, I provide the exclusive_locked() and 
shared_locked() methods that return exactly such locks as you describe.

I'd much rather have a single RW Lock object, with retgular locking proxies, 
rather than two distinct object, attached only by some shared common variables.

Also, with the structured approach I suggest, you can relatively easily create 
such a lock that also works across process boundaries by implementing a 
concrete class with SharableLockBase as a base.

--

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



[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-30 Thread Guido van Rossum

Guido van Rossum added the comment:

In practice this is indeed how most users of met a classes do it. E.g.
Django. So, +1.

--Guido van Rossum (sent from Android phone)
On Sep 30, 2012 11:36 AM, Antoine Pitrou rep...@bugs.python.org wrote:


 Antoine Pitrou added the comment:

 It looks slightly better, but it would also violate there is one obvious
 way to do it.

 --
 nosy: +gvanrossum, pitrou

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16049
 ___


--

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



[issue8800] add threading.RWLock

2012-09-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, since we're bikeshedding, I like Richard's proposal best:

 Personally, I would prefer to make the shared and exclusive locks
 attributes of the same object, so one could do
 
with selock.shared:
   ...
 
with selock.exclusive:
   ...

Please note, the same object could simply be a namedtuple instance.

Also I think shared/exclusive indeed conveys the semantics better than 
read/write.

--

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



[issue13028] python wastes linux users time by checking for dylib on each dynamic library load

2012-09-30 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
status: open - pending

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



[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 For once a Linux bot shows the failure that is the topic of this
 issue:

Hmm, so there may be a small race condition after all?

The problem is that I can't reproduce, on a non-debug build as on that
buildbot, after more than 43000 (!) test runs. Either this failure is
incredibly sporadic, or it needs certain conditions my system doesn't
meet.

--

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



[issue16081] Fix compile warnings in thread_pthread.h

2012-09-30 Thread Michele Orrù

Michele Orrù added the comment:

That's ok for me.
Tested with OSX 10.8 and clang.

--
nosy: +maker

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



[issue16081] Fix compile warnings in thread_pthread.h

2012-09-30 Thread Brian Brazil

Brian Brazil added the comment:

I'm on gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, this was the only warning I 
saw (though I don't have all the optional libraries installed).

--

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



[issue1052827] filelist.findall should not fail on dangling symlinks

2012-09-30 Thread Michele Orrù

Changes by Michele Orrù maker...@gmail.com:


--
nosy: +maker

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



[issue9650] format codes in time.strptime docstrings

2012-09-30 Thread Chris Rebert

Chris Rebert added the comment:

I'm going to bikeshed and again suggest that %I and %p be included for handling 
12-hour clock times.

Also, the patch seems to only be for strftime(), and not strptime().

--

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



[issue8800] add threading.RWLock

2012-09-30 Thread Richard Oudkerk

Richard Oudkerk added the comment:

@Sebastian: Both your patch sets are missing the changes to threading.py.

--

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



[issue15862] IDLE not working when due to wrong Hard Drive point of os.path.expanduser

2012-09-30 Thread Roger Serwy

Roger Serwy added the comment:

In your original message, did IDLE eventually start when you ran:

C:\Python27python.exe Lib\idlelib\idle.py

?  If yes, then the bug is likely due to issue13582.


If I understand correctly, when you reboot your computer, IDLE won't launch 
from the shortcut in the start menu?

--

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



[issue9650] format codes in time.strptime docstrings

2012-09-30 Thread Mike Hoy

Mike Hoy added the comment:

New patch includes time.strptime and the additional changes suggested by Chris 
Rebert.

--
Added file: http://bugs.python.org/file27365/issue9650-format-codes_v3.diff

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



[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-30 Thread Nadeem Vawda

Nadeem Vawda added the comment:

 Recursive inline _check_can_read() will be enough. Now this check calls 4 
 Python functions (_check_can_read(), readable(), _check_non_closed(), 
 closed). Recursive inlining only readable() in _check_can_read() is achieved 
 significant but less (about 30%) effect.

I've inlined readable() into _check_can_read() [3.3: 4258248a44c7 | default: 
abb5c5bde872]. This seems like a good balance between maximizing our 
performance in edge cases and not turning the code into a mess in the process ;)

Once again, thanks for your contributions!

--

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



[issue12930] reindent.py inserts spaces in multiline literals

2012-09-30 Thread Roger Serwy

Roger Serwy added the comment:

This issue also affects reindent.py in Python 3.x.

The attached patch adds a -s switch to reindent.py to disallow changes to the 
contents of strings.

The rstrip_and_expand_tabs function tokenizes the input to identify all strings 
and then expands and rstrips all parts of the input not within a string.

--
versions: +Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27366/issue12930.patch

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



[issue12930] reindent.py inserts spaces in multiline literals

2012-09-30 Thread Roger Serwy

Roger Serwy added the comment:

Attached is a simple test of the -s functionality for reindent.py. It works 
on Linux but I'm not sure about Windows.

--
Added file: http://bugs.python.org/file27367/test_reindent.py

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



[issue16074] bad error message in os.rename

2012-09-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue16076] xml.etree.ElementTree.Element is no longer pickleable

2012-09-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In fact I have tried other code, a bit faster and more maintainable (see patch).

--
Added file: http://bugs.python.org/file27368/bz2_bikeshedding.patch

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



[issue10951] gcc 4.6 warnings

2012-09-30 Thread Martin Pool

Martin Pool added the comment:

Hi, Martin,

On 20 August 2012 05:25, Martin v. Löwis rep...@bugs.python.org wrote:
 Martin v. Löwis added the comment:

 (As usual), I'm quite skeptical about this bulk bug report; it violates the 
 one bug at a time principle, where one bug can roughly be defined as 
 cannot be split into smaller independent issues.

I heartily agree with you in general: as well as being non-atomic,
it's also hard to have a clear test whether such bugs are fixed.  But,
I hope this patch has some value even if the bug is not a great
example.

 For the cases at hand, I think it would be best if somebody with gcc 4.6 
 available just fixed the easy ones, i.e. where the code clearly improves 
 when silenciing the warning. In these cases, I wouldn't mind if they get 
 checked in without code review; I know some favor review for all changes, in 
 which case a separate issue should be opened for a patch fixing a bunch of 
 these.

I've fixed what I believe to be all the safe/easy warnings in my patch
above.  I would appreciate if someone would review it and if possible
commit it.

--

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



[issue12930] reindent.py inserts spaces in multiline literals

2012-09-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Definitely a bugfix should not add any new switches. Patch would simply lead to 
preserving of all string literals and nothing more. I will look at Caio's 
patches a little later.

Now Python contains automated tests for some tools.

--
nosy: +storchaka

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



[issue9650] format codes in time.strptime docstrings

2012-09-30 Thread Chris Rebert

Chris Rebert added the comment:

This is now hardcore nitpicking, but I'm conflicted as to whether %p should be 
grouped with the other locale-related codes or with %I (since it's hard to 
imagine using %I or %p in a singleton capacity).

In any case, props to Mike for putting an actual patch together.

--

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



[issue13476] Simple exclusion filter for unittest autodiscovery

2012-09-30 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
assignee:  - michael.foord

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2012-09-30 Thread Ezio Melotti

Ezio Melotti added the comment:

Attached failing test.

--
keywords: +patch
Added file: http://bugs.python.org/file27369/issue11489.diff

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



[issue12930] reindent.py inserts spaces in multiline literals

2012-09-30 Thread Roger Serwy

Roger Serwy added the comment:


 Definitely a bugfix should not add any new switches. Patch would simply lead 
 to preserving of all string literals and nothing more.
I added the switch so that the existing behavior of reindent would stay 
the same in case some other scripts rely on that behavior. If you'd 
rather not include the switch, then I'm ok with removing it.

The patch causes reindent to no longer removes trailing whitespace on 
multi-line doc strings. Is that side-effect acceptable?

--

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



[issue16036] simplify int() signature docs

2012-09-30 Thread Chris Jerdonek

Chris Jerdonek added the comment:

[Django/Rietveld is erroring out for me when I try to reply there, so replying 
here]

On 2012/10/01 01:45:03, cvrebert wrote:
 Doc/library/functions.rst:636: arguments are given.  If *x* is a number, 
 return
 :meth:`x.__int__()
 How is number-ness determined? Are we just assuming anything with an 
 __int__()
 method is a number for purposes of explanation?

cvrebert, this patch has already been committed to 3.x.  Maybe open a new issue 
if you think the language can be improved further?  (Feel free to add me to the 
nosy list.)  This issue was originally focused more on updating just the 
signature line (along with any consequent changes to the text).

--

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



[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-30 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Felipe, could you please submit a Contributor Agreement Form? 
http://www.python.org/psf/contrib/

Your patch looks good to me, although I would move almost all


 fclose(fp);
 PyErr_Format(ZipImportError, can't read Zip file: %R, archive);
 return NULL;


To a goto label.

--

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



  1   2   >