[issue7659] Attribute assignment on object() instances raises wrong exception

2011-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: Along the lines of RDM's last post, see: http://code.activestate.com/recipes/52308-the-simple-but-handy-collector-of-a-bunch-of-named/ Or, if you do a few web searches for terms like "bethard coghlan namespaces" or "bethard generic objects" you'll get results al

[issue7659] Attribute assignment on object() instances raises wrong exception

2011-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: Object instances don't get a __dict__ by default to save the space the pointer and dict instance would require. Most builtins are missing that pointer. It is also the main memory saving provided by the use of __slots__. As far as AttributeError vs TypeError goe

[issue3849] FUD in documentation for urllib.urlopen()

2011-01-26 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue10848] Move test.regrtest from getopt to argparse

2011-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: As I recall, STDTESTS is there to check we have a basically functioning interpreter (i.e. the compiler works, etc). The idea is that if any of those fail, everything else is likely to go belly up as well. If regrtest is being used to run some other set of tests

[issue11017] optparse: error: invalid integer value

2011-01-26 Thread R. David Murray
R. David Murray added the comment: 09 is still an invalid token in python3. Since int('09') works in python2 it might be worth looking in to this further. -- nosy: +r.david.murray ___ Python tracker

[issue11003] os.system should be deprecated in favour of subprocess module

2011-01-26 Thread R. David Murray
R. David Murray added the comment: I wasn't around when that decision was made, but looking at the posixmodule.c source, system is a straightforward wrapper, but popen gets...byzantine on anything but unix. -- nosy: +r.david.murray ___ Python track

[issue8914] Run clang's static analyzer

2011-01-26 Thread Brett Cannon
Brett Cannon added the comment: Well, there is no upload because the compressed file is 70 MB. But you can download the file from https://docs.google.com/leaf?id=0B7CvitGf6YffMGFlYTg2N2UtMjY3Yi00ZTg1LWI2NWUtNmRiMmEwYzZjMTQ1&sort=name&layout=list&num=50 . -- _

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread R. David Murray
R. David Murray added the comment: I haven't looked at the items Haypo has pointed to yet, but I have looked at the API issues (get_string, add, etc). It seems to me that we have to make a decision here: do we break API backward compatibility and convert to consuming and emitting bytes prett

[issue8914] Run clang's static analyzer

2011-01-26 Thread Brett Cannon
Brett Cannon added the comment: Analyzed by downloading the latest Clang static analyzer from http://clang-analyzer.llvm.org/ and running ``scan-build ./configure --with-pydebug; scan-build make -s -j2``. The attached tar.xz (yes I went with a cutting edge archival format; get pax on UNIX to

[issue9233] json.load failure when C optimizations aren't built

2011-01-26 Thread Bob Ippolito
Bob Ippolito added the comment: For what it's worth, I don't think any of the failures mentioned here are in the current version of simplejson. There aren't any tests that check the speedup module name, the speedup tests are skipped when speedups are not detected, and the empty json object bu

[issue11020] Pyclbr broken because of missing 2-to-3 conversion

2011-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: At some point, we ought to clean-up bad variable names. For now (close to the release), I'll stick with the minimal fix. Fixed r88207 and r88028. -- resolution: -> fixed status: open -> closed versions: +Python 3.1 __

[issue11003] os.system should be deprecated in favour of subprocess module

2011-01-26 Thread Skip Montanaro
Skip Montanaro added the comment: Eric> Note that os.popen is implemented with subprocess. That seems somewhat wrong to me. There is a stdio popen function which os.popen used to expose. I thought that was the goal (thin wrapper around many library functions, then build higher level stuff on

[issue11021] email MIME-Version headers for each part in multipart message

2011-01-26 Thread R. David Murray
R. David Murray added the comment: For the record, can you point to the relevant part of the relevant RFC? -- assignee: -> r.david.murray nosy: +r.david.murray stage: -> needs patch versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker

[issue6584] gzip module has no custom exception

2011-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker ___

[issue11020] Pyclbr broken because of missing 2-to-3 conversion

2011-01-26 Thread R. David Murray
R. David Murray added the comment: One fix or the other ought to go in, IMO. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue11021] email MIME-Version headers for each part in multipart message

2011-01-26 Thread David Caro
New submission from David Caro : When attaching a subpart to a multipart message, python should follow the recomendations of the rfcs and remove the MIME-Version header of each part, leaving only one MIME-Version header at the beggining of the message. >>> from email.mime.multipart import MIM

