[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Éric Araujo
Éric Araujo added the comment: Feel free to commit the patch Andrew. You may want to document the new ABC class before the ABCMeta, as we expect that subclassing will become the preferred way. -- ___ Python tracker rep...@bugs.python.org

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9347869d1066 by Andrew Svetlov in branch 'default': Issue #16049: add abc.ABC helper class. http://hg.python.org/cpython/rev/9347869d1066 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Done. I prefer to leave existing class order in documentation. In general I agree with Eric that ABC should be before ABCMeta in the doc but now it has formalized as helper for metaclass with very short documentation. To put ABC first we need to transplate

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Bruno. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 The patch looks fine. Éric do you want to apply it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-07 Thread Bruno Dupuis
Bruno Dupuis added the comment: Éric, here is a full patch. I hope the doc isn't too confuse. I think we lack a word meaning 'has XXX as metaclass', we should imagine a term for that. -- keywords: +patch Added file: http://bugs.python.org/file28239/16049.patch

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-07 Thread Bruno Dupuis
Changes by Bruno Dupuis bdup...@lisael.org: Added file: http://bugs.python.org/file28240/16049.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-07 Thread Bruno Dupuis
Changes by Bruno Dupuis bdup...@lisael.org: Removed file: http://bugs.python.org/file28239/16049.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-06 Thread Éric Araujo
Éric Araujo added the comment: Bruno: do you want to propose an idea for the doc part? Or even a full patch for this request? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-02 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-02 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/issue16049 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-11-29 Thread Bruno Dupuis
Bruno Dupuis added the comment: This solution hides the risk of metaclass conflicts, as the user did not explicitly set the metaclass. IMO, this risk should be clearly told in the Doc. -- nosy: +bruno.dupuis ___ Python tracker rep...@bugs.python.org

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-11-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___ Python-bugs-list

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

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

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: It looks slightly better, but it would also violate there is one obvious way to do it. -- nosy: +gvanrossum, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: In practice this is indeed how most users of met a classes do it. E.g. Django. So, +1. --Guido van Rossum (sent from Android phone) On Sep 30, 2012 11:36 AM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou added the comment: It looks slightly

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-28 Thread Éric Araujo
Éric Araujo added the comment: Agreed. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___ Python-bugs-list mailing

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-26 Thread Mark Dickinson
Mark Dickinson added the comment: +1 -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___ Python-bugs-list mailing

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-25 Thread Raymond Hettinger
New submission from Raymond Hettinger: Since inheritance is more commonplace and more easily understood than __metaclass__, the abc module would benefit from a simple helper class: class ABC(metaclass=ABCMeta): pass From a user's point-of-view, writing an abstract base call

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-25 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +easy type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___