09:07:28 <KwBot> omwb: 20:57:55 <ChrisWarrick> re optional dependencies, if you peek at the code, you can see it’s sometimes for minor things, very niche features, or individual options 14:22:28 <andydj> Hey #nikola - Happy New Year! Is there a macro or something I can use to add script links to just some pages? I'm experimenting with writing some Brython web apps, which need a script tag, but I'd rather not make all my pages and posts load the resource if they don't need it. 14:26:14 <omwb> andydj: I'm still digging into Nikola. Generally speaking, it is possible in a Jinja template to activate or de-activate certain parts of it based on some arbitrary condition. Does that help any? Do you have access of your theme and is that using Jinja2? 14:28:07 <andydj> omwb - yes I have full access. I'll have to check about whether the template I'm using uses Jinja or not 14:28:56 <andydj> s/template/theme 14:29:54 <omwb> :-D Actually, templates are provided by themes, so the sentence makes perfect sense both ways. 14:30:06 <andydj> Yes - I'm using theme "gruberwine" which does indeed use Jinja2 14:35:18 <andydj> Now I have to drag my jinja knowledge out of offline neural storage! 14:40:39 <omwb> I found https://getnikola.com/theming.html#identifying-and-customizing-different-kinds-of-pages-with-a-shared-template which is possibly pertinent. It also give you some idea what Jinja-code would look like. Apparently, each page in Nikola can have *several* pagekinds. If you figure out how to add a new, additional pagekind to your page, say, "needs_brython" or whatever name sounds good to you, you are in business. I speculate setting an 14:40:40 <omwb> additional pagekind should be possible via metadata somehow. 14:44:02 <andydj> 👍 Thanks, I'll take a look at that 14:44:18 <omwb> andydj: Ah! https://getnikola.com/handbook.html#metadata-fields has some documentation about "extra" metadata, and there is some fits-all "data". That might be even better than "page-kind". 14:44:57 <andydj> 👍 that too 🙂 14:45:00 <omwb> There is also a note how to get at the keys inside a template. Though I'm a bit suspicious that's a typo - what the template gets is probably the value. 16:39:16 <KwBot> [nikola] Kwpolska closed pull request #3727 (aknrdureegaesr:devserver_nonbase): Improve non-root site handling of nikola auto. Fix 3715. https://github.com/getnikola/nikola/pull/3727 16:39:16 <KwBot> [nikola] Kwpolska closed pull request #3727 (aknrdureegaesr:devserver_nonbase): Improve non-root site handling of nikola auto. Fix 3715. https://github.com/getnikola/nikola/pull/3727 16:39:16 <KwBot> [nikola] Kwpolska closed pull request #3727 (aknrdureegaesr:devserver_nonbase): Improve non-root site handling of nikola auto. Fix 3715. https://github.com/getnikola/nikola/pull/3727 16:39:16 <KwBot> [nikola] Kwpolska closed pull request #3727 (aknrdureegaesr:devserver_nonbase): Improve non-root site handling of nikola auto. Fix 3715. https://github.com/getnikola/nikola/pull/3727 16:39:16 <KwBot> [nikola] Kwpolska closed pull request #3727 (aknrdureegaesr:devserver_nonbase): Improve non-root site handling of nikola auto. Fix 3715. https://github.com/getnikola/nikola/pull/3727 16:39:17 <KwBot> [nikola] Kwpolska closed issue #3715: Build-in auto server could support non-root sites better. https://github.com/getnikola/nikola/issues/3715 16:39:17 <KwBot> [nikola] Kwpolska closed issue #3715: Build-in auto server could support non-root sites better. https://github.com/getnikola/nikola/issues/3715 16:39:17 <KwBot> [nikola] Kwpolska closed issue #3715: Build-in auto server could support non-root sites better. https://github.com/getnikola/nikola/issues/3715 16:39:17 <KwBot> [nikola] Kwpolska closed issue #3715: Build-in auto server could support non-root sites better. https://github.com/getnikola/nikola/issues/3715 16:39:17 <KwBot> [nikola] Kwpolska closed issue #3715: Build-in auto server could support non-root sites better. https://github.com/getnikola/nikola/issues/3715 20:19:30 <KwBot> [nikola] aknrdureegaesr opened pull request #3729 (aknrdureegaesr:event_loop_not_owned_by_plugin): Move asyncio loop management from plugin to main. https://github.com/getnikola/nikola/pull/3729 20:19:30 <KwBot> [nikola] aknrdureegaesr opened pull request #3729 (aknrdureegaesr:event_loop_not_owned_by_plugin): Move asyncio loop management from plugin to main. https://github.com/getnikola/nikola/pull/3729 20:19:30 <KwBot> [nikola] aknrdureegaesr opened pull request #3729 (aknrdureegaesr:event_loop_not_owned_by_plugin): Move asyncio loop management from plugin to main. https://github.com/getnikola/nikola/pull/3729 20:19:30 <KwBot> [nikola] aknrdureegaesr opened pull request #3729 (aknrdureegaesr:event_loop_not_owned_by_plugin): Move asyncio loop management from plugin to main. https://github.com/getnikola/nikola/pull/3729 20:19:30 <KwBot> [nikola] aknrdureegaesr opened pull request #3729 (aknrdureegaesr:event_loop_not_owned_by_plugin): Move asyncio loop management from plugin to main. https://github.com/getnikola/nikola/pull/3729 20:52:56 <omwb> ChrisWarrick: Your code review remark in my previous PR made me think how to organize the asyncio-loop-fixes better. There is a pull request that makes a suggestion. Have a look, if you would! 20:55:24 <ChrisWarrick> omwb: your docstring suggests that we wouldn’t need any of the code now in __main__ if we dropped python 3.7, is that correct? 20:56:33 <omwb> I would hope so. But I'm not actually sure. How do the various OSs react, if the main stuff is through, but there is still a loop which is stopped, but not closed? 20:58:34 <ChrisWarrick> I don’t know, that would probably need testing on all OSes and Python versions 21:02:14 <omwb> I tried on one OS and one Python version, it seems to work. 21:02:46 <omwb> But my fix has a problem: The websocket part does not come done quickly. 21:04:08 <ChrisWarrick> what do you mean? it takes too long to shutdown? 21:06:06 <ChrisWarrick> FYI, I’m open to dropping 3.7 right now if it would improve things. Our usual criterion (EOL + no Debian/Ubuntu active release with support) is pmet, if you ignore debian oldoldstable. 21:09:26 <ChrisWarrick> also, if you’ve got too much free time, feel free to review the plugin manager rewrite: https://github.com/getnikola/nikola/pull/3728 21:39:26 <omwb> What I meant: There was a method to shut down any still-open websocket connections, namely `remove_websockets`. It was registered in a shutdown hook, but still that code didn't run. Previously, the web sockets sort-of crashed when the loop was closed. I now call it explicitly in a finally - block, so now it does run. The manual test consists of running `nikola auto -b` and then hitting Ctrl+C. Before calling the shutdown explicitly in th 21:39:26 <omwb> e final block, that would take a long time (20 seconds or so) to react to a Ctrl+C. 21:40:10 <omwb> So, now I fixed it (without fully understanding why the previous didn't work). 22:05:40 <omwb> I have no strong opinions towards dropping or keeping 3.7. I think the kind of machines that are still running Debian Buster are servers rather than desktops. Imho, Nikola is stuff that lives on desktops mostly. But I have little experience who the Nikola userbase is. 22:06:56 <ChrisWarrick> running nikola on server might make sense too (in automated pipelines, or if someone does all their unixing on a remote server) 22:16:57 <omwb> Yes. But people who don't upgrade their OSs might also not upgrade their Nikolas. 22:19:58 <ChrisWarrick> yeah, that’s one reason to drop 3.7 22:20:09 <ChrisWarrick> another is that I would expect libraries to start dropping it soon as well 22:52:21 <omwb> I actually had a brief glance at the plugin manager PR, but I need to become active with other things, so don't count on me for that. Sorry. 22:53:48 <omwb> That new plugin manager will be a breaking change for all plugin authors, so Nikola 3.0.0 is up in the pipeline, yes? Good opportunity to drop 3.7, I'd say. 23:07:13 <ChrisWarrick> !tell omwb I wouldn’t consider it to be a breaking change, the PluginCategory enforcement won’t count as a breaking change unless someone’s plugin is very old and not following the docs 23:07:13 <KwBot> ChrisWarrick: acknowledged.