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

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

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

2010-09-27 Thread Jesús Cea Avión
Jesús Cea Avión 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 http://news.cnet.com/8301-2

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

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

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

2010-09-27 Thread Lenard Lindstrom
Lenard Lindstrom 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 to the mem

[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 : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9929] subprocess.Popen unbuffered not work

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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

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

2010-09-27 Thread Tokio Kikuchi
New submission from Tokio Kikuchi : 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. encoded_text in the third part of encoded

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

2010-09-27 Thread Brian Curtin
Brian Curtin 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: -> committed/rejected s

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
Alexandre Vassalotti 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: pickle.loads(b'\x80\x03cbuiltins\nlist\ncbuiltins\nra

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

2010-09-27 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It could, but why introduce this redundancy with `os.name`? -- nosy: +exarkun ___ Python tracker ___ __

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

2010-09-27 Thread Jeffrey Finkelstein
Jeffrey Finkelstein 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 parsed from the input string). Al

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

2010-09-27 Thread Florent Gallaire
New submission from Florent Gallaire : 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 Here i

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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 course cha

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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. http://nadiana.com/py

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : 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 indices are always con

[issue9962] GzipFile doesn't have peek()

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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 __

[issue4111] Add Systemtap/DTrace probes

2010-09-27 Thread Dave Malcolm
Dave Malcolm 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: Lib/test/test_systemtap.py

[issue9964] Test failures with -OO

2010-09-27 Thread Michael Foord
Michael Foord 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 5: 5 tests failed:

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

2010-09-27 Thread Michael Foord
Michael Foord added the comment: Oops. The patch should go to issue 9964. Sorry for all this noise. -- ___ Python tracker ___ ___ Pyth

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

2010-09-27 Thread Michael Foord
Changes by Michael Foord : Removed file: http://bugs.python.org/file19035/pdb.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2010-09-27 Thread Michael Foord
Michael Foord 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 fact, if you run Python wi

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

2010-09-27 Thread Brett Cannon
Brett Cannon 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 tracker

[issue9964] Test failures with -OO

2010-09-27 Thread Michael Foord
New submission from Michael Foord : 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: When I run with -OO I get

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

2010-09-27 Thread Brett Cannon
New submission from Brett Cannon : 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 sysconfig.get_config_var('LDSHARED') as the valu

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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 (seekable=False)

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

2010-09-27 Thread Michael Foord
Michael Foord 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. Looking at the code actuall

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file18983/bench_pickle.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file18241/bench_pickle.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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 all the gzip f

[issue9947] Weird locking in logging config system

2010-09-27 Thread Vinay Sajip
Vinay Sajip added the comment: Fix checked into release31-maint (r85046). -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9945] Improper locking in logging

2010-09-27 Thread Vinay Sajip
Vinay Sajip added the comment: Good call, Éric - fix backported into release31-maint (r85045). -- ___ Python tracker ___ ___ Python-bu

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ryan Kelly
Changes by Ryan Kelly : Removed file: http://bugs.python.org/file19027/spooledtemporaryfile_truncate.patch ___ Python tracker ___ ___ Python-b

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ryan Kelly
Ryan Kelly 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, since SpooledT

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

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue9962] GzipFile doesn't have peek()

2010-09-27 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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() type: feature

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

2010-09-27 Thread Michael Foord
Michael Foord 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 test_ctypes test_dec

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

2010-09-27 Thread Brett Cannon
Brett Cannon added the comment: What specific failures are you talking about, Michael? I just ran regrtest with -O and had no (unexpected) failures. -- ___ Python tracker ___ __

[issue7397] __import__ docs should reference importlib.import_module

2010-09-27 Thread Brett Cannon
Brett Cannon added the comment: Fixed in r85043. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bug

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

2010-09-27 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: brett.cannon -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue3873] Unpickling is really slow

2010-09-27 Thread Alexandre Vassalotti
Alexandre Vassalotti 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 __

[issue3873] Unpickling is really slow

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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 GzipFile becomes O

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

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov : -- nosy: +kveretennicov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

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

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov : -- nosy: +kveretennicov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue9584] Allow curly braces in fnmatch

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov : -- nosy: +kveretennicov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue1776674] glob.glob inconsistent

2010-09-27 Thread Constantin Veretennicov
Changes by Constantin Veretennicov : -- nosy: +kveretennicov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2010-09-27 Thread Raymond Hettinger
Raymond Hettinger 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 oddities somewhere else). There

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

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +d...@python ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Éric Araujo
Éric Araujo 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 to fix them or ig

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-27 Thread Geoffrey Bache
Geoffrey Bache added the comment: I agree with Nick :) Though I'd say fixing a regression should take priority over further enhancing the messages. -- ___ Python tracker ___ _

