[issue3532] bytes.tohex method

2008-08-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > You did the 3.1 thing again! We can accept a new feature like this > before 3.0b3, can we not? Not without explicit approval by the release manager, no (or by BDFL pronouncement). The point of the betas is that *only* bugs get fixed, and

[issue2827] IDLE 3.0a5 cannot handle UTF-8

2008-08-09 Thread Senthil
Senthil <[EMAIL PROTECTED]> added the comment: I was NOT able to Reproduce it in IDLE 3.0b2 running on Linux. Would you like to try with 3.0b2 and also do. tjreedy: I did not properly get your comment. When you open Idle instance and create a new Document, cut-paste the code, and Run. The Execut

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-09 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: I've been thinking more about the errors="strict" default. I think this was Guido's suggestion. I've decided I'd rather stick with errors="replace". I changed errors="replace" to errors="strict" in patch 8, but now I'm worried that will cause pro

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-09 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: > Bill's main concern is with a policy decision; I doubt he would > object to using your code once that is resolved. But his patch does the same basic operations as mine, just implemented differently and with the heap of issues I outlined above.

[issue3532] bytes.tohex method

2008-08-09 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: You did the 3.1 thing again! We can accept a new feature like this before 3.0b3, can we not? > Hmm. There are probably many modules that you haven't used yet. Snap :) Well, I didn't know about the community's preference for functions over metho

[issue3534] refactor.py can lose indentation for relative imports

2008-08-09 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- resolution: -> out of date status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3534] refactor.py can lose indentation for relative imports

2008-08-09 Thread Roger Upole
Roger Upole <[EMAIL PROTECTED]> added the comment: I was using 3.0b2. The output is correct with latest updates, sorry for the trouble. ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-09 Thread Jim Jewett
Jim Jewett <[EMAIL PROTECTED]> added the comment: Matt, Bill's main concern is with a policy decision; I doubt he would object to using your code once that is resolved. The purpose of the quoting functions is to turn a string (representing the human-readable version) into bytes (that go over

[issue3534] refactor.py can lose indentation for relative imports

2008-08-09 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: What version of 2to3 are you using? AFAIK, this has been fixed in the trunk. -- nosy: +benjamin.peterson ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3187] os.listdir can return byte strings

2008-08-09 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Let's make this a release blocker for RCs. -- priority: critical -> deferred blocker ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3160] Building a Win32 binary installer crashes

2008-08-09 Thread Viktor Ferenczi
Viktor Ferenczi <[EMAIL PROTECTED]> added the comment: Thanks. Good point. :-) I did not find that bug, since pre_install_script is not defined for my project. Sorry, it is my fault. I did not test my patch deep enough. I need to know one more thing before providing a better patch: What is the

[issue3533] mac 10.4 buld of 3.0 --with-pydebug fails no __eprintf

2008-08-09 Thread Barry Alan Scott
Barry Alan Scott <[EMAIL PROTECTED]> added the comment: As far as I know I'm using the Xcode compiler. Does this match your expectations? $ which gcc /usr/bin/gcc $ gcc -v Using built-in specs. Target: powerpc-apple-darwin8 Configured with: /private/var/tmp/gcc/gcc-5341.obj~1/src/configure --di

[issue3532] bytes.tohex method

2008-08-09 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: -- versions: +Python 3.1 -Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Pyth

[issue3532] bytes.tohex method

2008-08-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > * However, it is *very* obscure. I've been using Python for a year and I > didn't know about it. Hmm. There are probably many modules that you haven't used yet. > * And, it requires importing binascii. So what? The desire to convert byte

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-09 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: Bill, I had a look at your patch. I see you've decided to make quote_as_string the default? In that case, I don't know why you had to rewrite everything to implement the same basic behaviour as my patch. (My latest few patches support bytes both w

[issue3532] bytes.tohex method

2008-08-09 Thread Matt Giuca
Matt Giuca <[EMAIL PROTECTED]> added the comment: > I recommend to use binascii.hexlify. Ah, see I did not know about this! Thanks for pointing it out. * However, it is *very* obscure. I've been using Python for a year and I didn't know about it. * And, it requires importing binascii. * And, it

[issue3534] refactor.py can lose indentation for relative imports

2008-08-09 Thread Roger Upole
New submission from Roger Upole <[EMAIL PROTECTED]>: Here's an excerpt from the output when run with --verbose. @@ -138,7 +136,7 @@ def _MakeColorizer(self): ext = os.path.splitext(self.GetDocument().GetPathName()) - import formatter +from . import formatte

[issue3080] Full unicode import system

2008-08-09 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- priority: -> critical type: -> behavior versions: +Python 3.1 -Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3134] shutil references undefined WindowsError symbol

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Raghuram, your patch looks good to me. I'll try to test it under Windows soon. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3526] Customized malloc implementation on SunOS and AIX

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le samedi 09 août 2008 à 17:28 +, Martin v. Löwis a écrit : > Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > > >> Instead, Python's own memory allocate (obmalloc) should be changed to > >> directly use the virtual memory interfa

[issue3532] bytes.tohex method

2008-08-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I recommend to use binascii.hexlify; this works in all Python version (since 2000 or so). I'm -1 for this patch. -- nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]>

