[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: A use case: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/572213 shows how code can use the Pickler.dispatch dict, but also some Pickler.save_xxx function which should be exposed as well. __

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Ilpo Nyyssönen
Changes by Ilpo Nyyssönen <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10959/optimized ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Ilpo Nyyssönen
Ilpo Nyyssönen <[EMAIL PROTECTED]> added the comment: Naturally it requires a big amount of files. Getting big amount of jpegs is easy. Getting big amount of pbms or rgbs is not so easy. I'll attach two profiling runs showing some difference when test_jpeg and test_exif are moved to be the first

[issue3208] function annotation for builtin and C function

2008-07-22 Thread Haoyu Bai
Haoyu Bai <[EMAIL PROTECTED]> added the comment: By considering the implementing, some problems emerged. First of all, as we know, all CFunctionObject and their attributes are imutable, but the __annotations__ attribute should be a dict, and dict is mutable. So how to solve this? Secondly, t

[issue2523] binary buffered reading is quadratic

2008-07-22 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Antoine wrote: > Le lundi 21 juillet 2008 à 21:18 +, Martin v. Löwis a écrit : > > IIUC, a read of the full requested size would achieve exactly that: on a > > non-blocking stream (IIUC), a read will always return > > min(bytes_avai

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-22 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Just in case you are wondering why I haven't submitted a patch yet, I want to let you know that my home computer is currently broken. So, I won't be able to work on this until I get my computer fixed (which unfortunately could take a

[issue3362] locale.getpreferredencoding() gives bus error on Mac OS X 10.4.11 PPC

2008-07-22 Thread cfr
cfr <[EMAIL PROTECTED]> added the comment: Altering ~/.CFUserTextEncoding so it has the contents "0:0" and then rebooting seems to prevent the crash for GUI applications, too. Would like to know how to fix this properly, of course, since I suspect that the value on my machine was probably not "0

[issue2275] urllib2 header capitalization

2008-07-22 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: Of course, that "along the lines of" suggestion isn't quite right: None does not have a .title() method. (and, to spell it out, I'm assuming in that suggestion that .headers is the dict of headers with .capitalize()d keys, i.e. unchanged from Pyt

[issue2275] urllib2 header capitalization

2008-07-22 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: > With respect to point 1), I assume that we all agree upon that headers > should stored in Titled-Format instead of Capitalized-format. I would probably choose to store the headers in Capitalized-form, because that makes implementing .headers t

[issue3092] Wrong unicode size detection in pybench

2008-07-22 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r65186 -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3231] re.compile fails with some bytes patterns

2008-07-22 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I think the fix is trivial enough. Committed in r65185. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3429] urllib.urlopen() return type

2008-07-22 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I'll let Georg make the final determination about this, but IMO this is unneeded. File-like objects are so common in Python code, that just telling what methods are supported should be fine. -- nosy: +benjamin.peterson ___

[issue3430] httplib.HTTPResponse documentations inconsistent

