[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file18999/py27_winreg_EnumValue.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9937 ___

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file19021/py27_fix_winreg_EnumValue_op1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9937 ___

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I've withdrew my patch... It has still problem, and I cannot fix it yet. I suppose option 2 is easy. ANSI API's limitation makes it harder to implement correctly. -- ___ Python tracker

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can't we use RegEnumValueW and RegQueryInfoKeyW? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9937 ___

[issue9958] (c)elementTree missing children

2010-09-27 Thread Valentin Kuznetsov
New submission from Valentin Kuznetsov vkuz...@gmail.com: Hi, I found that parsing XML file with identical structure leads to missing children item at some point. In my test case which I attach it happens at id=183. Basically I have XML with bunch of elements of the following structure:

[issue9958] (c)elementTree missing children

2010-09-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The given script yields an item on a start event; but the element may not be fully populated at this point. please read http://docs.python.org/library/xml.etree.elementtree.html#xml.etree.ElementTree.iterparse You should use the end

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-27 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I also just ran into this. Is it likely that an enhancement request to provide access to the raw command line, as requested by the previous commenter, would be accepted? It's sometimes useful to have some idea about what kind of

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-27 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Merely from a Windows point-of-view, you could get the full command line fairly easily: code import ctypes pstring = ctypes.windll.kernel32.GetCommandLineW () print (ctypes.c_wchar_p (pstring).value) /code TJG -- nosy: +tim.golden

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-27 Thread akira
New submission from akira 4kir4...@gmail.com: $ python3.1 -c'import math; f = math.log(4,2); print(int(f), f.as_integer_ratio())' 2 (2, 1) $ python3.2 -c'import math; f = math.log(4,2); print(int(f), f.as_integer_ratio())' 1 (9007199254740991, 4503599627370496) Python 3.2a2+ (py3k:85028, Sep

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-27 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: Interesting. Any idea if something similar is possible on Linux? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2972 ___

[issue9955] multiprocessing.Pipe segmentation fault when recv of unpicklable object

2010-09-27 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +asksol ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9955 ___ ___ Python-bugs-list mailing list

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-27 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: I'm afraid I don't know; might be worth asking that on the main python mailing list. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2972

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-27 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: No, it's not really a bug: math.log(x, 2) isn't an atomic operation: it's computed internally as something like log(x) / log(2), and since each of the three steps (computation of the logs, division) can introduce a small rounding error,

[issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue

2010-09-27 Thread Dave Malcolm
New submission from Dave Malcolm dmalc...@redhat.com: test test_structmembers crashed -- type 'exceptions.ValueError': string too long Traceback (most recent call last): File /builddir/build/BUILD/Python-2.7/Lib/test/regrtest.py, line 863, in runtest_inner the_package =

[issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue

2010-09-27 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9960 ___ ___ Python-bugs-list

[issue9961] Identity Crisis! variable assignment using strftime fails comparison test.

2010-09-27 Thread Bill Hawkes
New submission from Bill Hawkes williamhawke...@yahoo.com: See below. When variable assignment is used with strftime for the day of the week, it fails comparison checks for the days of the week. Even when using the str() function it still fails. Manual entry of variable assignment is required

[issue9961] Identity Crisis! variable assignment using strftime fails comparison test.

2010-09-27 Thread Jean-Paul Calderone
Jean-Paul Calderone inva...@example.invalid added the comment: You mistakenly used is for these comparisons, rather than ==. The strftime involvement is a red herring. The real problem is the use of an /identity/ comparison rather than an /equality/ comparison. -- nosy: +exarkun

[issue1615376] subprocess doesn\'t handle SIGPIPE

2010-09-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615376 ___ ___ Python-bugs-list

[issue1652] subprocess should have an option to restore SIGPIPE to default action

2010-09-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1652 ___ ___ Python-bugs-list mailing

[issue9609] make cProfile multi-stack aware

2010-09-27 Thread Todd Whiteman
Changes by Todd Whiteman twhit...@yahoo.com.au: -- nosy: +twhitema ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9609 ___ ___ Python-bugs-list

[issue9941] Unify trace and profile interfaces

2010-09-27 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I've ran into a problem adding context manager functionality to Profile/Trace objects. When profile/trace function is set in __enter__ and removed in __exit__ it catches two spurious events: a return from __enter__ and a

[issue1634774] locale 1251 does not convert to upper case properly

2010-09-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: the OP is right: str.upper is supposed to be locale-dependent http://docs.python.org/library/stdtypes.html#str.upper But the implementation uses _toupper() which is a macro with Visual Studio, and obviously not locale-dependent:

[issue9950] socket.sendall() crash when receiving a signal

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Patch committed in r85032. I'm gonna watch the buildbots a bit, in case the test fails on some platforms. -- assignee: - pitrou resolution: - fixed stage: - committed/rejected ___ Python tracker

[issue8521] Allow some winreg functions to accept named arguments

2010-09-27 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Committed in r85033. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8521

[issue8158] documentation of 'optparse' module incomplete

2010-09-27 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Hello, since 2.7 optparse is deprecated in favor of argparse: is this bug still worth to be fixed? If so, I can work on a patch for the doc. Regards, Sandro -- nosy: +sandro.tosi ___ Python

[issue8158] documentation of 'optparse' module incomplete

2010-09-27 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Sorry, I probably overlooked at the situation. After a quick chat with Antoine on IRC, it's clear optparse is here to stay for all the lifetime of 2.7 (quite a long and prosper, we hope :) so yes, it's worth work on its documentation, hence

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-27 Thread akira
akira 4kir4...@gmail.com added the comment: No, it's not really a bug: math.log(x, 2) isn't an atomic operation: It is not a bug, but values of math.log(4) differs between 3.1 and 3.2 i.e., math.log(4.0) in 3.2 returns value that is consistent with math.log(4) in 3.1 but math.log(4) in 3.2

[issue9441] increase logging handlers test coverage

2010-09-27 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: It would be nice to see tests for NTEventLogHandler, as there are currently none. I looked into implementing NTEventLogHandler's Win32 calls in a C extension rather than requiring a third-party module, but stopped once I realized there weren't

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-27 Thread akira
Changes by akira 4kir4...@gmail.com: Added file: http://bugs.python.org/file19031/test_log_power_two.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9959 ___

[issue9950] socket.sendall() crash when receiving a signal

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch passes at least on Linux, OS X and Solaris buildbots. Backported to 3.1 (r85034) and 2.7 (r85035). -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-27 Thread akira
Changes by akira 4kir4...@gmail.com: -- type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9959 ___ ___

[issue9929] subprocess.Popen unbuffered not work

2010-09-27 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: But if line buffering doesn't work, disabling buffering on stdout/stderr does have a functional consequence: it allows process output to appear as generated instead of coming in chunks when the buffer is full. Of course, I could be

[issue9929] subprocess.Popen unbuffered not work

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: But if line buffering doesn't work, disabling buffering on stdout/stderr does have a functional consequence: it allows process output to appear as generated instead of coming in chunks when the buffer is full Yes, sorry, I had it backwards.

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-09-27 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: This doesn't seem to be an issue anymore. -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue9934] Python Docs Typo

2010-09-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ported to distutils2 in 2f460982b025, thanks! -- components: +Distutils2 nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9934

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9943 ___ ___ Python-bugs-list

[issue9945] Improper locking in logging

2010-09-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Just to be sure: this does not apply to 3.1? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9945 ___

[issue9946] lock use in logging

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- superseder: - Improper locking in logging ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9946 ___ ___

[issue3532] bytes.tohex method

2010-09-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: See #9951 for a patch adding bytes.hex -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3532 ___

[issue9951] introduce bytes.hex method

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___ ___ Python-bugs-list

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +georg.brandl stage: - patch review type: behavior - feature request versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957 ___

[issue9956] memoryview type documentation lacks versionadded

2010-09-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Python 3.1 is considered a new start, so there is no versionadded:: 3.1. The directive is used for things new in 3.2 and later versions. Thanks for the patch! -- nosy: +eric.araujo ___ Python

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-27 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I agree with Nick :) Though I'd say fixing a regression should take priority over further enhancing the messages. -- ___ Python tracker rep...@bugs.python.org

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thank you for the report and patch. Not sure if this a bug or a new feature. Patch looks good, thanks for including a test too!. Can you also edit the documentation? (There are very minor whitespace nits in the patch, but I leave it to Georg

[issue1703592] have a way to ignore nonexisting locales in locale.setlocale

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1703592 ___ ___ Python-bugs-list

[issue9959] int(math.log(4,2)) == 1 instead of 2

2010-09-27 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: It is not a reasonable request for math float functions to produce exact integer values and there is some harm in making further alterations to the existing algorithm (the more you tweak it in one place, the more you create

[issue1776674] glob.glob inconsistent

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov kveretenni...@gmail.com: -- nosy: +kveretennicov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1776674 ___ ___

[issue9584] Allow curly braces in fnmatch

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov kveretenni...@gmail.com: -- nosy: +kveretennicov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___

[issue4573] zsh-style subpattern matching for fnmatch/glob

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov kveretenni...@gmail.com: -- nosy: +kveretennicov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4573 ___ ___

[issue8402] glob returns empty list with [ character in the folder name

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov kveretenni...@gmail.com: -- nosy: +kveretennicov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8402 ___ ___

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: One problem with the seek() approach is that some file-like objects have expensive seeks. One example is GzipFile, where seek(n) is O(n) (it first rewinds to the start of file, then reads n decompressed bytes). In the end, unpickling from a

[issue3873] Unpickling is really slow

2010-09-27 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Didn't Victor say that only one seek at the end is necessary per pickle? If this is the case, I don't think expensive seeks will be an issue. -- ___ Python tracker rep...@bugs.python.org

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-09-27 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: brett.cannon - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8787 ___ ___ Python-bugs-list

[issue7397] __import__ docs should reference importlib.import_module

2010-09-27 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Fixed in r85043. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7397 ___

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: What specific failures are you talking about, Michael? I just ran regrtest with -O and had no (unexpected) failures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9082

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: When I run with -OO I get 42 test failures. Most of them look like they are due to missing docstrings but some are likely to be due to missing asserts. 42 tests failed: test_bisect test_cmd test_code test_collections test_compileall

[issue9962] GzipFile doesn't have peek()

2010-09-27 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: GzipFile claims to implement BufferedIOBase but doesn't have peek(). -- components: Library (Lib) messages: 117476 nosy: nirai, pitrou priority: normal severity: normal stage: needs patch status: open title: GzipFile doesn't have peek()

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9082 ___ ___

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ryan Kelly
Ryan Kelly r...@rfk.id.au added the comment: I went looking for places to update the documentation but the description of SpooledTemporaryFile doesn't go into any detail of its methods, so I haven't added anything. New patch fixes some whitespace issues. I'd like to argue that this is a bug,

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ryan Kelly
Changes by Ryan Kelly r...@rfk.id.au: Removed file: http://bugs.python.org/file19027/spooledtemporaryfile_truncate.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9957 ___

[issue9945] Improper locking in logging

2010-09-27 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Good call, Éric - fix backported into release31-maint (r85045). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9945 ___

[issue9947] Weird locking in logging config system

2010-09-27 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into release31-maint (r85046). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9947 ___

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Didn't Victor say that only one seek at the end is necessary per pickle? If this is the case, I don't think expensive seeks will be an issue. If you are unpickling from a multi-megabyte gzip file and the seek at the end makes you uncompress

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is an update bench_pickle which also makes the file unpeekable. -- Added file: http://bugs.python.org/file19033/bench_pickle.py ___ Python tracker rep...@bugs.python.org

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file18241/bench_pickle.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3873 ___

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file18983/bench_pickle.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3873 ___

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Most of those failures look like they have a similar cause (not all of them though) related to running doctests. When issue 6292 was closed all tests passed with -OO, so this is a regression. I'm raising a separate issue for that.

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch using peek() rather than seek(). There are some inefficiencies around (such as using read() to skip the consumed prefetched bytes), but the benchmark results are still as good as with seek(): Protocol 0 - dump: 142.5 ms - load

[issue9963] test_sysconfig when LDFLAGS defined in the user's environment

2010-09-27 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: test_sysconfig.test_ldshared_value is failing for me on Mac because my LDFLAGS environment variable is being defined twice in what sysconfig.get_config_var('LDFLAGS') returns. This fails in a comparison against

[issue9964] Test failures with -OO

2010-09-27 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: When I run the test suite (py3k branch) with -OO I get 42 failures. Most of these look like they are caused by the same (or a similar) problem (attempting to run doctests from now-non-existent docstrings). The tests that fail are:

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I'm going to close this as I don't think any of the failures are because of the asserts, else -O would pick them up just as well as -OO. -- resolution: - invalid status: open - closed ___ Python

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Cool - although I *do* see failures under -O; test_import for example. That one is a __pycache__ test, so barry's fault I think. I'll detail the failures in issue 9964 as I think *most* of them are caused by a problem with pdb.py In

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: Removed file: http://bugs.python.org/file19035/pdb.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9082 ___

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Oops. The patch should go to issue 9964. Sorry for all this noise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9082 ___

[issue9964] Test failures with -OO

2010-09-27 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Most of the failures are caused by a problem in pdb. In fact, if you run Python with -OO you can't even *import* pdb. The attached patch fixes that problem (a hasty and untested patch though), and that reduces the number of failures to

[issue4111] Add Systemtap/DTrace probes

2010-09-27 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: Updated py3k version of patch. Changes: - renamed the probepoints: function__entry - frame__entry function__return - frame__exit as I believe this better describes what these do - added a test suite:

[issue9962] GzipFile doesn't have peek()

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a first patch, tests still need to be written. -- keywords: +patch Added file: http://bugs.python.org/file19038/gzippeek.patch ___ Python tracker rep...@bugs.python.org

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: This was mentioned during the review of issue #9410 (http://codereview.appspot.com/1694050/diff/2001/3001#newcode347), however we forgot to fix this. The new array-based memo for the Unpickler class assumes incorrectly that memo

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9965 ___ ___

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I don't think there's any point doing this. Pickle is insecure by construction; it shouldn't crash when used legitimately, but trying to make it robust in the face of hand-crafted pickle strings sounds like an uphill battle (*). (*) e.g.

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As an example of malicious pickle causing excessive memory usage, you can simply write: s = b'\x80\x03cbuiltins\nbytearray\nq\x00J\x00\x00\x00\x7f\x85q\x01Rq\x02.' _ = pickle.loads(s) This will allocate an almost 2GB bytearray. You can of

[issue9966] platform : a boolean to know easily when a system is posix

2010-09-27 Thread Florent Gallaire
New submission from Florent Gallaire fgalla...@gmail.com: Hi, The platform module could provide a boolean to know easily if a system is posix or not. The expected result, when the system is posix : import platform platform.isposix True otherwise : import platform platform.isposix False

[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

2010-09-27 Thread Jeffrey Finkelstein
Jeffrey Finkelstein jeffrey.finkelst...@gmail.com added the comment: Here's a patch for the python-email6 branch. It seemed to make sense to remove parsedate_tz() and mktime_tz() here, since the parsedate() function now returns a datetime object, including timezone information (if it was

[issue9966] platform : a boolean to know easily when a system is posix

2010-09-27 Thread Jean-Paul Calderone
Jean-Paul Calderone inva...@example.invalid added the comment: It could, but why introduce this redundancy with `os.name`? -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9966

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: I was going to say this method http://docs.python.org/dev/py3k/library/pickle.html#restricting-globals could be used to prevent this kind of attack on bytearray. But, I came up with this fun thing:

[issue9966] platform : a boolean to know easily when a system is posix

2010-09-27 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: I second what Jean-Paul said. os.name is well established and I don't think a second way to get the same information is needed. Thanks for the suggestion and patch, Florent. -- nosy: +brian.curtin resolution: - rejected stage: -

[issue9967] encoded_word regular expression in email.header.decode_header()

2010-09-27 Thread Tokio Kikuchi
New submission from Tokio Kikuchi tkiku...@users.sourceforge.net: Regular expression ecre for RFC2047 encoded_word in email.header module have bugs: 1. encoded_word should be separated by SPACEs in both leading and trailing ends. Current expression take care only trailing end. 2.

[issue9929] subprocess.Popen unbuffered not work

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: But if line buffering doesn't work, disabling buffering on stdout/stderr does have a functional consequence: it allows process output to appear as generated instead of coming in chunks when the buffer is full Yes, sorry, I had it

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-09-27 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/issue5753 ___ ___ Python-bugs-list mailing list

[issue9602] PyObject_AsCharBuffer() should only accept read-only objects

2010-09-27 Thread Lenard Lindstrom
Lenard Lindstrom le...@telus.net added the comment: PEP 3118 Rationale ... 3) There is no way for a consumer to tell the buffer-API-exporting object it is finished with its view of the memory and therefore no way for the exporting object to be sure that it is safe to reallocate the pointer

[issue9675] segfault: PyDict_SetItem: Assertion `value' failed.

2010-09-27 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: In the spirit of moving this forward: http://mail.python.org/pipermail/python-dev/2010-September/104201.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9675

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-09-27 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: This issue is equivalent to MS Windows DLL hijacking (the MS situation is worse, because the DDL can be in network shares or, even , in remote webdav servers): http://blog.metasploit.com/2010/08/exploiting-dll-hijacking-flaws.html

[issue9950] socket.sendall() crash when receiving a signal

2010-09-27 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: thanks Antoine! -- Added file: http://bugs.python.org/file19042/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9950 ___thanks