[issue1160] Medium size regexp crashes python

2012-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > This has probably been fixed in 3.3 in c67b7e0c818a. Then the issue may be closed? -- nosy: +storchaka ___ Python tracker ___ _

[issue9239] zipfile: truncating comment can corrupt the zipfile

2012-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Then the tests may still be added to test_zipfile? Yes, they may. Here is a patch with adapted for 3.3 tests only. -- Added file: http://bugs.python.org/file26216/zipfile_appendmode_comment_tests.patch ___ Pyth

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > On a side note, glancing at Python-3.3.0a4/Objects/rangeobject.c: > range_contains seems to iterate through the entire range whereas __contains__ > from the attached Range.py is O(1) See issue1766304. For int range.__contains__ is O(1), for custom types th

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2012-06-29 Thread Daniel Lenski
Daniel Lenski added the comment: Tim Golden, My preferred solution would be to replace the binary delete argument of the current NamedTemporaryFile implementation with finer-grained options: delete=False # don't delete delete=True # delete after file closed, current behav

[issue15222] mailbox.mbox writes without empty line after each message

2012-06-29 Thread lilydjwg
lilydjwg added the comment: Hi, Petri Lehtinen. That's a bug of mine. That mbox is made up by me for demo, not procmail which has the newline. However, a newline is indeed lost and in some way it does corrupt my real mbox. -- ___ Python tracker

[issue15227] Fatal Python error: PyEval_RestoreThread: NULL tstate on example script..

2012-06-29 Thread Thomas Maslach
New submission from Thomas Maslach : I've been running into a bug recently and reduced the code to the following: import Tkinter tk = Tkinter.Tk() window = Tkinter.Frame(tk) def onDestroy (event): pass window.bind ("", onDestroy) Just run and the following will be display

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: datetime.__dict__ is another attribute that behaves this way (i.e. doesn't exist for instances in CPython but does for PyPy). -- ___ Python tracker __

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks. I suspected that might be the case. Then the question becomes whether failing to fall back to the class attribute is the desired behavior, and if not, to update the documentation accordingly. -- ___ Pytho

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread R. David Murray
R. David Murray added the comment: This is true for most (all?) CPython classes that are implemented in C. For example io.StringIO instances do not have a __module__ attribute either. -- nosy: +r.david.murray ___ Python tracker

[issue9670] Exceed Recursion Limit in Thread

2012-06-29 Thread Ned Deily
Ned Deily added the comment: Looks like using clang brought the size back down again. Closing. -- status: open -> closed ___ Python tracker ___ _

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Glenn Linderman
Changes by Glenn Linderman : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Glenn Linderman
Glenn Linderman added the comment: Ah, so then it would require a new API to make the Python code as smart as the C code, max is too general. Issue 15016 is an example of Python code that could benefit from knowing in constant time if the string contained only characters < 128, or if the stri

[issue15225] Add negative tests for passing str to hmac.HMAC and hmac.new

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: You don't need to call self.fail(), assertRaises() will do it for you. -- nosy: +pitrou ___ Python tracker ___

[issue6021] itertools.grouper

2012-06-29 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue13792] The "os.execl" call doesn't give programs exit code

2012-06-29 Thread Tim Golden
Tim Golden added the comment: Closing as it's been pending for six months and I see nothing further to add -- stage: -> committed/rejected status: pending -> closed ___ Python tracker

[issue4485] fast swap of "default" Windows python versions

2012-06-29 Thread Tim Golden
Tim Golden added the comment: Effectively made redundant by PEP 397, implemented in 3.3 -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python tracker __

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2012-06-29 Thread Tim Golden
Tim Golden added the comment: Daniel. If you have any interest in this issue, would you mind summarising the state of affairs, please? I have no direct interest in the result but I'm happy to commit a patch or even to work one up if somone can come up with a single, concrete suggestion.

[issue798876] windows sys.path contains nonexistant directory

