[issue12473] factory func of collections.defaultdict should receive the missing key as args when called.

2011-07-02 Thread HaiYun Yan

New submission from HaiYun Yan lyricco...@gmail.com:

for example:

def calc(params):
 i am factoring numbers. 
# an expensive CPU cost function but 
# passin params and return result are both lightweight

cachedcalc = collections.defaultdict(calc)
result = cachedcalc[0xFFF0AC0FFF1]

--
components: Library (Lib)
messages: 139624
nosy: lyricconch
priority: normal
severity: normal
status: open
title: factory func of collections.defaultdict should receive the missing key 
as args when called.
type: behavior
versions: Python 2.7

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



[issue12401] unset PYTHON* environment variables when running tests

2011-07-02 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +ezio.melotti, michael.foord

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



[issue12473] factory func of collections.defaultdict should receive the missing key as args when called.

2011-07-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

-1. Besides compatibility issues, defaultdict is a dict: it contains data, and 
is not meant to consume CPU when accessing items. Its default function should 
return initial values, like 0 or an empty list.

I think what you want is memoization; a memoized function still looks like a 
function! there are many implementations for python, one of these is here: 
http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize

--
nosy: +amaury.forgeotdarc
resolution:  - invalid
status: open - closed

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



[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-02 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 On FreeBSD 6, os.kill(os.getpid(), signum) calls immediatly
 the signal handler before the creation of the first thread (...),
 whereas the signal handler is called later (when exactly?) after
 the creation of the first thread (default after my commit).

 It looks like a kernel/libc bug. At least, it doesn't conform to 
 POSIX.1-2001. Extract of the Linux manual page of the kill function (syscall):


Yes, that's definitely a kernel/libc bug, like  #12392.

 I see two options:

  - revert my commit and fix #12392 (test_signal) differently
  - skip test_register, test_register_file, test_register_threads and 
 test_stack_overflow can on freebsd6

 I prefer to revert my commit because it introduced an unexpected behaviour on 
 signal handling. It calls the signal handler later when the process sends a 
 signal to itself, even if the application don't use threads.


I'm also in favor of reverting this commit.

 The new fix for #12392 is to ensure that at least one thread was created. We 
 can for example use the following code at the beginning of test_signal:

 if sys.platform in ('freebsd5', 'freebsd6'):
  # On FreeBSD6, pthread_kill() doesn't work on the main thread
  # before the creation of the first thread
  import threading
  t = threading.Thread(target=lambda: None)
  t.start()
  t.join()

 Then test_signal.test_pthread_kill_main_thread() should be skipped or patched 
 for freebsd6.


Yes.

By the way, this also explains the test.test_signal.WakeupSignalTests
failures we had on FreeBSD 6.4.
Here's what I wrote in see http://bugs.python.org/issue8407#msg137382 :



==
FAIL: test_signum (test.test_signal.WakeupSignalTests)
--
Traceback (most recent call last):
  File 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py,
line 272, in test_signum
self.check_signum(signal.SIGUSR1, signal.SIGALRM)
  File 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py,
line 238, in check_signum
self.assertEqual(raised, signals)
AssertionError: Tuples differ: (14, 30) != (30, 14)

First differing element 0:
14
30

- (14, 30)
+ (30, 14)


This means that the signals are not delivered in order.
Normally, pending signals are checked upon return to user-space, so
trip_signal should be called when the kill syscall returns, so signal
numbers should be written in order to the wakeup FD (and here it looks
like the lowest-numbered signal is delivered first).
You could try adding a short sleep before the second kill (or just
pass unordered=True to check_signum, but in that case we don't check
the correct ordering).


Since signals are not delivered synchronously when the kill() syscall
returns, they are delivered later, and the order is not preserved.

The patch above (creating a dummy thread at the beginning of
test_signal) should fix this, so you might be able to revert
http://hg.python.org/cpython/rev/29e08a98281d .

--

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Updated patch.

--
Added file: http://bugs.python.org/file22545/heap_gc_deadlock_lockless.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12352
___diff -r fcf242243d46 Lib/multiprocessing/heap.py
--- a/Lib/multiprocessing/heap.py   Sun Jun 26 15:29:27 2011 +0200
+++ b/Lib/multiprocessing/heap.py   Sat Jul 02 10:59:15 2011 +0200
@@ -101,6 +101,8 @@
 self._stop_to_block = {}
 self._allocated_blocks = set()
 self._arenas = []
+# list of pending blocks to free - see free() comment below
+self._pending_free_blocks = []
 
 @staticmethod
 def _roundup(n, alignment):
@@ -175,15 +177,39 @@
 
 return start, stop
 
+def _free_pending_blocks(self):
+# Free all the blocks in the pending list - called with the lock held.
+while True:
+try:
+block = self._pending_free_blocks.pop()
+except IndexError:
+break
+self._allocated_blocks.remove(block)
+self._free(block)
+
 def free(self, block):
 # free a block returned by malloc()
+# Since free() can be called asynchronously by the GC, it could happen
+# that it's called while self._lock is held: in that case,
+# self._lock.acquire() would deadlock (issue #12352). To avoid that, a
+# trylock is used instead, and if the lock can't be acquired
+# immediately, the block is added to a list of blocks to be freed
+# synchronously sometimes later from malloc() or free(), by calling
+# _free_pending_blocks() (appending and retrieving from a list is not
+# strictly thread-safe but under cPython it's atomic thanks to the 
GIL).
 assert os.getpid() == self._lastpid
