[issue21493] Add test for ntpath.expanduser

2014-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But most other tests in this file use tester() to test str and bytes. And it would be good to test multicomponent arguments (e.g. '~test\\foo\\bar' and '~/foo/bar'). -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka

[issue10203] sqlite3.Row doesn't support sequence protocol

2014-05-25 Thread Claudiu.Popa
Claudiu.Popa added the comment: Thanks. Here's the updated patch. It supports negative indeces (my previous patch didn't do that). -- Added file: http://bugs.python.org/file35354/issue10203.patch ___ Python tracker rep...@bugs.python.org

[issue21493] Add test for ntpath.expanduser

2014-05-25 Thread Claudiu.Popa
Claudiu.Popa added the comment: Here's an updated patch. -- Added file: http://bugs.python.org/file35355/issue21493.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21493 ___

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2014-05-25 Thread Florent Xicluna
Florent Xicluna added the comment: I've been bitten by this issue with a custom psycopg2 mock. cur = mock.Mock() cur.connection.cursor.return_value = cur cur.reset_mock() RuntimeError: maximum recursion depth exceeded the patch looks ok, except the mix of tab and spaces :-) --

[issue12972] Color prompt + readline

2014-05-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the followup. This should be useful info for anyone who finds this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12972 ___

[issue21477] Idle: improve idle_test.htest

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7eea8f608c2 by Terry Jan Reedy in branch '3.4': Issue #21477: Idle htest: modify run; add more tests. http://hg.python.org/cpython/rev/d7eea8f608c2 -- ___ Python tracker rep...@bugs.python.org

[issue21477] Idle: improve idle_test.htest

2014-05-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: 0. I pushed a slight revision of the patch. See 2) for the main change. In htest, I also did 3), corrected some line spacing issues, and changed 'focussing' to the US spelling 'focusing'. A tested 2.7 version of the attached, htest-25052014-34.py, is top

[issue21477] Idle: improve idle_test.htest

2014-05-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, remove unscrollable (test2) tree widget (review response). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21477 ___

[issue8743] set() operators don't work with collections.Set instances

2014-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Added tests that include the pure python sets.Set(). Only the binary or/and/sub/xor methods are tested. The comparison operators were designed to only interact with their own kind. A comment from Tim Peters explains the decision raise a TypeError

[issue21576] Overwritten (custom) uuid inside dictionary

2014-05-25 Thread beta
beta added the comment: import copy ship = {'Name': 'Slagschip', 'Blocks': 5} shipData = copy.deepcopy(ship) # needed, otherwise linked-object shipData['uuid'] = Id # unique Id Is this the correct Python behavior? -- resolution: - not a bug ___

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

2014-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Stefan. For us, I don't see the need to add a restriction, possibly breaking code that is currently working fine (with high mode = low). The important part is that we now allow low==mode or high==mode and have a smooth transition to low==high.

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

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ea6c8eb91e2 by Raymond Hettinger in branch '3.4': Issue 13355: Make random.triangular degrade gracefully when low == high. http://hg.python.org/cpython/rev/7ea6c8eb91e2 -- ___ Python tracker

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

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6dc5c4ba7544 by Raymond Hettinger in branch '2.7': Issue 13355: Make random.triangular degrade gracefully when low == high. http://hg.python.org/cpython/rev/6dc5c4ba7544 -- ___ Python tracker

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

2014-05-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13355 ___

[issue21558] Fix a typo in the contextlib docs

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebeade01bd8e by Raymond Hettinger in branch '3.4': Issue 21558: Fix a typo in the contextlib docs http://hg.python.org/cpython/rev/ebeade01bd8e -- nosy: +python-dev ___ Python tracker

[issue21558] Fix a typo in the contextlib docs

2014-05-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +ncoghlan resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21558 ___

[issue21137] Better repr for threading.Lock()

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7574f94b1068 by Raymond Hettinger in branch 'default': Issue 21137: Better repr for threading.Lock() http://hg.python.org/cpython/rev/7574f94b1068 -- nosy: +python-dev ___ Python tracker

[issue21137] Better repr for threading.Lock()

2014-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Berker. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21137 ___

[issue15246] Line coverage for collectionts.abc.Set

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc353953ce8b by Raymond Hettinger in branch 'default': Issue 15246: Improve test coverage for collections.abc.Set. (Contributed by James King). http://hg.python.org/cpython/rev/dc353953ce8b -- nosy: +python-dev

[issue15246] Line coverage for collectionts.abc.Set

2014-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch. Nice work. -- resolution: - fixed status: open - closed versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15246

[issue21575] list.sort() should show arguments in tutorial

2014-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is there a reason why we do not show the arguments there? It was likely an oversight. I think it should be updated so that people know the options are there. -- nosy: +rhettinger ___ Python tracker

[issue21575] list.sort() should show arguments in tutorial

