[issue22770] test_ttk_guionly and test_tk can cause Tk segfaults on OS X when run with regrtest -j option

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if add root.update_idletasks() before root.destroy() in Lib/test/support/__init__.py? Does this fix the problem? -- assignee: - ned.deily type: - crash ___ Python tracker rep...@bugs.python.org

[issue22770] test_ttk_guionly and test_tk can cause Tk segfaults on OS X when run with regrtest -j option

2014-10-31 Thread Ned Deily
Ned Deily added the comment: Adding root.update_idletasks() before root.destroy() doesn't help by itself. As I noted in the Tk issue, to avoid the crash without changing Tk and while still destroying and creating roots/Tcl instances, it is necessary to get the open application Apple event

[issue22539] Table formatting errors in pydoc

2014-10-31 Thread Georg Brandl
Georg Brandl added the comment: Couldn't reproduce in 3.4.2. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22539 ___

[issue22771] shutil.make_archive() doesn't use its verbose argument

2014-10-31 Thread Georg Brandl
New submission from Georg Brandl: It seems like verbose should be passed to the archival function, but it isn't. -- components: Library (Lib) messages: 230324 nosy: georg.brandl priority: normal severity: normal status: open title: shutil.make_archive() doesn't use its verbose argument

[issue22770] test_ttk_guionly and test_tk can cause Tk segfaults on OS X when run with regrtest -j option

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, this code doesn't run on Mac OS at all (see issue18604). Does this patch fixes the problem? May be just root.update() would be enough. -- keywords: +patch Added file: http://bugs.python.org/file37082/issue22770.patch

[issue22613] Several minor doc issues

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset f72271f05ea4 by Georg Brandl in branch '3.4': #22613: fix several factual errors in builtin docs (thanks Jacques Ducasse) https://hg.python.org/cpython/rev/f72271f05ea4 New changeset 5faee3db42a7 by Georg Brandl in branch '3.4': #22613: explain

[issue22613] Several minor doc issues

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 60c6dc1b316f by Georg Brandl in branch '2.7': #22613: document Cmd.cmdqueue (thanks Jacques Ducasse) https://hg.python.org/cpython/rev/60c6dc1b316f New changeset d3fd218ef2cf by Georg Brandl in branch '2.7': #22613: minor other fixes in library

[issue22613] Several minor doc issues

2014-10-31 Thread Georg Brandl
Georg Brandl added the comment: All remaining points have been fixed. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22613

[issue22771] shutil.make_archive() doesn't use its verbose argument