-self._lock.acquire()
-try:
-self._allocated_blocks.remove(block)
-self._free(block)
-finally:
-self._lock.release()
+if not self._lock.acquire(0):
+# can't acquire the lock right now, add the block to the list of
+# pending blocks to free
+self._pending_free_blocks.append(block)
+else:
+# we hold the lock
+try:
+self._free_pending_blocks()
+self._allocated_blocks.remove(block)
+self._free(block)
+finally:
+self._lock.release()
 
 def malloc(self, size):
 # return a block of right size (possibly rounded up)
@@ -191,6 +217,7 @@
 if os.getpid() != self._lastpid:
 self.__init__() # reinitialize after fork
 self._lock.acquire()
+self._free_pending_blocks()
 try:
 size = self._roundup(max(size,1), self._alignment)
 (arena, start, stop) = self._malloc(size)
diff -r fcf242243d46 Lib/test/test_multiprocessing.py
--- a/Lib/test/test_multiprocessing.py  Sun Jun 26 15:29:27 2011 +0200
+++ b/Lib/test/test_multiprocessing.py  Sat Jul 02 10:59:15 2011 +0200
@@ -1738,6 +1738,29 @@
 self.assertTrue((arena != narena and nstart == 0) or
 (stop == nstart))
 
+def test_free_from_gc(self):
+# Check that freeing of blocks by the garbage collector doesn't 
deadlock
+# (issue #12352).
+# Make sure the GC is enabled, and set lower collection thresholds to
+# make collections more frequent (and increase the probability of
+# deadlock).
+if gc.isenabled():
+thresholds = gc.get_threshold()
+self.addCleanup(gc.set_threshold, *thresholds)
+else:
+gc.enable()
+self.addCleanup(gc.disable)
+gc.set_threshold(10)
+
+# perform numerous block allocations, with cyclic references to make
+# sure objects are collected asynchronously by the gc
+for i in range(5000):
+a = multiprocessing.heap.BufferWrapper(1)
+b = multiprocessing.heap.BufferWrapper(1)
+# circular references
+a.buddy = b
+b.buddy = a
+
 #
 #
 #
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-07-02 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Can we get this committed for 3.2.1 then?

--

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


Added file: http://bugs.python.org/file22546/heap_gc_deadlock_lockless.diff

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


Removed file: http://bugs.python.org/file22477/heap_gc_deadlock.diff

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