[issue9956] memoryview type documentation lacks versionadded

2010-09-27 Thread Éric Araujo
Éric Araujo 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 tracker

[issue9957] SpooledTemporayFile.truncate should take size parameter

2010-09-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl stage: -> patch review type: behavior -> feature request versions: +Python 3.2 ___ Python tracker ___ __

[issue9951] introduce bytes.hex method

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue3532] bytes.tohex method

2010-09-27 Thread Éric Araujo
Éric Araujo added the comment: See #9951 for a patch adding bytes.hex -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue9946] lock use in logging

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- superseder: -> Improper locking in logging ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9945] Improper locking in logging

2010-09-27 Thread Éric Araujo
Éric Araujo added the comment: Just to be sure: this does not apply to 3.1? -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bu

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9934] Python Docs Typo

2010-09-27 Thread Éric Araujo
Éric Araujo added the comment: Ported to distutils2 in 2f460982b025, thanks! -- components: +Distutils2 nosy: +eric.araujo ___ Python tracker ___

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

2010-09-27 Thread Brian Curtin
Brian Curtin added the comment: This doesn't seem to be an issue anymore. -- stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue9929] subprocess.Popen unbuffered not work

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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. It's buffe

[issue9929] subprocess.Popen unbuffered not work

2010-09-27 Thread R. David Murray
R. David Murray 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 completely misunderstandi

[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 ___ ___ Python-bugs-list mailing list Un

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

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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 _

[issue1665333] Documentation missing for OptionGroup class in optparse

2010-09-27 Thread Sandro Tosi
Sandro Tosi added the comment: I will work on it, it noone objects. Cheers, Sandro -- nosy: +sandro.tosi ___ Python tracker ___ __

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

[issue9441] increase logging handlers test coverage

2010-09-27 Thread Brian Curtin
Brian Curtin 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 any tests. I may

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

[issue8158] documentation of 'optparse' module incomplete

2010-09-27 Thread Sandro Tosi
Sandro Tosi 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 I'll start preparing

[issue8158] documentation of 'optparse' module incomplete

2010-09-27 Thread Sandro Tosi
Sandro Tosi 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 tracker

[issue8521] Allow some winreg functions to accept named arguments

2010-09-27 Thread Brian Curtin
Brian Curtin added the comment: Committed in r85033. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

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

2010-09-27 Thread Antoine Pitrou
Antoine Pitrou 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

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

2010-09-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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: #define _toupper(_Char)

[issue9941] Unify trace and profile interfaces

2010-09-27 Thread Alexander Belopolsky
Alexander Belopolsky 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 call to __exit__. This is part

[issue9609] make cProfile multi-stack aware

2010-09-27 Thread Todd Whiteman
Changes by Todd Whiteman : -- nosy: +twhitema ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

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

2010-09-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue1615376] subprocess doesn\'t handle SIGPIPE

2010-09-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2010-09-27 Thread Jean-Paul Calderone
Jean-Paul Calderone 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 resolution: -> invalid

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

2010-09-27 Thread Bill Hawkes
New submission from Bill Hawkes : 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 for a successful comparis

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

2010-09-27 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[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 : test test_structmembers crashed -- : 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 = __import__(abstest, globals(), locals(), []) File "/builddir/b

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

2010-09-27 Thread Mark Dickinson
Mark Dickinson 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, you shouldn't be surp

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

2010-09-27 Thread Tim Golden
Tim Golden added the comment: I'm afraid I don't know; might be worth asking that on the main python mailing list. -- ___ Python tracker ___

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

2010-09-27 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +asksol ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

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

2010-09-27 Thread Geoffrey Bache
Geoffrey Bache added the comment: Interesting. Any idea if something similar is possible on Linux? -- ___ Python tracker ___ ___ Pytho

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

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

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

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

2010-09-27 Thread Geoffrey Bache
Geoffrey Bache 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 Python process is being star

[issue9958] (c)elementTree missing children

2010-09-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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" events instead.

[issue9958] (c)elementTree missing children

2010-09-27 Thread Valentin Kuznetsov
New submission from Valentin Kuznetsov : 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: .

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread STINNER Victor
STINNER Victor added the comment: Can't we use RegEnumValueW and RegQueryInfoKeyW? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file19021/py27_fix_winreg_EnumValue_op1.patch ___ Python tracker ___ ___ P

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-27 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file18999/py27_winreg_EnumValue.patch ___ Python tracker ___ ___ Python-bug