getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.62k stars 450 forks source link

Implement a new plugin manager from scratch to replace Yapsy and add Python 3.12 support (Fix #3719, Fix #3725) #3728

Closed Kwpolska closed 10 months ago

Kwpolska commented 11 months ago

Pull Request Checklist

Description

Yapsy does not work under Python 3.12 due to Python 3.12 carelessly removing things from the standard library (fixes #3719). To keep Nikola working, a new plugin manager was developed from scratch, and it will be used instead of Yapsy. This also contains a fix for templates not loading if the plugin places the templates in the directory with __init__.py (fixes #3725).

felixfontein commented 10 months ago

Thanks for working on this! I didn't have much time to review this yet, but I did run some first test and noticed that it doesn't load quite a few of my plugins (Plugin ... does not specify Nikola configuration - it will not be loaded). I'll take a closer look at this probably over the weekend.

Kwpolska commented 10 months ago

I forgot to mention that setting NikolaPluginCategory in the .plugin file is now mandatory for all plugins. Wrong values will break in unexpected ways (although it might be worth adding a check). I’ll update CHANGES.txt to mention this.

felixfontein commented 10 months ago

With the updated plugin metadata (see also https://github.com/getnikola/plugins/pull/431) everything seems to work well!