Removed file: http://bugs.python.org/file22490/heap_gc_deadlock_lockless.diff

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


Removed file: http://bugs.python.org/file22545/heap_gc_deadlock_lockless.diff

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



[issue12465] gc.get_referents can be used to crash Python

2011-07-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This looks a lot like the crasher described in 
Lib/test/crashers/underlying_dict.py

For the record, the similar issue1517663 was closed even though there was a 
patch, with a comment of the if it hurts, don't do it kind.

--
nosy: +amaury.forgeotdarc

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

The last heap_gc_deadlock_lockless.diff looks good.

Note: please try to use different filenames for different versions of the same 
patch. For example, add a number (heap_gc_deadlock_lockless-2.diff) to the name.

--

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



[issue12468] longjmp causes uninitialized stack frame

2011-07-02 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Digging a little deeper:
- in ./Modules/fpectlmodule.c, the longjmp() is actually not used at all (dead 
code)
- in Modules/readline.c, the jmp_buf is correctly initialized (well, there's a 
tiny race condition because SIGINT handler is installed before setjmp() 
initializes jbuf, but it's not worth fixing)

In this case, I'm 99% sure the culprit is:
import pycurl

That's a know bug in libcurl:
longjmp causes uninitialized stack frame in libcurl's alarmfunc running 
gwibber-daemon
https://bugzilla.redhat.com/show_bug.cgi?id=539809

Suggesting to close as invalid.

--

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



[issue12468] longjmp causes uninitialized stack frame

2011-07-02 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

And the backtrace leaves no doubt:
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f2415de61d7]
/lib/x86_64-linux-gnu/libc.so.6(+0xfe169)[0x7f2415de6169]
/lib/x86_64-linux-gnu/libc.so.6(__longjmp_chk+0x33)[0x7f2415de60d3]
/usr/lib/libcurl-gnutls.so.4(+0xbb45)[0x7f241528bb45]

The longjmp is in libcurl.
Closing as invalid.

--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-02 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 I'm also in favor of reverting this commit.

Hum, the problem is that the Python test suite creates a lot of threads. Revert 
the patch doesn't change anything for the test suite. I mean that all tests 
relying on signal delivery should (must) be running in a new fresh process, 
especially if the test expects that the signal is received immediatly (as 
described in POSIX). If we don't use a subprocess, the tests will fail 
sometimes if at least one thread was created before.

I will try to write a patch which implement all requirements we listed in this 
issue. I just fear that it is a little bit overkill just to support an old 
(?) OS. But fixing a test for FreeBSD 6 improves usually the reliability on 
other OSes, especially when we replaced fork() by subprocess.

--
nosy: +loewis

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



