[issue11492] email.header.Header doesn't fold headers correctly

2011-04-10 Thread R. David Murray
R. David Murray added the comment: This was quite the adventure. The more I worked on fixing the tests, the more if/else cases the existing splitting algorithm grew. When I reached the point where fixing one test broke two others, I thought maybe it was time to try a different approach

[issue11492] email.header.Header doesn't fold headers correctly

2011-04-10 Thread R. David Murray
R. David Murray added the comment: Note that this fix solves issue 11772, so I've closed that one as a duplicate. -- ___ Python tracker <http://bugs.python.org/is

[issue1028] Tkinter binding involving Control-spacebar raises unicode error

2011-04-10 Thread R. David Murray
R. David Murray added the comment: Nudge: report on the Ubuntu bug tracker that this is still an issue with 3.2: https://bugs.launchpad.net/bugs/517552 -- nosy: +r.david.murray versions: +Python 3.2, Python 3.3 ___ Python tracker <h

[issue11827] mention of list2cmdline() in docs of subprocess.Popen

2011-04-11 Thread R. David Murray
R. David Murray added the comment: I vote for (2) (I presume 'it' in that sentence is 'subprocess'). list2cmdline shouldn't be a "real" public method, at least not without the issues surrounding being given careful design attention

[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-11 Thread R. David Murray
R. David Murray added the comment: Patch mostly looks good to me, modulo some English wording that I'll fix up when I commit it. The issue with the '@' is that it might not be there. So you do need to check for that case (it means the domain part defaults to the 'local&

[issue11827] mention of list2cmdline() in docs of subprocess.Popen

2011-04-11 Thread R. David Murray
R. David Murray added the comment: Ah, right. I guess I was advocating that the docs be written from the perspective that list2cmdline doesn't exist as an identifiable entity. From the POV of the updated docs, it is just subprocess's behavior, and list2cmdline is an implementat

[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-11 Thread R. David Murray
R. David Murray added the comment: Hmm. You are correct. I thought the RFC's covered this case, but apparently they don't. The email package gets used in MUA contexts, where the domain part of the address may be omitted and the MUA must fill it in before transmitting the mess

[issue11828] startswith and endswith don't accept None as slice index

2011-04-11 Thread R. David Murray
R. David Murray added the comment: Well, if it is judged a bug (and it seems to me that it is), then it can get fixed in 2.7 and 3.2 (and yes I did confirm that the same bug is present in 2.7). It appears to be the result of startswith/endswith applying naive parsing to their arguments

[issue11834] wrong module installation dir on Windows

2011-04-12 Thread R. David Murray
R. David Murray added the comment: It's a doc issue. Doc issues are pretty much by definition easy in the sense of the easy keyword (doable in a day) (unless they are controversial), so we don't bother to attach the easy keyword to them. -- nosy: +r.da

[issue11830] "import decimal" fails in Turkish locale

2011-04-12 Thread R. David Murray
Changes by R. David Murray : -- nosy: +mark.dickinson, skrah ___ Python tracker <http://bugs.python.org/issue11830> ___ ___ Python-bugs-list mailing list Unsub

[issue10019] json.dumps with indent = 0 not adding newlines

2011-04-12 Thread R. David Murray
R. David Murray added the comment: Thanks, Sandro. -- assignee: bob.ippolito -> nosy: +r.david.murray resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://

[issue7484] smtplib: verify breaks with Postfix servers

2011-04-12 Thread R. David Murray
R. David Murray added the comment: Thanks for working on this. The tests seem to be missing, as is the line that adds 'clean' to the def, so the patches won't work as is. However, now that I've looked at the patch in more detail, adding a parameter to a public method is

[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-13 Thread R. David Murray
R. David Murray added the comment: For easy reference, here's a hash for that changeset that roundup will turn into a link: e727cf354720. TestIdempotent is already run for both the bytes and str cases (they are widely separated in the test file...I'll fix that at

[issue8809] smtplib should support SSL contexts

2011-04-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue8809> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-13 Thread R. David Murray
R. David Murray added the comment: OK, so when I went to apply this, I figured out that the patch isn't quite right. I've redone the doc updates, and am attaching a version of the patch containing them. The issue is that the place that the IDNA decode support needs to be added

[issue11782] email.generator.Generator.flatten() fails

2011-04-13 Thread R. David Murray
R. David Murray added the comment: I applied this as part of #11684. Thanks. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker <http://bugs.python

[issue11684] Add email.parser.BytesHeaderParser

2011-04-13 Thread R. David Murray
R. David Murray added the comment: Thanks for correcting my oversight :) -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue11684] Add email.parser.BytesHeaderParser

2011-04-13 Thread R. David Murray
Changes by R. David Murray : -- versions: -Python 3.2 ___ Python tracker <http://bugs.python.org/issue11684> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-13 Thread R. David Murray
R. David Murray added the comment: Yes, putting the function in _parseaddr is fine. And yes, 232 looks like a good place. The alternative would be understanding the rfc822 parser, which is pretty mind bending, and of doubtful additional benefit. (At most it would save a pair of split/join

[issue4537] webbrowser.UnixBrowser should use builtins.open

2011-04-14 Thread R. David Murray
R. David Murray added the comment: Despite the apparent similarity, your issue is something different from what was reported in this issue. Could you please open a new issue for your problem? -- nosy: +r.david.murray ___ Python tracker <h

[issue11731] Simplify email API via 'policy' objects

2011-04-14 Thread R. David Murray
R. David Murray added the comment: Éric did a review of the previous patch (mostly doc stuff) which should be pretty much addressed in this new version of the patch. I'd like to propose this version (modulo any forthcoming comments) for commit to trunk. I've removed some paramet

[issue11731] Simplify email API via 'policy' objects

2011-04-14 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file21662/policy_for_review.patch ___ Python tracker <http://bugs.python.org/issue11731> ___ ___ Pytho

[issue11731] Simplify email API via 'policy' objects

2011-04-14 Thread R. David Murray
Changes by R. David Murray : Added file: http://bugs.python.org/file21663/policy_for_review.patch ___ Python tracker <http://bugs.python.org/issue11731> ___ ___ Python-bug

[issue8326] Cannot import name SemLock on Ubuntu

2011-04-14 Thread R. David Murray
R. David Murray added the comment: Like Stefan says, use the default build options with the checkout. If it works, then the problem is an Ubuntu bug, and not a Python bug. -- ___ Python tracker <http://bugs.python.org/issue8

[issue11731] Simplify email API via 'policy' objects

2011-04-15 Thread R. David Murray
R. David Murray added the comment: What I hope is the final patch, after Barry's review, and Éric's second. -- Added file: http://bugs.python.org/file21674/policy_final.patch ___ Python tracker <http://bugs.python.o

[issue11701] email.parser.BytesParser().parse() closes file argument

2011-04-16 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray ___ Python tracker <http://bugs.python.org/issue11701> ___ ___ Python-bugs-list mailing list Un

[issue11700] mailbox.py proxy updates

2011-04-16 Thread R. David Murray
R. David Murray added the comment: Here's a patch that fixes the reported bug (calling close twice fails with an AttributeError) the simple way. Note that there was actually a test for the buggy behavior, which is rather odd considering that there is also a 'closed' method

[issue11700] mailbox.py proxy updates

2011-04-17 Thread R. David Murray
R. David Murray added the comment: Ah. Well, since the io module and its classes didn't exist when that code in mailbox.py was written, no, that's not what happened :) Nor does 'file like object' in Python necessarily mean conformance to the io specification. We a

[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-17 Thread R. David Murray
R. David Murray added the comment: Thanks. I should be able to look at this tomorrow. You are correct about the fact that Message currently doesn't do any decoding. That is part of the design: you get the string out of Message and use the helper decoding functions (decode_h

[issue11700] mailbox.py proxy updates

2011-04-17 Thread R. David Murray
R. David Murray added the comment: Updated patch addressing Stefen and Ezio's comments. -- Added file: http://bugs.python.org/file21699/mailbox_close_twice.patch ___ Python tracker <http://bugs.python.org/is

[issue11867] Make test_mailbox deterministic

2011-04-18 Thread R. David Murray
New submission from R. David Murray : Attached is a patch to remove the last sleeps from test_mailbox. I believe this makes the test suite deterministic. It also shaves 4 seconds of fixed overhead off the test run time. -- components: Tests files: mailbox_fork_with_ipc.patch

[issue11867] Make test_mailbox deterministic

2011-04-18 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue11867> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11828] startswith and endswith don't accept None as slice index

2011-04-18 Thread R. David Murray
Changes by R. David Murray : -- priority: -> normal ___ Python tracker <http://bugs.python.org/issue11828> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11492] email.header.Header doesn't fold headers correctly

2011-04-18 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue8769] Straightforward usage of email package fails to round-trip

