This works around a bug when installing PyYaml
>=5.4.1,<6.0.1 ever since Cython 3.0 has been released.
PyYaml 6.0.1 pins Cython to a version less than 3.0 which
resolves this issue (for now).
See also yaml/pyyaml#724
Apparently we have an issue when updating from an older OctoPrint install
that included that to a newer one that depends on OctoPrint-Setuptools, because
the `octoprint_setuptools` package simply won't be installed in that case.
A reinstall after updating OctoPrint makes it available, but that's not something
we can do in the field.
Long term this needs a better solution, short term we are simply going to provide
OctoPrint-Setuptools to pyproject.toml users, and a vendored copy here. It's the
only solution I see for now.
Really closes#4749
This is the final version to include universal wheels. Newer versions
seem to have native C extensions, no arm wheels are provided, building
them on a Pi takes *ages* and piwheels.org currently doesn't have
already compiled wheels for latest available either due to build issues.
For now we'll stick to 0.39.4, long term we might have to compile our own
wheels find another solution.
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
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.
With a fallback of pbkdf2_sha256 should anything
go wrong while attempting to import argon2
from passlib, e.g. due to broken native bindings.
Migration happens transparently on first login via
username and password.
Should reduce likelihood of brute force attacks
on unsecure networks if users decide to deploy/make
OctoPrint accessible there against all advice to
the contrary.
Cherry picked from 82c892ba40
Should reduce likelihood of brute force attacks
on unsecure networks if users decide to deploy/make
OctoPrint accessible there against all advice to
the contrary.
Flask 2.2 requires werkzeug 2.2 which we can't
upgrade to due to flask-login, and the current
version pins might be causing issues in the
field.
TODO for 1.9.0: upgrade werkzeug & flask if
possible with flask-login.
Apparently werkzeug removes stuff on minor releases and that just
broke flask-login 0.5. A newer version isn't out yet, so we pin to
a lower version of werkzeug for 1.8.0 and will then see what to do
with this situation for 1.9 and later (potentially even vendor
flask-login as it appears pretty dead currently).
* ✨ Add `--no-color` option to disable colored output on console
Closes#4396
Also removed the setting of INFO logs to white, instead it will be left as default. If there is a light-colored background (such as white) then it becomes unreadable. Can then just use whatever user has configured for their default and not worry about contrast issues.
* 🎨 Remove redundant bool wrapper
* ⬆️ Update to colorlog 6
That way we get support for NO_COLOR as well:
https://no-color.org/
* 💬 Add NO_COLOR to --no-color help
Co-authored-by: Gina Häußge <gina@octoprint.org>
This allows browsers and other clients to calculate download progress
and detect if the download fails (they get less data than expected).
This is most useful when downloading multiple timelapses due to their
potential size.
This is a backport of PR #4313
We need to process markdown stuff in OctoPrint
now anyhow, might as well just convert
the files previously converted during build on
the go.
That also makes it easier to keep setup.py
Py2 compatible.
* pyupgrade
* various new codemods
* manual removal of Py2/3 compat imports
* manual adjustment of docs, examples, tests
* to_str is now the new to_unicode, deprecated
redirection to to_bytes has been removed
* to_native_str has been redirected to point to
to_str
* to_unicode has been redirected to point to
to_str
* atomic_write refactored to use
NamedTemporaryDirectory
* various other fixes/refactorings all over the
place
The original frozendict module is maintained again and has not removed
setup.py from the repository to make packaging harder. Also the 2.x
releases have added native code to speed it up.
We need to however stick to older versions for
Python 2 and can only pull in newer versions
under Python 3.
Co-authored-by: Gina Häußge <gina@octoprint.org>