[issue5513] "What's New" should say VERY CLEARLY that the type file is gone

2009-03-18 Thread Martin v. Löwis
Martin v. Löwis added the comment: > The Python 3 "What's New" should SCREAM that the type file is gone I don't think the documentation should ever SCREAM. > "The type file has been replaced by _ioTextIOWrapper; use open() to > open a file; open returns an instance of _ioTextIOWrapper."

[issue1520662] support all of strftime(3)

2009-03-18 Thread Tennessee Leeuwenburg
Tennessee Leeuwenburg added the comment: I might start trawling through these issues, slowly ticking them off. Thanks for the links. -T On Wed, Mar 18, 2009 at 1:17 PM, David W. Lambert wrote: > > David W. Lambert added the comment: > > (I have no clue where the servers are.) > > --

[issue5515] 'n' formatting for int and float handles leading zero padding poorly

2009-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with your plan. BTW, have you checked to see what Java and C# do? -- ___ Python tracker ___ ___

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2009-03-18 Thread Jess Austin
Changes by Jess Austin : -- title: equality not reflexive for subclasses of datetime.date and datetime.datetime -> equality not symmetric for subclasses of datetime.date and datetime.datetime ___ Python tracker __

[issue5516] equality not reflexive for subclasses of datetime.date and datetime.datetime

2009-03-18 Thread Jess Austin
Changes by Jess Austin : -- title: equality not reflixive for subclasses of datetime.date and datetime.datetime -> equality not reflexive for subclasses of datetime.date and datetime.datetime ___ Python tracker __

[issue5516] equality not reflixive for subclasses of datetime.date and datetime.datetime

2009-03-18 Thread Jess Austin
New submission from Jess Austin : While the datetime.date and datetime.datetime classes consistently handle mixed-type comparison, their subclasses do not: >>> from datetime import date, datetime, time >>> d = date.today() >>> dt = datetime.combine(d, time()) >>> d == dt False >>> dt == d False

[issue5515] 'n' formatting for int and float handles leading zero padding poorly

2009-03-18 Thread Eric Smith
New submission from Eric Smith : I think the way leading zero padding is handled for int and float by format's 'n' code is a bug. >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF8') 'en_US.UTF8' >>> format(12345, '010n') '12,345' >>> format(12345, '09n') '00012,345' >>> forma

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-18 Thread Rudd-O
Rudd-O added the comment: Improved version of the autonaming patch, now makes rpmbuild accept files that were installed with spaces on their names. -- Added file: http://bugs.python.org/file13372/python-2.4-distutils-bdist_rpm-autonames+optimize-v2.patch __

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: My numbers: # No patch $ ./python /home/haypo/pidigits-2.py 3000 Python 3.1a1+ (py3k:70466, Mar 18 2009, 23:56:06) [GCC 4.3.2] CPU: 64 bits, little endian PyLong: base=2^30, sizeof(digit)=32 bits (...) Best Time; 2300.2 ms # With faster_integer_division.patch

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: Oh, there is no version number of the benchmark tool itself! -- ___ Python tracker ___ ___ Python-bu

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: New version of pidigit: - works on python 2.6, trunk and py3k - display Python version, CPU info (bits, endian), PyLong info (base, digit size) - display usage if no argument is given -- Added file: http://bugs.python.org/file13371/pidigits-2.py __

[issue5514] Darwin framework libpython3.0.a is not a normal static library

2009-03-18 Thread Jack Howarth
New submission from Jack Howarth : The libpython3.0.a created for Python 3.0.1 isn't a normal static library. file /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpython3.0.a /System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c onfig/libpyt

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the version of pidigits that I was using. -- Added file: http://bugs.python.org/file13370/pidigits_bestof.py ___ Python tracker ___ _

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: [Antoine] > Well, the original code in pidigits is by me :-) Apologies for the misattribution! -- ___ Python tracker ___ __

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: Useful informations for an integer benchmark: - CPU type: 32 or 64 bits, endian - Memory size - Python version - Informations about how Python was compiled - Integer implementation: use int_info when it's available, otherwise base=2^15 Who has the last ve

[issue5512] Streamline integer division

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Results here (Athlon X2 3600+ with gcc in 64-bit mode with 30-bit digits), "pidigits_bestof.py 2000": - unpatched: 1644.9 ms - patched: 694.8 ms ! -- ___ Python tracker ___