2008-07-22 Thread ThomasH
New submission from ThomasH <[EMAIL PROTECTED]>: The library reference documentation of httplib.HTTPResponse does not match up with the online help documentation, or with the dir() information of a particular instance. E.g. the list of public features in the library reference (http://docs.python

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: HTTP is defined as a stream of bytes; the fact that you can specify encodings for headers and content is a different level of the spec. WSGI wants to basically be as transparent a mapping as possible between HTTP and Python data structures

[issue3429] urllib.urlopen() return type

2008-07-22 Thread ThomasH
New submission from ThomasH <[EMAIL PROTECTED]>: The file-like object returned by urllib.urlopen() should be documented like a proper class. The textual description under the urlopen() method is less approachable and breaks the usual format of a class documentation. Maybe the return type should

[issue3428] httplib.HTTPMessage undocumented

2008-07-22 Thread ThomasH
New submission from ThomasH <[EMAIL PROTECTED]>: The httplib.HTTPMessage class needs documentation; it is missing from the package documentation entirely. Instances of this class are e.g. returned by the urllib.urlopen().info() method. -- assignee: georg.brandl components: Documentation

[issue3427] urllib documentation: urlopen().info() return type

2008-07-22 Thread ThomasH
New submission from ThomasH <[EMAIL PROTECTED]>: http://docs.python.org/lib/module-urllib.html The page says that the return type of urlopen().info() is a mimetools.Message object, which is not quite true; it is a httplib.HTTPMessage object, which is a class derived from mimetools.Message, but wi

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: Wow, I read the WSGI spec. That seems very strange that it says "HTTP does not directly support Unicode, and neither does this interface." Clearly HTTP *does* support Unicode, because it allows you to specify an encoding. I assume then that the I

[issue3293] incorrect comments for PyObject_ReleaseBuffer

2008-07-22 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +teoliphant priority: -> normal ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: For the "why Latin-1", read the WSGI spec's explanation of how strings should be handled in Python implementations where 'str' is unicode. I suppose that you *could* make it a text stream with Latin-1 encoding; I'm just not clear on whether

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2008-07-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Well, os.path.supports_unicode_filenames is False on posix platforms. So os.path.abspath is not supposed to work with unicode values. I was about to close the issue, but python 3.0 also defines supports_unicode_filenames to False! In ad

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: Are you saying the stream passed to _write SHOULD always be a binary stream, and hence the test case is wrong, because it opens a text stream? (I'm not sure where the stream comes from, but we should guarantee it's a binary stream). Also, why La

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: The encoding must be latin-1, not utf-8, and the stream must be binary mode, not text. I have no idea how to deal with the test suite, and don't have time at the moment to investigate. ___ Python tracker <

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2008-07-22 Thread Christian Häggström
New submission from Christian Häggström <[EMAIL PROTECTED]>: If current working directory contains non-ascii characters, calling os.path.abspath(u".") will result in an error. I expect it to call the underlying os.getcwdu() in this case. >>> import os >>> os.path.abspath(u".") Traceback (most re

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- assignee: -> pje nosy: +pje priority: high -> critical ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3425] posixmodule.c always using res = utime(path, NULL)

2008-07-22 Thread Oskar Andersson
New submission from Oskar Andersson <[EMAIL PROTECTED]>: I'm porting, embedding and extending Python in a very limited environment. This environment does not have utime.h and have not defined the following function: int utime(const char *, const struct utimbuf *); Although the function called

[issue3348] Cannot start wsgiref simple server in Py3k

2008-07-22 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou priority: -> high ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Do you have any benchmarks to prove this with? IMO, the difference would be extremely insignificant. -- nosy: +benjamin.peterson status: open -> pending ___ Python tracker <[EMAIL PROTECTED]>

[issue3417] make the fix_dict fixer smarter

2008-07-22 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Ok. I'll mark this as something to do for 2.7/3.1. -- versions: +Python 2.7, Python 3.1 ___ Python tracker <[EMAIL PROTECTED]>

[issue616013] cPickle documentation incomplete

2008-07-22 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: No need for gratuitous breakage of cPickle in Python 2.6. Alexandre, if you can add the list of changes to the documentation, that would be great. -- nosy: +georg.brandl ___ Python tracker <[EMAIL P

[issue1481296] long(float('nan'))!=0L

2008-07-22 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > It also just "feels right", to me; an attempt to convert a nan > to an integer should not pass silently. I have the same gut feeling. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]>

[issue3424] imghdr test order makes it slow

2008-07-22 Thread Ilpo Nyyssönen
New submission from Ilpo Nyyssönen <[EMAIL PROTECTED]>: The order of tests in imghdr makes it slow in common cases. Even without any statistics it is quite easy to see that jpeg is the most common format. In imghdr only bmp and png are after it. Also, should png really be the last one? Nearly al

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2008-07-22 Thread Aurelien Jarno
Aurelien Jarno <[EMAIL PROTECTED]> added the comment: AFAIK, this "mixed-endian" format is only used on little endian ARM (old-ABI only). That is true that IEEE 754 does not specify any format. I used the big and little endian code as a template to add the "ARM format", hence IEEE in the nam

[issue3409] ElementPath.Path.findall problem with unicode input

2008-07-22 Thread Fredrik Lundh
Fredrik Lundh <[EMAIL PROTECTED]> added the comment: Hmm. That's embarrassing. What was I thinking? Guess it's time to update the 2.X codebase to ET 1.2.8. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-22 Thread Trent Mick
Trent Mick <[EMAIL PROTECTED]> added the comment: Thanks Ronald. Any comment on http://bugs.python.org/msg69936 ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3381] `./configure --enable-framework --enable-universalsdk` fails because of change in r63997

2008-07-22 Thread Ronald Oussoren
Ronald Oussoren <[EMAIL PROTECTED]> added the comment: Committed in r65183. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___