Lektor

Latest version: v3.3.11

Safety actively analyzes 629503 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

3.4.0b5

Breaking Changes

- Removed the `lektor dev publish-plugin` command. (To publish a
plugin to PyPI, use [twine].) ([1065])

- Removed `SourceObject.iter_virtual_sources()` from our API. ([1106])

- Removed support for `config["LESSC_EXECUTABLE"]`. (There is no sign
that it has ever been used.) ([edb35f9])

- Removed support for `BuildState.make_named_temporary` method. It has
been totally broken for awhile — so clearly it is not used.<br>
Also remove _context manager_ protocol support from `BuildState` — it was
only there to support `BuildState.make_named_temporary`. ([6f11bad])

Bugs Fixed

- Fix several issues involving the installation of local plugin packages.
We now install plugins into a _bone fide_ virtual environment, rather
than using pip’s `--target` parameter. ([1065], [1028], [865])

- Fix template `markdown` filter (broken in [992]). ([1102] [1100])

- Fix dependency tracking to record the `alt` of _virtual sources_ as
well as their `path`. ([1108], [1007], [959])

- Fix equality semantics for `Record` and `VirtualSourceObject`. These
are now considered “equal” only if their _path_ (including _page
number_, in the case of pages), _alt_, and _pad_ all match.
Previously (for the most part) only _path_ (without page number) was
being checked in `Record.__eq__`. ([1105], [1101])

Cleanup

- Implement our own `deprecated` decorator, used to mark functions and methods
as being deprecated. Remove dependency on `deprecated` package. ([1113])

- Remove (direct) dependency on [pytz]. Since the inclusion of the
`zoneinfo` module in Python>=3.9 (see [PEP 615]), `pytz` is no long
necessary. Recent releases of [Babel][babel-2.12] will work with
either `pytz` or `zoneinfo` (depending on what is available) — now
we will, too. ([1110])

Deprecations

- Deprecate the `Record.contents` property and the use of the
`lektor.filecontents.FileContents` class. These are unused by
Lektor itself. While they are in use by at least one other project
(see [1026]), the semantics of the `.contents` property is quite
unclear when _alts_ are in use. ([1114])

Packaging

- Use [hatchling] as our PEP 517 build engine. Among other things, this allows
for installing Lektor directly from a git repository — so long as `npm` is installed
locally, installing, using `pip` from the git repo will now build the frontend
JS and CSS, thus resulting in a working installation of Lektor. ([1112], [1081])

Tests

- Require `tox >= 4.1`.

- Disuse `pytest-cov` — just run `coverage` directly.

Bit-Rot

- Audit and adjust metadata to ensure that we declare all direct dependencies. ([26e700e])

- Update frontend npm dependencies.

- Fix tox config for tox 4.\*.

[26e700e]: https://github.com/lektor/lektor/commit/26e700e62b3c02a18761cfd7cc7f274ee171dd89
[6f11bad]: https://github.com/lektor/lektor/commit/6f11bad5844d73c0ba8f5bb74c1e69f6c78650fc
[edb35f9]: https://github.com/lektor/lektor/commit/edb35f9c1fae1f4e4ae45b51175cdad5e3a52ecd
[1114]: https://github.com/lektor/lektor/pull/1114
[1113]: https://github.com/lektor/lektor/pull/1113
[1112]: https://github.com/lektor/lektor/pull/1112
[1108]: https://github.com/lektor/lektor/pull/1108
[1106]: https://github.com/lektor/lektor/pull/1106
[1105]: https://github.com/lektor/lektor/pull/1105
[1102]: https://github.com/lektor/lektor/pull/1102
[1101]: https://github.com/lektor/lektor/issues/1101
[1100]: https://github.com/lektor/lektor/issues/1100
[1081]: https://github.com/lektor/lektor/issues/1081
[1065]: https://github.com/lektor/lektor/pull/1065
[1028]: https://github.com/lektor/lektor/issues/1028
[1026]: https://github.com/lektor/lektor/issues/1026
[1007]: https://github.com/lektor/lektor/pull/1007
[959]: https://github.com/lektor/lektor/pull/959
[865]: https://github.com/lektor/lektor/issues/865
[babel-2.12]: https://github.com/python-babel/babel/blob/master/CHANGES.rst#version-2120
[hatchling]: https://pypi.org/project/hatchling/
[pytz]: https://pypi.org/project/pytz/
[pep 615]: https://peps.python.org/pep-0615/