2011-04-18 Thread R. David Murray
R. David Murray added the comment: This is fixed in 3.2/3.3 by the fix for issue 11492. The suggested fix for 2.7 is more radical than I'm comfortable with for a point release. I'm open to argument on that, but in the meantime I'm closing the issue with 11492 as

[issue1372770] email.Header should preserve original FWS

2011-04-18 Thread R. David Murray
R. David Murray added the comment: As of the fix for issue 11492, the email package only uses continuation_ws when folding RFC2047 encoded words. So I consider this issue fixed. (I have, by the way, come around to the view that we should never be introducing or deleting whitespace except

[issue5612] whitespace folding in the email package could be better ; -)

2011-04-18 Thread R. David Murray
R. David Murray added the comment: This now works correctly in 3.2/3.3 (see issue 11492). Note that the whitespace compression is too deeply embeded in the 2.7 email package for there to be any way to fix it there. -- resolution: -> duplicate stage: test needed -> com

[issue11867] Make test_mailbox deterministic

2011-04-19 Thread R. David Murray
R. David Murray added the comment: Thanks for testing this. I was afraid something like that would happen, since socket implementations are different on different platforms. I presume you ran it on OSX. Now I have to decide if I want to fix it, or if I should just switch to using threads

[issue11867] Make test_mailbox deterministic

