[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-09-29 Thread STINNER Victor
STINNER Victor added the comment: UserDict_self_and_dict_keywords_3.patch looks good to me. -- nosy: +haypo ___ Python tracker ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you all for your reviews. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c5407e1b0ec by Serhiy Storchaka in branch '2.7': Issue #22609: Constructor and the update method of collections.UserDict now https://hg.python.org/cpython/rev/4c5407e1b0ec New changeset 1869f5625392 by Serhiy Storchaka in branch '3.4': Issue

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___ Python-bugs-list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___ Python-bugs-list mailing list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I was pinging Raymond. He is maintainer of the collections module, this issue is assigned to his, and he had valid objections to previous version of the patch. Even one of this reason is enough to wait his review before committing. Thank you Raymond.

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-07-19 Thread Martin Panter
Martin Panter added the comment: Who are you pinging? I did just notice a minor English grammar problem (“one arguments”). But as far as I am concered you could have already committed the patch. -- ___ Python tracker rep...@bugs.python.org

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-07-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I will look at this more when I get a chance (likely this week). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-06-29 Thread Martin Panter
Martin Panter added the comment: Patch looks fine to me. I understand Yury withdrew his comment. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Martin's comments. -- versions: +Python 3.6 Added file: http://bugs.python.org/file39821/UserDict_self_and_dict_keywords_3.patch ___ Python tracker rep...@bugs.python.org

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-06-26 Thread Yury Selivanov
Yury Selivanov added the comment: Left some feedback in the code review. -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-05-30 Thread Martin Panter
Martin Panter added the comment: Left a couple pedantic comments. -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___ Python-bugs-list mailing list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-05-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please look at the new patch Raymond? This is the dependency for issue22958. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-03-30 Thread Berker Peksag
Berker Peksag added the comment: UserDict_self_and_dict_keywords.patch looks good to me. Is there a reason not to use assertWarnsRegex? Also, there are already collections.UserDict() usages in the test file, so I'd remove the from collections import UserDict import. -- nosy:

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Berker. Is there a reason not to use assertWarnsRegex? Initially the patch was written for 2.7. Fixing WeakValueDictionary in 2.7 needs first fix UserDict (issue22958). That is why I returned to this issue. Also, there are

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for UserDict, that keep current behavior, but allows to pass keys self and dict if positional parameter dict is specified. UserDict(self=42) {'self': 42} UserDict({}, dict=42) {'dict': 42} UserDict(dict={'a': 42}) {'a': 42} --

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So may be close this issue? See also issue22958. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-12-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] So what to do wish UserDict? I'm leaning in favor of leaving UserDict as-is. AFAICT, in the very long history of UserDict, this has never been a problem. So, I don't think there is an issue worth breaking the published API and possibly

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So what to do wish UserDict? Should we break backward compatibility and add support for self and dict keywords as in other dict-like types? -- ___ Python tracker rep...@bugs.python.org

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-12-01 Thread Ethan Furman
Ethan Furman added the comment: Fix `self` now, add a warning and single minor cycle deprecation period for 'dict'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-12-01 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: serhiy.storchaka - rhettinger priority: high - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-11-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 816c15fe5812 by Serhiy Storchaka in branch '3.4': Issue #22609: Constructors and update methods of mapping classes in the https://hg.python.org/cpython/rev/816c15fe5812 New changeset 88ab046fdd8a by Serhiy Storchaka in branch 'default': Issue

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-11-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd1ead4feddf by Serhiy Storchaka in branch '3.4': Issue #22609: Revert changes in UserDict. They conflicted with existing tests. https://hg.python.org/cpython/rev/cd1ead4feddf New changeset 167d51a54de2 by Serhiy Storchaka in branch 'default':

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unfortunately there is existing test for current behavior of UserDict: self.assertEqual(collections.UserDict(dict=[('one',1), ('two',2)]), d2) This looks wrong to me and I think we should break compatibility here. --

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-11-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3dfe4f0c626b by Serhiy Storchaka in branch '2.7': Issue #22609: Constructors and update methods of mapping classes in the https://hg.python.org/cpython/rev/3dfe4f0c626b -- ___ Python tracker

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-11-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks good. Go ahead and apply the first version of the patch. -- assignee: rhettinger - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-13 Thread Ethan Furman
Ethan Furman added the comment: Code looks good. Only downside is the change in help and inspect.signature output, but that is minor: Help on dict object: class dict(object) [...] | __init__(self, /, *args, **kwargs) vs. Help on class Counter in module collections: class

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-13 Thread Larry Hastings
Larry Hastings added the comment: FWIW, I agree that it should be fixed: dict(self=1) {'self': 1} -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: After some thought, I think we have to fix this. I'll go through the patch in careful detail this weekend. Ethan, if you would like to help, it would be great to have a third pair of eyes looking at the patch to make sure it correct it every detail.

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I thought that more verbose but straightforward code would be more acceptable. Well, here is smaller and clever patch. Tests are the same. -- Added file: http://bugs.python.org/file36886/collections_pos_only_params2.patch

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-12 Thread Ethan Furman
Ethan Furman added the comment: I will take a look. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___ Python-bugs-list mailing list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-11 Thread Evgeny Kapun
New submission from Evgeny Kapun: import collections collections.Counter(self=1) Traceback (most recent call last): File stdin, line 1, in module TypeError: __init__() got multiple values for argument 'self' collections.OrderedDict(self=test) Traceback (most recent call last): File stdin,

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-11 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-11 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___ Python-bugs-list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch nosy: +rhettinger, serhiy.storchaka stage: - patch review versions: +Python 2.7, Python 3.5 Added file: http://bugs.python.org/file36881/collections_pos_only_params.patch ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22609 ___ ___

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll spend some time taking this one under consideration. Keyword arguments for dicts and dict-like classes are already somewhat limited (only non-keyword identifiers) that why Guido resisted adding them in the first place. And, in the context of