[issue11020] Pyclbr broken because of missing 2-to-3 conversion

2011-01-26 Thread R. David Murray
R. David Murray added the comment: As long as we are modifying that code, how about fixing the use of 'dict' as a variable name? Alternative patch attached. -- nosy: +r.david.murray Added file: http://bugs.python.org/file20544/pyclbr2.patch ___ Pyt

[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

2011-01-26 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here is an update patch, which corrects a typo in the previous patch, and adds a test to test_zlib. The test uses a memory-mapped sparse file, so it gets skipped on systems without mmap. The alternative would be to allocate a 4+GB buffer of ordinary memory, ca

[issue11020] Pyclbr broken because of missing 2-to-3 conversion

2011-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +patch Added file: http://bugs.python.org/file20542/pyclbr.patch ___ Python tracker ___ __

[issue11018] typo in test_bz2

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r88204 (3.2), r88205 (3.1) and r88206 (2.7). -- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue10848] Move test.regrtest from getopt to argparse

2011-01-26 Thread R. David Murray
R. David Murray added the comment: I would open three new bugs to address the issues you raise. It ought to be possible to rename things so that we can eliminate the pre-population of NOTTESTS (if not I'd like to know why not!). STDTESTS appear to move certain tests to the front, possibly f

[issue11020] Pyclbr broken because of missing 2-to-3 conversion

2011-01-26 Thread Raymond Hettinger
New submission from Raymond Hettinger : The command line invocation of pyclbr failed because of a 2-to-3 error. The dict.values() call returns a dictview which doesn't support the sort() method. Invoke with: $ python -m pyclbr Lib/collections.py -- components: Library (Lib) messages

[issue10981] argparse: options starting with -- match substrings

2011-01-26 Thread David Caro
David Caro added the comment: Yes it is, here http://docs.python.org/dev/library/argparse.html#argument-abbreviations. -- ___ Python tracker ___ ___

[issue10848] Move test.regrtest from getopt to argparse

2011-01-26 Thread Sandro Tosi
Sandro Tosi added the comment: shouldn't we use the same method also for --coverdir (that currently faild the "least surprise" test when specifying a relative path) replacing coverdir = os.path.join(os.getcwd(), a) with coverdir = os.path.join(support.SAVEDCWD, a) ? -- ___

[issue10848] Move test.regrtest from getopt to argparse

2011-01-26 Thread Sandro Tosi
Sandro Tosi added the comment: As suggested by David, I made it possible to specify an alternative test directory by introducing '--testdir DIR' cli option: attached the patch, comments are welcome :) What about STDTESTS/NOTTESTS in case --testdir is specified? Currently they are executed/ex

[issue11003] os.system should be deprecated in favour of subprocess module

2011-01-26 Thread Éric Araujo
Éric Araujo added the comment: Note that os.popen is implemented with subprocess. For os.system, what Raymond said: It complies with the Python habit of exposing calls as is, and its documentation already advertises subprocess. -- nosy: +eric.araujo _

[issue10981] argparse: options starting with -- match substrings

2011-01-26 Thread Éric Araujo
Éric Araujo added the comment: Is this behavior documented? -- nosy: +eric.araujo versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Python tracker ___ __

[issue10878] asyncore does not react properly on close()

2011-01-26 Thread gmr
gmr added the comment: For more clarity, I am passing in a list because it will evaluate as False in the while loop on 209 and 213. The fix is to add len(map) to the while loops on those lines. -- ___ Python tracker

[issue10878] asyncore does not react properly on close()

2011-01-26 Thread gmr
gmr added the comment: What I noticed in tracing through the code is that it's getting stuck in a loop because it depends on grabbing asyncore.socket_map if map is null when passed into asyncore.loop. I got around this by appending: asyncore.loop(0.1, map=[], count=1) After my close(). I bel

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: pitrou> There's a missing conversion in mailbox.patch. pitrou> Running with -bb shows the issue. pitrou> Here is an updated patch. Good catch: test_mailbox now pass on Windows. -- Some remarks on mailbox2.patch. get_string() returns a bytes object: I propose

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread R. David Murray
R. David Murray added the comment: Committed in r88203. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: The new test fails without the fix, and it pass with the fix. The fix itself looks correct because I wrote a similar patch :-) Go on. -- ___ Python tracker __

