Closed nixjdm closed 4 years ago
I'm willing to work on this one.
The documentation recommends using a dedicated library, since the module is going to be removed.
Which library would you prefer?
@nnrcschmdt I think https://pypi.org/project/feedgenerator/ ?
@nixjdm ?
I don't have experience with either, but looking through the links only, I think we should go with the other one, https://github.com/lkiesow/python-feedgen.
Pelican's doesn't seem to have any docs, and seems hardly maintained compared to python-feedgen. It may be that Pelican's reached stability 4 years ago - the last time their tox.ini was updated - but software has a tendency to break when not touched for a while. python-feedgen seems to actually receive some attention, and even has travis-ci builds.
That's still a fairly surface-level comparison. That's what I think we should go with, absent some real experience with them, and not looking further.
Thank you @nnrcschmdt for volunteering and doing the initial research!
Yeah, after looking at the stats I feel the same! thanks @nixjdm
The Pallets blog has a custom feed plugin (probably from before this project existed). I just updated it to feedgen with the release of Werkzeug 1.0 and it was basically a one-to-one change. If you're interested: https://github.com/pallets/website/commit/4021a914b89052a2db9a6f313646983e82e7ef29
I should probably just switch to this plugin :-)
Any plans to merge the changes made by either @davidism or @nnrcschmdt into master? I use Netlify to deploy my personal site, and I'm currently getting this error when trying to do a 'prod' build, which I believe is caused by this deprecation, although I'm not entirely sure:
5:20:49 PM: File "/opt/buildhome/.cache/lektor/packages/099981587d5d8c871de6de3e64aaf948/lektor_atom.py", line 17, in <module>
5:20:49 PM: from werkzeug.contrib.atom import AtomFeed
5:20:49 PM: ImportError: No module named contrib.atom
That said, lektor build
still works fine on my Mac. If there aren't any near-term plans to merge these fixes in, any advice that might help me get my site deploying again?
@franktisellano: What worked for me is downgrading Werkzeug to the last release before 1.0:
~/.local/lib/lektor/bin/pip install Werkzeug==0.16.1
You might have to adapt the path if your Lektor is installed somewhere else; which lektor
can help.
@mthuurne Hey, this worked! Thank you!
For future readers: I added Werkzeug==0.16.1
to my requirements.txt file, and the build succeeded!
This line is deprecated: https://github.com/nixjdm/lektor-atom/blob/92abbf3c32814240c4e9452f596fc05435404748/lektor_atom.py#L17
See https://werkzeug.palletsprojects.com/en/0.15.x/contrib/atom/