[issue2366] Fixer for new metaclass syntax is needed

2008-09-12 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Added in r66438. One open issue is that the comment is lost in the following example: class X: __metaclass__ = Meta # Spam -- resolution: - fixed status: open - closed ___ Python tracker

[issue2366] Fixer for new metaclass syntax is needed

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Good work on the patch! It looks pretty good. I'm attaching a patch with a few minor changes. I don't really understand the need for fixup_parse_tree, since I see in the Grammar that a suite is required for every classdef.

[issue2366] Fixer for new metaclass syntax is needed

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Thu, Aug 21, 2008 at 9:38 PM, Jack Diederich [EMAIL PROTECTED] wrote: Jack Diederich [EMAIL PROTECTED] added the comment: Benjamin, the 2to3 parse tree straddles the 2.x Grammar and 3.x Grammar (it's its own thing) which is why

[issue2366] Fixer for new metaclass syntax is needed

2008-07-31 Thread Jack Diederich
Jack Diederich [EMAIL PROTECTED] added the comment: Thanks for the ping. I just rewrote the patch from scratch and it handles corner cases (of which there are many in the parse tree) better. I'll upload/checkin sometime today. ___ Python tracker [EMAIL

[issue2366] Fixer for new metaclass syntax is needed

2008-07-31 Thread Jack Diederich
Jack Diederich [EMAIL PROTECTED] added the comment: The new patch works and handles all the corner cases I could think of. I tried to comment the heck out of it because it does a lot of manual walking and manipulation of the syntax tree. This only handles __metaclass__ inside classes. I

[issue2366] Fixer for new metaclass syntax is needed

2008-07-30 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Ping -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 ___ ___

[issue2366] Fixer for new metaclass syntax is needed

2008-03-20 Thread Jack Diederich
Jack Diederich [EMAIL PROTECTED] added the comment: New patch that does more. Collin, could you take a look at the fixer? I listed some stumbling blocks at the top (and at least one bug in 2to3). The fixer seems to work fine on actual files but the unit tests that use strings do nothing.

[issue2366] Fixer for new metaclass syntax is needed

2008-03-19 Thread Collin Winter
Collin Winter [EMAIL PROTECTED] added the comment: A quick test indicates that the old way doesn't work anymore. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 __ ___

[issue2366] Fixer for new metaclass syntax is needed

2008-03-19 Thread Jack Diederich
Jack Diederich [EMAIL PROTECTED] added the comment: Here is a partial implementation. It doesn't warn about __metaclass__ at the module level and doesn't handle multiple __metaclass__ assignements in one class. tests pending. -- keywords: +patch Added file:

[issue2366] Fixer for new metaclass syntax is needed

2008-03-17 Thread Brett Cannon
New submission from Brett Cannon [EMAIL PROTECTED]: * new metaclass syntax (removing __metaclass__?) - __metaclass__ = type at global level disappear - __metaclass__ = anything else should generate warning - __metaclass__ = something within a class should use new syntax - class

[issue2366] Fixer for new metaclass syntax is needed

2008-03-17 Thread Jack Diederich
Changes by Jack Diederich [EMAIL PROTECTED]: -- nosy: +jackdied __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2366] Fixer for new metaclass syntax is needed

2008-03-17 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: -- priority: immediate - urgent __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 __ ___ Python-bugs-list mailing list

[issue2366] Fixer for new metaclass syntax is needed

2008-03-17 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Does the old way still work in 3.0? If so, I don't think we should have a fixer. -- nosy: +rhettinger __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2366 __