Re: Nevow and python 3
Glyph <[email protected]> Tue, 23 Jan 2018 23:51:44 -0800
| Newsgroups | gmane.comp.python.twisted.web |
|---|---|
| Message-ID | <[email protected]> |
--===============3869975818585369867== Content-Type: multipart/alternative; boundary="Apple-Mail=_0A47E822-187F-4449-8892-9B35B150E291" --Apple-Mail=_0A47E822-187F-4449-8892-9B35B150E291 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 23, 2018, at 2:03 AM, Markus Demleitner = <[email protected]> wrote: >=20 > Hi, >=20 > Since I have a couple of projects building on nevow that I'd like to > keep maintaining into the post-python2 world (and at least one of > them contains a broader user base that I can't easily get to port > templates and such), I've started porting nevow to python3. What's > on https://github.com/msdemlei/nevow runs essentially all the unit > tests that weren't broken on python2 except for those related to > livepages. Hi Markus! > I've not tried to port any python2 code to this now, though, since I > find the current situation where lots of byte strings leak > through from twisted.web quite unsatisfying. I've tried to formulate > something like a preliminary policy in > = https://github.com/msdemlei/nevow/blob/master/doc/strings_and_bytes.rst, > but I'm deeply unhappy about most of this. Yeah, IRequest is an unfortunate interface. Work is ongoing to design a = more thoughtful one and gradually migrate to it. I think = https://github.com/wsanchez/txrequest = <https://github.com/wsanchez/txrequest> is getting pretty complete, and = from there the hope is that it will get integrated into Klein and then = upstreamed into Twisted. > Ideally, I'd like to fairly exclusively expose actual strings to "actual" meaning text? > nevow client code unless they actually deal with binary data (as in > static.File, and of course request.write needs to be able to deal > with this). This will probably mean isolating client code from > twisted.web.Requests a bit more. >=20 > So:=20 >=20 > (1) Is anyone else still interested in this? I can't speak to anyone else, but the fact that Nevow has a duplicated = resource model is kind of unfortunate; that's why we're hoping to just = replace the Twisted one eventually. (But in an upward-compatible way, = with comprehensive interoperability and a smooth deprecation transition, = not web2 all over again...) > (2) Is anyone at all interested in the livepages stuff (I'm not, and > dropping it would certainly make porting and maintaining the package > a lot easier)? If you're going to drop livepage, is there any reason you're not just = migrating to twisted.web.template? Is there any way t.w.t could be made = into an easier migration path? > (3) If I went ahead with this and actually tried to get a > python3-nevow into Debian (which I'd really, really like to see): How > is everyone's feeling about keeping the name nevow even if serious > functional changes (such as dropping livepages) were to come about? > [What I care about most is keeping the templating system including > the render_ and data_ methods]. If you're going to do a fork, please come up with a new name. Using the = existing one is confusing, it causes namespace conflicts (what happens = when Nevow itself gets some upstream patches that port it to python 3 = from someone else?) and it causes import conflicts. That said, if you are interested in porting Nevow the same way that = Twisted is being ported (i.e. there's one set of sources, but `pip = install` on python 3 only installs the modules ported thus far) then = that would certainly be a way to invest the effort in just porting the = parts that you need, and letting someone else port LivePage later :). = I'd be happy to make you a maintainer if you're interested in doing this = - not a lot of other activity on Nevow right now! -glyph --Apple-Mail=_0A47E822-187F-4449-8892-9B35B150E291 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><blockquote type=3D"cite" class=3D"">On Jan 23, 2018, at 2:03 = AM, Markus Demleitner <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:<br = class=3D""></blockquote><div><blockquote type=3D"cite" class=3D""><br = class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">Hi,<br= class=3D""><br class=3D"">Since I have a couple of projects building on = nevow that I'd like to<br class=3D"">keep maintaining into the = post-python2 world (and at least one of<br class=3D"">them contains a = broader user base that I can't easily get to port<br class=3D"">templates = and such), I've started porting nevow to python3. What's<br = class=3D"">on <a href=3D"https://github.com/msdemlei/nevow" = class=3D"">https://github.com/msdemlei/nevow</a> runs essentially all = the unit<br class=3D"">tests that weren't broken on python2 except for = those related to<br class=3D"">livepages.</div></div></blockquote><div><br= class=3D""></div><div>Hi Markus!</div><div><br = class=3D""></div><blockquote type=3D"cite" class=3D""><div class=3D""><div= class=3D"">I've not tried to port any python2 code to this now, though, = since I<br class=3D"">find the current situation where lots of byte = strings leak<br class=3D"">through from twisted.web quite unsatisfying. = I've tried to formulate<br class=3D"">something like a preliminary = policy in<br class=3D""><a = href=3D"https://github.com/msdemlei/nevow/blob/master/doc/strings_and_byte= s.rst" = class=3D"">https://github.com/msdemlei/nevow/blob/master/doc/strings_and_b= ytes.rst</a>,<br class=3D"">but I'm deeply unhappy about most of = this.<br class=3D""></div></div></blockquote><div><br = class=3D""></div><div>Yeah, IRequest is an unfortunate interface. = Work is ongoing to design a more thoughtful one and gradually = migrate to it. I think <a = href=3D"https://github.com/wsanchez/txrequest" = class=3D"">https://github.com/wsanchez/txrequest</a> is getting = pretty complete, and from there the hope is that it will get integrated = into Klein and then upstreamed into Twisted.</div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div = class=3D"">Ideally, I'd like to fairly exclusively expose actual strings = to<br class=3D""></div></div></blockquote><div><br = class=3D""></div><div>"actual" meaning text?</div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div = class=3D"">nevow client code unless they actually deal with binary data = (as in<br class=3D"">static.File, and of course request.write needs to = be able to deal<br class=3D"">with this). This will probably mean = isolating client code from<br class=3D"">twisted.web.Requests a bit = more.<br class=3D""><br class=3D"">So: <br class=3D""><br class=3D"">(1) = Is anyone else still interested in this?<br = class=3D""></div></div></blockquote><div><br class=3D""></div><div>I = can't speak to anyone else, but the fact that Nevow has a duplicated = resource model is kind of unfortunate; that's why we're hoping to just = replace the Twisted one eventually. (But in an upward-compatible = way, with comprehensive interoperability and a smooth deprecation = transition, not web2 all over again...)</div><br class=3D""><blockquote = type=3D"cite" class=3D""><div class=3D""><div class=3D"">(2) Is anyone = at all interested in the livepages stuff (I'm not, and<br = class=3D"">dropping it would certainly make porting and maintaining the = package<br class=3D"">a lot easier)?<br = class=3D""></div></div></blockquote><div><br class=3D""></div><div>If = you're going to drop livepage, is there any reason you're not just = migrating to twisted.web.template? Is there any way t.w.t could be = made into an easier migration path?</div><br class=3D""><blockquote = type=3D"cite" class=3D""><div class=3D""><div class=3D"">(3) If I went = ahead with this and actually tried to get a<br class=3D"">python3-nevow = into Debian (which I'd really, really like to see): How<br class=3D"">is = everyone's feeling about keeping the name nevow even if serious<br = class=3D"">functional changes (such as dropping livepages) were to come = about?<br class=3D"">[What I care about most is keeping the templating = system including<br class=3D"">the render_ and data_ methods].<br = class=3D""></div></div></blockquote></div><div class=3D""><br = class=3D""></div><div class=3D"">If you're going to do a fork, please = come up with a new name. Using the existing one is confusing, it = causes namespace conflicts (what happens when Nevow itself gets some = upstream patches that port it to python 3 from someone else?) and it = causes import conflicts.</div><div class=3D""><br class=3D""></div><div = class=3D"">That said, if you are interested in porting Nevow the same = way that Twisted is being ported (i.e. there's one set of sources, but = `pip install` on python 3 only installs the modules ported thus far) = then that would certainly be a way to invest the effort in just porting = the parts that you need, and letting someone else port LivePage later = :). I'd be happy to make you a maintainer if you're interested in = doing this - not a lot of other activity on Nevow right now!</div><div = class=3D""><br class=3D""></div><div class=3D"">-glyph</div><div = class=3D""><br class=3D""></div></body></html>= --Apple-Mail=_0A47E822-187F-4449-8892-9B35B150E291-- --===============3869975818585369867== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVHdpc3RlZC13 ZWIgbWFpbGluZyBsaXN0ClR3aXN0ZWQtd2ViQHR3aXN0ZWRtYXRyaXguY29tCmh0dHBzOi8vdHdp c3RlZG1hdHJpeC5jb20vY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL3R3aXN0ZWQtd2ViCg== --===============3869975818585369867==--