2014-05-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35358/sort_tut.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21575

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-05-25 Thread tholzer
tholzer added the comment: No problem, I've attached a patch for socket.py for Python 2.7.3. A few notes: getaddrinfo (and gethostbyname, etc.) are already immune to this bug, so I've just fixed the connect() call. The socket does need to be closed after EINTR, otherwise a EINPROGRESS might

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-05-25 Thread tholzer
tholzer added the comment: I've also attached a potential patch for the C module Modules/socketmodule.c inside internal_connect(). A few notes: This seems to work both without time-out and with time-out sockets (non-blocking). One concern would be a signal storm prolonging the operation

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-05-25 Thread tholzer
Changes by tholzer thol...@wetafx.co.nz: Added file: http://bugs.python.org/file35361/socketmodule_2.7.6_eintr_patch.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20611 ___

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-05-25 Thread tholzer
Changes by tholzer thol...@wetafx.co.nz: Removed file: http://bugs.python.org/file35360/socketmodule_2.7.6_eintr_patch.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20611 ___

[issue20664] _findLib_crle and _get_soname broken on latest SunOS 5.11

2014-05-25 Thread Jeff Quast
Changes by Jeff Quast cont...@jeffquast.com: Added file: http://bugs.python.org/file35363/opensolaris-ctypes-python-3.x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20664 ___

[issue20664] _findLib_crle and _get_soname broken on latest SunOS 5.11

2014-05-25 Thread Jeff Quast
Jeff Quast added the comment: Submitting fix to fallback to alternate '/usr/bin/dump' path, confirmed using SmartOS. As for the issues writing to /lib and /usr/lib from a zone, and the request for An environment variable .. to override this functionality. I have to disagree: crle(1) already

[issue21477] Idle: improve idle_test.htest

2014-05-25 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: Added file: http://bugs.python.org/file35364/htest-25052014-27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21477 ___

[issue21577] Help for ImportError should show a more useful signature.

2014-05-25 Thread Eric Snow
New submission from Eric Snow: Currently: __init__(self, /, *args, **kwargs) Proposed: __init__(self, /, *args, name=None, path=None, **kwargs) Even that is still a little vague, but at least it doesn't gloss over the kwonly args added in 3.3. -- components: Interpreter Core

[issue21578] Misleading error message when ImportError called with invalid keyword args

2014-05-25 Thread Eric Snow
New submission from Eric Snow: ImportError(spam='spam') Traceback (most recent call last): File stdin, line 1, in module TypeError: ImportError does not take keyword arguments However, it *does* take keyword arguments: ImportError(name='spam', path='spam') ImportError() --

[issue21343] os.path.relpath returns inconsistent types

2014-05-25 Thread Matt Bachmann
Matt Bachmann added the comment: Looking into the project im working on I discovered why relpath was acting strangely. It is because the project mocks get_cwd but not get_cwdu. Your request helped me track that down :-) So that is not an issue. However, the issue described in the original

[issue15767] add ModuleNotFoundError

2014-05-25 Thread Eric Snow
Eric Snow added the comment: Any chance we could revive ModuleNotFoundError? It's nice to be able to distinguish between the failure to *find* the module during import from other uses of ImportError. I'd definitely expect it to work the way Guido explained. Basically only

[issue16774] Additional recipes for itertools docs

2014-05-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16774 ___

[issue16774] Additional recipes for itertools docs

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2781fb146f4a by Raymond Hettinger in branch 'default': Issue 16774: Add a new itertools recipe (suggested by Alexey Kachayev). http://hg.python.org/cpython/rev/2781fb146f4a -- nosy: +python-dev ___

[issue16774] Additional recipes for itertools docs

2014-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: In the end, I decided to add a variant of take_last(). Thank you for the suggestion. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16774

[issue8743] set() operators don't work with collections.Set instances

2014-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3615cdb3b86d by Raymond Hettinger in branch '2.7': Issue 8743: Improve interoperability between sets and the collections.Set abstract base class. http://hg.python.org/cpython/rev/3615cdb3b86d -- nosy: +python-dev

[issue21558] Fix a typo in the contextlib docs

2014-05-25 Thread Berker Peksag
Berker Peksag added the comment: Thanks Raymond, will do. -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21558 ___

[issue21137] Better repr for threading.Lock()

2014-05-25 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21137 ___ ___

[issue21579] Python 3.4: tempfile.close attribute does not work

2014-05-25 Thread Марк Коренберг
New submission from Марк Коренберг: Suppose code: = import os import tempfile want_to_replace = 'zxc.dat' tmpdir=os.path.dirname(os.path.realpath(want_to_replace)) with tempfile.NamedTemporaryFile(dir=tmpdir) as fff: # do somewhat with fff here... and

[issue21580] PhotoImage(data=...) apparently has to be UTF-8 or Base-64 encoded

2014-05-25 Thread Martin Panter
New submission from Martin Panter: At the bottom of the “tkinter” doc page it mentions the “data” option is available. However I was unable to get it to work well when passing a plain bytes() string in. It seems the bytes() string gets interpreted as UTF-8 somewhere along the line, although

[issue21436] Consider leaving importlib.abc.Loader.load_module()

2014-05-25 Thread Eric Snow
Eric Snow added the comment: I'd rather see something like load_from_spec() added to importlib.util, a la issue #21235. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21436 ___

<    1   2