[issue2124] xml.sax and xml.dom fetch DTDs by default

2008-02-16 Thread Martin v. Löwis
Martin v. Löwis added the comment: -1 on issuing a warning. I really cannot see much of a problem in this entire issue. XML was designed to "be straightforwardly usable over the Internet" (XML rec., section 1.1), and this issue is a direct consequence of that design decision. You might just as we

[issue1404925] subprocess.Popen inside thread locks the thread in some case

2008-02-16 Thread Leonid Evdokimov
Leonid Evdokimov added the comment: I confirm the bug. Deadlock at Linux 2.6 (^C does not work): Python 2.4.4 (#1, Jan 8 2008, 23:42:40) [GCC 4.1.1 (Gentoo 4.1.1-r3)] on linux2 Sometimes work and sometimes fails with fatal error at FreeBSD 6.3: Python 2.4.4 (#2, Oct 31 2007, 05:20:42) [GCC 3

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-02-16 Thread Lea Wiemann
Lea Wiemann added the comment: I know, but I don't always want to define the comparison on the object itself, because it's not an intrinsic feature of the object. It's just the way I happen to sort it right now. (That's especially likely if the ordering algorithm is complex.) __

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-02-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, an object with a complex element-to-element comparison can define an __lt__() method and have it work with sort, min, max, etc. __ Tracker <[EMAIL PROTECTED]> __

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-02-16 Thread Raymond Hettinger
Changes by Raymond Hettinger: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/p

[issue1762] Inheriting from ABCs makes classes slower.

2008-02-16 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I'd like a second opinion about whether it's a good idea to commit the attached patch, which moves abc._Abstract into object. Its effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__=abc.ABCMeta' 'Foo()' up from 2.5u

[issue2124] xml.sax and xml.dom fetch DTDs by default

2008-02-16 Thread A.M. Kuchling
A.M. Kuchling added the comment: What if we just tried to make the remote accesses apparent to the user, by making a warning.warn() call in the default implementation that was deactivated by a setFeature() call. With a warning, code will continue to run but the user will at least be aware they'r

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-02-16 Thread Lea Wiemann
Lea Wiemann added the comment: "Non-obvious" to the novice that this technique can be used, and non- obvious to the reader of the program. I'm envisioning key functions that return long sequences of -1/0/1 integers, or numbers between 0 and 2**50... Not good. Instead of removing cmp, I'd sugg

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-02-16 Thread Lea Wiemann
Lea Wiemann added the comment: Is this really necessary? I see that the sorting code gets a little simpler, but I believe that there are valid use cases for cmp out there, where using a key would at least be cumbersome. So why remove it when it's useful? For instance, if you have an algorith

[issue2124] xml.sax and xml.dom fetch DTDs by default

2008-02-16 Thread Paul Boddie
Paul Boddie added the comment: (Andrew, thanks for making a bug, and apologies for not reporting this in a timely fashion.) Although an in-memory caching solution might seem to be sufficient, if one considers things like CGI programs, it's clear that such programs aren't going to benefit from su

[issue2131] "codecs" module on Windows uses incorrect end-of-line, wiriting broken Unicode (UTF-8) files

2008-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: As stated in the codecs.open() docstring: """Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values""". This certainly means you have to insert "\r\n" yourself (instead of

[issue2131] "codecs" module on Windows uses incorrect end-of-line, wiriting broken Unicode (UTF-8) files

2008-02-16 Thread Technologov
Technologov added the comment: OK: try filewr.write("abc"+"\n"+"abc") The file will be generated with 7 bytes in it (must be 8, because Windows has two-byte line-end). Without using "codecs" modules, everything works fine, and the file will have 8-bytes in it. (see 2nd example) Plus, the text

[issue1813] Codec lookup failing under turkish locale

2008-02-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I agree that it's a bit unfortunate that the 8-bit string APIs in Python use the locale aware C functions per default (this should really be reversed: there should be locale-aware .upper() and .lower() methods and the the standard ones should work just like t

[issue2131] "codecs" module on Windows uses incorrect end-of-line, wiriting broken Unicode (UTF-8) files

2008-02-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Could explain what exactly is wrong with the end-of-line on Windows ? Note that "Unicode text files" on Windows are generally interpreted as UTF-16 encoded files. Perhaps that's what makes you think there's a bug. -- nosy: +lemburg

[issue2131] "codecs" module on Windows uses incorrect end-of-line, wiriting broken Unicode (UTF-8) files

2008-02-16 Thread Technologov
New submission from Technologov: "codecs" module on Windows writes incorrect end-of-line, making it impossible to write Unicode files. See below, how-to reproduce bug (Python 2.5.1 on Windows XP) === #buggy unicode support module:

[issue2130] [feature-request] Please add bool data type to "optparse" module

2008-02-16 Thread Technologov
New submission from Technologov: hi ! Currently "optparse" module lacks "bool" data type parsing. It would be nice to add this feature. -Technologov, 16.02.2008. -- components: Extension Modules messages: 62469 nosy: Technologov severity: normal status: open title: [feature-request] Pl

[issue1220212] os.kill on windows

2008-02-16 Thread Technologov
Technologov added the comment: Yes, this feature would be very important for me too... Anybody knows, _when_ it will be integrated into Python ? If this bugzilla supports email notifications, Please add me as "CC" for this bug. -Technologov -- nosy: +Technologov _

[issue1943] improved allocation of PyUnicode objects

2008-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an updated patch, to comply with the introduction of the PyUnicode_ClearFreeList() function. Added file: http://bugs.python.org/file9441/unialloc3.patch __ Tracker <[EMAIL PROTECTED]> __

[issue1813] Codec lookup failing under turkish locale

2008-02-16 Thread Antoine Pitrou
Changes by Antoine Pitrou: -- versions: +Python 2.6 -Python 2.5 __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe

[issue1813] Codec lookup failing under turkish locale

2008-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Even if we don't fix all uses of (?to)(lower|upper) in the source tree, I think it's important that codec and locale lookup work properly when the current locale defines non-latin case folding for latin characters. Here is a patch. Perhaps also the str type shou

[issue2061] IDLE - autocompletion to support alternate path separators

2008-02-16 Thread Tal Einat
Tal Einat added the comment: Umm, that's me being silly and forgetting to remove some backwards compatibility stuff. Revised (simpler) version attached. Added file: http://bugs.python.org/file9439/IDLE_AutoComplete_path_separators.080216.patch __ Tracker <[EMAI

[issue1813] Codec lookup failing under turkish locale

2008-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: As for the .upper() and .lower() methods, they are used in quite a bunch of standard library modules :-/... Lib/base64.py Lib/BaseHTTPServer.py Lib/bsddb/test/test_compare.py Lib/bsddb/test/test_dbobj.py Lib/CGIHTTPServer.py Lib/cgi.py Lib/compiler/ast.py Lib/Co

[issue1813] Codec lookup failing under turkish locale

2008-02-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: The C library's tolower() and toupper() are used in a handful of source files. It might make sense to replace some of those calls with ascii-only versions of the corresponding functions. Modules/_sre.c:return ((ch) < 256 ? (unsigned int)tolower((ch)) : ch);

[issue2066] Adding new CNS11643, a *huge* charset, support in cjkcodecs

2008-02-16 Thread Giovanni Bajo
Giovanni Bajo added the comment: Making the standard Windows Python DLL larger is not only a problem of disk size: it will make all packages produced by PyInstaller or py2exe larger, and that means lots of wasted bandwidth. I see that MvL is still -1 on simply splitting CJK codecs out, and vetos

[issue2110] Implement __format__ for Decimal

2008-02-16 Thread Facundo Batista
Facundo Batista added the comment: Please, be my guest! Thanks! __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue2128] sys.argv is wrong for unicode strings

