[issue17794] Priority Queue

2013-04-26 Thread Daniel Wong
Daniel Wong added the comment: btw, I have a related patch: http://bugs.python.org/issue17834 Chances of it being accepted aren't looking good right now though. -- ___ Python tracker __

[issue17851] Grammar errors in threading.Lock documentation

2013-04-26 Thread Andriy Mysyk
Andriy Mysyk added the comment: submitting a patch for both grammar errors -- assignee: -> docs@python components: +Documentation keywords: +patch nosy: +docs@python Added file: http://bugs.python.org/file30029/issue17851.patch ___ Python tracker

[issue17851] Grammar errors in threading.Lock documentation

2013-04-26 Thread Andriy Mysyk
New submission from Andriy Mysyk: No need for comma in "which one of the waiting threads proceeds is not defined, and may vary across implementations." "Once a thread has acquired a lock, subsequent attempts to acquire it block, until it is released; any thread may release it" should read "are

[issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple

2013-04-26 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. I changed the patch according to your review comments. Here is the new version. -- Added file: http://bugs.python.org/file30028/aifc_2.patch ___ Python tracker __

[issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple

2013-04-26 Thread R. David Murray
R. David Murray added the comment: I made review comments: patch looks good, tests need a bit of work. Would you be interested in adding the What's New entry as well? (Doc/whatsnew/3.4). -- stage: -> patch review ___ Python tracker

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-26 Thread R. David Murray
R. David Murray added the comment: As I said in the review, thanks for working more on this. For the reason for (3), look at the test just before the ones you added. -- ___ Python tracker __

[issue17846] Building Python on Windows - Supplementary info

2013-04-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> needs patch versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17846] Building Python on Windows - Supplementary info

2013-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have also had problems, and I think the devguide needs a chapter on the subject. I have additional info from Steve Dower of MS to add. There are also proposed rewrites of the .bat files to be factored it to any doc. Thank you for your writeup. -- co

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think PseudoXxxFile should have close methods, but that the methods should not be called when they should not be. Rebinding sys.stdin should not close command line input. My perhaps naive thought is that initializing sys.__stdin__ to the original sys.stdin,

[issue17804] streaming struct unpacking

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I don't want the bikeshedding to last too long, so I committed the patch with docs. Thanks everyone! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <

[issue17804] streaming struct unpacking

2013-04-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset d232cff25bbd by Antoine Pitrou in branch 'default': Issue #17804: New function ``struct.iter_unpack`` allows for streaming struct unpacking. http://hg.python.org/cpython/rev/d232cff25bbd -- nosy: +python-dev ___

[issue17825] Indentation.offset and SyntaxError.offset mismatch

2013-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps Florent is pointing to the fact that for 'except X:', the syntax error is detected at the ' ' at offset 6 but the caret is backed up under the 't' at offset 5*, whereas it is not backed up to the space before 'open'. Which behavior do you propose t

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What if just use io.BufferedReader? > > if not isinstance(file, io.BufferedReader): > file = io.BufferedReader(file) > > (at start of _Unpickler.__init__) Two problems: 1. semantically, it is wrong; the BufferedReader will read bytes beyond the

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > A feature that may be actually nice to have in the pickle protocol would be some framing, to help with streaming unpickling (right now unpickling a stream can read almost one byte at a time, IIRC). > However, that would also make the protocol and the pickler

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: (note: I've updated PEP 3154 with framing and GLOBAL_STACK) -- ___ Python tracker ___ ___ Python-bug

[issue17804] streaming struct unpacking

2013-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think 'iter_unpack' is deceptive and wrong for the following reason. Up to now, 'ixyz' or 'iterxyz' or 'iter_xyz' has meant a version of 'xyz' that presents items one at a time rather than all at once in a collection object (usually in a list). Unpack return

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: A proof of concept hack to enable framing on pickle showed a massive performance increase on streaming unpickling (up to 5x faster with a C file object such as io.BytesIO, up to 150x faster with a pure Python file object such as _pyio.BytesIO). There is a slig

[issue17842] Add base64 module tests for a bytearray argument

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The argument should be tested, not the result. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue17803] Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError

2013-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Line 35 is "import sys" so sys imports within functions are superfluous, as well as contrary to current guidelines. There is another on 1033. Both were removed before 3.3, so this amounts to a 2.7 backport. It took me a moment to see that the unneeded conditio

[issue17827] Document codecs.encode and codecs.decode

2013-04-26 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: I was not aware that such things are placed in What's New. I just looked at such a document for 3.3... makes a lot of sense. -- ___ Python tracker __

[issue16316] Support xz compression in mimetypes module

2013-04-26 Thread R. David Murray
R. David Murray added the comment: I agree with Éric. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue16316] Support xz compression in mimetypes module

