Four new hooks were added:
- octoprint.plugin.backup.before_backup
- octoprint.plugin.backup.after_backup
- octoprint.plugin.backup.before_restore
- octoprint.plugin.backup.after_restore
Those will allow plugins to perform additional
tasks right before/after backup and right before/
after restore.
This is a compromise for #4195: Instead of having
an extension point in OctoPrint to pull in
additional files, having to figure out
readability, proper allow listing to prevent
attempts to backup everything and the kitchen sink
and such, plugins CAN pull in additional stuff
they want to have in the backup into their data
folder and then on restore (or start after
restore) put it where it belongs. In an ideal
world, we would ever only want to backup stuff
that is already in the base folder anyhow, but
as #4195 demonstrates there is sometimes a need
for more.
And since these hooks are not limited to this
functionality specifically but could also be used
for other stuff (think reregistering somewhere
after restore or whatnot), I think they are a
good compromise.
Implements #4195
This way
?l10n=zh_hk
will work too, not just
?l10n=zh_hant_hk
Additionally, a comma separated list of l10n
options can now also be provided via query
or header, not just a single value:
?l10n=zh_hk,zh
See #4445
In multiple locations OctoPrint so far only used
the language component, rendering territory and/or
script specific translations unusable and
unselectable.
Fixes#4445
We extracted octoprint_setuptools into its own
package on pypi and pull that in on OctoPrint's
install to support plugins gettings installed
non-isolated via setuptools.
Additionally, OctoPrint's setup.py will use it
for clean & translation sub commands, but it's
made optional during install - we don't need
additional commands during a wheel build/install.
Plugins that use pyproject.toml can now add
octoprint-setuptools as a build requirement:
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "octoprint-setuptools"]
build-backend = "setuptools.build_meta"
That way, isolated builds (as triggered by
the existance of pyproject.toml) will work.
And finally, by adding wheel as a dependency
to OctoPrint, we ensure that pip won't try to
install setup.py based plugins in an isolated
environment and fail due to the missing
octoprint_setuptools dependency.
Implements #4682
Work towards fixing #4552
If LFN_WRITE capability is reported as supported,
OctoPrint by default now will upload SD files
to the printer under their full name instead of
shortening it to DOS conventions.
The primary name as reported by the firmware
(first entry in the M20 output) is still
considered the main name and used for any file
operations like selecting or deleting. So, if
the firmware supports a DOS name here, that's
also what OctoPrint will (continue to) use for
any such operations.
Implements #4494
By adding a query parameter `devmode` it can be
re-enabled.
This should hopefully reduce the amount of text-only
systeminfo we get on the forums.
Implements #4524
When 3.12 comes around, we can always change
the python version requirement for local testing,
but this way there will be no bad surprises in the
field, OctoPrint will just refuse to install.