[issue4294] Macros for PyLong: sign, number of digits, fits in an int

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: Updated version of my macros patch for PyLong type: - patch for Python trunk - define 3 macros: PyLong_SIGN(x), PyLong_EQUALS_ZERO(x), PyLong_NDIGITS(x) - just replace code by the equivalent macros The goal is the make the code easier to read. It would also

[issue5512] Streamline integer division

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the original code in pidigits is by me :-) (although it's not stated in the source file). I haven't tried the patch but the performance work you're doing is really impressive, Mark! -- nosy: +pitrou ___ Python

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: Sounds good to me! An integer benchmark script in the Tools/ directory would be handy. -- ___ Python tracker ___ __

[issue5513] "What's New" should say VERY CLEARLY that the type file is gone

2009-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm working on the whatsnew updates and will make sure this is clear. -- assignee: georg.brandl -> rhettinger nosy: +rhettinger ___ Python tracker __

[issue5513] "What's New" should say VERY CLEARLY that the type file is gone

2009-03-18 Thread Mitchell Model
New submission from Mitchell Model : MAIN POINT The Python 3 "What's New" should SCREAM that the type file is gone, not just that people should use the function open() to open files, since that has been a recommendation for quite a while. EXPLANATION In multiple readings of the Python 3 "Wha

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to include integer benchmark tools to upstream? I mean the "pidigit" tool (I didn't wrote this test! I just ported it to Python3) and maybe my "bench_int" tool. It could useful to reproduce the benchmark on different Python versions and d

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
New submission from Mark Dickinson : Here's a patch that streamlines the x_divrem function in Objects/longobject.c. More benchmarks are needed, but the initial results are promising: for py3k, on a 32-bit machine with 15-bit digits, Victor's pidigits benchmark runs almost twice as fast with

[issue4034] traceback attribute error

2009-03-18 Thread STINNER Victor
STINNER Victor added the comment: @benjamin.peterson: Cool! Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2009-03-18 Thread Eric Smith
Eric Smith added the comment: Antoine Pitrou wrote: > The problem seems to be that the thousands separator on the Solaris > variant of en_US is an empty string (rather than a comma) (*), and > apparently it hits a bug in the padding mechanism (which perhaps assumes > that the thousands separator

[issue5396] os.read not handling O_DIRECT flag

2009-03-18 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > I think the policy is to mirror all possible O_* constants, even if they > are of no use in Python. For example, we also have os.O_DIRECTORY. Not disagreeing with the conclusion of this ticket, but I would like to point out that os.O_DIRECTORY isn't use

[issue5425] 2to3 wrong for types.StringTypes

2009-03-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'm rejecting this patch again not because I think it's any worse than the status quo (I think they're about equally incorrect/correct), but because this is now released behavior and changing it may result in backwards incompatibility. Also, people can easily

[issue4034] traceback attribute error

2009-03-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r70463. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

[issue5500] tarfile: path problem in arcname under windows

2009-03-18 Thread Lars Gustäbel
Lars Gustäbel added the comment: At the moment, I am unable to reproduce the problem you describe. I tried several combinations of what I think you could have meant, but everything seems to work okay here. Could you please provide some stand-alone testcase or code to illustrate that issue?

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Great! > Committed 30bit_longdigit20.patch to py3k in r70460, with some minor > variations (incorporate Nick Coghlan's improved error messages > for marshal, fix some comment typos, add whatsnew and Misc/NEWS entries). --

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: That should be r70459, of course. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: Committed 30bit_longdigit20.patch to py3k in r70460, with some minor variations (incorporate Nick Coghlan's improved error messages for marshal, fix some comment typos, add whatsnew and Misc/NEWS entries). Thanks all for your feedback. I might get around to

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-18 Thread Rudd-O
Rudd-O added the comment: ahaha! I have the patch that implements this functionality. 1) it renames the RPM package name to python-%packagename-py2.4 and and its requirements as well. 2) it autooptimizes (-O1) any RPM built if no optimization has been configured in setup.cfg, so it works with a

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Implementing this may be difficult (the module may not be on the search path when its run and there's no way to determine that). Also, it would break compatibility. Anyway, it's usually better to define classes that will be pickled in their own permanent modu

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: It looks like that did the trick. Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-03-18 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- stage: -> needs patch versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker ___ ___ Pytho

[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-03-18 Thread J.R. Allen
New submission from J.R. Allen : Currently the zipfile.ZipFile class has no __exit__ atribute, so it does not work with a with statement as other file objects do. Can this be implemented? -- components: Library (Lib) messages: 83768 nosy: petruchio severity: normal status: open title:

[issue5510] patches for Modules/socketmodule.c for NetBSD

2009-03-18 Thread Ramsey Dow
New submission from Ramsey Dow : I couldn't install setuptools (required by gitosis) because Python 2.6.1 didn't install socket when I built it. A little digging and I uncommented the "_socket socketmodule.c" line in Modules/Setup. Unfortunately, the Bluetooth socket stuff in Modules/socketmodule

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
Nathaniel Troutman added the comment: I believe I've tracked down the problem. When you run a python module directly (ie "python Foo.py") any classes defined in the module have their '__module__' attribute set to '__main__'. Which means the pickle says the class is in '__main__' of whatever modu

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-18 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: doko: thanks for your interest encouraging more formal and generic solutions to this. For what it is worth, the current version of my patch (used in Tahoe) is here: http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=20081125155118-92b7

[issue5508] maximum recursion depth exceeded in __subclasscheck__

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is the reason. Starting from Python 2.6, classes can redefine subclass checking using a special method named __subclasscheck__. Since this method can contain arbitrary code, we have to guard against recursion when calling it. Therefore, the recursion count

[issue4015] [patch] make installed scripts executable on windows

2009-03-18 Thread Benny Bach
Benny Bach added the comment: Ok - I see what you mean. I can't see any problems with it. However generating a separate bat file has the advantage that you can still invoke the original script by calling python explicitly. -- ___ Python tracker

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-18 Thread Matthias Klose
Changes by Matthias Klose : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python

[issue1322] platform.dist() has unpredictable result under Linux

2009-03-18 Thread Matthias Klose
Matthias Klose added the comment: MAL, please can we add zooko's patch in some form? The current implementation assumes an implementation, which doesn't exist on all platforms, and just dividing linux distributions in "unsupported" and "supported" seems to be odd. You cite some URL's in platfor

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Trying a fix in r70458. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
Nathaniel Troutman added the comment: Why can I only attach one file at a time? -- Added file: http://bugs.python.org/file13365/LoadFoo.py ___ Python tracker ___

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
New submission from Nathaniel Troutman : If I define a class Foo in module A and in module A pickle out a list of Foo objects to 'foo.pkl', then in module B attempt to unpickle 'foo.pkl' I recieve the error "AttributeError: 'module' object has no attribute 'Foo'" Attached are: Foo.py which defin

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, Martin, do you have any idea why the Solaris buildbot doesn't seem to be enabled on trunk? -- ___ Python tracker ___ ___

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi Mark, > AssertionError: ' 4200' != ' 4200' > > Any idea what's going on here? The problem seems to be that the thousands separator on the Solaris variant of en_US is an empty string (rather than a comma) (*), and apparently it hits a bug in the pa

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2009-03-18 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: With following patch for investigation, (release30-maint) Index: Lib/io.py === --- Lib/io.py (revision 70450) +++ Lib/io.py (working copy) @@ -57,6 +57,7 @@ import os import abc +import

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2009-03-18 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I can reproduce this on coLinux(debian). But coLinux is running on windows, so its console behavior may not be same as native linux. (You need to use Ctrl+D on coLinux instead of Ctrl+Z) -- nosy: +ocean-city ___ P

[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: Backported to the trunk in r70454. Thanks, all! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: r70357 seems to have caused the sparc solaris py3k buildbot to start failing on test_locale: == FAIL: test_integer_grouping_and_padding (test.test_locale.TestNumberFormatting) ---

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2009-03-18 Thread Brad Miller
Changes by Brad Miller : -- nosy: +bmiller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue5508] maximum recursion depth exceeded in __subclasscheck__

2009-03-18 Thread ganges master
New submission from ganges master : this is similar to bug #5370, but this for is a different reason. also, i have seen several sites on google that mention it, so it has happened to quite a few people. the bug is that when calling dir() on a object, it looks for __members__ and __methods__, whi

[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: Committed to py3k, r70452. Since this is partway between a bugfix and a new feature, I suggest that it's not worth merging it to 3.0 (or 2.6). It should be backported to 2.7, however; I'll do this after verifying that the py3k buildbots are happy. ---

[issue4015] [patch] make installed scripts executable on windows

2009-03-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: On posix platform, build_scripts already updates the #! line to refer to the target interpreter, and changes the file mode. On Windows, it could change the extension as well. Or does it causes problems? -- ___

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Andreas Schawo
Andreas Schawo added the comment: I agree with you. A separate patch will do better. In the next days I'm able to provide a new patch with the test_struct cleanup. Currently all tests succeeded on Windows and Linux. So I think no other module relies on this feature explicitly. I've already ch

[issue4508] distutils compiler not handling spaces in path to output/src files

2009-03-18 Thread C. E. Ball
C. E. Ball added the comment: I also found this bug while using SciPy's weave on Windows XP to compile some inline c/c++ code. Thorney's distutils_compiler_quoting.patch fixed the problem for me. Here is the relevant part of the traceback (I hope): """ Found executable C:\Program Files\Topogr

[issue4015] [patch] make installed scripts executable on windows

2009-03-18 Thread Benny Bach
Benny Bach added the comment: If you have to name the script with a .bat extension it is not portable to other platforms or did I misunderstand something? The point of generating the bat file is to be able to use the same script on all platforms. -- ___

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: I think you're right about issue 4228: we should go ahead and clean up the struct module anyway. As far as I can tell, only the Python 2.5 zipfile module is using the deprecated behaviour. The _struct.c portion of your patch looks fine. I think there's still

[issue4228] struct.pack('L', -1)

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: I don't know the zipfile module very well (i.e., at all), but as far as I can tell from looking at the source, there's no use of struct.pack('L', -1) in 2.6 onwards: it's only potentially a problem in 2.5 (and that isn't going to change, now that 2.5 is in secur

[issue5507] ctypes configuration fails on mips-linux (and probably Irix)

2009-03-18 Thread Matthias Klose
New submission from Matthias Klose : | File "build/temp.linux-mips-2.6/libffi/fficonfig.py", line 32, in | ffi_sources += ffi_platforms['MIPS'] | KeyError: 'MIPS' however the fficonfig.py file has only MIPS_LINUX and MIPS_IRIX keys. -- assignee: theller components: ctypes message

[issue4228] struct.pack('L', -1)

2009-03-18 Thread Andreas Schawo
Andreas Schawo added the comment: As I understand actually the zipfile module possibly creates damaged zip files after version 2.4 because of '\x00\x00\x00\x00' instead of '\xff\xff\xff\xff' as header offset. But without any error. I think the _struct.c should be cleaned in any case. Because we

[issue5503] multiprocessing/connection.py wrong pipe name under win32

2009-03-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> jnoller nosy: +jnoller priority: -> normal type: -> behavior versions: +Python 2.7, Python 3.0, Python 3.1 ___ Python tracker ___ __

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: (cannot reproduce under Linux) -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5374] optparse special usage tokens conflict with formatting characters

2009-03-18 Thread Andy Buckley
Andy Buckley added the comment: I'm easy either way --- I appreciate that it is a non-issue with new formatting, but until developers can rely on the presence of Py >= 2.6, %-formatting wil continue to be widely used. Since optparse's special use of %-delimited tokens clashes with the establish

[issue5506] io.BytesIO doesn't support the buffer protocol

2009-03-18 Thread Antoine Pitrou
New submission from Antoine Pitrou : It may be logical for BytesIO to support the buffer protocol (readable /and/ writable). -- components: Library (Lib) messages: 83740 nosy: pitrou priority: normal severity: normal stage: test needed status: open title: io.BytesIO doesn't support the b

[issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But it looks that py3k is stronger because it doesn't crash. Is it the > power of the GIL? Yes, it is. In theory, we needn't take the lock in all of BufferedReader.readline(), only when calling external code which might itself release the GIL. In practice, w

[issue1529142] Allowing multiple instances of IDLE with sub-processes

2009-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is there anyone following this thread that thinks the weeble's patch is not ready to commit? -- assignee: kbk -> rhettinger nosy: +rhettinger ___ Python tracker _

[issue1201569] allow running multiple instances of IDLE

2009-03-18 Thread Tal Einat
Tal Einat added the comment: This should be dropped in favor of issue #1529142, which proposes a simpler and better solution. -- ___ Python tracker ___ ___

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2009-03-18 Thread Fan Decheng
New submission from Fan Decheng : Platform: Windows Vista x64 Python version: 3.0.1 x64 When I use sys.stdin.readlines(), it correctly ends when I enter ^Z (ctrl-Z) on the console (this is the EOF on the console). However when I call sys.stdin.read(), it doesn't end when ^Z is entered. It ends