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

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

[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

[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

[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

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

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

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

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

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

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

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

[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

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

[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

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

[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

[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

[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

[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

[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

[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

[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

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

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

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

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

[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

[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

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

[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

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

[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

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

[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

[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

[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

[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

[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

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

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

[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

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

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

[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

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

[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

[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

[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

[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

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

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

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

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

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

[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':

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

[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

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