2013-04-26 Thread Éric Araujo
Éric Araujo added the comment: In my opinion supporting xz in the standard library is totally separate from keeping the mime types registry up to date. -- ___ Python tracker ___

[issue17842] Add base64 module tests for a bytearray argument

2013-04-26 Thread Kushal Das
Kushal Das added the comment: All the decoders create bytes as result, not sure how to assume if the result should be bytes or bytearray. -- ___ Python tracker ___ _

[issue17827] Document codecs.encode and codecs.decode

2013-04-26 Thread Ezio Melotti
Ezio Melotti added the comment: To advertise them? It should be explained that they are not new, but that now they are documented and can/should be used. -- ___ Python tracker

[issue17827] Document codecs.encode and codecs.decode

2013-04-26 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: So, why place them in What's New? -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-li

[issue17834] Add Heap (and DynamicHeap) classes to heapq module

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >From my multilingual experience I can say that priority queue is very rarely >used type of collections (but if it needed it is very usefull). On one hand, >Python stdlib already contains one such type, and this type will be good >enough in non-performance-c

[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-04-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl, larry stage: -> needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker ___

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is not important enough. We can defer fixing until a better patch will be proposed. In any case please add an explaining comment to your patch when committing it. Otherwise some future code will depend on self.stdin. -- _

[issue17834] Add Heap (and DynamicHeap) classes to heapq module

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: queue.PriorityQueue is a locked class for use in multi-threaded code. That's like saying Queue is a good substitute for list :-) OTOH, the proposed patch raises a lot of warning signs for me. I will wait for a decision on the feature's desirability before maki

[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would like to call this a critical regression. Under 2.7 and 3.2, all pickle protocols are affected. Under 3.3 and 3.4, pickle protocols 0 and 1 are affected. (unfortunately, 3.2 doesn't receive bugfixes anymore) -- nosy: +benjamin.peterson, pitrou pr

[issue16316] Support xz compression in mimetypes module

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Xz-related mimetypes was added because Python 3.3+ supports xz compression. Backporting them to 3.3 makes sense. But backporting to 2.7 is more questionable. -- ___ Python tracker

[issue17839] base64 module should use memoryview

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not only memoryview should be supported, but any class which supports the buffer protocol and is C-contiguous (i.e. array.array). -- nosy: +serhiy.storchaka ___ Python tracker _

[issue16662] load_tests not invoked in package/__init__.py

2013-04-26 Thread vila
Changes by vila : -- nosy: +vila ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman

[issue11218] pattern=None when following documentation for load_tests and unittest.main()

2013-04-26 Thread vila
Changes by vila : -- nosy: +vila ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman

[issue17842] Add base64 module tests for a bytearray argument

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Needed tests for decoders. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue17721] Help button on preference window doesn't work

2013-04-26 Thread Roger Serwy
Changes by Roger Serwy : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue17850] unicode_escape encoding fails for '\\Upsilon'

2013-04-26 Thread Edward K Ream
Edward K Ream added the comment: On Fri, Apr 26, 2013 at 8:51 AM, Edward K. Ream wrote: > > If this is not a bug, why does six define six.u as > unicode(s,"unicode_escape") for *all* u constants?? > Oops. The following works:: s = r'\\Upsilon' unicode(s,"unicode_escape") My apologies

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-04-26 Thread Roger Serwy
Roger Serwy added the comment: If we remove .close() then we'll need to then have an alternative way to allow "exit()" and "quit()" to actually close IDLE. The RPC proxy already transfers exceptions between the subprocess and the front-end, so we could catch the SystemExit exception and handle

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2013-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python 3.3 doesn't support HTTP/0.9 and doesn't have LineAndFileWrapper class. -- nosy: +christian.heimes, serhiy.storchaka versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue17850] unicode_escape encoding fails for '\\Upsilon'

2013-04-26 Thread R. David Murray
R. David Murray added the comment: Because as Ezio demonstrated, it produces the same result as using the 'u' prefix on the same string. -- nosy: +r.david.murray ___ Python tracker

[issue17850] unicode_escape encoding fails for '\\Upsilon'

2013-04-26 Thread Edward K. Ream
Edward K. Ream added the comment: Thanks for your quick reply. If this is not a bug, why does six define six.u as unicode(s,"unicode_escape") for *all* u constants?? -- ___ Python tracker

[issue17850] unicode_escape encoding fails for '\\Upsilon'

2013-04-26 Thread Ezio Melotti
Ezio Melotti added the comment: This is not a bug, \U should be followed by 8 hex digits and it indicates a Unicode codepoint: >>> '\\u0065'.decode('unicode_escape') u'e' >>> '\\U0065'.decode('unicode_escape') u'e' >>> '\\Upsilon'.decode('unicode_escape') Traceback (most recent call last):