[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter

2011-01-26 Thread Ned Deily
Ned Deily added the comment: Terry, we are working on all of the OS X IDLE Tk issues at the moment with focus first on 3.2. These issues will be updated and closed as they are resolved. -- ___ Python tracker ___

[issue3871] cross and native build of python for mingw32 with distutils

2011-01-26 Thread Roumen Petrov
Changes by Roumen Petrov : Added file: http://bugs.python.org/file20540/python-py3k-20110126-MINGW.patch ___ Python tracker <http://bugs.python.org/issue3871> ___ ___

[issue3871] cross and native build of python for mingw32 with distutils

2011-01-26 Thread Roumen Petrov
Changes by Roumen Petrov : Removed file: http://bugs.python.org/file20539/python-2.7-20110126-MINGW.patch ___ Python tracker <http://bugs.python.org/issue3871> ___ ___

[issue3871] cross and native build of python for mingw32 with distutils

2011-01-26 Thread Roumen Petrov
Changes by Roumen Petrov : Added file: http://bugs.python.org/file20539/python-2.7-20110126-MINGW.patch ___ Python tracker <http://bugs.python.org/issue3871> ___ ___ Pytho

[issue3871] cross and native build of python for mingw32 with distutils

2011-01-26 Thread Roumen Petrov
Roumen Petrov added the comment: fixed test case failure for 32-bit time_t -- Added file: http://bugs.python.org/file20538/python-2.7-20110126-MINGW.patch ___ Python tracker <http://bugs.python.org/issue3

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread R. David Murray
R. David Murray added the comment: OK, so let's try again, since roundup saw fit to clear the upload field on me... -- Added file: http://bugs.python.org/file20537/bytes_generator_none_body.patch ___ Python tracker

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread R. David Murray
R. David Murray added the comment: Here's the patch and test. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue3754] cross-compilation support for python build

2011-01-26 Thread Roumen Petrov
Changes by Roumen Petrov : Added file: http://bugs.python.org/file20536/python-py3k-20110126-CROSS.patch ___ Python tracker <http://bugs.python.org/issue3754> ___ ___

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: (Patch without patch from #9124) -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file20535/BytesGenerator_handle_text.patch ___ Python tracker

[issue3754] cross-compilation support for python build

2011-01-26 Thread Roumen Petrov
Roumen Petrov added the comment: fixed patch failure on Parser/pgen.stamp -- Added file: http://bugs.python.org/file20534/python-2.7-20110126-CROSS.patch ___ Python tracker <http://bugs.python.org/issue3

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread R. David Murray
New submission from R. David Murray : This was discovered by Haypo during work on #9124. I'll attach a patch with test shortly. -- assignee: r.david.murray messages: 127139 nosy: r.david.murray priority: high severity: normal stage: commit review status: open title: BytesGenerator fail

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 26.01.2011 14:14, schrieb Jesús Cea Avión: > > Jesús Cea Avión added the comment: > > Antoine, I am not talking about python, I am talking about the UNIX > standarization process. In particular, how a new flag (for > filesystems) in an OS can be "skipped"

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I am thinking about how to manage OS's with no support for doors. > Instead of conditionally compile the new STAT, I would rather have > the function always available, but returning FALSE when the OS > doesn't support doors. But what happen if you mount a Sol

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed in r88201. Will add a note to 2.7 docs advising use as a keyword-only argument. -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread R. David Murray
R. David Murray added the comment: Haypo: yeah, in an ideal world Generator would use get_payload() and not _payload, but I had to make some compromises with purity of model separation in order to achieve the practical goal of handling bytes usefully. I'd like to fix that as I work on email

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Anthony, that is what tarfile.patch2 does. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Anthony Long
Anthony Long added the comment: Strange, I didn't see it until this email came. Probably an old browser cache. Either way, looks good to me. No issues on mac SL. -- nosy: +antlong ___ Python tracker _

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Anthony Long
Changes by Anthony Long : -- nosy: -antlong ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Anthony Long
Anthony Long added the comment: Tests trying all positions and expecting an appropriate TypeError should be included. -- nosy: +antlong ___ Python tracker ___ _

[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter

2011-01-26 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > I have the impression that there has been progress on tcl/tk on Apple in the > last 7 months. Should this issue still be open, and if so, for both 2.7 and > 3.2? From http://www.python.org/do

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Brian Curtin
Brian Curtin added the comment: Looks good to me. As discussed in IRC, a note in 2.7 about the future of the `add` signature would also be helpful. -- nosy: +brian.curtin ___ Python tracker _

[issue11014] 'filter' argument for Tarfile.add needs to be a keyword-only argument

2011-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file20533/tarfile.patch2 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter

2011-01-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have the impression that there has been progress on tcl/tk on Apple in the last 7 months. Should this issue still be open, and if so, for both 2.7 and 3.2? -- nosy: +terry.reedy ___ Python tracker

[issue11011] More functools functions

2011-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm intrigued by the tampoline() but after reading Nick's post, I think it needs to be an external recipe or blog post with extensive examples so that it can mature and either prove its worth or serve as an intellectually stimulating toy. --

[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2011-01-26 Thread Arif Amirani
Changes by Arif Amirani : -- nosy: +kontinuity ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-26 Thread Christoph Gohlke
Christoph Gohlke added the comment: Thank you. The new patch works and it also fixes a crash of the python-2.5.4.amd64 interpreter at startup when ctypes 1.0.2 and pyreadline 1.6.2 are installed. -- ___ Python tracker

[issue763708] Failures in test_macostools for --enable-unicode=ucs4

2011-01-26 Thread Brett Cannon
Brett Cannon added the comment: Since the whole Mac directory got gutted in the switch over to Python 3, macostools is now gone, making this out of date. -- resolution: -> out of date status: languishing -> closed ___ Python tracker

[issue11018] typo in test_bz2

2011-01-26 Thread Brett Cannon
Brett Cannon added the comment: Patch looks good to me. -- assignee: -> pitrou nosy: +brett.cannon resolution: -> accepted stage: patch review -> commit review ___ Python tracker

[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8743] set() operators don't work with collections.Set instances

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue5097] asyncore.dispatcher_with_send undocumented

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue3849] FUD in documentation for urllib.urlopen()

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9233] json.load failure when C optimizations aren't built

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue2007] cookielib lacks FileCookieJar class for Internet Explorer

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue4492] httplib code thinks it closes connection, but does not

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7659] Attribute assignment on object() instances raises wrong exception

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8025] TypeError: string argument expected, got 'str'

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue6584] gzip module has no custom exception