2011-04-19 Thread R. David Murray
R. David Murray added the comment: I think the fix is to either put a try/except around the socket shutdown call, or to remove it entirely (I think things will still work right on linux without it). If you leave the self.c_sock_close = True in, it should take care of the resource warning

[issue11882] test_imaplib failed on x86 ubuntu

2011-04-19 Thread R. David Murray
R. David Murray added the comment: This is a repeatable error? What is your system timezone set to? The difference is exactly one half hour. Does the test pass if you change the calendar.timegm call to have '0' or '1' as the last element of the tuple instead of &#

[issue11873] test_regexp() of test_compileall failure on "x86 OpenIndiana 3.x"

2011-04-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue11873> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11889] 'enumerate' 'start' parameter documentation is confusing

2011-04-20 Thread R. David Murray
R. David Murray added the comment: If you know what an iterator is, the documentation, it seems to me, is clear. That is, an iterator cannot be indexed, so the behavior you expected could not be implemented by enumerate. That doesn't meant the docs shouldn't be improved. An exam

[issue8094] Multiprocessing infinite loop

2011-04-20 Thread R. David Murray
R. David Murray added the comment: Your code doesn't appear to have anything to do with the reported bug, which is about an infinite loop. But FYI to my understanding your script can't work on windows, since foo can't be imported. On linux, foo doesn't