[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-02 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 Revert the patch doesn't change anything for the test suite.

I know, but at least it doesn't change the default - be it broken - behaviour 
on FreeBSD 6.

 I just fear that it is a little bit overkill just to support an old (?) OS.

Yes. I mean, we can't expect Python signal machinery to work when the 
underlying OS is broken.
I personally think we should just skip all those failing tests on FreeBSD6.

--

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



[issue10883] urllib: socket is not closed explicitly

2011-07-02 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Here's an updated patch implementing reference counting for ftpwrapper.
It changes the semantics of ftpwrapper.close() to postpone actually closing
the connection until all files have also been closed (like socket.close()).

--
Added file: http://bugs.python.org/file22547/issue10883.patch

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



[issue12474] Invalid read in symtable.c

2011-07-02 Thread Stefan Krah

New submission from Stefan Krah stefan-use...@bytereef.org:

After 151142c0c5b1 Valgrind finds an invalid read in symtable.c, line 907:

  st-st_cur = (PySTEntryObject *)PyList_GET_ITEM(st-st_stack, size - 2);


==14301== Memcheck, a memory error detector
==14301== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==14301== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==14301== Command: ./python
==14301== 
==14301== Invalid read of size 8
==14301==at 0x4A1B30: symtable_exit_block (symtable.c:907)
==14301==by 0x49FFA3: PySymtable_Build (symtable.c:276)
==14301==by 0x473B42: PyAST_CompileEx (compile.c:295)
==14301==by 0x49E37D: run_mod (pythonrun.c:1790)
==14301==by 0x49E10E: PyRun_StringFlags (pythonrun.c:1727)
==14301==by 0x45EBFB: builtin_exec (bltinmodule.c:818)
==14301==by 0x54E2FF: PyCFunction_Call (methodobject.c:81)
==14301==by 0x471B4C: call_function (ceval.c:3957)
==14301==by 0x46D482: PyEval_EvalFrameEx (ceval.c:2663)
==14301==by 0x470060: PyEval_EvalCodeEx (ceval.c:3393)
==14301==by 0x47208A: fast_function (ceval.c:4055)
==14301==by 0x471C9F: call_function (ceval.c:3978)
==14301==  Address 0x691df18 is 8 bytes before a block of size 32 alloc'd
==14301==at 0x4C27972: realloc (vg_replace_malloc.c:525)
==14301==by 0x5367FB: list_resize (listobject.c:62)
==14301==by 0x537F5B: list_ass_slice (listobject.c:643)
==14301==by 0x5381BA: PyList_SetSlice (listobject.c:677)
==14301==by 0x4A1B61: symtable_exit_block (symtable.c:909)
==14301==by 0x4A2997: symtable_visit_stmt (symtable.c:1128)
==14301==by 0x49FED2: PySymtable_Build (symtable.c:256)
==14301==by 0x473B42: PyAST_CompileEx (compile.c:295)
==14301==by 0x49E37D: run_mod (pythonrun.c:1790)
==14301==by 0x49E10E: PyRun_StringFlags (pythonrun.c:1727)
==14301==by 0x45EBFB: builtin_exec (bltinmodule.c:818)
==14301==by 0x54E2FF: PyCFunction_Call (methodobject.c:81)

--
components: Interpreter Core
messages: 139636
nosy: benjamin.peterson, skrah
priority: normal
severity: normal
status: open
title: Invalid read in symtable.c
type: behavior
versions: Python 3.3

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



[issue12465] gc.get_referents can be used to crash Python

2011-07-02 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue12459] time.sleep(-1.0) behaviour

2011-07-02 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

+if gc.isenabled():
+thresholds = gc.get_threshold()
+self.addCleanup(gc.set_threshold, *thresholds)
+else:
+gc.enable()
+self.addCleanup(gc.disable)

It seems you won't restore the thresholds if the GC wasn't enabled at first.

--

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



[issue10898] posixmodule.c redefines FSTAT

2011-07-02 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I've had to split the three #undef's up to just before they're used.

I would really prefer to move up the offending #include rather than
sprinkle those #undef's all over the place.

--

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 96a0788583c6 by Charles-François Natali in branch '2.7':
Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
http://hg.python.org/cpython/rev/96a0788583c6

--
nosy: +python-dev

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 874143242d79 by Charles-François Natali in branch '2.7':
Issue #12352: In test_free_from_gc(), restore the GC thresholds even if the GC
http://hg.python.org/cpython/rev/874143242d79

--

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 0d4ca1e77205 by Charles-François Natali in branch '3.1':
Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
http://hg.python.org/cpython/rev/0d4ca1e77205

--

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 37606505b227 by Charles-François Natali in branch '3.2':
Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
http://hg.python.org/cpython/rev/37606505b227

--

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



[issue12352] multiprocessing.Value() hangs

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset fd8dc3746992 by Charles-François Natali in branch 'default':
Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
http://hg.python.org/cpython/rev/fd8dc3746992

--

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



[issue12409] Moving Documenting Python to Devguide

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I don’t understand Fred’s replies.

 The scope of this document is much larger than Python's documentation,
 but extends to all projects written in Python that use Sphinx as their
 documentation tool.