2014-10-31 Thread Berker Peksag
Berker Peksag added the comment: verbose was used by _call_external_zip() (see https://hg.python.org/cpython/rev/a1d078b88247#l3.143), and _call_external_zip() was removed in issue 20744 (see https://hg.python.org/cpython/rev/681e20f8b717). Perhaps we can deprecate version arguments of

[issue22613] Several minor doc issues

2014-10-31 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22613 ___ ___

[issue22771] shutil.make_archive() doesn't use its verbose argument

2014-10-31 Thread Georg Brandl
Georg Brandl added the comment: That makes sense. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22771 ___ ___ Python-bugs-list mailing list

[issue22771] shutil.make_archive() doesn't use its verbose argument

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 335ff0c6d879 by Georg Brandl in branch '3.4': Closes #22771: verbose is unused; deprecate it. https://hg.python.org/cpython/rev/335ff0c6d879 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue17381] IGNORECASE breaks unicode literal range matching

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6f52a3d0f548 by Serhiy Storchaka in branch 'default': Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. https://hg.python.org/cpython/rev/6f52a3d0f548 New changeset 7981cb1556cf by Serhiy Storchaka in branch '3.4':

[issue22768] Add a way to get the peer certificate of a SSL Transport

2014-10-31 Thread Mathieu Pasquet
Mathieu Pasquet added the comment: Maybe transport.get_extra_info('socket').getpeercert(True) would be okay, no patch needed? Thanks, that indeed works; I don't know why I missed it while reading the source. Maybe the docs could use some clarification, though? (users are not supposed to know

[issue22768] Add a way to get the peer certificate of a SSL Transport

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Maybe transport.get_extra_info('socket').getpeercert(True) would be okay, no patch needed? That will be problematic with issue22560. The clear-text socket object and the SSL object become unrelated, and it would be logical for get_extra_info('socket') to

[issue19329] Faster compiling of charset regexpes

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebd48b4f650d by Serhiy Storchaka in branch '2.7': Backported the optimization of compiling charsets in regular expressions https://hg.python.org/cpython/rev/ebd48b4f650d -- ___ Python tracker

[issue17381] IGNORECASE breaks unicode literal range matching

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebd48b4f650d by Serhiy Storchaka in branch '2.7': Backported the optimization of compiling charsets in regular expressions https://hg.python.org/cpython/rev/ebd48b4f650d New changeset 6cd4b9827755 by Serhiy Storchaka in branch '2.7': Issue #17381:

[issue22772] doc error in __ifloordiv__ and __itruediv__

2014-10-31 Thread Lorenz Quack
New submission from Lorenz Quack: the doc string of __itruediv__ and __ifloordiv__ represent the operator as x/y and x//y respectively. This is obviously false and should be x/=y and x//=y patch attached -- assignee: docs@python components: Documentation files: inplace_div_doc.patch

[issue22772] doc error in __ifloordiv__ and __itruediv__

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 147518a95b60 by Georg Brandl in branch '3.4': Closes #22772: fix __ifloordiv__ and __itruediv__ docstring. https://hg.python.org/cpython/rev/147518a95b60 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue22772] doc error in __ifloordiv__ and __itruediv__

2014-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3f13f1620d70 by Georg Brandl in branch '2.7': Closes #22772: fix __ifloordiv__ and __itruediv__ docstring. https://hg.python.org/cpython/rev/3f13f1620d70 -- ___ Python tracker rep...@bugs.python.org

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
New submission from David Edelsohn: The patch for Issue19884 to set enable-meta-key to off does not work when readline-devel package is libreadline5, which includes SLES 11. -- components: Extension Modules messages: 230340 nosy: David.Edelsohn, haypo, pitrou priority: normal severity:

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: Patch attached to export version and skip test if version less than 0x600. -- type: - behavior Added file: http://bugs.python.org/file37084/Issue22773.txt ___ Python tracker rep...@bugs.python.org

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: Revised patch with leading underscores to make version objects private. -- Added file: http://bugs.python.org/file37085/Issue22773.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773

[issue22774] Weird S.rstrip() result

2014-10-31 Thread Szieberth Ádám
New submission from Szieberth Ádám: I just faced the following bug (v3.4.2): t1 = '#5 amarg (Concession)' t2 = '#6 ironman (Concession)' s = ' (Concession)' t1.rstrip(s) '#5 amarg' t2.rstrip(s) '#6 ironma' t1[:-len(s)] '#5 amarg' t2[:-len(s)] '#6 ironman' -- messages: 230343

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to see the bug fixed instead of being skipped :-/ Is there a way to fix the issue, but differently on readline 6.0? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773

[issue19884] Importing readline produces erroneous output

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: Issue22773 provides a patch to export Readline version and skip the test for earlier releases of libreadline where turning off enable-meta-key does not work. -- nosy: +David.Edelsohn ___ Python tracker

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: The portion of the patch to skip the test is necessary because, as mentioned in Issue19884, setting enable-meta-key does not work in older releases of libreadline. The particular combination of default TERM and libreadline is rare in old OS versions and can

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1 for the patch. -- stage: - patch review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773 ___

[issue22774] Weird S.rstrip() result

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: It may be unexpected, but it's not a bug. From the documentation: Return a copy of the string with trailing characters removed. The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to

[issue12728] Python re lib fails case insensitive matches on Unicode data

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are complete patch and script used to generate equivalence table. -- Added file: http://bugs.python.org/file37086/re_ignore_case_2.patch Added file: http://bugs.python.org/file37087/re_cases.py ___ Python

[issue17381] IGNORECASE breaks unicode literal range matching

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Antoine for your review. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17381

[issue9179] Lookback with group references incorrect (two issues?)

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I'm going to commit the patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9179 ___

[issue17717] Set up nasm from external.bat

2014-10-31 Thread Zachary Ware
Zachary Ware added the comment: Ok, I've imported nasm-2.11.06 to: http://svn.python.org/projects/external/nasm-2.11.06 I'll work on a patch for default and see what (if anything) will need to change in the openssl checkout. -- ___ Python

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: Oh, one thought - in testtools we split out 'docs for test writers' and 'docs for framework folk'. That would facilitate getting runTest out of test writers face while still documenting it appropriately. This has already been discussed in the past, and IIRC

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-10-31 Thread Tim Graham
New submission from Tim Graham: Expected: import pickle from http.cookies import SimpleCookie pickle.loads(pickle.dumps(SimpleCookie('hi=there'),2)) SimpleCookie: hi='there' # Actual SimpleCookie: hi='Set-Cookie: hi=there' Patch is based on the suggestion from Georg Brandl in #22758 (I

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-10-31 Thread Tim Graham
Tim Graham added the comment: By the way, this is my first patch for Python and I submitted a CLA 2 days ago. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22775 ___

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: +return list(set(matches)) Shouldn't this be sorted before being returned? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22143 ___

[issue22769] Tttk tag_has() throws TypeError when called without item

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank your for your report David. Here is a patch which fixes the bug and adds tests for Treeview.tag_has(). -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org

[issue11957] re.sub confusion between count and flags args

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: I agree about 767fd62b59a9, there should be tests for args passed both by position and as keyword args. Serhiy, do you think the enum solution is worth pursuing, or is it better to just turn those args to keyword-only (after a proper deprecation process)?

[issue17717] Set up nasm from external.bat

2014-10-31 Thread Zachary Ware
Zachary Ware added the comment: Fairly simple patch for default. -- keywords: +patch Added file: http://bugs.python.org/file37089/issue17717-default.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17717

[issue17717] Set up nasm from external.bat

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't say anything about the patch, but thank you for automating this! One less manual step :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17717

[issue22706] Idle extension configuration and key bindings

2014-10-31 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: -- nosy: +sahutd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22706 ___ ___

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: In normal HTML utf-8 works fine, doesn't it? It does, in fact as long as the encoding used by the browser matches the one used in the file, no charrefs needs to be used (except gt; lt; and quot;). Of course, if non-Unicode encodings are used, the range of

[issue22751] Fix test___all__ warning about modified environment

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: Are there cases where import locale might fail? If so, it should maybe be moved in the try, otherwise the patch LGTM. -- assignee: - ezio.melotti nosy: +serhiy.storchaka, zach.ware stage: - patch review ___ Python

[issue22758] Regression in Python 3.2 cookie parsing

2014-10-31 Thread Tim Graham
Tim Graham added the comment: FYI, I created #22775 and submitted a patch for the issue that SimpleCookie doesn't pickle properly with HIGHEST_PROTOCOL. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22758

[issue22776] SyslogHandler's record formatting during emit(..) not covered by try-except block

2014-10-31 Thread Yoel
New submission from Yoel: Not all exceptions occurring during SyslogHandler's emit(..) method are caught and handled since the try-except block only covers the latter part of the method. Thus, since handleError is not invoked, such exceptions might cause the whole program to crash, even

[issue22776] SyslogHandler's record formatting during emit(..) not covered by try-except block

2014-10-31 Thread Yoel
Changes by Yoel davidsony...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22776 ___ ___ Python-bugs-list mailing

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22775 ___

[issue22758] Regression in Python 3.2 cookie parsing

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22758 ___

[issue22751] Fix test___all__ warning about modified environment

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22751 ___

[issue22701] Write unescaped unicode characters (Japanese, Chinese, etc) in JSON module when ensure_ascii=False

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: The example works for me with both python 2 and 3. I'm going to close this in a while if OP doesn't reply. $ python2 -c import json; json.dump({'name': '港区'}, open('py2.json', 'w'), indent=4, separators=(',', ': '), ensure_ascii=False) cat py2.json {

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Naming it _READLINE_BUILDTIME_VERSION instead of _READLINE_VERSION would avoid ambiguity. -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773

[issue19884] Importing readline produces erroneous output

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19884 ___

[issue22680] unittest discovery is fragile

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: Does removing from unittest import * from somewhere fix the issue? Is this a bug in your code, or did that import reveal a bug in unittest? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22680

[issue22680] unittest discovery is fragile

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does removing from unittest import * from somewhere fix the issue? Yes. Is this a bug in your code, or did that import reveal a bug in unittest? Your choice :-) -- ___ Python tracker rep...@bugs.python.org

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: I am trying to follow the precedent of zlibmodule with the naming so that users of Python modules have as consistent an experience and user interface as possible. -- ___ Python tracker rep...@bugs.python.org

[issue22680] unittest discovery is fragile

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: btw, in case that's not clear from the traceback, discover was mistaking FunctionTestCase as one of my test classes (while it was just there because of the import *). -- ___ Python tracker rep...@bugs.python.org

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, I think there's no ambiguity here. Victor, are you ok with the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773 ___

[issue22680] unittest discovery is fragile

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or perhaps everything that has as a __module__ something which has the attribute __unittest = True? (the attribute is there for a reason, right?) -- ___ Python tracker rep...@bugs.python.org

[issue22680] unittest discovery is fragile

2014-10-31 Thread Michael Foord
Michael Foord added the comment: Ah. Test discovery is discovering FunctionTestCase and attempting to instantiate it as a test. And failing. Maybe discovery should special case that class and not treat it as a normal TestCase. -- ___ Python

[issue22680] unittest discovery is fragile

2014-10-31 Thread Ethan Furman
Ethan Furman added the comment: Michael Foord opined: - Maybe discovery should special case that class and not treat it as a normal TestCase. Not a bad idea. On the other hand, I don't believe unittest is advertised as supporting 'from ... import *', which *is* usually

[issue22680] unittest discovery is fragile

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22680 ___

[issue11957] re.sub confusion between count and flags args

2014-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the enum solution is worth pursuing, and that we need general class which represents the set of specified named flags. I'm working on implementation of enum.IntFlags. -- ___ Python tracker

[issue22581] Other mentions of the buffer protocol

2014-10-31 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___

[issue22678] An OSError subclass for no space left on device would be nice: NoSpaceError

2014-10-31 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22678 ___

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-31 Thread Lorenz Quack
Lorenz Quack added the comment: I couldn't find anything concerning order in the docs so I didn't see any reason the have them sorted. I'm not opposed to sorting them. I guess you could call me +0 on returning sorted(set(matches)) -- ___ Python

[issue10712] 2to3 fixer for deprecated unittest method names

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10712 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22751] Fix test___all__ warning about modified environment