2011-01-26 Thread David Stanek
Changes by David Stanek : -- nosy: +dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-01-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: No, the issue can be fixed by better checking the arguments. -- ___ Python tracker ___ ___ Pyt

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-01-26 Thread David Stanek
David Stanek added the comment: Should this just be resolved as a "won't fix"? -- nosy: +dstanek ___ Python tracker ___ ___ Python-bug

[issue11013] Build of 2.7 svn fails in readline

2011-01-26 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue11013] Build of 2.7 svn fails in readline

2011-01-26 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file20526/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue11007] stack tracebacks should give the relevant class name

2011-01-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: trace.py has a hack for this: it uses gc.get_referrers() to crawl back from the code object to the encloding class. I would not trust this gc.get_referrers() though; it is probably slow, and there are even some crashers related to this function; I would

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2011-01-26 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8275] callback function on win64 results in bad behavior. mem corruption?

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Would it be possible to add a test case to the patch? -- nosy: +georg.brandl, pitrou stage: -> patch review type: behavior -> crash versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-26 Thread Nadeem Vawda
Nadeem Vawda added the comment: >> * The read*() methods are implemented very inefficiently. Since they >> have to deal with the bytes objects returned by >> BZ2Decompressor.decompress(), a large read results in lots of >> allocations that weren't necessary in the C implementation. > > It probab

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a missing conversion in mailbox.patch. Running with -bb shows the issue. Here is an updated patch. -- Added file: http://bugs.python.org/file20532/mailbox2.patch ___ Python tracker

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I am looking at Linux :-). Anyway the feedback has been very useful. I will implement this as soon as mercurial switch is done. -- ___ Python tracker __

[issue11018] typo in test_bz2

2011-01-26 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nvawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread John Levon
John Levon added the comment: Jesus, yes, it's totally possible that POSIX might define: (stat.S_IFSOCK + stat.S_IFIFO) to mean something other than S_IDOOR. However, the POSIX committee is always careful to respect existing usage. It's vanishingly unlikely that any attempt to do this would ac

[issue11018] typo in test_bz2

