Lektor v3.3.0 Release Notes

Release Date: 2021-12-14 // over 2 years ago
  • ๐Ÿš€ This release drops support for versions of Python before 3.6. ๐Ÿ‘ In particular, Python 2.7 is no longer supported.

    ๐Ÿš€ Quite a few bugs have been fixed since the previous release.

    ๐ŸŽ The Admin UI has seen a major refactor and various performance optimisations. โšก๏ธ It has been rewritten in Typescript, and updated to use v5 of the Bootstrap CSS framework.

    ๐Ÿ› Bugs Fixed

    Database

    • ๐Ÿ›  Fix queries with offset but without a limit. #827
    • ๐Ÿ›  Fix the handling of deferred (descriptor-type) model fields when used in slug_format and when used as a sort key. #789
    • โš  Refrain from issuing warning about future change in implicit image upscaling behavior in cases that do not involve upscaling. #885
    • ๐Ÿ›  Fix bug with translation fallback of record label. #897

    Data Modelling

    • ๐Ÿ›  Fixed pagination issue which caused child-less paginated pages to not be built. #952

    Publisher

    • ๐Ÿ‘ Allow rsync deployment to a local path. #830
    • ๐Ÿ›  Clean up subprocess handling in lektor.publisher. This fixes "ResourceWarning: unclosed file" warnings which were being emitted when using the rsync publisher, as well as possible other buglets. #896

    ๐Ÿ’ป Command Line

    • ๐Ÿ›  Fix circular imports in lektor.cli to allow its use as an executable module (python -m lektor.cli). #682, #856
    • 0๏ธโƒฃ Fall back to watchdog PollingObserver if default Observer type fails to start. This fixes "OSError: inotify watch limit reached" and perhaps other similar failures. #861, #886

    ๐Ÿ”Œ Plugins

    • ๐Ÿ›  Fix the Plugin.emit method so that it works. #859
    • ๐Ÿ‘ป Reword the (previously incomprehensible) exception message emitted when attempting to load a plugin from an improperly named distribution. #875, #879

    ๐Ÿ‘ท Build System

    • ๐Ÿ›  Fix bug in lektor.sourcesearch.find_files which was causing intermittent exceptions. #895, #897

    Miscellaneous

    • ๐Ÿ›  Fix reference cycle in Environment. #882
    • ๐Ÿ›  Fix "unclosed file" ResourceWarnings. #898

    ๐Ÿ’ป Admin UI

    • ๐Ÿ›  Fix the checkboxes widget. They were broken so as to be uncheckable. #812, #817
    • ๐Ÿ”„ Fix page data being incorrectly marked as changed when flow block is expanded/collapsed in the edit UI. #828, #842
    • ๐Ÿ›  Fix encoding of URLs when opening the admin UI from the pencil button. #815, #837
    • ๐Ÿ’ป Rename a CSS class in the admin UI to prevent breakage by ad blockers. The class add-block was being blocked by the EasyList FR ad blocker. #785, #841
    • ๐Ÿ˜Œ Relax URL checking to allow all valid URLs in URL fields. #793, #840, #864
    • โšก๏ธ Preview iframe was not always updating when it should. #844, #846
    • ๐Ÿ‘‰ Make the "Save" button always visible (without need to scroll on long pages). #43, #870
    • Disable the "Save" button unless there are changes. #872
    • โž• Add "<ctl>-e" hotkey shortcut to edit page. #876
    • โšก๏ธ Update UI to Bootstrap v4. (This fixes a layout issue with the date picker.) #648, #884
    • ๐Ÿ›  Fix edit page failure for select and checkbox widgets with no choices. #890, #900
    • โšก๏ธ Update UI to Bootstrap v5. #917, #926
    • โž• Add missing translation strings, show error dialogs on top of other dialogs #934.

    Internal changes

    Python code

    • โฌ‡๏ธ Drop python 2 compatibility. #822, #850, #871, #920, #922
    • โฌ‡๏ธ Drop python 3.5 compatibility. #878, #880
    • ๐Ÿ‘Œ Support python 3.10. #938
    • ๐Ÿ— Switch to PEP-518-compatible (pyproject.toml) build process. #933, #942
    • Code beautification/reformatting. We now use black, reorder-python-imports, [flake8][], and [pylint][]. #823, #916, #925, #936
    • ๐Ÿ”จ Refactor rsync publisher tests. #836
    • Restructure code to prevent circular imports. #856, #871, #873
    • ๐Ÿ›  Minor docstring fixes. #874
    • ๐Ÿ‘• Enabled pylint's no-self-use policy. #887

    JS code

    • We now require node >= 14. #940
    • โšก๏ธ Update NPM/JS dependencies. Update to webpack v5. #816, #834, #848, #852, #860, #905, #917, #926, #945, #957
    • ๐Ÿ’… Use prettier and [eslint][] for JS (and YAML) beautification and style enforcement. #825, #936
    • โœ… Disuse unmaintained jsdomify to prevent hanging tests. #839
    • Disuse jQuery. #851
    • ๐Ÿ”จ Convert JS code to Typescript. Various other refactoring and cleanups. #857, #869, #872
    • ๐Ÿ”จ Refactor code to handle hotkeys. #876

    Dependencies

    • ๐Ÿ˜Œ Relax werkzeug<1 to werkzeug<3. #829, #833, #911, #923
    • โฌ‡๏ธ Drop support for Python 2. #818, #819
    • We now require Jinja2>=3.0. #921

    โœ… Testing/CI

    • โœ… Use tox for local testing. #824
    • ๐Ÿ‘• Pin version of pylint used for tests. #891
    • โœ… Complete rewrite of the tests for lektor.pluginsystem to increase coverage and reduce running time. #881.
    • โœ… Test under Python 3.9. #845
    • โœ… Test under Node v14 and v16. #852, #927
    • โšก๏ธ Do not run brew update in MacOS CI workflow. #853
    • CI workflow simplification. #927

    ๐Ÿ‘• [pylint]: https://pylint.org/

    โœ… [flake8]: https://flake8.pycqa.org/en/latest/

    ๐Ÿ‘• [eslint]: https://eslint.org/