On 7/11/22 13:51, Glyph wrote:
On Jul 8, 2022, at 10:20 AM, Peter Westlake <email@example.com> wrote:
I notice that Nevow is now available from pypi.org, but has a syntax error when imported:
When you say "now available" you mean like, "since 2004" :-) ?
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nevow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/runbench3.6/lib/python3.6/site-packages/nevow/__init__.py", line 73, in <module>
from nevow import flat
File "/usr/local/runbench3.6/lib/python3.6/site-packages/nevow/flat/__init__.py", line 7, in <module>
from nevow.flat.ten import flatten, precompile, iterflatten, getSerializer, serialize, registerFlattener, getFlattener, partialflatten
File "/usr/local/runbench3.6/lib/python3.6/site-packages/nevow/flat/ten.py", line 13, in <module>
from nevow import tags
File "/usr/local/runbench3.6/lib/python3.6/site-packages/nevow/tags.py", line 28, in <module>
from nevow.stan import Proto, Tag, directive, raw, xml, CommentProto, invisible, slot, cdata
File "/usr/local/runbench3.6/lib/python3.6/site-packages/nevow/stan.py", line 150
raise NotImplementedError, "Stan slot instances are not iterable."
SyntaxError: invalid syntax
That isn't valid Python 3, so how come Nevow is installable?
In brief, the metadata that let you say "not for python 3" postdates python 3 itself, so the relatively old releases (even the most recent one being almost 3 years at this point) do not have that metadata set and never will, given that they're immutable. You could do a new release that wasn't installable (and maybe we even did?) but then pip will just fall back to the older ones unless we yank them.
Are there any plans to fix it?
Not currently; twisted.web.template mostly does what was actually unique to Nevow (allow you to render a web page with a Deferred in the middle of it) and is much more compact, well tested, up-to-date and so on.
However, there are clearly still things still using Nevow out there and if you wanted to bring it into the modern era, ideally while unifying it somewhat with t.w.t to reduce duplication and make the migration easier, I'm sure you could muster some enthusiasm for code reviews and releases if you posted some gentle encouragements to this list.
We should probably archive the project and mark it as officially unmaintained or actually do this update within the next year though; leaving it like this forever is a little rude to new potential users who might waste time on it if they run across it somehow.
nevow was brought into the Python3 realm with a last ditch massive effort not really structured according to twisted development rules. That effort serves all my needs specifically making Livepage work for others I can't speak.
Find the pull request at https://github.com/twisted/nevow/pull/110
Although it was my intention to bring Livepage's communication into the new age I will not be able to work on that anymore as I'm terminally ill.