Really?  docs.python.org/documenting is much smaller that sphinx.pocoo.org, and 
only seems to cover documenting Python, not any Python project.

 With that, it makes sense to keep it as part of the documentation for
 users of Python.
I don’t follow.  You’re saying that since the document also covers other 
projects than Python, it makes sense to include it in the Python docs?

IMO, the criterion for the devguide is to have version-independent documents in 
one place instead of needlessly including them with CPython and having to sync 
across versions.  For the Documenting Python docs, if they contain 
version-specific instructions, or if they contain instructions needed in a 
CPython tarball, then they’re in the right place, otherwise they could move to 
the devguide.

--
nosy: +eric.araujo

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



[issue12442] shutil.disk_usage()

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Looks like my message on Rietveld was not received or not read:

http://bugs.python.org/review/12442/diff/2951/7664#newcode776

--
nosy: +eric.araujo

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



[issue9968] Let cgi.FieldStorage have named uploaded file

2011-07-02 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
versions: +Python 3.3 -Python 3.2

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



[issue6234] cgi.FieldStorage is broken when given POST data

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Closing as duplicate.  The other report has more discussion.

--
nosy: +eric.araujo
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - WSGI, cgi.FieldStorage incompatibility

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



[issue11066] cgi.py proposals : sys.stdout encoding + rewriting of parsing functions

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

See also #1610654 and #6234.

--
nosy: +eric.araujo

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



[issue1573931] WSGI, cgi.FieldStorage incompatibility

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Now that web-sig has reached agreement on PEP , can an expert update the 
status of this bug?

--
nosy: +eric.araujo

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



[issue12411] cgi.parse_multipart is broken on 3.x

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

This looks like a conversion bug indeed; network I/O should use bytes.  Strange 
that no-one caught this, but if there was no test and no users, then bugs can 
slip.

See also #11066, #8077, #4953, #6234 (also adding some people from those bugs’ 
nosy fields).

--
nosy: +MHordecki, efosmark, eric.araujo, flox, milesck, quentel
versions: +Python 3.2

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



[issue12412] non defined representation for pwd.struct_passwd

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

The docs indeed don’t say more that “Password database entries are reported as 
a tuple-like object, whose attributes correspond to the members of the passwd 
structure”; no mention is made of named tuple or struct sequence.

I think there is no bug for CPython; you may want to suggest friendlier reprs 
for structseqs to PyPy.

--
nosy: +benjamin.peterson, eric.araujo
resolution:  - works for me
stage:  - committed/rejected
status: open - closed

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



[issue12414] getsizeof() on code objects is wrong

2011-07-02 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +rhettinger

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



[issue12442] shutil.disk_usage()

2011-07-02 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

I removed the percent usage from the returned namedtuple hence that comment is 
no longer necessary.

--

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



[issue12415] Missing: How to checkout the Doc sources

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

How about adding this near the top of documenting/building:

  The sources for the Python documentation are included in the
  Python repository, alongside code and tests.  Follow the
  instructions in the `Developpers' Guide`_ to get a copy of this
  repository.

  _Developpers's Guide: http://docs.python.org/devguide

--
nosy: +eric.araujo
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue12418] python should inherit the library search path from the compiler for stdlib extensions

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Do you know if all compilers supported by CPython have a similar option?

--
nosy: +eric.araujo

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



