lektor / lektor-atom

Lektor Atom plugin.
30 stars 13 forks source link

Replace deprecated Werkzeug's atom with Pelican's feedgenerator #31

Closed xlotlu closed 4 years ago

xlotlu commented 4 years ago

closes #23 supersedes #25

goanpeca commented 4 years ago

Awesome! but we will need test to pass :-p

xlotlu commented 4 years ago

Awesome! but we will need test to pass :-p

@goanpeca, definitely. Please remove https://github.com/lektor/lektor-atom/blob/master/.pre-commit-config.yaml#L11

goanpeca commented 4 years ago

Done!

goanpeca commented 4 years ago

@xlotlu could you please run

pre-commit run -a before the push thanks?

xlotlu commented 4 years ago

So, that tool produces this diff:

diff --git a/lektor_atom.py b/lektor_atom.py
index 900227c..7b354b7 100644
--- a/lektor_atom.py
+++ b/lektor_atom.py
@@ -4,8 +4,6 @@ import sys
 import uuid
 from datetime import date
 from datetime import datetime
-
-import click
 from lektor.build_programs import BuildProgram
 from lektor.context import get_ctx
 from lektor.context import url_to
@@ -15,8 +13,9 @@ from lektor.pluginsystem import Plugin
 from lektor.sourceobj import VirtualSourceObject
 from lektor.utils import build_url

-from markupsafe import escape
+import click
 from feedgenerator.django.utils.feedgenerator import Atom1Feed
+from markupsafe import escape

 PY2 = sys.version_info[0] == 2

I'd rather not have any opinion on this. :)

Immediate edit: black also fails. Grr.

goanpeca commented 4 years ago

That is why we also used import reorder, because black sometimes messes the imports.

goanpeca commented 4 years ago

I can merge and then apply the style fixes later ;-)

xlotlu commented 4 years ago
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted /home/runner/work/lektor-atom/lektor-atom/setup.py
All done! ✨ 🍰 ✨
1 file reformatted, 3 files left unchanged.

@goanpeca on my machine black doesn't change setup.py. Please test on yours, maybe it's a version difference. I have 19.10b0 here.

goanpeca commented 4 years ago

Will merge ;-)

xlotlu commented 4 years ago

Guys, also please take this over from here. If you find the source, force-push, see if it works etc. I'm sorry but I need to go now, and if I don't manage to see it through today I won't be able to take care of it for weeks.

goanpeca commented 4 years ago

I will check and make a release if things work ok!

paternal commented 4 years ago

I will check and make a release if things work ok!

@goanpeca Any update about a new release? Do you need any help?