2008-02-16 Thread Christian Heimes
Christian Heimes added the comment: The issue is related to #1342 Since we have dropped support for older versions of Windows (9x, ME, NT4) I like to get the Python interface to argv, env and files fixed. -- components: +Windows nosy: +tiran priority: -> high versions: +Python 2.6 ___

[issue2129] Link error of gethostbyaddr and gethostname in Python Manuals (the chm file)

2008-02-16 Thread June Kim
New submission from June Kim: Finding gethostname and gethostbyaddr entities from the index tab and clicking them in Python25.chm results in showing up the wrong section of 14.1.1 Process Parameters, instead of the proper section 17.2 socket. -- components: Documentation messages: 624

[issue2128] sys.argv is wrong for unicode strings

2008-02-16 Thread Giovanni Bajo
New submission from Giovanni Bajo: Under Windows, sys.argv is created through the Windows ANSI API. When you have a file/directory which can't be represented in the system encoding (eg: a japanese-named file or directory on a Western Windows), Windows will encode the filename to the system enc

[issue1124861] subprocess fails on GetStdHandle in interactive GUI

2008-02-16 Thread Daniel Serodio
Daniel Serodio added the comment: Is there any chance of having this fixed for 2.5.2 ? _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list ma

[issue2127] sqlite3 docs should mention utf8 requirement

2008-02-16 Thread Damien Elmes
New submission from Damien Elmes: The docs on http://docs.python.org/lib/sqlite3-Module-Contents.html should mention that the connection string should always be UTF-8, regardless of the encoding system of the underlying filesystem. See the 'note to windows users' on http://www.sqlite.org/c3ref/

[issue2126] BaseHTTPServer.py fails long POST from IE

2008-02-16 Thread June Kim
Changes by June Kim: -- title: BaseHTTPServer.py and long POST from IE -> BaseHTTPServer.py fails long POST from IE __ Tracker <[EMAIL PROTECTED]> __ _

[issue2126] BaseHTTPServer.py and long POST from IE

2008-02-16 Thread June Kim
New submission from June Kim: http://bugs.python.org/issue430160 http://bugs.python.org/issue427345 These two issues refer to the same bug, which occurs when there is a POST from an Internet Explorer and the POST's content is long enough. The issue was resolved by changing the CGIHTTPServer.py t

[issue2126] BaseHTTPServer.py

2008-02-16 Thread June Kim
Changes by June Kim: -- components: Library (Lib) nosy: juneaftn, rhettinger severity: normal status: open title: BaseHTTPServer.py type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> _

[issue2120] broken links in advocacy HOWTO

2008-02-16 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r60855, thanks! -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue2123] ctypes pointer not always keeping target alive

2008-02-16 Thread Armin Rigo
Armin Rigo added the comment: We're finding such bugs because we are trying to reimplement ctypes in PyPy. I guess your last question was "is it impossible to construct this 'bug' without *reading* .contents?". The answer is that it doesn't change much; you can replace all the reads from .conte

[issue2124] xml.sax and xml.dom fetch DTDs by default

2008-02-16 Thread Virgil Dupras
Virgil Dupras added the comment: The blog page talked about 503 responses. What about issuing a warning on these responses? Maybe it would be enough to make developers aware of the problem? Or what about in-memory caching of the DTDs? Sure, it wouldn't be as good as a catalog or anything, but