2012-06-29 Thread Tim Golden
Tim Golden added the comment: THis was fixed almost two years ago in Py3K. Won't fix for 2.7 -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
Yclept Nemo added the comment: On a side note, glancing at Python-3.3.0a4/Objects/rangeobject.c: range_contains seems to iterate through the entire range whereas __contains__ from the attached Range.py is O(1) -- ___ Python tracker

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
Yclept Nemo added the comment: >>> a=Range.Range(5,61,4) >>> ar=Range.Range(57,1,-4) >>> b=Range.Range(21,63,6) >>> br=Range.Range(57,15,-6) >>> list(a); list(ar); list(b); list(br) [5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57] [57, 53, 49, 45, 41, 37, 33, 29, 25, 21, 17, 13, 9, 5] [21,

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
Yclept Nemo added the comment: > max and min for a range object are already O(1) one-liners: true; dropping > As for __and__, it doesn't feel like a particularly natural operation to me, > given that a range object represents an *ordered* sequence of integers rather > than just a subset. Tr

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Tim Golden
Changes by Tim Golden : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2012-06-29 Thread Daniel Lenski
Changes by Daniel Lenski : -- nosy: +dlenski ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb4b184e5b33 by Tim Golden in branch '2.7': Issue #1677: Handle better a race condition between the interactive interpreter and http://hg.python.org/cpython/rev/bb4b184e5b33 New changeset 52af10209976 by Tim Golden in branch '3.2': Issue #1677: Ha

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Martin v . Löwis
Martin v. Löwis added the comment: What the C code finds quickly (in constant time) is that the maximum is <=127. Most code doesn't know (and doesn't care) what the actual maximum is. So I see no bug here. -- nosy: +loewis ___ Python tracker

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15226] max( str ) should be fast with PEP 393

2012-06-29 Thread Glenn Linderman
New submission from Glenn Linderman : This is stupid code, but it should be faster with PEP 393 than before, should it not? str = ' ' * 500 + "this is really a string examplewow!!!"; for ix in range( 9000 ): z = max(str) print("Max character: " + max(str)) While the new C API see

[issue15222] mailbox.mbox writes without empty line after each message

2012-06-29 Thread Petri Lehtinen
Petri Lehtinen added the comment: Since there's no empty line between the content of mail 2 and the "From " line of mail 3, the body of mail 2 isn't really terminated by a newline. Reading the message confirms this: >>> import mailbox >>> mbox = mailbox.mbox('mbox') >>> mbox[1].get_payload()

[issue15034] Devguide should document best practices for stdlib exceptions

2012-06-29 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue15148] shutil.which() docstring could be clearer

2012-06-29 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue15225] Add negative tests for passing str to hmac.HMAC and hmac.new

2012-06-29 Thread Marc Abramowitz
Marc Abramowitz added the comment: And here is the tiny patch to make it clear in the error message which of the 3 arguments had the wrong type -- I follow the convention followed in some TypeErrors raised in Lib/zipfile.py -- Added file: http://bugs.python.org/file26213/hmac.py.patch

[issue15158] Add support for multi-character delimiters in csv

2012-06-29 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue15225] Add negative tests for passing str to hmac.HMAC and hmac.new

2012-06-29 Thread Marc Abramowitz
New submission from Marc Abramowitz : I had been thinking of improving the error message for this case slightly -- and then couldn't find a test for this case so I'm adding one in the attached patch... -- components: Tests files: test_hmac.py.patch keywords: patch messages: 164348 nosy

[issue15139] Speed up threading.Condition wakeup

2012-06-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: Currently negative timeouts are treated as zero timeouts by Condition.wait(). The patches turns them into errors. -- ___ Python tracker ___

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-06-29 Thread pmoody
pmoody added the comment: one more patch, superseding the last patch. also reported externally, the v6 parser would incorrectly parse some v6 addresses. http://code.google.com/p/ipaddr-py/issues/detail?id=97 -- Added file: http://bugs.python.org/file26211/ipaddress-bytes-str-v6-parsi

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-06-29 Thread Eric V. Smith
Eric V. Smith added the comment: Serhiy: I'm not sure what you're saying. At the point that str.format() is producing its error message, it doesn't know as much as %-formatting does about the original arguments, so it can't produce a similar message. -- __

