[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-01-04 Thread Berker Peksag
Berker Peksag added the comment: Here is a follow-up list: * formatter module (will be removed in Python 3.6) * asynchat.fifo() (will be removed in Python 3.6) * buffering argument of bz2.BZ2File() (deprecated in 2011) * tarfile.filemode() (deprecated in 2012) * SO config var (sysconfig.get_conf

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-04 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Vajrasky. -- components: +Library (Lib) -Tests nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f859a61f5853 by Berker Peksag in branch '3.4': Issue #18644: Fix a ResourceWarning in formatter.test(). https://hg.python.org/cpython/rev/f859a61f5853 New changeset f374e4e6d04b by Berker Peksag in branch 'default': Issue #18644: Fix a ResourceWarni

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-04 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. Could you provide an example to reproduce the issue you described? -- nosy: +berker.peksag, orsenthil ___ Python tracker

[issue23132] Faster total_ordering

2015-01-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file37599/total_ordering2.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: I think that such a thing is meaningless, as I don't own copyright to the patches, my employer (Google) does. But, it can't hurt, so, done. -- ___ Python tracker ___

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can you submit a contributor agreement as well? -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue23001] Accept mutable bytes-like objects

2015-01-04 Thread Martin Panter
Martin Panter added the comment: If this goes ahead, it would be nice adding notes to the documentation saying that bytearray() or whatever was previously not supported. There are APIs in Python 2.6 that had similar treatment with no documentation updates, and I keep being bitten by it. -

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Since both patches will clobber each other (same test method), complicating the review process, I've written the patch for issue23086 first. It's currently waiting on committee review from my employer. Will upload to other issue, and once it's submitted or r

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Devin, you're welcome to whip-up a patch for the tests for this one. I don't know if it will go forward though. I'm leaving it open for a while to see if anyone has objections. If you want to work another straight-forward ABC patch, have a look at http:/

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: Right, but there's still no danger of overflow. On Sun, Jan 4, 2015, at 16:50, STINNER Victor wrote: > > STINNER Victor added the comment: > > PY_SSIZE_T_MAX is usually smaller than SIZE_T_MAX ;-) > > (strlen result is not signed.) > > -- > > ___

[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-01-04 Thread Martin Panter
Martin Panter added the comment: Another one to deal with one way or the other: html.parser.HTMLParser.unescape() It is apparently due to be removed in 3.5. It was meant to be an undocumented internal function, and there is now an public alternative. However I would be inclined to leave it aro

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread STINNER Victor
STINNER Victor added the comment: PY_SSIZE_T_MAX is usually smaller than SIZE_T_MAX ;-) (strlen result is not signed.) -- ___ Python tracker ___

[issue23167] Marshal docs say format version is 3; actual format version is 4

2015-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ac23d3242b4 by Benjamin Peterson in branch '3.4': the current marshal version is 4 (closes #23167) https://hg.python.org/cpython/rev/8ac23d3242b4 New changeset 826831a9a376 by Benjamin Peterson in branch 'default': merge 3.4 (#23167) https://hg.pyt

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: Presumably strlen can't return SIZE_T_MAX because the trailing '\0' has to have been allocated somewhere. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread STINNER Victor
STINNER Victor added the comment: +size_t argsize = strlen(arg) + 1; +if (argsize > PY_SSIZE_T_MAX/sizeof(wchar_t)) +return NULL; +res = PyMem_Malloc(argsize*sizeof(wchar_t)); The code doesn't check for integer overflow on "+1". I suggest instead: +size_t arglen = strle

[issue20606] Operator Documentation Example doesn't work

2015-01-04 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue23167] Marshal docs say format version is 3; actual format version is 4

2015-01-04 Thread Dmitry Kazakov
New submission from Dmitry Kazakov: Documentation on marshal module says that format version is 3, but Py_MARSHAL_VERSION is set to 4. Search for marshal-related issues gave me an idea that this is a documentation bug. -- assignee: docs@python components: Documentation files: marshal_d

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ce98e85929d by Benjamin Peterson in branch '3.2': add some overflow checks before multiplying (closes #23165) https://hg.python.org/cpython/rev/1ce98e85929d New changeset d1af6f3a8ce3 by Benjamin Peterson in branch '3.3': merge 3.2 (closes #23165)

[issue23163] pdb docs need to contain a statement on threads/multithreaded debugging

2015-01-04 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-04 Thread Jurijs Vorotilovs
New submission from Jurijs Vorotilovs: Python 2.7.9 has a bug in urllib2.py:urlopen(). It creates HTTPSHandler instances by its own when it should not. One may have assigned custom openers with subclassed HTTPSHandler or HTTPSHandler instance with debug enabled or etc. -- components: Li

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue23156] Update tix install information in tkinter tix chapter of doc

2015-01-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I found tix8.4.3.dll and pkgIndex.tcl inside tcl/tix8.4.3, which is not where the doc currently says to look. Christian Gollwitzer posted a response on the python-list thread "Python Tk Tix GUI documentation & builder overview and tips" (which helped inspire t

[issue23155] unittest: object has no attribute '_removed_tests'

2015-01-04 Thread Ian Cordasco
Ian Cordasco added the comment: Keep in mind, this could also be a problem with NetBSD's distribution of python. -- ___ Python tracker ___ ___

[issue23155] unittest: object has no attribute '_removed_tests'

2015-01-04 Thread Ian Cordasco
Changes by Ian Cordasco : -- nosy: +icordasc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23165] Heap overwrite in Python/fileutils.c:_Py_char2wchar() on 32 bit systems due to malloc parameter overflow

2015-01-04 Thread Guido Vranken
New submission from Guido Vranken: The vulnerability described here is exceedingly difficult to exploit, since there is no straight-forward way an "attacker" (someone who controls a Python script contents but not other values such as system environment variables), can control a relevant parame

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2015-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 98ee845a139a by Benjamin Peterson in branch '2.7': make SSLv23 the default version in ftplib (closes #23111) https://hg.python.org/cpython/rev/98ee845a139a -- resolution: -> fixed stage: -> resolved status: open -> closed

[issue20606] Operator Documentation Example doesn't work

2015-01-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Closed -- nosy: +asvetlov resolution: -> duplicate stage: -> resolved superseder: -> operator.setitem example no longer works in Python 3 due to lazy map ___ Python tracker ___

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2015-01-04 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I think that this fix should be applied also in 2.7 branch. -- nosy: +Arfrever, benjamin.peterson resolution: fixed -> stage: resolved -> status: closed -> open versions: +Python 2.7, Python 3.4 ___

[issue22956] Improved support for prepared SQL statements

2015-01-04 Thread mike bayer
mike bayer added the comment: prepared statements are, in proportion to the typical speed issues in Python (see my comparison benchmark at https://mail.python.org/pipermail/db-sig/2014-December/006147.html) a fairly small optimization that the DBAPI already allows for in an implicit sense, via

[issue23132] Faster total_ordering

2015-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: The metadata adjustments in Serhiy's patch had me thinking in terms of functools.wraps, but that rationale doesn't actually apply here (since the functions are only used in one place, and have a distinctive name rather than a generic one). I'd also missed that

[issue20606] Operator Documentation Example doesn't work

2015-01-04 Thread Gareth Rees
Gareth Rees added the comment: This is a duplicate of #22180, which was fixed in changeset 9c250f34bfa3 by Raymond Hettinger in branch '3.4'. The fix just removes the bad example, as in my patch. So I suggest that this issue be closed as a duplicate. -- ___

[issue23132] Faster total_ordering

2015-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The convert mapping is redundant, function name can be calculated from root and opname. __name__ and __doc__ can be assigned at import time. -- ___ Python tracker __

[issue23164] "pydoc filter" documentation restrictive

2015-01-04 Thread Eric O. LEBIGOT
New submission from Eric O. LEBIGOT: The pydoc documentation for filter reads: filter(function or None, sequence) -> list, tuple, or string Return those items of sequence for which function(item) is true. If function is None, return the items that are true. If sequence is a tu

[issue23161] collections.abc.MutableSet missing methods

2015-01-04 Thread Martin Panter
Martin Panter added the comment: For what it’s worth, every now and then I have to stop and remember that I can’t do this sort of thing: unsupported_keys = config_dict.keys().difference(supported_list) though it is not a big problem to rewrite it as unsupported_keys = config_dict.keys() - set

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Thanks for the patch! I was secretly hoping to write it though. :P Not sure how the code review tool works. The patch looks good to me, except it needs tests IMO. I can write them if you think this is not worth the effort. -- ___

[issue23161] collections.abc.MutableSet missing methods

2015-01-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: copy() should not be implemented magically, no. I understand the argument in favor of not implementing redundant methods, but if the redundancy was this big a concern, they should not have been added to sets in the first place. The current ABCs are inconsist

[issue23132] Faster total_ordering

2015-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't see "creating new functions" as an advantage. ABCs don't do this, nor does any other subclassing. It seems like an attempt to create a false illusion about where the code resides. This feels like feature creep with no real advantage that anyone

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: While this hasn't proven to be an issue to date (non-reflexive objects don't arise much in practice), the proposed change would make it easier to use the Sequence ABC to create classes that are interoperable with other sequences and that have the clean inva

[issue23143] Remove some conditional code in _ssl.c

2015-01-04 Thread Ned Deily
Ned Deily added the comment: Note that this change causes _ssl.so builds to fail on at least one buildbot, the OS X Tiger one, where the system OpenSSL version is 0.9.7. I've asked the buildbot owner to consider installing a local copy of a current OpenSSL. There may be other buildbots affec

[issue23163] pdb docs need to contain a statement on threads/multithreaded debugging

2015-01-04 Thread Karl Richter
New submission from Karl Richter: Due to the fact that `pdb` currently simply ignores breakpoints which are set and hit in another than the main thread the docs need to contain a statement on behavior in a multithreaded environment. -- components: Library (Lib) messages: 233409 nosy: k

[issue23161] collections.abc.MutableSet missing methods

2015-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The r-methods have already been implemented. Here's the difference as of Python 3.4.2: >>> set(dir(set)) - set(dir(collections.abc.MutableSet)) {'update', 'difference_update', 'symmetric_difference', 'intersection_update', 'intersection', 'issubset', 'issu

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: See Raymond Hettinger's comments in http://bugs.python.org/issue4296 for details on why the usual sequence behavior is deliberate. -- ___ Python tracker

[issue23161] collections.abc.MutableSet missing methods

2015-01-04 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23132] Faster total_ordering

2015-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, at least one error in my example: the return tuple should be "__gt__, __le__, __ge__". -- ___ Python tracker ___ __

[issue23156] Update tix install information in tkinter tix chapter of doc

2015-01-04 Thread Ned Deily
Ned Deily added the comment: I'm no expert on Tk but, as best I can tell, Tix is a very old third-party set of Tk extension widgets that has been made obsolete by the Ttk widget set integrated into standard Tk 8.5. See, for example, Kevin Walzer's comments here: http://www.thecodingforums.com

[issue23132] Faster total_ordering

2015-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: While I like the readability of Raymond's version, I think the main pay-off we're getting from the template based version is that each decorator invocation is creating *new* function objects. That creation of new function objects is what allows Serhiy's patch to

[issue19777] Provide a home() classmethod on Path objects

2015-01-04 Thread Mayank Tripathi
Mayank Tripathi added the comment: Added docs to mcsalgado's patch. -- nosy: +oquanox Added file: http://bugs.python.org/file37595/home.patch ___ Python tracker ___ _

[issue23157] Lib/test/time_hashlib.py doesn't work

2015-01-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: removing it would also be fine, it's not like it gets used anymore. the fixes were trivial. done. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue23157] Lib/test/time_hashlib.py doesn't work

2015-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset badb7e319ed0 by Gregory P. Smith in branch '3.4': fix issue23157 - time_hashlib hadn't been ported to Python 3. https://hg.python.org/cpython/rev/badb7e319ed0 New changeset b96985753613 by Gregory P. Smith in branch 'default': fix issue23157 - time_

[issue22256] pyvenv should display a progress indicator while creating an environment

2015-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: I have a vague recollection of originally using check_call, and then switching to check_output. However, that may have just been for testing related reasons, which could be better handled in the test suite, allowing users to see the pip installation output as a

[issue23162] collections.abc sequences don't check identity before equality

2015-01-04 Thread Devin Jeanpierre
New submission from Devin Jeanpierre: For sequence __contains__ and other scenarios, identity is checked before equality, which I've heard is so that "for x in y: assert x in y" doesn't ever fail with an AssertionError (even with NaN and so on). This is not the case for collections.abc-based s