[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-04-21 Thread R. David Murray
R. David Murray added the comment: My fix (and the tests) for this are wrong. decode_header returns (binary, charset) pairs, but the chunks list is (string, charset) pairs. -- stage: committed/rejected -> needs patch status: closed ->

[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-21 Thread R. David Murray
New submission from R. David Murray : I went to write a test that would trigger something if it was run on 3.3.0, and had to look in the source code to figure out what the hexversion for that would be. I think the hexversion algorithm should be documented in its sys entry

[issue11900] 2.7.1 unicode subclasses not calling __str__() for print statement

2011-04-21 Thread R. David Murray
R. David Murray added the comment: You subclassed unicode. So print printed the value of your unicode object, which didn't need coercion. -- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: ope

[issue11900] 2.7.1 unicode subclasses not calling __str__() for print statement

2011-04-21 Thread R. David Murray
R. David Murray added the comment: For the record, this isn't as simple as I made it sound. See, for example, issue 9196. -- ___ Python tracker <http://bugs.python.org/is

[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-04-21 Thread R. David Murray
R. David Murray added the comment: Note that when this is fixed, make_header on the return value from decode_header will fail because it doesn't know now to handle unknown-8bit. -- ___ Python tracker <http://bugs.python.org/is

[issue11900] 2.7.1 unicode subclasses not calling __str__() for print statement

2011-04-21 Thread R. David Murray
R. David Murray added the comment: Well, it's possible I'm wrong and you've found a bug. There are numerous differences between 2 and 3 in both string handling and special method handling, though, so it may be hard to pin down. If you poke around a bit more and still th

[issue11909] Doctest sees directives in strings when it should only see them in comments

2011-04-22 Thread R. David Murray
Changes by R. David Murray : -- stage: -> patch review type: -> feature request versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/i

[issue11873] test_regexp() of test_compileall failure on "x86 OpenIndiana 3.x"

2011-04-22 Thread R. David Murray
R. David Murray added the comment: Given that it happens randomly I suspect a timing issue, but without having reviewed the code in question. I'm not sure when I'll have time to look at this. -- ___ Python tracker <http://bu

[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2011-04-22 Thread R. David Murray
Changes by R. David Murray : -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue9319> ___ ___ Python-bugs-list mailing list Unsubscri

[issue11882] test_imaplib failed on x86 ubuntu

2011-04-25 Thread R. David Murray
R. David Murray added the comment: Yeah, I looked at the source of calendar.gmtime, and it turns out it ignores the isdst flag, which it also seems should be irrelevant anyway, looking at the test code again. I tried setting my /etc/localtime to /usr/share/zoneinfo/posix/Asia/Calcutta

[issue11917] Test Error

2011-04-25 Thread R. David Murray
R. David Murray added the comment: For the record: yes this is the way regrtest works when a test named on the command line doesn't exist. Not pretty, I'll grant you. Maybe someone will propose a patch/feature request to improve the error message some day. -- nosy: +r.da

[issue11917] Test Error

2011-04-25 Thread R. David Murray
R. David Murray added the comment: Your best resources would probably be the python mailing list (python-list, see http://mail.python.org) which is also comp.lang.python, or the #python irc channel on freenode. -- ___ Python tracker <h

[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread R. David Murray
R. David Murray added the comment: Thanks! I tidied up the ReST formatting a bit and changed the bit numbering to the more standard left to right order (standard for bit fields...I realize hexversion is a number, but conceptually one deals with it as a bit field). -- resolution

[issue11882] test_imaplib failed on x86 ubuntu

2011-04-26 Thread R. David Murray
R. David Murray added the comment: So this is probably not a python problem at all, but a problem with your system c library time functions. time.mktime is a thin wrapper around the mktime libc call. Perhaps you could write a short C program to test it? I've added Barry as nosy sin

[issue11926] help("keywords") returns incomplete list of keywords

2011-04-27 Thread R. David Murray
R. David Murray added the comment: As part of fixing this we should add a unit test to pydoc that goes something like this: assertEqual(sorted(pydoc.Helper.keywords.keys())), sorted(keyword.kwlist)) -- nosy: +r.david.murray ___ Python tracker

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: We don't ship unless all tests pass on all of our test platforms (and we have quite a few). If you look at that test it says the regex "should match 'ls -ld /.' on any posix system, however perversely configured". Perhaps your

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: The re matches for me if I call it manually with your ls -ld output. What output do you get if you do a 'print commands.getstatus("/.")' using your build of the python interpreter? By the way, this is a deprecated function under test

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: Hmm. This is very odd. The output from getstatus is the same as your ls output, and that output passes the re. Python has its own regular expression implementation, so your pcre version shouldn't have anything to do with it. That complicated re, b

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: You are running selinux, right? Have you checked for things in the log that might indicate selinux is blocking the ls call for some reason? -- ___ Python tracker <http://bugs.python.org/issue11

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: I would say that coreutils is wrong to be appending a space. If a program were to parse the output of ls, it would reasonably expect the filename to be rendered exactly as it appears in the directory. That is, a program should treat a trailing space as

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: By the way, I wouldn't expect most programs to ever notice that trailing space parsing -l output, but if it also attaches the trailing space in regular ls output, *that* I would expect more programs would trip

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray
R. David Murray added the comment: Oh, drat. We could have figured this out much sooner if I'd been paying closer attention. I was testing based on current 2.7 tip instead of 2.7.1, and indeed this test bug was only recently (April 4th!) fixed. And the issue is indeed selinux; the fi

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-29 Thread R. David Murray
R. David Murray added the comment: No, if you take a look at tip, the problem is that bit of re is not covering all cases, and should look like this: [.+@]? # It may have special attributes. I assumed the "." was selinux, but I don't actually know, as I don't se

[issue11344] Add os.path.splitpath(path) function

2011-04-29 Thread R. David Murray
R. David Murray added the comment: Did you try a make distclean/configure/make? _thread.info is a new attribute introduced by a relatively recent patch. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-29 Thread R. David Murray
R. David Murray added the comment: Sorry, didn't see that you'd figured it out in the midst of your other comments not relevant to this bug. If the re were simpler it wouldn't actually be *testing* the function under test, and so would be a useless test. (It would show th

[issue11954] 3.3 - 'make test' fails

2011-04-29 Thread R. David Murray
R. David Murray added the comment: Just so you know, you aren't likely to get much help using this approach to bug reporting. A single, focused bug report is much more likely to get attention. You might also want to try starting with a "vanilla configure" and see how thin

[issue11954] 3.3 - 'make test' fails

2011-04-29 Thread R. David Murray
R. David Murray added the comment: A focused bug report would focus on *one* of the test failures (as in the failures from running a single test_x). Python3 does not support Berkeley DB out of the box, you need a third party library to get bdb support. You might be interested to look at

[issue11955] 3.3 : test_argparse.py fails 'make test'

2011-04-29 Thread R. David Murray
R. David Murray added the comment: The six error messages tell you that six different tests failed. Yes, the failures are probably all due to the same cause, but that's just how unit testing works. (And yes, the argparse tests are a bit more terse and difficult to understand than ma

[issue11954] 3.3 - 'make test' fails

2011-04-29 Thread R. David Murray
R. David Murray added the comment: test_distutils should not be dependent on the existence of rpm (if it references the system rpm it should skip if it doesn't exist). It is difficult to find someone willing to run a buildbot as the root user, so while we will see about fixing the test

[issue11959] smtpd cannot be used without affecting global state

2011-04-29 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue11959> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11964] Undocumented change to indent param of json.dump in 3.2

2011-04-30 Thread R. David Murray
R. David Murray added the comment: This change was made by Raymond in issue 5729. It is the only feature added by that patch; the missing versionchanged was an oversight and I don't think it makes any more likely that other features were added that weren't documented. If you ar

[issue11883] Call connect() before sending an email with smtplib

2011-04-30 Thread R. David Murray
R. David Murray added the comment: The call to connect() is not required in the first example, since the hostname is passed to the constructor in that case. Since these examples are about the email package rather than smtplib, I preferred to change the other examples to pass localhost to

[issue11935] MMDF/MBOX mailbox need utime

2011-04-30 Thread R. David Murray
R. David Murray added the comment: The problem with this patch is that it would also show 'new mail' if what had in fact happened was that a message had been *deleted* (see the comments at the beginning of the flush method). So actually fixing this is a bit more complicated. A

[issue11882] test_imaplib failed on x86 ubuntu

2011-04-30 Thread R. David Murray
R. David Murray added the comment: Kasun, were you able to reproduce the problem (or show it doesn't happen) calling mktime directly from C? -- resolution: -> invalid stage: -> committed/rejected status: open -> pending ___ Python

[issue11873] test_regexp() of test_compileall failure on "x86 OpenIndiana 3.x"

2011-04-30 Thread R. David Murray
R. David Murray added the comment: The failing test is launching a subprocess to compile python code, waiting for the subprocess to exit, and then checking to see if the file was created. So the timing issue would appear to be that the file created by the subprocess doesn't appear to

[issue11967] Left shift and Right shift for floats

2011-04-30 Thread David Albert Torpey
New submission from David Albert Torpey : I would like to left and right shift floats as a fast way to multiply or divide by a power of 2 without rounding error. The only way to do that now is t=frexp(x) and y=ldexp(t[0],t[1]+2). But would be better to type y=x<<2. Tha

[issue11971] Wrong parameter -O0 instead of -OO in manpage

2011-05-01 Thread R. David Murray
R. David Murray added the comment: Thanks for catching that, and for the patch. -- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker <http://

[issue11834] wrong module installation dir on Windows

2011-05-02 Thread R. David Murray
Changes by R. David Murray : -- assignee: docs@python -> nosy: +brian.curtin, tim.golden ___ Python tracker <http://bugs.python.org/issue11834> ___ ___ Python-

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-03 Thread R. David Murray
R. David Murray added the comment: Running test_compileall with -F it failed on iteration 588 on my linux box. So this isn't platform specific. No idea why that particular test should be fragile, but I'll look in to it when I get some time if nobody beats me to it. --

[issue11988] special method lookup docs don't address some important details

2011-05-03 Thread R. David Murray
New submission from R. David Murray : The following code: class X(list): def __contains__(self, key): print('X contains:', key) class Y(): def __init__(self, x): self.x = x def __getattr__(self, key): retu

[issue11988] special method lookup docs don't address some important details

2011-05-03 Thread R. David Murray
R. David Murray added the comment: Well, then I suppose my question is why isn't __contains__ looked up? Other special methods that don't exist on Y do cause __getattr__ to be called. Why is __contains__ special? The docs for __getattr__ don't hint at this possibility eithe

[issue11988] special method lookup docs don't address some important details

2011-05-03 Thread R. David Murray
R. David Murray added the comment: Ah, that's what my problem is. My test example was poorly conceived (I used __del__!) so I *thought* the other special methods were triggering getattr. I'd have figured it out if I hadn't screwed up my test :( -- resolution: -

[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-04 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue11999> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue665194] datetime-RFC2822 roundtripping

2011-05-04 Thread R. David Murray
R. David Murray added the comment: Here is a patch that adds datetime support to email.utils.formatdate. Ultimately the email package will give programs access to datetime+timezone representations of the dates in various headers, so this provides the output end of the round trip. Alexander

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-04 Thread alejandro david weil
New submission from alejandro david weil : Python's documentation includes 2 source codes for alternate xrange implementations, which, at least in my tests, give unexpected results. # from file:///usr/share/doc/python2.6-doc/html/library/functions.html#xrange takewhile(lambda x:

[issue8158] Docstring of optparse.OptionParser incomplete

2011-05-04 Thread R. David Murray
R. David Murray added the comment: Thanks everyone. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.3 ___ Python tracker <http://bugs.python.o

[issue11935] MMDF/MBOX mailbox need utime

2011-05-04 Thread R. David Murray
R. David Murray added the comment: Not all system mail spools are mode 1777. Mutt needs to be setgid mail on systems that aren't, if I understand correctly. Making a python program setgid mail is a bit more of security issue than making a well-tested C program setgid, since it is easi

[issue11935] MMDF/MBOX mailbox need utime

2011-05-05 Thread R. David Murray
R. David Murray added the comment: Yes if you are a member of group mail you would not need setgid mail, obviously. The problem report in question was submitted by one of the Debian maintainers, so I have to believe that the system in question was not misconfigured. This part of the

[issue11935] MMDF/MBOX mailbox need utime

2011-05-05 Thread R. David Murray
R. David Murray added the comment: Steffen, your sense of humor is great, but oftentimes I have no clue what you are talking about. Where does ftruncate factor in? I was asking what mutt does when it modifies a file in the hopes that it had some pithy algorithm for making sure the mailbox

[issue12007] Console commands won't work

2011-05-05 Thread R. David Murray
R. David Murray added the comment: I believe this is out of scope for Python itself, and is a platform distribution issue. The platform must do some special magic to make those things work; they don't in a vanilla python build as far as I know. You might look to your readline configur

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-05 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy nosy: +r.david.murray stage: -> test needed type: crash -> behavior ___ Python tracker <http://bugs.python.org/i

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread R. David Murray
R. David Murray added the comment: I ran the patched version 2945 times without failure. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker <http://

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread R. David Murray
R. David Murray added the comment: Do you think we can get 9527 in? My patch was based on the non-existence of a LocalTimezone facility in the stdlib. Good point about the special interpretation of -. Given 9527 (and only given 9527) it would indeed make sense to restrict email to

[issue11873] test_regexp() of test_compileall fails occassionally

2011-05-05 Thread R. David Murray
R. David Murray added the comment: You are right that I got the regex wrong (I'm bad at regexes), but in fact it is fine the way it is. Since there's no r, the regex is actually "ba[^/]$", which is exactly what I meant. -- __

[issue11935] MMDF/MBOX mailbox need utime

2011-05-05 Thread R. David Murray
R. David Murray added the comment: "prepare new tail" means all of the text from the first modified line to the end? (As opposed to "just the new mail"?) mailbox does locking. I see no reason in principle it couldn't stat/restore, it would just be setting the tim

[issue11935] MMDF/MBOX mailbox need utime

2011-05-05 Thread R. David Murray
R. David Murray added the comment: Oh, and does mutt's behavior apply to any mbox, or only the one in the system spool? -- ___ Python tracker <http://bugs.python.org/is

[issue9527] Add aware local time support to datetime module

2011-05-05 Thread R. David Murray
R. David Murray added the comment: LocalTimezone support would be *really* helpful for the email module. It would allow us to have unambiguous semantics for datetime objects representing timestamps exacted from or inserted into email messages (see issue 665194 for recent discussion). The

<    28   29   30   31   32   33   34   35   36   37   >