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

2009-07-17 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Note: empty.zip is nothing but an empty file created using the 'touch' command. -- ___ Python tracker ___ _

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

2009-07-17 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Also repros on python-3.1 -- versions: +Python 3.1 ___ Python tracker ___ ___ Python-bugs-list m

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

2009-07-17 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : 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 "", line 1, in File "/Li

[issue6510] zipfile: OSError File exists

2009-07-17 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : 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 ('GChartWrapper-0.8.osx-10.5.zip').ex

[issue6509] re.py - encounter unexpected str-object

2009-07-17 Thread kai zhu
kai zhu added the comment: traced culprit to sre_parse.py (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 = [] a = p.append def

[issue6509] re.py - encounter unexpected str-object

2009-07-17 Thread kai zhu
Changes by kai zhu : -- components: +Regular Expressions ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue6509] re.py - encounter unexpected str-object

2009-07-17 Thread kai zhu
New submission from kai zhu : >>> import re >>> compiled = re.compile(b"a(\w)") >>> s = b"aa" >>> s = compiled.sub(b"a\\1", s) Traceback (most recent call last): File "", line 1, in File ".../lib/python3.1/re.py", line 303, in filter return sre_parse.expand_template(template, match) Fi

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

2009-07-17 Thread kai zhu
kai zhu 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 uninstantiated i

[issue6477] Pickling of NoneType raises PicklingError

2009-07-17 Thread Alexandre Vassalotti
Alexandre Vassalotti 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 "NoneType" return Non

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-17 Thread Nick Coghlan
Nick Coghlan 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 dis def dis_str(sou

[issue6461] multiprocessing: freezing apps on Windows

2009-07-17 Thread Jesse Noller
Jesse Noller 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 __

[issue6508] expose setresuid

2009-07-17 Thread Travis H.
Travis H. 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 __

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

2009-07-17 Thread Nick Coghlan
Nick Coghlan 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 below: $ ./pyth

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

2009-07-17 Thread Terry J. Reedy
Terry J. Reedy 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 ___ Python

[issue6461] multiprocessing: freezing apps on Windows

2009-07-17 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6508] expose setresuid

2009-07-17 Thread Travis H.
New submission from Travis H. : 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 implement this. -- components: Exte

[issue6477] Pickling of NoneType raises PicklingError

2009-07-17 Thread Nick Coghlan
Nick Coghlan 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 to be singletons an

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

2009-07-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 '?' -- ___ Py

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

2009-07-17 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

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

2009-07-17 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/7/17 Eric Promislow : > > Eric Promislow 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 just as well by running a tool like Pylint over your code.

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

2009-07-17 Thread Eric Promislow
Eric Promislow added the comment: Understood. Could the tool emit a warning when it encounters something like this? -- ___ Python tracker ___ ___

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-17 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- priority: -> low stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-17 Thread Terry J. Reedy
New submission from Terry J. Reedy : 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 as compile(cod

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

2009-07-17 Thread Benjamin Peterson
Benjamin Peterson 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 ___

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

2009-07-17 Thread R. David Murray
Changes by R. David Murray : -- nosy: +benjamin.peterson priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-

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

2009-07-17 Thread Eric Promislow
New submission from Eric Promislow : 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 open("flip2.py").

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

2009-07-17 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r74065. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

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

2009-07-17 Thread Hans Lellelid
Hans Lellelid 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). -- __

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

2009-07-17 Thread R. David Murray
R. David Murray 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.) -- nosy: +r.david.mu

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

2009-07-17 Thread Eric Promislow
Eric Promislow added the comment: Not in Sridar's patch, but 'pathname2url' is also misspelled as 'pahtname2url' in the MAPPING struct. -- nosy: +ericp ___ Python tracker ___ ___

[issue6415] warnings.warn segfaults on bad formatted string

2009-07-17 Thread Brett Cannon
Brett Cannon added the comment: On Fri, Jul 17, 2009 at 00:03, Hirokazu Yamamoto wrote: > > Hirokazu Yamamoto added the comment: > > I've committed in r74040(trunk), r74043(release26-maint), r74046(py3k), > r74047(release31-maint). Is release30-maint still active? > No, 3.0 is dead. Thanks,

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

2009-07-17 Thread Brett Cannon
Brett Cannon added the comment: On Fri, Jul 17, 2009 at 01:32, Ezio Melotti wrote: > > Ezio Melotti 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?). I did, but Aahz has already fixed it. >

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

2009-07-17 Thread csmayfield
New submission from csmayfield : 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 following example t

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

2009-07-17 Thread kai zhu
New submission from kai zhu : # copy this to test.py # > touch foo.txt # > python3.1 -c "import test; import collections" # > ... # > File "test.py", line 5, in find_module # > def find_module(self, mname, path = None): open("foo.txt") # > File "test.py", line 5, in find_module # > de

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

2009-07-17 Thread James Broadhead
James Broadhead added the comment: +1 to the above. (imo, this is a bugfix, not a new feature) -- ___ Python tracker ___ ___ Pyth

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

2009-07-17 Thread Michael Haubenwallner
Michael Haubenwallner 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 ___ Python tracker

[issue6503] Python Docs: 6.6.4. Mutable Sequence Types

2009-07-17 Thread Ezio Melotti
Ezio Melotti 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 ___ Pyth

[issue6503] Python Docs: 6.6.4. Mutable Sequence Types

2009-07-17 Thread Michael Kesper
New submission from Michael Kesper : 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: normal status: open title

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

2009-07-17 Thread R. David Murray
R. David Murray 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 perceive it as a bug.

[issue6502] documentation error: missing comma between kwonlyargcount & nlocals

2009-07-17 Thread Ezio Melotti
Ezio Melotti 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 ___ Python tracker

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

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton 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 objects that redirect via Apach

[issue6502] documentation error: missing comma between kwonlyargcount & nlocals

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

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

2009-07-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 standard streams ar

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

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton 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 is in Python code, I will wh

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

2009-07-17 Thread Graham Dumpleton
New submission from Graham Dumpleton : 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: unknown encoding: cp0 I fi

[issue6500] urllib2 maximum recursion depth exceeded

2009-07-17 Thread Ezio Melotti
Ezio Melotti 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: -> normal status: ope

[issue6498] Py_Main() does not return on SystemExit

2009-07-17 Thread Rogi
Rogi 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 for internal use?

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

2009-07-17 Thread Ezio Melotti
Ezio Melotti 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 not under our control,

[issue6500] urllib2 maximum recursion depth exceeded

2009-07-17 Thread simon
New submission from simon : 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 attributes be public?

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

2009-07-17 Thread Ezio Melotti
Ezio Melotti 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 after operators like ==, <

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

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton 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 tracker

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

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton 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 ___

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

2009-07-17 Thread Graham Dumpleton
Graham Dumpleton 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: No module named encodings.ut

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

2009-07-17 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +benjamin.peterson priority: -> normal stage: -> patch review ___ Python tracker ___ ___ Python-bu

[issue6473] hmac sha384/sha512 fails test vectors

2009-07-17 Thread Iain Wade
Iain Wade 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 ___ Python tracker

[issue6415] warnings.warn segfaults on bad formatted string

2009-07-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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 versions: +Python 2.7, Pytho