[issue6415] warnings.warn segfaults on bad formatted string

2009-07-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I've committed in r74040(trunk), r74043(release26-maint), r74046(py3k), r74047(release31-maint). Is release30-maint still active? -- resolution: - fixed stage: commit review - committed/rejected status: open - closed

[issue6473] hmac sha384/sha512 fails test vectors

2009-07-17 Thread Iain Wade
Iain Wade iw...@optusnet.com.au added the comment: d'oh, I should have checked HEAD before submitting the bug. I am running 2.5.1 on OSX, the fix seems to be in 2.5.2 and above. Thanks, and sorry for wasting your time. -- status: open - closed ___

[issue6496] 2to3 generates from urllib.parse import pathname2url

2009-07-17 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +benjamin.peterson priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6496 ___

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: I see this problem on both MacOS X 10.5 and on Windows. This is when using Python embedded inside of Apache/mod_wsgi. On MacOS X the error is: Fatal Python error: Py_Initialize: can't initialize sys standard streams ImportError:

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: Hmmm, actually my MacOS X error is different, although Windows one is same, except that encoding is listed and isn't empty. -- ___ Python tracker rep...@bugs.python.org

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: You can ignore my MacOS X example as that was caused by something else. My question still stands as to whether the fix will address the similar problem I saw on Windows. -- ___ Python

[issue6497] Support for digital Cinema/film DPX and Kodak Cineon image file formats in imghdr module

2009-07-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I can't judge the content of the patch because I don't know these formats at all, however there are a few issues about the style: 1) there are tabs mixed with spaces, the standard is 4 spaces; 2) there should be an empty space before and

[issue6500] urllib2 maximum recursion depth exceeded

2009-07-17 Thread simon
New submission from simon nku...@gmail.com: def __getattr__(self, attr): # XXX this is a fallback mechanism to guard against these # methods getting called in a non-standard order. this may be # too complicated and/or unnecessary. # XXX should the __r_XXX

[issue6449] Improve/update python.org/dev/

2009-07-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks to you for fixing it! However on http://www.python.org/dev/buildbot/ now there's 3.w (maybe you missed the '2' key?). About the IRC stuff, at least #python-dev (and probably #python-docs too) are under our control (even if Freenode is

[issue6498] Py_Main() does not return on SystemExit

2009-07-17 Thread Rogi
Rogi r...@linuxmail.org added the comment: As a workaround, I copied teh function PyRun_InteractiveOneFlags() to my own source and modified it so it would not print or clear exceptions. However, I have never found documentation about PyArena* or PyParser_AST*. Are those functions public or just

[issue6500] urllib2 maximum recursion depth exceeded

2009-07-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: That __getattr__ was removed in r70815 and in Python 3.1 it's OK. The change wasn't backported to the trunk though. Assigning to Jeremy to see what he thinks about it. -- assignee: - jhylton nosy: +ezio.melotti, jhylton priority:

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-07-17 Thread Graham Dumpleton
New submission from Graham Dumpleton graham.dumple...@gmail.com: When using Python 3.1 for Apache/mod_wsgi (3.0c4) on Windows, Apache will crash on startup because Python is forcing the process to exit with: Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError:

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: I have created issue6501 for my Windows variant of this problem given that it appears to be subtly different due to there being an encoding where as the MacOS X variant doesn't have one. Seeing that the fix for the MacOS X issue

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-07-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - Apache is not a Console application, so the Windows GetConsoleCP() function returns zero (and os.device_encoding(1) returns 'cp0'). - pythonw.exe has no console either; but in pythonrun.c, the test (fileno(stdin) 0) is true, and the

[issue6502] documentation error: missing comma between kwonlyargcount nlocals

2009-07-17 Thread kai zhu
New submission from kai zhu kaizhu...@gmail.com: missing comma between kwonlyargcount nlocals class code(object) | code(argcount, kwonlyargcount nlocals, stacksize, flags, codestring, |constants, names, varnames, filename, name, firstlineno, |lnotab[, freevars[, cellvars]])

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: Yes, Apache remaps stdout and stderr to the Apache error log to still capture anything that errant modules don't log via the Apache error log functions. In mod_wsgi it replaces sys.stdout and sys.stderr with special file like

[issue6502] documentation error: missing comma between kwonlyargcount nlocals