[issue9670] Exceed Recursion Limit in Thread

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > try appending a CC=clang to the ./configure for the 3.2 buildbot until > the clang changes are backported. Ok, done that. Can someone watch the next builds? -- ___ Python tracker

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> '%d' % ([],) Traceback (most recent call last): File "", line 1, in TypeError: %d format: a number is required, not list -- nosy: +storchaka ___ Python tracker __

[issue9670] Exceed Recursion Limit in Thread

2012-06-29 Thread Ned Deily
Ned Deily added the comment: 3x is now using clang to compile on 10.7 Lion; 32 is failing back to the Xcode 4 default of llvm-gcc which has proved problematic fox 3x. Rather than tweak the test again, try appending a CC=clang to the ./configure for the 3.2 buildbot until the clang changes ar

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-06-29 Thread pmoody
pmoody added the comment: Reported externally, ipaddress tries to parse 4 character strings as bytes. https://groups.google.com/forum/?hl=en_US&fromgroups#!topic/ipaddr-py-dev/j6FkeJtsBz4 -- Added file: http://bugs.python.org/file26210/ipaddress-bytes-str.diff

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- versions: +Python 2.7 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Chris Jerdonek added the comment: Also, FWIW, in PyPy the behavior is different. Datetime instances do have the __module__ attribute: Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:11) [PyPy 1.9.0] on darwin Type "help", "copyright", "credits" or "license" for more

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue9239] zipfile: truncating comment can corrupt the zipfile

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The bug is no longer there. Probably it is fixed in issue14399. Then the tests may still be added to test_zipfile? -- assignee: alanmcintyre -> nosy: +pitrou priority: high -> normal ___ Python tracker

[issue9670] Exceed Recursion Limit in Thread

2012-06-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue9670] Exceed Recursion Limit in Thread

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Re-opening. The test fails on 3.2 on the new Lion buildbot (but neither on 3.3 nor 2.7, it seems). See http://buildbot.python.org/all/builders/AMD64%20Lion%203.2 -- nosy: +lukasz.langa, pitrou ___ Python tracker

[issue9239] zipfile: truncating comment can corrupt the zipfile

2012-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Anyone may close the issue as "out of date"? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Tim Golden
Tim Golden added the comment: > Tim, you've got tabs in your 3.3 patch. Thanks, Antoine. I'll sort that out. (Goodness know how; none of my editors use tabs). > Other than that, I wonder why you wait for 100 ms in 3.3 but 10 ms in the > other versions? Ummm. Because they were written separat

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Tim, you've got tabs in your 3.3 patch. Other than that, I wonder why you wait for 100 ms in 3.3 but 10 ms in the other versions? -- ___ Python tracker ___

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: max and min for a range object are already O(1) one-liners: >>> a = range(3, 21, 5) >>> a[-1] if a.step > 0 else a[0] # max(a) 18 >>> a[0] if a.step > 0 else a[-1] # min(a) 3 As for __and__, it doesn't feel like a particularly natural operation to me, given

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
New submission from Yclept Nemo : Python 3.3 expands the range class but I would find some additional methods useful: min/max: provides O(1) time __and__: provides intersection: Range(...) & Range(...) examples: intersection #1: a=Range.Range(9,58,4) b=Range.Range(15,69,6) c=a&b print(c) Range

[issue15223] datetime instances lack __module__ attribute