3.4.0b4

Test under python 3.11. ([1084][])

Features

Dev Server

- Add live-reloading of pages when they are rebuilt. ([1027][])

Bugs

Plugins

- `PluginController.emit` would, under certain circumstances, silently
ignore `TypeError`s thrown by plugin hook methods. ([1086][],
[1085][])

[1027]: https://github.com/lektor/lektor/pull/1027
[1084]: https://github.com/lektor/lektor/pull/1084
[1085]: https://github.com/lektor/lektor/issues/1085
[1086]: https://github.com/lektor/lektor/pull/1086

3.4.0b3

Features

Mistune

- When configuring `mistune` plugins (from a Lektor plugin), allow
for specifying third-party plugins as a a string in the format
`"<module.name>:attr"`. (Plugins which are listed in the
`mistune.PLUGINS` map may be listed by their key.) ([1074][])

Deprecations

- Remove support for the `--build-flag` option to `lektor build` and
`lektor server`. ([1062][])

Bugs

- Fix spelling of `typing-inspect` in dependencies. ([1058][], continued)

Mistune

- When using `mistune>=2`, enable the `url`, `strikethrough`,
`footnotes`, and `table` plugins for feature parity with
`mistune==0.*`. ([1074][])

Admin Server

- Fix Admin UI tracking of navigation to URLs with anchors or query
strings in the preview view. ([1053][])
- We now test under `node-current` (currently node 18) and
`node-lts/*` (16). Previously we were testing under
node 14 and 16. ([1064][])

Bit-Rot

- Disuse `pkg_resources` in favor of `importlib.metadata`. ([1061][], [1073][])
- Update frontend dependencies, including upgrade to React version 18. ([1063][])
- Remove pin on transitive dependency `typing-inspect`.

Packaging

- Clean up package to remove a bit of cruft from the sdist. ([1066][])

[1053]: https://github.com/lektor/lektor/pull/1053
[1061]: https://github.com/lektor/lektor/pull/1061
[1062]: https://github.com/lektor/lektor/pull/1062
[1063]: https://github.com/lektor/lektor/pull/1063
[1064]: https://github.com/lektor/lektor/pull/1064
[1066]: https://github.com/lektor/lektor/pull/1066
[1073]: https://github.com/lektor/lektor/pull/1073
[1074]: https://github.com/lektor/lektor/pull/1074

3.4.0b2

Bugs

Command Line

- Fix `lektor clean` (broken in [1048][]). ([1056][])

Bit-Rot

- Pin `typing-inspect` to prevent breakage of `marshmallow_dataclass`.
([1058][], [lovasoa/marshmallow_dataclass207][md207])

[1056]: https://github.com/lektor/lektor/issues/1056
[1058]: https://github.com/lektor/lektor/issues/1058
[md207]: https://github.com/lovasoa/marshmallow_dataclass/pull/207

3.4.0b1

This release drops support for Python 3.6, which has reached end-of-life in
December 2021.

Changes

Admin Frontend

- The _save_ hotkey (`<ctl>-s`) now always switches to the _preview_
view. Previously, the _save_ hotkey was disabled unless there were
changes to be saved. ([1022][])
- Boolean checkboxes can now be reverted to the "unset" state by
typing _Delete_ or _Backspace_ into them. This is pertinent, e.g.,
for the `_hidden` field, where unset mean something different
(inherit from parent) than either `false` or `true`. ([1048][])
- Add ability to resize textareas. ([1050][])

Markdown

- Links and image URLs in markdown text are now, by default, resolved
via the Lektor database. Previously, they were not. Note that this
behavior may be customized on a per-datamodel-field basis if one
wants to get the old behavior back. ([992][])
- Lektor now supports either [mistune][] 2.x or mistune 0.x. The
configuration API of mistune 2.x differs significantly from that of
mistune 0.x. If you are using a plugin that customizes the markdown
rendering, you will likely have to update the plugin to support the
newer mistune, or pin mistune to the older version. ([992][])