[issue17850] unicode_escape encoding fails for '\\Upsilon'

2013-04-26 Thread Edward K. Ream
New submission from Edward K. Ream: On both windows and Linux the following fails on Python 2.7: s = '\\Upsilon' unicode(s,"unicode_escape") UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-7: end of string in escape sequence BTW, the six.py package uses this c

[issue17837] Support for building on ppc64p7

2013-04-26 Thread David Edelsohn
David Edelsohn added the comment: I meant I don't see the equivalent of your patch in the upstream repository, so no one from the Fedora community appears to have contributed something equivalent yet. -- ___ Python tracker

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2013-04-26 Thread R. David Murray
R. David Murray added the comment: Thanks for the report. Looks like it is a fairly rare case, which I suppose is why it hasn't been reported before. If the "could be" turns out to be sufficient, that should be enough for someone to write a test for this. The patch itself should be even easi

[issue17837] Support for building on ppc64p7

2013-04-26 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: Hmm, good point. I'll try to discuss with Fedora people who work on secondary arches. Thanks. -- ___ Python tracker ___ _

[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2013-04-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch is in attachment. I'm a bit worried about Python versions < 3.4 because this kinds of breaks backward compatibility as recv() is not expected to return None but I see no other saner solution. -- keywords: +patch Added file: http://bugs.python.

[issue17837] Support for building on ppc64p7

2013-04-26 Thread David Edelsohn
David Edelsohn added the comment: If you look at the top of config.sub it says: # Please send patches with a ChangeLog entry to config-patc...@gnu.org. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD I

[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2013-04-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I confirm I can reproduce this issue also in pyftpdlib: https://code.google.com/p/pyftpdlib/issues/detail?id=255 Current proposed patch returning '' is not ideal as for asynchat '' is an alias for 'connection lost'. In summary recv() in case of EAGAIN should

[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2013-04-26 Thread Kushal Das
Kushal Das added the comment: Patch along with a test for the same. -- keywords: +patch Added file: http://bugs.python.org/file30025/issue17826_v1.patch ___ Python tracker ___ __

[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2013-04-26 Thread Kushal Das
Kushal Das added the comment: Working on this. -- nosy: +kushaldas ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue17721] Help button on preference window doesn't work

2013-04-26 Thread Guilherme Simões
Guilherme Simões added the comment: Attached is a patch that removes the Help button from the Preferences window. Maybe it would be nice to have the Help button open a text file describing every possible option, but while this doesn't happen it is better to remove this button. -- keyw

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2013-04-26 Thread Miroslav Stampar
Miroslav Stampar added the comment: Mentioned "divine intervention" could be: 1) Argument strict should be set to 0/False when instantiating HTTPResponse 2) No status should be returned from the backend server (hence the "# assume it's a Simple-Response from an 0.9 server") 3) Any part of respo

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2013-04-26 Thread Miroslav Stampar
New submission from Miroslav Stampar: httplib module's auxiliary class LineAndFileWrapper contains a readline() method having no arguments (than self). It's being used in code where commented with "assume it's a Simple-Response from an 0.9 server" as a wrapper for response stream ("self.fp = L

[issue15693] expose glossary link on hover

2013-04-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17839] base64 module should use memoryview

2013-04-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2013-04-26 Thread Michael Foord
Michael Foord added the comment: This illustrates the difference: >>> from mock import Mock, create_autospec >>> some_list = [1, 2, 3] >>> m = Mock() >>> m.side_effect = some_list >>> m.side_effect >>> m2 = create_autospec(lambda: None) >>> m2.side_effect = some_list >>> m2.side_effect [1, 2, 3

[issue13355] random.triangular error when low = high=mode

2013-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Soonish -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue17848] issue about compile with clang and build a shared lib

2013-04-26 Thread leon zheng
New submission from leon zheng: build with prefix point to a arbitrary path, can't find the dynamic lib, and libffi upstream bug: ./configure --prefix=xxx --enable-shared --enable-ipv6 --with-threads CC=clang -- components: Build files: mywork.pitch messages: 187838 nosy: matrixsystem pr

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-26 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17839] base64 module should use memoryview

2013-04-26 Thread Kushal Das
Kushal Das added the comment: A patch with tests update to use memoryview in base64 module. -- keywords: +patch Added file: http://bugs.python.org/file30022/issue17839_v1.patch ___ Python tracker __

[issue13355] random.triangular error when low = high=mode

2013-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: Raymond: have you had time to look at this yet? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue17794] Priority Queue

2013-04-26 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue17794] Priority Queue

2013-04-26 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file30019/issue17794.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6028] Interpreter aborts when chaining an infinite number of exceptions

2013-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing as won't fix. There is no sane way around the current behaviour. -- resolution: -> wont fix status: open -> closed ___ Python tracker __