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

2009-03-18 Thread Fan Decheng
New submission from Fan Decheng fandech...@gmail.com: 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

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

2009-03-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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

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

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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.

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

2009-03-18 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: 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

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

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: (cannot reproduce under Linux) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5505 ___

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

2009-03-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - jnoller nosy: +jnoller priority: - normal type: - behavior versions: +Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5503

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

2009-03-18 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com 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

[issue5374] optparse special usage tokens conflict with formatting characters

2009-03-18 Thread Andy Buckley
Andy Buckley a...@insectnation.org 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

[issue1201569] allow running multiple instances of IDLE

2009-03-18 Thread Tal Einat
Tal Einat talei...@users.sourceforge.net added the comment: This should be dropped in favor of issue #1529142, which proposes a simpler and better solution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1201569

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

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

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2009-03-18 Thread Benny Bach
Benny Bach benny.b...@gmail.com 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. --

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

2009-03-18 Thread C. E. Ball
C. E. Ball ceb...@users.sf.net 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

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Andreas Schawo
Andreas Schawo andreas.sch...@gmail.com 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

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

2009-03-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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? --

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue5508] maximum recursion depth exceeded in __subclasscheck__

2009-03-18 Thread ganges master
New submission from ganges master gangesmas...@users.sourceforge.net: 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

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

2009-03-18 Thread Brad Miller
Changes by Brad Miller bonel...@gmail.com: -- nosy: +bmiller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___ ___ Python-bugs-list mailing

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Backported to the trunk in r70454. Thanks, all! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4474

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

2009-03-18 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

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

2009-03-18 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 @@

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

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org http://bugs.python.org/issue1222

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
New submission from Nathaniel Troutman locutusofbe...@yahoo.com: 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

[issue5509] cPickle - module object has no attribute

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

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

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Trying a fix in r70458. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1222 ___ ___

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

2009-03-18 Thread Matthias Klose
Matthias Klose d...@debian.org 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

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

2009-03-18 Thread Matthias Klose
Changes by Matthias Klose d...@debian.org: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1322 ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2009-03-18 Thread Benny Bach
Benny Bach benny.b...@gmail.com 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. --

[issue5508] maximum recursion depth exceeded in __subclasscheck__

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2009-03-18 Thread Zooko O'Whielacronx
Zooko O'Whielacronx zo...@zooko.com 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:

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Nathaniel Troutman
Nathaniel Troutman locutusofbe...@yahoo.com 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

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

2009-03-18 Thread Ramsey Dow
New submission from Ramsey Dow yes...@speakeasy.net: 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

[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 pyt...@petruchio.org: 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:

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

2009-03-18 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- stage: - needs patch versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5511 ___

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It looks like that did the trick. Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1222 ___

[issue5509] cPickle - module object has no attribute

2009-03-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org 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

[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 rud...@rudd-o.com 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,

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: That should be r70459, of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4258 ___

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

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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). --

[issue5500] tarfile: path problem in arcname under windows

2009-03-18 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de 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

[issue4034] traceback attribute error

2009-03-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r70463. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4034 ___

[issue5425] 2to3 wrong for types.StringTypes

2009-03-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org 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.

[issue5396] os.read not handling O_DIRECT flag

2009-03-18 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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

[issue4034] traceback attribute error

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @benjamin.peterson: Cool! Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4034 ___

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: 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

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[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 m...@acm.org: 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

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

2009-03-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Sounds good to me! An integer benchmark script in the Tools/ directory would be handy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5512

[issue5512] Streamline integer division

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue5512] Streamline integer division

2009-03-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: [Antoine] Well, the original code in pidigits is by me :-) Apologies for the misattribution! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5512

[issue5512] Streamline integer division

2009-03-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5512

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

2009-03-18 Thread Jack Howarth
New submission from Jack Howarth howa...@bromo.med.uc.edu: 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

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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:

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, there is no version number of the benchmark tool itself! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5512 ___

[issue5512] Streamline integer division

2009-03-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[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 rud...@rudd-o.com 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

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

2009-03-18 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: 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'

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

2009-03-18 Thread Jess Austin
New submission from Jess Austin jess.aus...@gmail.com: 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

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

2009-03-18 Thread Jess Austin
Changes by Jess Austin jess.aus...@gmail.com: -- 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 symmetric for subclasses of datetime.date and datetime.datetime

2009-03-18 Thread Jess Austin
Changes by Jess Austin jess.aus...@gmail.com: -- 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

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

2009-03-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I concur with your plan. BTW, have you checked to see what Java and C# do? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5515

[issue1520662] support all of strftime(3)

2009-03-18 Thread Tennessee Leeuwenburg
Tennessee Leeuwenburg tleeuwenb...@gmail.com 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 rep...@bugs.python.orgwrote: David W. Lambert lamber...@corning.com added the