GitHub Pages Publisher

- Add support for specifying which branch to push to by specifying a
`branch` query param on the target URL. ([978][], [995][])
- Add support for force-pushing orphan commits by adding a
`preserve_history=no` query param to the target URL. ([995][])

Thumbnailing

- The `crop` parameter of the `Image.thumbnail()` method (long since
depreacted) has been removed. ([551][], [960][])
- Implicit thumbnail upscaling has been disabled. ([551][], [960][])

Bugs

Admin Server

- Refactor and fix numerous buglets in the admin http server. ([987][])
- Fix 404 error for `/admin`. ([1043][], [1044][])
- Fix URL resolution to hidden pages. ([1048][])

Admin Frontend

- Use [esbuild][] rather than webpack/babel to build the admin js code. ([1012][])
- Update frontend deps. ([1025][])
- Make `size = {small|large}` field option work again. ([1022][])
- Handle hotkeys when the preview iframe has the focus. ([1022][])
- Fix for spurious page scrolling when typing in textareas. ([1][],
[1038][], [1050][])

Builder

- The `asseturl` filter was not propery tracking build dependencies
resulting in stale hashes in the asset URL if the asset was
updated. ([1020][])
- Fix so that un-hidden children of hidden parents are built. Fix
pruning logic so that artifacts corresponding to hidden pages are
pruned. ([203][], [1048][])

Bit-rot

- Fixes for `click==8.1.3`. ([1031][], [1033][])
- Fixes for `werkzeug>=2.2.0`. ([1019][], [1018][], [1051][])
- Update npm package minimist. ([1021][])
- Remove dependency on the `requests[security]` extra. ([1036][])
- Remove `build-system.requires` dependencies on `wheel`, and the
`setuptools_scm[toml]` extra. ([1036][])

CI

- Update pre-commit config to use `black==22.3.0` to avoid breakage
caused by `click>=8.1.0`. ([1019][])
- Updateto `pylint=2.13.4`. ([1025][])

Command Line

- Fix exception when `--extra-flag`s are specified. ([1041][], [1042][])

Packaging

- Declare explicit dependencies on `MarkupSafe` and `pytz`,
where were transitively implied but are imported directly
by Lektor code. ([1036][])

Refactorings

- Removed unused cruft. ([1009][])

[mistune]: https://mistune.readthedocs.io/en/latest/
[esbuild]: https://github.com/evanw/esbuild
[1]: https://github.com/lektor/lektor/issues/1
[203]: https://github.com/lektor/lektor/issues/203
[551]: https://github.com/lektor/lektor/pull/551
[960]: https://github.com/lektor/lektor/pull/960
[978]: https://github.com/lektor/lektor/issues/978
[987]: https://github.com/lektor/lektor/pull/987
[992]: https://github.com/lektor/lektor/pull/992
[995]: https://github.com/lektor/lektor/pull/995
[1009]: https://github.com/lektor/lektor/pull/1009
[1012]: https://github.com/lektor/lektor/pull/1012
[1018]: https://github.com/lektor/lektor/issues/1018
[1019]: https://github.com/lektor/lektor/pull/1019
[1020]: https://github.com/lektor/lektor/issues/1020
[1021]: https://github.com/lektor/lektor/pull/1021
[1022]: https://github.com/lektor/lektor/issues/1022
[1025]: https://github.com/lektor/lektor/pull/1025
[1031]: https://github.com/lektor/lektor/issues/1031
[1033]: https://github.com/lektor/lektor/pull/1033
[1036]: https://github.com/lektor/lektor/pull/1036
[1038]: https://github.com/lektor/lektor/issues/1038
[1041]: https://github.com/lektor/lektor/issues/1041
[1042]: https://github.com/lektor/lektor/pull/1042
[1043]: https://github.com/lektor/lektor/issues/1043
[1044]: https://github.com/lektor/lektor/pull/1044
[1048]: https://github.com/lektor/lektor/pull/1048
[1050]: https://github.com/lektor/lektor/pull/1050
[1051]: https://github.com/lektor/lektor/pull/1051

3.3.2

Features

Command Line

