[Twisted-Python] Helping the Python 3 port

Jonathan Ballet jon at multani.info
Thu May 9 05:17:11 MDT 2013


On Thu, May 09, 2013 at 10:35:28AM -0000, exarkun at twistedmatrix.com wrote:
> On 09:04 am, jon at multani.info wrote:
> >On Wed, May 08, 2013 at 05:40:56PM -0700, Glyph wrote:
> >>
> >>On May 8, 2013, at 4:03 PM, Jonathan Ballet <jon at multani.info> wrote:
> >>
> >> > On Wed, May 08, 2013 at 09:36:14AM -0600, Tom Prince wrote:
> >> >> Have you seen https://twistedmatrix.com/trac/wiki/Plan/Python3 ?
> >> >>
> >> >> That is the plan for porting to python3.
> >> >
> >> > What about "importing" code from other librairies?
> >> >
> >> > I have this specific case where I need to support metaclass for both
> >> > Python 2.x and Python 3.x which have different syntax (__metaclass__ 
> >>and
> >> > class XXX(.., metaclass=...)), which `six` addresses with a function
> >> > called `with_metaclass()` [1]
> >>
> >>Within Twisted?  Which case is that?
> >
> >I was referring to twisted.python.reflect.PropertyAccessor which uses a
> >metaclass to manage access to its properties. It is marked as 
> >deprecated
> >since Twisted 12.1.0, so I guess there still need to support it on both
> >Python 2.x and Python 3, which is why I was looking for this
> >compatibility layer.
> 
> Eh.  Strongly consider not porting deprecated things. :) 
> PropertyAccessor could even be deleted for the next release, Twisted 
> 13.1 (this would be a relatively quick deprecation/removal cycle, but it 
> just fits within the defined policy), if it is a maintenance burden - 
> and forcing us to solve the metaclass issue sounds like a bit of a 
> burden.

OK, fine with me. It anwsers at the same time one of my question on
#5929 (sorry for the Trac spam on this ticket BTW, Trac was a bit slow
to accept my updates :/)

 Jonathan




More information about the Twisted-Python mailing list