nevow icon indicating copy to clipboard operation
nevow copied to clipboard

py3 fixalltests

Open wthie opened this issue 4 years ago • 3 comments

  • Almost all of the porting work was done by Markus Demleitner
  • This pull request was specifically created at the request of the community, it does not adhere to the development standards used in the twisted universe. This draft PR is way too big and messy, my work was more like a last ditch effort to see the light at the other end of the tunnel. The common understanding is that this PR would serve as the basis for a number of more specific and more finely tuned PR's.
  • Spidermonkey needs to be installed for the JS tests. Experiments with node.js instead ended with a few tests depending too much on Spidermonkey's features. That's why I dropped the idea of using node.js alternatively.
  • subunit needs to be installed, the tests will inform you to do so
  • Initial porting of non trivial code has shown that the flatteners are a major 'piece de resistance' with the suggestion of replacing them with twisted/web flatteners

wthie avatar Dec 03 '20 23:12 wthie

Hi there @wthie! Any chance you could break this up into ... a lot more PRs, so folks could possibly review them? As a monolith this is enormous. Hopefully stuff like @implementer and print can be done as a series of very quick small PRs.

Regarding this:

Initial porting of non trivial code has shown that the flatteners are a major 'piece de resistance' with the suggestion of replacing them with twisted/web flatteners

The more of nevow that we can replace with twisted.web.template, the better. I realize there are still some livepage / athena users out there, and it would be nice to offer a supported upgrade path, but there's a ton of duplication of this code now and reducing it would be wonderful.

glyph avatar Dec 04 '20 20:12 glyph

Assuming that the test coverage for nevow is 100% making all tests pass under Python3 ideally would give one a library which serves the same purpose as the same library did under Python2.

This was the leanest effort assumption underlying this work, although finding out that porting actual production code does not really work, the same as with a lot of the examples in nevow which would need attention and rewriting.

I had Markus Demleitner's fork around for quite some time after he had the parts crossed over he needed for his production code. With Covid-19 I saw a chance to set apart some time to work on the nevow/athena section. After a few stabs and getting frustrated I started over to stubbornly make the tests work one by one with the result being this PR, ugly as hell, mechanically done! I apologize for this but it is about as far as I can go right now.

I now see a chance of succeeding with porting my productive code. After that I believe I'll be in a much better position to tackle replacing similar functionality code in nevow with twisted code. This is possibly also the position of https://github.com/BMtthws as well as it was the one of https://github.com/msdemlei

All this sounds pretty lame and it is an excuse but I promise I'll be back!

wthie avatar Dec 04 '20 23:12 wthie

My plan to help here is to replicate as many of the porting changes as possible with automated tools like pyupgrade, putting these into PRs grouped by the type of change. Hopefully this way we can get some of the trivial changes out of the way, leaving reviewers to focus on the really tricky stuff (in PRs grouped by component).

mithrandi avatar Dec 07 '20 07:12 mithrandi