[issue12474] Invalid read in symtable.c

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 6b3872a11299 by Benjamin Peterson in branch 'default':
fix possibily uninitialized memory usage (closes #12474)
http://hg.python.org/cpython/rev/6b3872a11299

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

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



[issue12442] shutil.disk_usage()

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Ah, excellent!  Thanks for the new function.  About using assertGreater and 
friends in tests, as Ezio and I suggested, I have done the change in my working 
copy and will commit it later.

--

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



[issue9561] distutils: set encoding to utf-8 for input and output files

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Okay.  I guess you’ll use codecs.open in 2.7
 Oh, Python 2.7... DistributionMetadata of distutils encodes most
 values to byte strings (get_xxx() methods calls self._encode_field).
I forgot that.  No change is needed in 2.7.

 I checked, there is not bootstrap issue.
I was talking about bootstrapping if a change to use codecs was made.

--

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



[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Distutils is frozen.  New features go into distutils2.

--

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



[issue11363] Curses - add missing functions to doc

2011-07-02 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Yes, the typo is also on default; I did not mention it, as the merge would have 
shown it :)

I did not report the bug I found; if you could test all examples for 3.x-compat 
and open a report, it would be great.

--

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



[issue12442] shutil.disk_usage()

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 479973c6aa03 by Éric Araujo in branch 'default':
Clean up NEWS entry and tests for shutil.disk_usage (#12442)
http://hg.python.org/cpython/rev/479973c6aa03

--

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



[issue12442] shutil.disk_usage()

2011-07-02 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Thanks for the further fixes.

--

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset edba722f3b02 by Vinay Sajip in branch '3.2':
Closes #12291: Fixed bug which was found when doing  multiple loads from one 
stream.
http://hg.python.org/cpython/rev/edba722f3b02

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

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 42dd11028e94 by Vinay Sajip in branch 'default':
Closes #12291 for 3.3 - merged fix from 3.2.
http://hg.python.org/cpython/rev/42dd11028e94

--

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-07-02 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks!

--

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



[issue12456] Hangs in concurrent.futures

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 51c1f2cedb96 by Antoine Pitrou in branch 'default':
Issue #12456: fix a possible hang on shutdown of a 
concurrent.futures.ProcessPoolExecutor.
http://hg.python.org/cpython/rev/51c1f2cedb96

--
nosy: +python-dev

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



[issue12456] Hangs in concurrent.futures

2011-07-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


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

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



[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-07-02 Thread Petri Lehtinen

Changes by Petri Lehtinen pe...@digip.org:


--
stage: needs patch - patch review

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



[issue12043] Update shutil documentation

2011-07-02 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

It turns out it was just move() with a slightly outdated description; so I take 
the occasion to fix some minor stuff in the doc.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file22548/issue12043-default.patch

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



[issue12043] Update shutil documentation

2011-07-02 Thread Sandro Tosi

Changes by Sandro Tosi sandro.t...@gmail.com:


Added file: http://bugs.python.org/file22549/issue12043-27.patch

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



[issue12442] shutil.disk_usage()

2011-07-02 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
stage: commit review - committed/rejected

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



[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-07-02 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 0f5ea42fb46c by R David Murray in branch '3.2':
#12147: make send_message correctly handle Sender and Resent- headers.
http://hg.python.org/cpython/rev/0f5ea42fb46c

New changeset b8cec4f3faaa by R David Murray in branch 'default':
merge #12147: make send_message correctly handle Sender and Resent- headers.
http://hg.python.org/cpython/rev/b8cec4f3faaa

--
nosy: +python-dev

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



[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-07-02 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I tweaked the patch a bit (mostly style/cosmetic) and added some additional 
tests.  Thanks, Nicolas!

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

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



[issue12411] cgi.parse_multipart is broken on 3.x

2011-07-02 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Indeed, Victor's comments on his patch say that he changed code that was in the 
posted patch to say 'line.startswith(b'--')', and the original patch did use 
b'--', but the code he checked in is missing the 'b'.  He also asked for more 
tests.

Victor, any chance you can review this patch, since you were the last one to 
work on the code in question?

--
nosy: +r.david.murray

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



[issue11253] autodocument first appearance of ctypes.wintypes constants

2011-07-02 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

On Mon, Jun 27, 2011 at 12:18 AM, Senthil Kumaran
rep...@bugs.python.org wrote:
 As you said, the future version can be updated, but we
 cannot go back with updating the documentation of the already released
 versions.

Why?
--
anatoly t.

--

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