2011-01-26 Thread Antoine Pitrou
New submission from Antoine Pitrou : This was found by Nadeem in issue5863. Index: Lib/test/test_bz2.py === --- Lib/test/test_bz2.py(révision 88199) +++ Lib/test/test_bz2.py(copie de travail) @@ -86,7 +86,7 @@

[issue5863] bz2.BZ2File should accept other file-like objects.

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > * The read*() methods are implemented very inefficiently. Since they > have to deal with the bytes objects returned by > BZ2Decompressor.decompress(), a large read results in lots of > allocations that weren't necessary in the C implementation. It probably de

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Antoine, I am not talking about python, I am talking about the UNIX standarization process. In particular, how a new flag (for filesystems) in an OS can be "skipped" and not being reused for some other purpuse in other OS. Off topic for python, but curious t

[issue11017] optparse: error: invalid integer value

2011-01-26 Thread Éric Araujo
Éric Araujo added the comment: That change has been done in Python 3. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue11017] optparse: error: invalid integer value

2011-01-26 Thread hensing
hensing added the comment: Shouldn't it be better to parse only numbers with prefix "0o" "0o72" as an octal number? So it would be consistent to hex and bin (0x and 0b). -- ___ Python tracker ___

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But now I am wondering... Which organization defines flags like > S_IFSOCK or S_IFIFO?. Posix members?. I am worried about flag > collision between OSs. They are defined unconditionally in Lib/stat.py. > For instance, if DOORS were a real flag defined in Sol

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Given the behaviour of Solaris DOORS, the flags selected are very cleverly chosen. Sensible engineering :). But now I am wondering... Which organization defines flags like S_IFSOCK or S_IFIFO?. Posix members?. I am worried about flag collision between OSs.

[issue11017] optparse: error: invalid integer value

2011-01-26 Thread Éric Araujo
Éric Araujo added the comment: 08 is not a valid octal number. See http://docs.python.org/library/optparse#standard-option-types and http://docs.python.org/reference/lexical_analysis#integer-and-long-integer-literals Hope this helps. -- nosy: +eric.araujo resolution: -> invalid sta

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I do know, but when you are working inside a zone, I am not sure you > can count of that file being always present. Syslog even could be > disabled or not available inside a zone. Then you can just skip the test. > I am thinking about how to manage OS's with

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I do know, but when you are working inside a zone, I am not sure you can count of that file being always present. Syslog even could be disabled or not available inside a zone. I am thinking about how to manage OS's with no support for doors. Instead of cond

[issue11017] optparse: error: invalid integer value

2011-01-26 Thread hensing
New submission from hensing : OptionParser can't parse int "08" and "09". "8", "9" and "01..07" works. -- components: Library (Lib) files: minimal.py messages: 127106 nosy: hensing priority: normal severity: normal status: open title: optparse: error: invalid integer value type: crash ve

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thanks for the feature request. It seems trivial to implement, but not > trivial to test :). You can test against an existing file, such as "/var/run/syslog_door" (given its name, it is unlikely to be anything other than a door) --

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: All test_email and test_mailbox pass with mailbox.patch+BytesGenerator_handle_text.patch on Windows except one test: == ERROR: test_set_item (test.test_mailbox.TestBabyl) -

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Thanks for the feature request. It seems trivial to implement, but not trivial to test :). I assign this to myself. I will work on it after Mercurial migration is finished. Getting impatient :). -- assignee: -> jcea ___

[issue11011] More functools functions

2011-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: How the conversion from a recursive algorithm to an iterative one works depends on the specific algorithm involved. A trampoline does the job for tail calls, but not necessarily any other recursive algorithm. Factorial actually has a fairly trivial iterative al

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: This message will not help anyone. And it's not a chat, but because it seems i really made the horses gone grazy (direct translation of a german proverb): - msg127002: RDM, i didn't know all of that and i am really sorry. Now I am looking forward to do

[issue11016] Add S_ISDOOR to the stat module

2011-01-26 Thread Antoine Pitrou
New submission from Antoine Pitrou : Solaris has an additional kind of special files named doors. The standard headers define the following macro: #define S_ISDOOR(mode) (((mode)&0xF000) == 0xd000) Perhaps it would be nice to include the equivalent in the stat module. (although funnily

[issue10826] pass_fds sometimes fails

2011-01-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 'D' denotes a door file. There are several of them in the system; the > following ones (from /var/run) match the time stamp: Thanks for the explanation! > It's common for library routines to open a door and keep it open for > the entire process lifetime. >

  1   2   >