2014-10-31 Thread Zachary Ware
Zachary Ware added the comment: It doesn't look like import locale can fail (import _locale can, but locale.py has emulation that would work with this patch). LGTM. -- stage: patch review - commit review versions: -Python 3.6 ___ Python tracker

[issue12458] Tracebacks should contain the first line of continuation lines

2014-10-31 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12458 ___ ___

[issue21278] Running the test suite with -v makes the test_ctypes and the test_zipimport erroneously reported as failed

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: If no one is able to reproduce it, I guess we can close it. OK you all receive updates even if the bug is closed, right? Yes. -- resolution: works for me - out of date stage: - resolved status: open - closed ___

[issue16518] add buffer protocol to glossary

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: See #22581. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518 ___ ___ Python-bugs-list mailing list

[issue13884] IDLE: Remove tear-off menu feature

2014-10-31 Thread Ezio Melotti
Ezio Melotti added the comment: I haven't seen any other program using it, so I wouldn't mind if they were removed. People with disabilities probably have better ways to deal with menus, but if adding the option is trivial it's probably better to add it. --

[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-10-31 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - patch review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22775 ___

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Ned Deily
Ned Deily added the comment: The patch doesn't take into account that the readline module may be linked with BSD libedit (as is the default on OS X and is preferred by some third-party distributors) rather than GNU readline. The patch causes the test to be incorrectly skipped on those

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Ned Deily
Ned Deily added the comment: Make that: The documented way of differentiating the two cases is by checking the __doc__ string for libedit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread STINNER Victor
STINNER Victor added the comment: In the past, I added sys.thread_info to be able to skip tests on some old platforms. Maybe we need something similar: an object with runtime version, build version, implementation name, etc. -- ___ Python tracker

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Matt Frank
Matt Frank added the comment: My platform is the Android command-line shell. Essentially it is like an embedded linux platform with a very quirky partially implemented libc (not glibc). It has no langinfo.h and while it has locale.h, the implementations of setlocale() and localeconv() do

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: @ned.deily Can you offer a suggestion of how you you like the skipIf test modified to check __doc__ for libedit? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Ned Deily
Ned Deily added the comment: Something like: @unittest.skipIf((libedit not in readline.__doc__) and (readline._READLINE_VERSION 0x6000), not supported in this library version) should work. -- ___

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: Okay, grouping was wrong in my initial attempt. New patch attached. -- Added file: http://bugs.python.org/file37090/Issue22773.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here is what other mutable types do: s = [] s.__iadd__(1) Traceback (most recent call last): File pyshell#1, line 1, in module s.__iadd__(1) TypeError: 'int' object is not iterable s = set() s.__ior__(1) NotImplemented from collections import

[issue22683] bisect index out of bounds issue

2014-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: treat the hi in the precondition in the same way as the lo parameter Originally, there was no special test for lo. The test was added only because negative lo value failed in an unfortunate way (with an infinite loop). No change to hi was made because

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Stefan Krah
Stefan Krah added the comment: Has anyone made an effort to get this fixed in Android? I find it strange that hundreds of projects now work around Android bugs instead of putting (friendly) pressure on the Android maintainers. Minimal langinfo.h and locale.h support should be trivial to

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread Ned Deily
Ned Deily added the comment: The test works OK with libedit now, thanks. But are you sure about the readline version test? Testing with a GNU readline 6.3: print('%x' % readline._READLINE_RUNTIME_VERSION) 603 so the test_readline check: readline._READLINE_VERSION 0x6000 causes the

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Matt Frank
Matt Frank added the comment: I am working on using my resources at Intel to put some pressure on Google to fix some of the (many) problems in the Bionic libc. I have a sort of polyfill library that implements locale.h, langinfo.h, as well as the structure definitions for wchar.h, and it

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Stefan Krah
Stefan Krah added the comment: To expand a little, here ... https://code.google.com/p/android/issues/list ... I cannot find either a localeconv() or an nl_langinfo() issue. Perhaps the maintainers would be willing to add minimal versions? --

[issue22777] Test pickling with all protocols

2014-10-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some pickling tests use only default protocol. Other tests use only lower protocols (0, 1, and may be 2). Proposed match makes all pickling tests using all existing protocols from 0 to HIGHEST_PROTOCOL inclusive. Also fixed some minor bugs. --

[issue22778] list's in-place add doesn't return NotImplemented when appropriate

2014-10-31 Thread Ethan Furman
New submission from Ethan Furman: -- s = [] -- s += 1 Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object is not iterable For comparison, when NotImplemented is appropriately returned the message looks like this: -- s -= 1 Traceback (most recent call

[issue22779] deque in-place addition does not return NotImplemented when appropriate

2014-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please don't replicate the same variant of the issue multiple times. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22779 ___

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Note, the += operation is conceptually similar to update() methods with are usually duck typeable: d = {} d.update(1) Traceback (most recent call last): File pyshell#16, line 1, in module d.update(1) TypeError: 'int' object is not iterable s =

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-10-31 Thread Ethan Furman
Ethan Furman added the comment: The behavior exhibited by set() is correct, and the behavior for array and bytearray are fine, as the error message is even more helpful. Issues opened for list (issue22778) and deque (issue22779). -- ___ Python

[issue22779] deque in-place addition does not return NotImplemented when appropriate

2014-10-31 Thread Ethan Furman
New submission from Ethan Furman: -- from collections import deque -- d = deque() -- d += 1 Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object is not iterable deque should be returning NotImplemented, which would generate a more appropriate error

[issue22778] list's in-place add doesn't return NotImplemented when appropriate

2014-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please don't replicate existing issues. Also, this behavior for lists is long-standing, tested, and designed by Guido. More than a little code relies on this behavior. -- assignee: - rhettinger nosy: +rhettinger resolution: - not a bug status:

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think I've changed my mind on this. The important distinction is not between ducktyping or cooperating. It's that this is an in-place mutating operation. A mutating operation should always be the responsibility of the receiver, and so it sounds wrong to be

[issue22779] deque in-place addition does not return NotImplemented when appropriate

2014-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: This behavior was intended. It was modeled after the behavior for lists. Any change here would break code such as: d = deque() d += 'abc' # This is specially allowed (note, we have a test for it) -- resolution: - not a bug status: open

[issue22773] Export Readline version and expect ANSI sequence for version 0x6000

2014-10-31 Thread David Edelsohn
David Edelsohn added the comment: The test should be 0x0600. -- Added file: http://bugs.python.org/file37092/Issue22773.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22773 ___

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-10-31 Thread Ethan Furman
Ethan Furman added the comment: https://docs.python.org/2/reference/datamodel.html#object.__iadd__ -- [...] These methods should attempt to do the operation in-place (modifying self) and return the result (which could be, but does

[issue22766] collections.Counter's in-place operators should return NotImplemented for unsupported types

2014-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: You misread that paragraph: For instance, to execute the statement x += y, where x is an instance of a class that has an __iadd__() method, x.__iadd__(y) is called. This is the present case, and the case of most mutable containers. If x is an instance of a

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread STINNER Victor
STINNER Victor added the comment: If the platform doesn't provide anything, we can maybe adopt the same approach than Mac OS X: force the encoding to UTF-8 and just don't use the C library. -- ___ Python tracker rep...@bugs.python.org

[issue22778] list's in-place add doesn't return NotImplemented when appropriate

2014-10-31 Thread Ethan Furman
Ethan Furman added the comment: My understanding was that if a different patch will be needed, it is not the same issue. Is that not correct? Here's the test: def test_iadd(self): ... self.assertRaises(TypeError, u.__iadd__, None) It would still pass, as returning

  1   2   >