2012-06-29 Thread Chris Jerdonek
New submission from Chris Jerdonek : Instances of datetime.datetime don't seem to have the '__module__' attribute even though the datetime class itself does. This seems to contradict Section 3.2 of the Python documentation about the standard type hierarchy (in the subsection called "Class inst

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Tim Golden
Changes by Tim Golden : Added file: http://bugs.python.org/file26208/issue1677-python32.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Tim Golden
Changes by Tim Golden : Removed file: http://bugs.python.org/file26207/issue1677-python32.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2012-06-29 Thread Tim Golden
Tim Golden added the comment: And here's the patch against 3.2 (essentially the 2.7 patch but allowing for the removal of RISCOS support) -- Added file: http://bugs.python.org/file26207/issue1677-python32.patch ___ Python tracker

[issue15220] Reduce parsing overhead in email.feedparser.BufferedSubFile

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Realistically, any performance improvement is 3.4-only now. -- nosy: +pitrou versions: +Python 3.4 -Python 2.7, Python 3.3 ___ Python tracker _

[issue15222] mailbox.mbox writes without end-of-line at the file end.

2012-06-29 Thread lilydjwg
lilydjwg added the comment: I think I got something wrong. It seems that it only happens when the last message is deleted. I've also made up a sample mbox attached. The code to reproduce: from mailbox import mbox mb = mbox('mbox') del mb[len(mb)-1] mb.close() -- status: pending -> op

[issue9216] FIPS support for hashlib

2012-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > _Please_ publicise the change a little better? Pretty please!? This changes haven't been committed in Python, so you probably want to post on the Fedora bug tracker instead. -- ___ Python tracker

[issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights

2012-06-29 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights

2012-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69f654f718f4 by Petri Lehtinen in branch '2.7': #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on flush() http://hg.python.org/cpython/rev/69f654f718f4 New changeset 13fb85ef0eea by Petri Lehtinen in branch '3.2': #5346: Preserve

[issue11626] Py_LIMITED_API on windows: unresolved symbol __imp___PyArg_ParseTuple_SizeT

2012-06-29 Thread Rainer Schaaf
Rainer Schaaf added the comment: Thanks, I tested it with 3.3beta1 and it works fine now. -- ___ Python tracker ___ ___ Python-bugs-

[issue15222] mailbox.mbox writes without end-of-line at the file end.

2012-06-29 Thread Petri Lehtinen
Petri Lehtinen added the comment: I cannot reproduce this on 3.2 or 2.7. My mailboxes always have an ending newline if the last message also has it. Only if the last message doesn't end in a newline, there's no newline in the end of the mbox. Furthermore, if a message doesn't end with a newli

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-29 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14327] replace use of uname in the configury with macros set by AC_CANONICAL_HOST

2012-06-29 Thread Matthias Klose
Matthias Klose added the comment: that was checked in -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue15009] urlsplit can't round-trip relative-host urls.

2012-06-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: Look at the following two bugs which dwelt on similar issues: Issue8339 and Issue7904 and in one message particular, msg102737, I seem to have come to a conclusion that " I don't see that 'x://' and 'x:///y' qualifies as valid URLS as per RFC 3986" and it

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3d7a75e945ee by Petri Lehtinen in branch '2.7': #9559: Don't call _pre_mailbox_hook more than once http://hg.python.org/cpython/rev/3d7a75e945ee New changeset 7cf5a629fde2 by Petri Lehtinen in branch '3.2': #9559: Don't call _pre_mailbox_hook more

[issue15009] urlsplit can't round-trip relative-host urls.

2012-06-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: Let me address this one thing at a time, the point on smb really confused me and I got into thinking that how smb (being more common), the issue was not raised. Looks smb url will always start with smb:// (// are the requirements for identified netloc, empty

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-29 Thread Larry Hastings
Larry Hastings added the comment: WFM. That is, unless people want to bring up additional only-tangentially-related topics to annoy Hynek ;-) How about those ? They're really having a year of it, aren't they! -- ___ Python tracker

[issue15217] os.listdir is missing in os.supports_dir_fd

2012-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Storchaka: please take it up with Antoine, he's the defender of the realm for > POSIX-functions-are-atomic iirc. I'd be happy with dir_fd for os.listdir, > though it may be too late for 3.3 anyway. I know that this is possible (and relatively easy), but