[issue6071] no longer possible to hash arrays

2009-09-08 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Can this ticket be marked as a release blocker so it's not forgotten about for 2.7? -- ___ Python tracker <http://bugs.python.org/i

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Alright. So in Python 3.1, this is the behavior: >>> BaseException().message (attribute error) >>> BaseException("foo").message (attribute error) >>> BaseException("foo", "bar").message (attr

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Hm. That PEP is marked as rejected, though. I guess it was partially implemented, those changes included in the Python 2.5 release, and then it was decided that it was a bad idea, rejected, and the changes undone for 3.x (what about 2.7)? Or did

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: After looking at this more carefully, I find myself wondering what exactly is being deprecated at all. Brett said: > it's needed for anyone who came to rely on the feature in their 2.5 code from Python. Can someone help me understand what the fe

[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This also affects Twisted. We worked around it a couple months ago by putting a read-only `message` property onto our Exception subclass (Here's the revision: <http://twistedmatrix.com/trac/changeset/27062>). This seemed reasonable enough, b

[issue6843] No documentation for the module argument to warnings.filterwarnings

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Thanks for that Georg. I'm still having trouble with this. I'm aware that the issue tracking isn't the right place to ask for help with writing programs, but I think that since I still can't get this code to work, even looking at t

[issue6837] Mark the compiler package as deprecated

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Oops. I wrote "In contract" in my previous message. I meant "In contrast". -- ___ Python tracker <http://bu

[issue6837] Mark the compiler package as deprecated

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Hi Georg, thanks for your comment. I'm not sure I fully understand, though. The compiler package is widely used, okay. So I suppose that means that the desire here is to make those users happy? But the compiler package is deprecated, and has known

[issue6843] No documentation for the module argument to warnings.filterwarnings

2009-09-05 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : None of the documentation seems to cover this parameter. The test suite doesn't even seem to exercise it, either. What does it do? What kind of values are expected to be passed for it? -- assignee: georg.brandl components: Document

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-05 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Ah, thanks for the clarification, Philip. I've attached another patch updating those docs. -- ___ Python tracker <http://bugs.python.org/i

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-05 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : Added file: http://bugs.python.org/file14839/subprocess-conversion-doc.patch ___ Python tracker <http://bugs.python.org/issue5

[issue6837] Mark the compiler package as deprecated

2009-09-04 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Bugs are no longer being fixed in the compiler package. To me, that says it should be regular-deprecated. People with no short term plans of switching to Python 3 will still want to avoid the compiler package. They should be told about the deprecation

[issue6837] Mark the compiler package as deprecated

2009-09-04 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : According to http://docs.python.org/library/compiler.html, the compiler package is deprecated. However, importing the compiler package does not emit a deprecation warning. It should, to convey this information to people who are actually trying to use

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-03 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Hey Philip, I'm not sure I follow. The patch only changes the os module, not the subprocess module. What subprocess documentation do you think needs to be updated? -- ___ Python tracker

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-08-27 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Attached os-popen-list.patch which includes all of the earlier os-popen.diff and adds tests which fail without this patch and pass with it. They also pass on Python 2.5. The patch is against the Python 2.6 maintenance branch, but presumably it should be

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-08-27 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : Added file: http://bugs.python.org/file14791/os-popen-list.patch ___ Python tracker <http://bugs.python.org/issue5329> ___ ___ Python-bug

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-22 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I hope you'll also write some unit tests for privilege.py (actually, I hope you'll do test driven development on it). -- ___ Python tracker <http://bugs.python.

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It would still be nice to have the currently unimplemented platform wrappers added to the standard library, though. For example, as solinym pointed out, getresuid and getresgid are not currently wrapped at all. There may be other low-level APIs which may

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Maybe this should just be a third-party module for the time being? That removes the question of which stdlib module to add it to for now. Plus, since it's not just a straightforward platform API wrapper, it probably merits separate distribution t

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: If it's not a problem, then the invoker doesn't need to check the exit code of setup.py. Why are you resistant to exposing more information? -- ___ Python tracker <http://bugs.python.

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This makes it more easily possible for automated systems to detect that there was a problem with the build. Checking an exit code is easy. Grabbing and parsing stdout and stderr is hard and fragile. -- nosy: +exarkun

[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2009-07-26 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Here's a patch implementing part of the requested feature. pystones cannot tell the difference between tr...@head with or without this patch applied. Both report a maximum of 78125 pystones/second/ -- keywords: +patch nosy: +exarkun Added

[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Notice what it does to other dict keys: >>> simplejson.dumps({1: 1}) '{"1": 1}' In other words, I don't think this is a bug. It's how JSON works. JSON dict keys are str

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: The os module is mostly for wrappers around native platform APIs. So at the very least, I don't think such an API belongs there. It would fit in to a general process-related module, perhaps. -- ___ P

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It might be better to pick a better (but probably platform-specific) API for such a use-case. os.kill has a problem with false positives (on Linux it will tell you a process exists even when it doesn't). Looking in /proc/ or using a Windows A

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: For what it's worth, here are some timings from my system. First, os.kill without raising an exception: exar...@boson:~$ python -m timeit -s 'import os; pid = os.getpid()' ' os.kill(pid, 0) ' 100 loops, best of 3: 0.413 us

[issue6554] Do we have something like os.pid_exists()?

2009-07-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This is quite a microoptimization. Why do you think you need to avoid the exception here? -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue6

[issue6515] http://docs.python.org/dev/library/unittest.html#load-tests-protocol doesn't make it clear when load_tests support was introduced

2009-07-18 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : The load_tests feature will be new in 2.7. Earlier in the unittest documentation, there's a mention that loadTestsFromModule was changed in 2.7 to add support for load_tests. However, the main documentation for load_tests doesn't say anyt

[issue6514] "python -m unittest " does not run any tests

2009-07-18 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : exar...@boson:~$ cat > test_foo.py from unittest import TestCase class SomeTests(TestCase): def test_foo(self): pass exar...@boson:~$ python -m unittest test_foo -- Ra

[issue6485] is_finished not exported by zlib

2009-07-14 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This is a duplicate of #5210, which has a patch attached. -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue6

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2009-07-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > It's not, I was more thinking of push_str(foo), where it uses a default encoding. I think some people don't know what unicode or encoding is, or don't want to worry about it. Nice as it sounds, the problem with this is that those p

[issue1563] asyncore and asynchat incompatible with Py3k str and bytes

2009-07-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > It's not 'that' clear you should only work with bytes on a socket. It's pretty clear to me. :) That's what sockets can deal with - bytes. If you want to transfer something other than bytes via a socket, then you need to

[issue6377] distutils compiler switch ignored

2009-07-08 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Cool, thanks. PyCrypto also works again now. -- ___ Python tracker <http://bugs.python.org/issue6377> ___ ___ Python-bug

[issue6377] distutils compiler switch ignored

2009-07-08 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It looks like this change may have broken some parts of distutils. For example, Twisted's setup.py now produces this output when running the build_ext command: $ ~/Projects/python/trunk/python setup.py build_ext running build_ext Traceback (most r

[issue6410] Dictionaries should support __add__

2009-07-06 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Cool. I'm convinced. -- ___ Python tracker <http://bugs.python.org/issue6410> ___ ___ Python-bugs-list mailing list

[issue6410] Dictionaries should support __add__

2009-07-06 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: FWIW, here are some use cases: http://twistedmatrix.com/trac/browser/tags/releases/twisted-8.2.0/twisted/python/context.py#L32 http://twistedmatrix.com/trac/browser/tags/releases/twisted-8.2.0/twisted/python/log.py#L270 http://twistedmatrix.com/trac

[issue6410] Dictionaries should support __add__

2009-07-04 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > IIRC, Guido has previously rejected this suggestion and its variants. Got a link? It'd be nice to know what the rationale was. -- ___ Python tracker <http://bugs.python.or

[issue6410] Dictionaries should support __add__

2009-07-04 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Why so much opposition to the shorter spelling of .copy() & .update()? As Tim pointed out, lists, tuples, and strings all provide this shortcut. Why not dicts? -- nosy: +exarkun ___ Python tracker &

[issue6409] 2to3 generates malformed diffs

2009-07-03 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : I ran 2to3 over Twisted r27084 like this: time ~/Projects/python/trunk/python /home/exarkun/Projects/python/trunk/Tools/scripts/2to3 -j 4 twisted/ > 2to3.patch Visual inspection revealed some curious defects, and attempting to apply it failed like t

[issue6403] distutils builds extension modules to root package directory

2009-07-02 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue6403> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6397] Implementing Solaris "poll" in the "select" module

2009-07-01 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Solaris 10 introduced "The Event Completion Framework". I am not particularly familiar with Solaris, so I couldn't say whether it would be better to target this or the older /dev/poll. Some documentation suggests that "The Event Comp

[issue6367] Change the instruction pointer in python

2009-06-29 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: You're talking about adding a non-local goto feature to the language. This would be a huge change, and not one that is generally in the direction that any widespread languages (let alone Python itself) are going these days. Please raise this on o

[issue6313] test_with.py has a couple minor mistakes

2009-06-19 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : I found a couple mistakes in test_with.py with Pyflakes. -- components: Tests files: test_with.patch keywords: patch messages: 89530 nosy: exarkun severity: normal status: open title: test_with.py has a couple minor mistakes versions: Python 2.7

[issue6275] let unittest.assertRaises() return the exception object caught

2009-06-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I just want to second Kristján's position. I've used assertRaises a lot over the years (an implementation in a third-party unit testing library) and it is extremely common that I want the exception object to perform the kind of checks he is

[issue6289] compile() raises SyntaxError with confusing message for some decoding problems

2009-06-15 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Consider this source file: # coding: ascii ☃ It is not a valid Python program (for several reasons). The first problem encountered is that bytes representing SNOWMAN do not fit into ASCII, so the file cannot be decoded using the declared encoding

[issue4490] xml/sax/expatreader.py raises AttributeError when run

2009-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I found XMLGenerator in xml.sax.saxutils. Attached patch changes expatreader to use that instead. Though I have no idea what the point of this stanza is. I suppose it's to exercise the code, in lieu of some unit tests. It might be better to just d

[issue4180] warnings.simplefilter("always") does not make warnings always show up

2009-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: So how about it? -- ___ Python tracker <http://bugs.python.org/issue4180> ___ ___ Python-bugs-list mailing list Unsub

[issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0

2009-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Perhaps the C implementation should interpret the stacklevel parameter differently so that it is compatible with the Python implementation. The stacklevel value is, after all, a very important part of the interface of warnings.warn, as it is the only way

[issue2376] Set up "supported"-only buildbot waterfall view

2009-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This was done long ago, it seems. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue2376> ___ _

[issue3684] traceback.format_exception_only() misplaces the caret for certain SyntaxErrors

2009-06-04 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Any plans for a unit test for this change? -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue3684> ___ ___

[issue6188] Error Evaluating float(x) ** float(y)

2009-06-03 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Have you checked to see what the result of a ** b is? -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue6

[issue6130] There ought to be a way for extension types to associate documentation with their tp_new or tp_init methods

2009-05-27 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : If an extension type supplies a tp_new or tp_init, these will be invoked by the normal instantiation logic. They will also be exposed as `__new__´ and `__init__´ attributes of the type. However, there is no way to supply a docstring for these methods

[issue6128] Consequences of using Py_TPFLAGS_HAVE_GC are incompletely explained

2009-05-27 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Creation of GC'd types is explained at <http://docs.python.org/c-api/gcsupport.html>. The docs claim that PyObject_GC_Track must be called once an object created with PyObject_GC_New is initialized. The docs fail to explain what should be do

[issue6073] threading.Timer and gtk.main are not compatible

2009-05-27 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: pygtk doesn't release the GIL around its internal calls unless you call threads_init. So I think this is pretty clearly just a misuse of the pygtk library. There's nothing at all Python can do about it. If an extension library doesn't

[issue6116] frame.f_locals keeps references to things for too long

2009-05-27 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Oh, I forgot dictionaries aren't weakrefable. That's such a pain, I thought the third solution would be a good balance between easy and good. :/ Regarding the first solution, my only question right now is whether this should be a new attribute/

[issue6116] frame.f_locals keeps references to things for too long

2009-05-26 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : When a frame's f_locals attribute is accessed, one of two things happens: * If this is the first access, a new dictionary is created and it is populated with the locals from the frame (since they are not stored internally as a dictionary).

[issue6071] no longer possible to hash arrays

2009-05-22 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Perhaps Gregory has some idea about how this can most easily be resolved, since I think he did the work on #3745 which introduced this change in behavior. -- nosy: +gregory.p.smith ___ Python tracker <h

[issue6071] no longer possible to hash arrays

2009-05-22 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I would certainly like to, but unfortunately at present I am unable to. -- ___ Python tracker <http://bugs.python.org/issue6

[issue5064] compiler.parse raises SyntaxErrors without line number information

2009-05-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It seems a patch would be an enormous undertaking, as the data structure returned by the parser does not include this information, and the parser is written in C. I'll just hack around this somehow. Don't expect a pat

[issue5485] pyexpat has no unit tests for UseForeignDTD functionality

2009-05-20 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Here's a new patch which adds SetParamEntityParsing to the pyexpat library docs and adds another test for external entity reference handling. This is probably all I'll do on this ticket. -- Added file: http://bugs.python.org

[issue5767] xmlrpclib loads invalid documents

2009-05-20 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Here's a patch which removes sgmlop support from xmlrpclib. -- keywords: +patch Added file: http://bugs.python.org/file14023/xmlrpclib.patch ___ Python tracker <http://bugs.python.org/i

[issue6072] unittest.TestCase._result is very likely to collide (and break) with application-defined TestCase attributes

2009-05-20 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Here's a patch which renames `_result´ to `_resultForDoCleanups´. Another possibility would be for `doCleanups´ to take the result object as an argument. This would make it harder for applications to call directly, though (I've never wan

[issue6072] unittest.TestCase._result is very likely to collide (and break) with application-defined TestCase attributes

2009-05-20 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : r72219 introduced an `_result´ attribute to `TestCase´. As `TestCase´ is designed specifically with the intent that applications should subclass it -- and frequently -- I would suggest that the attribute be given a name less likely to collide with a

[issue6071] no longer possible to hash arrays

2009-05-20 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : It used to be possible to use hashlib with arrays; it no longer seems possible. exar...@charm:~$ python -c ' import sys, hashlib, array print sys.version_info print hashlib.sha1(array.array("b", [1, 2, 3])).hexdigest() '

[issue6007] distutils tricks you into thinking you can build extensions with mingw

2009-05-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > Even though I still don't understand the original issue, apparently, > it is an issue only if the localtime() function is used. Extensions > that don't use it might still work fine, according to the report. I have an extension which

[issue6007] distutils tricks you into thinking you can build extensions with mingw

2009-05-12 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Per issue3308, it is not really possible to build Python extensions with MinGW anymore (as far as I can tell). The distutils documentation is misleading in this regard, as is the continued existence of the build_ext --compiler=mingw32 option. The

[issue5840] "Thread State and the Global Interpreter Lock" section of the docs doesn't cover TLS APIs

2009-04-25 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Python includes several APIs for manipulating TLS: PyAPI_FUNC(int) PyThread_create_key(void); PyAPI_FUNC(void) PyThread_delete_key(int); PyAPI_FUNC(int) PyThread_set_key_value(int, void *); PyAPI_FUNC(void *) PyThread_get_key_value(int

[issue5767] xmlrpclib loads invalid documents

2009-04-16 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This actually appears to be an issue with the sgmlop-based parser, not the expat-based parser. After removing sgmlop, the exception-raising behavior is restored. Perhaps this bug should be closed as invalid, then. Only, I wonder if this is the right bug

[issue5767] xmlrpclib loads invalid documents

2009-04-15 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Prior versions of xmlrpclib.loads would raise an exception when passed malformed documents: exar...@bigdog24:~/_trial_temp$ python2.4 -c 'from xmlrpclib import loads; loads("\x00\n\n \n \n \n \n\n")' Traceback (most recent call la

[issue5571] new "TestCase.skip" method causes all tests to skip under trial (Twisted's test runner)

2009-03-27 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Hi Benjamin, Thanks for this fix. :) I noticed the revision in your comment doesn't seem to be the one that contains the fix though. -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/i

[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-03-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: /Any/ addCleanup that is successfully executed should cause the cleanup function to be called. Otherwise you have to define all your cleanup twice, and that's no fun. -- ___ Python tracker

[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-03-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > And maybe the addCleanup components could be a stack of callable objects? Yea, that's handy. My example didn't show it, but that's what trial implements. -- ___ Python tracker <h

[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-03-23 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Here's one: class ReactorShutdownInteraction(unittest.TestCase): """Test reactor shutdown interaction""" def setUp(self): """Start a UDP port""" self.serve

[issue5533] unittest can't deal with packages

2009-03-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: dpaste.com will eventually discard your proof. You should include all information for a bug report on the tracker. You can include the code in a comment or attach it to the ticket as a file. -- nosy: +exarkun

[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

[issue5496] codecs.lookup docstring is misleading

2009-03-15 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : codecs.lookup is documented as returning a tuple. It actually returns a what the registered lookup function returns, which really *should* be a codecs.CodecInfo instance. If a registered lookup function actually returns a tuple, then codecs.getreader

[issue5485] pyexpat has no unit tests for UseForeignDTD functionality

2009-03-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: To clarify, I'll probably work on this patch a bit more later, adding a few more tests for related behavior. -- ___ Python tracker <http://bugs.python.org/i

[issue5485] pyexpat has no unit tests for UseForeignDTD functionality

2009-03-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Here's the version I have now. I don't think it's complete, but it finishes the test started in the previous patch, and the test passes. -- Added file: http://bugs.python.org/file13323/use-fore

[issue5485] pyexpat has no unit tests for UseForeignDTD functionality

2009-03-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Thanks, that helped a bunch. I'm sure it would have taken me a long time to find SetParamEntityParsing(XML_PARAM_ENTITY_PARSING_ALWAYS). Perhaps it would also be good to expand the pyexpat documentation to cover that method and parameter (unless

[issue5485] pyexpat has no unit tests for UseForeignDTD functionality

2009-03-13 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Lacking unit tests for this (documented) functionality makes it harder for alternate Python runtimes to correctly provide it. Plus, if it's not tested, it might not work. I tried to write tests for the feature since I recently used it and thoug

[issue5420] Queue deprecation warning patch

2009-03-04 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Unit tests are a great thing as well. Also, the deprecation warnings you've added are the really annoying kind. They refer to users to the source of the deprecated methods themselves! A vastly preferable use of the warnings system is to refer use

[issue5380] pty.read raises IOError when slave pty device is closed

2009-02-27 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue5380> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5305] imaplib should support international mailbox names

2009-02-26 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > UTF-7 already sounds like something horrible for me, but a *modified* > UTF-7 encoding is something a little bit more strange for me. Why not > reusing directly UTF-7. UTF-7 wasn't horrible for its time, but its time has very likely

[issue5333] os.kill() inconsistency

2009-02-20 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Read the docs for kill(2). -1 is a completely legitimate PID. Recommend close as invalid. -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue5

[issue5305] imaplib should support international mailbox names

2009-02-20 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: IMAP4 UTF-7 is implemented in Twisted - <http://twistedmatrix.com/trac/browser/trunk/twisted/mail/imap4.py#L5385>, <http://twistedmatrix.com/trac/browser/trunk/twisted/mail/test/test_imap.py#L58>. Feel free to re-use any of that code that woul

[issue4565] Rewrite the IO stack in C

2009-02-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Hi Antoine, > > Surely the majority of the burden is imposed by the C implementation. I expect that 90% of the time spent fixing bugs will be spent fixing them in C. > Hmm, it depends. It's probably true in general, but I suspect a fair

[issue4565] Rewrite the IO stack in C

2009-02-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > We don't maintain any other features in two languages for those purposes. IMO, it will just be more of a burden to fix bugs in two different places as compared to the advantages you mention. Surely the majority of the burden is imposed

[issue4565] Rewrite the IO stack in C

2009-02-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > Oh, and "what to do of the now unused pure Python implementations in io.py"? Easiest would be to dump them, as they will probably get hopelessly out of sync, but perhaps there's some genuine portability/educational advantage to ke

[issue1941] 2.6 stdlib using with statement

2009-02-17 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker <http://bugs.python.org/issue1941> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1043706] External storage protocol for large email messages

2009-02-14 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker <http://bugs.python.org/issue1043706> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1053365] nntplib: add support for NNTP over SSL

2009-02-14 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker <http://bugs.python.org/issue1053365> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue805194] Inappropriate error received using socket timeout on Windows.

2009-02-14 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker <http://bugs.python.org/issue805194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-02-12 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : If pydoc is used to try to look up the documentation for a module which does not exist, this is reported reasonably: exar...@charm:~$ pydoc foobarbaz no Python documentation found for 'foobarbaz' exar...@charm:~$ However, if

[issue5172] python-dev tracker summary emails contain incorrect "median duration of open issues" information

2009-02-06 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : The weekly tracker summary emails sent to python-dev contain incorrect information. The value for the "median duration of open issues" it reports has recently wrapped around to 0 and started growing from there. Looking at older reports, it&#x

[issue3783] dbm.sqlite proof of concept

2009-02-04 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker <http://bugs.python.org/issue3783> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-04 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: -exarkun ___ Python tracker <http://bugs.python.org/issue3959> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2009-02-03 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > It's indeed possible to provide that as a third-party module; one > would have to implement an EntityResolver, and applications would > have to use it. If there was a need for such a thing, somebody would > have done it years ago. I do

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

2009-02-03 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Though it's inconvenient to do so, you can arrange to have the locator available from the entity resolver. The content handler's setDocumentLocator method will be called early on with the locator object. So you can give your entity resolver a

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

2009-02-03 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone : -- nosy: +exarkun ___ Python tracker <http://bugs.python.org/issue2124> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3783] dbm.sqlite proof of concept

2009-01-29 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Some comments on tmp_dev_shelver.py... Regarding SQLhash.__init__, it would be better to avoid relying on the "sqlite_master" table by using the CREATE TABLE IF NOT EXISTS form of table creation. Setting the isolation_level in __init__

<    1   2   3   4   >