[issue3187] os.listdir can return byte strings

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hmm, I suppose that while the filename is latin1-encoded, Py_FileSystemDefaultEncoding is "utf-8" and therefore os.listdir fails decoding the filename and falls back on returning a byte string. It was acceptable in Python 2.x but is a very ann

[issue3533] mac 10.4 buld of 3.0 --with-pydebug fails no __eprintf

2008-08-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Are you sure you are using the correct compiler (i.e. from the XCode release relevant for your operating system version)? -- nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]>

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

2008-08-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: No, getpreferredencoding should always produce an encoding name. If the application had an idea what to use, it wouldn't have to ask. So I favor (3), or, perhaps given that OSX uses UTF-8 in many places, (5) return "UTF-8" _

[issue3526] Customized malloc implementation on SunOS and AIX

2008-08-09 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: >> Instead, Python's own memory allocate (obmalloc) should be changed to >> directly use the virtual memory interfaces of the operating system (i.e. >> mmap), bypassing the malloc of the C library. > > How would that interact with fork()? N

[issue3205] bz2 iterator fails silently on MemoryError

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Fixed in r65609. Thanks for the report and for the patch! -- nosy: +pitrou resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3253] shutil.move bahave unexpected in fat32

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This is already fixed in the trunk (which will become Python 2.6). -- nosy: +pitrou resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

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

2008-08-09 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- versions: +Python 2.6, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Pytho

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

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: locale.getpreferredencoding() should certainly not crash but the question remains of what should be the outcome. I can see several possibilities: (1) return the empty string (2) return None (3) return "ascii" (!!) (4) raise an exception (which

[issue3160] Building a Win32 binary installer crashes

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hi Viktor, It's complicated for me to test under Windows right now, but your snippet looks buggy: script_data = open(self.pre_install_script, "r").read() cfgdata = cfgdata + script_data + b"\n\0" script_data is an un

[issue3533] mac 10.4 buld of 3.0 --with-pydebug fails no __eprintf

2008-08-09 Thread Barry Alan Scott
New submission from Barry Alan Scott <[EMAIL PROTECTED]>: I wanted to use Py_DEBUG build to help debug a problem with ref counts in a C++ extension. I cannot find eprintf in the sources of python where does this symbol come from? How do I fix the build to define it? $ sw_vers ProductName:

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-08-09 Thread Andrew Dalke
Andrew Dalke <[EMAIL PROTECTED]> added the comment: FreeBSD is why my hosting provider uses. Freebsd.org calls 2.6 "legacy" but the latest update was earlier this year. There is shared history with Macs. I don't know the details though. I just point out that the problem isn't only on Darwin

[issue3492] Zlib compress/decompress functions returning bytearray

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > Any updates ? The py3k list is also very silent since the > week-end...Thanks! Your two patches look good, I suppose either Alexandre or I will commit them soon. You shouldn't to worry when you don't get a reply immediately, people react s

[issue3532] bytes.tohex method

2008-08-09 Thread Matt Giuca
New submission from Matt Giuca <[EMAIL PROTECTED]>: I haven't been able to find a way to encode a bytes object in hexadecimal, where in Python 2.x I'd go "str.encode('hex')". I recommend adding a bytes.tohex() method (in the same vein as the existing bytes.fromhex class method). I've attached a

[issue3501] expm1 missing

2008-08-09 Thread Mark Dickinson
Changes by Mark Dickinson <[EMAIL PROTECTED]>: -- assignee: -> marketdickinson components: +Extension Modules -None priority: -> normal versions: +Python 2.7, Python 3.1 -Python 3.0 ___ Python tracker <[EMAIL PROTECTED]>

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le samedi 09 août 2008 à 11:26 +, Andrew Dalke a écrit : > Mind you, I also get the problem on FreeBSD 2.6 so it isn't Darwin > specific. Darwin and the BSD's supposedly share a lot of common stuff. But FreeBSD 2.6 is a bit old, isn't it

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-08-09 Thread Andrew Dalke
Andrew Dalke <[EMAIL PROTECTED]> added the comment: You're right. I mistook the string implementation for the list one which does keep a preallocated section in case of growth. Strings of course don't grow so there's no need for that. I tracked the memory allocation all the way down to obma

[issue3526] Customized malloc implementation on SunOS and AIX

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le vendredi 08 août 2008 à 22:46 +, Martin v. Löwis a écrit : > Instead, Python's own memory allocate (obmalloc) should be changed to > directly use the virtual memory interfaces of the operating system (i.e. > mmap), bypassing the malloc

[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: I confirmed this patch works on my win2000. And I believe it works on Trent's machine, too. http://mail.python.org/pipermail/python-dev/2008-June/080525.html ___ Python tracker <[EMAIL PROTECTED]>

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Perhaps. I'm under Linux. However, at the end of the file_read() implementation in fileobject.c, you can find the following lines: if (bytesread != buffersize) _PyString_Resize(&v, bytesread); Which means that the string *is* resized at

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-08-09 Thread Andrew Dalke
Andrew Dalke <[EMAIL PROTECTED]> added the comment: I tested it with Python 2.5 on a Mac, Python 2.5 on FreeBSD, and Python 2.6b2+ (from SVN as of this morning) on a Mac. Perhaps the memory allocator on your machine is making a promise it can't keep? ___ Py

[issue3531] file read preallocs 'size' bytes which can cause memory problems

2008-08-09 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: I can't reproduce, your code snippet works fine. What Python version is it? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> __