- Enabled the [Jinja debug extension][jinja-dbg-ext] when the
`LEKTOR_DEV` env var is set to 1 and `lektor server` is
used. ([984][])

License

- The wording in the LICENSE file was standardized to that of the
current [BSD 3-Clause License][bsd]. ([972][])

Bugs

Markdown Renderer

- Fix overzealous HTML-entity escaping of link and image attributes. ([989][])

Admin API

- Fix a bug in `make_editor_session` when editing non-existant pages
with a non-primary alt. ([964][])
- Fix the ability to add an initial flowblock to a page. (Broken in 3.3.1.)
- Refactor API views to move business logic back into the `Tree`
adapter ([967][]). This fixes [962][].

Admin UI

- Changed the structure of the URLs used by the GUI single-page app ([976][]).
This fixes problems with the "edit" pencil when using alternatives ([975][]),
and issues when page ids include colons ([610][]).
- Other React refactors and fixes ([988][]).

Database

- Fix `Attachment.url_path` when _alternatives_ are in use. There is only
one copy of each attachment emitted — the `url_path` should always be
that corresponding to the _primary alternative_. ([958][])
- `Pad.get`, if not passed an explicit value for the `alt` parameter,
now returns the record for the _primary alternative_ rather than the
fallback record. Similarly, `Pad.root` now returns the root record
for the _primary alternative_. ([958][], [965][])
- Fix for uncaught `OSError(error=EINVAL)` on Windows when `Pad.get`
was called with a path containing characters which are not allowed
in Windows filenames (e.g. `<>*?|\/":`).

Builder

- Pages now record a build dependency on their datamodel `.ini` file.
- Fix sqlite version detection so that we use "without rowid" optimization
with current versions of sqlite. ([1002][])

Command Line

- When running `lektor dev new-theme`: fix check for ability to create symlinks
under Windows. ([996][])
- Fix _rsync_ publisher when deletion enabled on macOS. ([946][], [954][])

Tests

- Fix for test failures when git is not installed. ([998][], [1000][])

Refactorings

- Cleaned up `EditorSession` to split mapping methods (for access to
record data) to a separate class, now available as
`EditorSession.data`. ([969][])

Testing

- Cleaned up and moved our `pylint` and `coverage` configuration to
`pyproject.toml`. ([990][], [991][])

Admin UI

- Move frontend source from `lektor/admin/static/` to `frontend/`.
Compiled frontend code moved from `lektor/admin/static/gen/` to
'lektor/admin/static/`. ([1003][])

Packaging

- Omit `example` subdirectory, frontend source code, developer-centric
config files, as well as other assorted cruft from sdist. ([986][])

[bsd]: https://opensource.org/licenses/BSD-3-Clause
[610]: https://github.com/lektor/lektor/issues/610
[946]: https://github.com/lektor/lektor/issues/946
[954]: https://github.com/lektor/lektor/pull/954
[958]: https://github.com/lektor/lektor/pull/958
[962]: https://github.com/lektor/lektor/issues/962
[964]: https://github.com/lektor/lektor/pull/964
[965]: https://github.com/lektor/lektor/issues/965
[967]: https://github.com/lektor/lektor/pull/967
[969]: https://github.com/lektor/lektor/pull/969
[972]: https://github.com/lektor/lektor/pull/972
[975]: https://github.com/lektor/lektor/issues/975
[976]: https://github.com/lektor/lektor/pull/976
[984]: https://github.com/lektor/lektor/pull/984
[986]: https://github.com/lektor/lektor/pull/986
[988]: https://github.com/lektor/lektor/pull/988
[989]: https://github.com/lektor/lektor/pull/989
[990]: https://github.com/lektor/lektor/pull/990
[991]: https://github.com/lektor/lektor/pull/991
[996]: https://github.com/lektor/lektor/pull/996
[998]: https://github.com/lektor/lektor/issues/998
[1000]: https://github.com/lektor/lektor/pull/1000
[1002]: https://github.com/lektor/lektor/pull/1002
[1003]: https://github.com/lektor/lektor/pull/1003
[jinja-dbg-ext]: https://jinja.palletsprojects.com/en/latest/extensions/#debug-extension

Page 2 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.