2009-07-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks for the report. This was introduced in r60313 (see also #1939). -- assignee: georg.brandl - ezio.melotti nosy: +ezio.melotti priority: - low resolution: - accepted stage: - needs patch

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Personally I would like to see that happen, but I think you should probably poll python-dev since it can be argued either way as to whether it is a bug fix or a new feature. FWIW, from the feeder bug reports it looks to me like the users

[issue6503] Python Docs: 6.6.4. Mutable Sequence Types

2009-07-17 Thread Michael Kesper
New submission from Michael Kesper mkes...@schokokeks.org: In http://docs.python.org/library/stdtypes.html#mutable-sequence-types s.pop([i]) is listed. Correct would be: s.pop(i) -- assignee: georg.brandl components: Documentation messages: 90623 nosy: georg.brandl, mkesper severity:

[issue6503] Python Docs: 6.6.4. Mutable Sequence Types

2009-07-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The [] here mean that i is optional, the note (6) clarifies that its default value is -1. Closing as invalid. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed

[issue6163] [HP-UX] ld: Unrecognized argument: +s -Ldir

2009-07-17 Thread Michael Haubenwallner
Michael Haubenwallner michael.haubenwall...@salomon.at added the comment: While at it: gcc does not understand '+s', it does need '-Wl,+s'. -- nosy: +haubi Added file: http://bugs.python.org/file14514/distutils_hpux_libdir_option-gcc.patch ___

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-17 Thread James Broadhead
James Broadhead jamesbroadh...@gmail.com added the comment: +1 to the above. (imo, this is a bugfix, not a new feature) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___

[issue6505] Minor typos in tutorial (i/o chapter)

2009-07-17 Thread csmayfield
New submission from csmayfield csmayfi...@gmail.com: In tutorial/inputoutput.html: This also greater control over how the value is formatted. The following example truncates the Pi to three places after the decimal. Should be: This allows greater control over how the value is formatted. The

[issue6449] Improve/update python.org/dev/

2009-07-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Fri, Jul 17, 2009 at 01:32, Ezio Melotti rep...@bugs.python.org wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks to you for fixing it! However on http://www.python.org/dev/buildbot/ now there's 3.w (maybe you missed

[issue6415] warnings.warn segfaults on bad formatted string

2009-07-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Fri, Jul 17, 2009 at 00:03, Hirokazu Yamamoto rep...@bugs.python.orgwrote: Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I've committed in r74040(trunk), r74043(release26-maint), r74046(py3k), r74047(release31-maint). Is

[issue6496] 2to3 generates from urllib.parse import pathname2url

2009-07-17 Thread Eric Promislow
Eric Promislow er...@activestate.com added the comment: Not in Sridar's patch, but 'pathname2url' is also misspelled as 'pahtname2url' in the MAPPING struct. -- nosy: +ericp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6496

[issue6449] Improve/update python.org/dev/

2009-07-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Enzio, Georg, Antoine, Benjamin, Barry, and I, just to name a few, hang out in #python-dev regularly (as in daily, for some of us). (Well, Barry doesn't actively monitor the channel, but if you mention his name he often wakes up.)

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-17 Thread Hans Lellelid
Hans Lellelid h...@velum.net added the comment: Personally, I also think that this is a bugfix, though I realize that in order to fix the bug an API addition had to be made. So +1 from me on rolling into 2.6 (though my opinion is simply that of someone who's eager to see it fixed). --

[issue6496] 2to3 generates from urllib.parse import pathname2url

2009-07-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r74065. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6496 ___

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Eric Promislow
New submission from Eric Promislow er...@activestate.com: Given this code: import thread print thread $ python ActivePython 2.6.1.1 (ActiveState Software Inc.) based on Python 2.6.1 (r261:67515, Dec 5 2008, 13:58:38) [MSC v.1500 32 bit (Intel)] on win32 from lib2to3.main import main print

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +benjamin.peterson priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6506 ___

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This is purposeful. Otherwise random variables, functions, or classes, with the same name as a module which people were using could be changed. -- ___ Python tracker rep...@bugs.python.org

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-17 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: dis.dis(ob) currently accepts a module, a class, a method, a function, or a code object. But for most uses I have seen on python-list, people start with a code snippet. They must then wrap that in a function or remember (or lookup) a call such

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-17 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- priority: - low stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6507 ___

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Eric Promislow
Eric Promislow er...@activestate.com added the comment: Understood. Could the tool emit a warning when it encounters something like this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6506

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2009/7/17 Eric Promislow rep...@bugs.python.org: Eric Promislow er...@activestate.com added the comment: Understood.  Could the tool emit a warning when it encounters something like this? Perhaps, but I think you could find this out

[issue6506] lib2to3 fails to convert 'thread' when not followed by a period

2009-07-17 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6506 ___

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-07-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: On a Western Windows, I suggest PYTHONIOENCODING=cp1252:backslashreplace But PYTHONIOENCODING=mbcs is also OK, except that characters outside the Windows code page will be replaced with '?' --

[issue6477] Pickling of NoneType raises PicklingError

2009-07-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Given that dumps(type(Ellipsis)) and dumps(type(NotImplemented)) don't work either, I am reclassifying this as a documentation bug. The thing about the types of these three objects (None, Ellipsis, NotImplemented) is that they are all designed

[issue6508] expose setresuid

2009-07-17 Thread Travis H.
New submission from Travis H. travis+w-python@subspacefield.org: Python should expose setresuid in the same module that exposes setuid. The reason why is complicated, but is best explained here: http://www.eecs.berkeley.edu/~daw/papers/setuid-usenix02.pdf I might work on a patch to

[issue6461] multiprocessing: freezing apps on Windows

2009-07-17 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - jnoller nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6461 ___ ___

[issue6465] email.feedparser regular expression bug (NLCRE_crack)

2009-07-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I believe both 2.4 and 3.0 are no longer maintained. 2.5 only gets security fixes. On the otherhand, fix should go into 3.2 ;-). -- nosy: +tjreedy versions: +Python 3.2 -Python 2.4, Python 2.5, Python 3.0

[issue6467] raw_input() doesn't work as expected when it gets multiple ^D

2009-07-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Confirmed - it's actually pressing Ctrl-D after entering text on the line that seems to cause strange behaviour. For example, in the following, the only letters I typed were test and then I just pressed Ctrl-D 4 times and got the output seen

[issue6508] expose setresuid

2009-07-17 Thread Travis H.
Travis H. travis+w-python@subspacefield.org added the comment: should also expose setresgid for same reason. Paper also defines a higher-level API in section 8.2.1 that would probably be worth implementing. -- ___ Python tracker

[issue6461] multiprocessing: freezing apps on Windows

2009-07-17 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Thanks for noticing this. Unfortunately, I don't know enough about py2exe/windows to dig into that part. I can fix the low hanging fruit though -- ___ Python tracker rep...@bugs.python.org

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Copying my suggestion (minus examples) over from the python-ideas thread: We could define it as trying the three modes in order (first 'eval', then 'single', then 'exec') moving on to the next option if it raises syntax error: from dis import

[issue6477] Pickling of NoneType raises PicklingError

2009-07-17 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: I agree with Nick. And if you really want to, you could hack a Pickler subclass to support NoneType: import io import pickle class XPickler(pickle.Pickler): def persistent_id(self, obj): if obj is type(None): return

[issue6504] infinite recursion from calling builtins.open()

2009-07-17 Thread kai zhu
kai zhu kaizhu...@gmail.com added the comment: recursion also goes away if we open as raw bytes: open(foo.txt, rb). modes r+ w also give infinite recursion, while rb+ wb do not. note found another bug: instance method find_module should raise exception anyway, since its class was

[issue6509] re.py - compiled byte-object regular expr encounter unexpected str-object

2009-07-17 Thread kai zhu
New submission from kai zhu kaizhu...@gmail.com: import re compiled = re.compile(ba(\w)) s = baa s = compiled.sub(ba\\1, s) Traceback (most recent call last): File stdin, line 1, in module File .../lib/python3.1/re.py, line 303, in filter return sre_parse.expand_template(template,

[issue6509] re.py - compiled byte-object regular expr encounter unexpected str-object

2009-07-17 Thread kai zhu
Changes by kai zhu kaizhu...@gmail.com: -- components: +Regular Expressions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6509 ___ ___

[issue6509] re.py - compiled byte-object regular expr encounter unexpected str-object

2009-07-17 Thread kai zhu
kai zhu kaizhu...@gmail.com added the comment: traced culprit to sre_parse.py line 711 (where literal is always str): ... def parse_template(source, pattern): # parse 're' replacement string into list of literals and # group references s = Tokenizer(source) sget = s.get p =

[issue6510] zipfile: OSError File exists

2009-07-17 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: sridh...@whymac:/tmp/i wget http://google-chartwrapper.googlecode.com/ files/GChartWrapper-0.8.osx-10.5.zip Saving to: `GChartWrapper-0.8.osx-10.5.zip' sridh...@whymac:/tmp/i apy -c import zipfile; zipfile.ZipFile

[issue6511] zipfile: Invalid argument when opening zero-sized files

2009-07-17 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: Ideally, zipfile.BadZipFile should be thrown when trying to open files that are zero-sized. sridh...@whymac:/tmp/i apy -c import zipfile; zipfile.ZipFile ('empty.zip').extractall() Traceback (most recent call last): File

[issue6511] zipfile: Invalid argument when opening zero-sized files

2009-07-17 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Also repros on python-3.1 -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6511 ___

[issue6511] zipfile: Invalid argument when opening zero-sized files

2009-07-17 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Note: empty.zip is nothing but an empty file created using the 'touch' command. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6511