Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.
Also extracted install command cleanup into class method and added tests
for that.
cc @markwal
Instead of hardcoding a list of supported mixins, we now instead define
a base class (or a list thereof) from which mixins might inherit and use
inspection to determine the set of mixins each plugin implementation
implements. Not only will that reduce the risk of forgetting to add a
new mixin to the whitelist, but it will also allow mixins defined by
plugins.
Files (and folders) are still slugified to ASCII for storage on disk,
but now the original filename is stored alongside in metadata.yaml
and used for display in the file list and print status.
The slicing dialog also inherits that display name for use as base
for the suggested GCODE name.
Internally, everything still depends completely on the slugified
ASCII version.
This implements #2094
If the filename contained a [] pair, the file would not match the glob
pattern used for selecting for deletion.
Backporting the glob.escape function from Python 3.4 and using it here
should fix that. We only use our own ported version if glob.escape
doesn't exist - that should reduce redundant code once we become Python
3 compatible.
E.g. in case of a disconnected thermistor, or when it is really
really cold. Make sure our parsing doesn't get confuse by this and
thinks that
ok T:150.0/210.0 T0:-55.7/0 T1:150.0/210.0
is actually only T and T1 being reported by the firmware, causing
stuff to be wrongly canonicalized thanks to T/T1 being Smoothie's way
of reporting dual extruder setups.
Fixes#2007
Now also detects capabilities reported by (extended) M115 output and
if AUTOREPORT_TEMP is available enables it with the configured
autoreport interval and disables active polling.
Implements #1679
* Don't restrict the list of compatibility values to check against
to only those we have mapped, also support unmapped more exotic
ones.
* Allow 1:1 check against sys.platform values (with startswith).
Combined with the above that allows very granular compatibility
modelling ("freebsd11", "freebsd12") if required.
* Instead of only whitelisting ("linux", "freebsd") now also black
listing is possible ("!windows").
A detected os must match all provided whitelist elements (if the
whitelist is empty that is considered always the case) and none of
the backlist elements (if the blacklist is empty that is also
considered always the case).
See the included unit tests for examples of how this works.
* UserSettings: crashed if overwrite an existing key with primitive value by same key with complex value. Also reduced number of calls to user.get_setting()
* Updated tests
(cherry picked from commit b75b53d)
* Fix priority queue sorting (sorts ascending, not descending!)
* Abort low priority jobs when a high priority job comes in
* Utilize queue for tracking aborted jobs too
* Abort analysis for items that are to be deleted/moved (also
fixes issue under Windows where it was impossible to delete
a file for which the analysis was still running).
Example:
* both "session" and "session_P5000" cookies available: "session" value from "session_P5000"
* only "session" cookie available: "session" value from "session"
* only "session_P5000" cookie available: "session" value from "session_P5000"
Also added API docs regarding header encoding, incl support for RFC 5987
for filename fields in Content-Disposition headers in multipart/form-data
parts, incl. an example of an upload request with a utf-8 encoded filename.
Solves an issue with clients encoding filenames in multipart
headers in ISO-8859-1, causing an HTTP 500 response code.
This change makes ISO-8859-1 encoded headers work, sends
a 400 Bad Request instead of 500 Internal Server Error if the
request multipart headers cannot be decoded as either UTF-8
or ISO-8859-1, defines UTF-8 content type for multipart text
fields in rebuilt body and also adds support for RFC 5987 for the
multipart file upload "filename" header component.
* make sure server_port headers are properly set in reverse proxied scenarios
* overwrite request and response classes to
* always apply reverse proxy environment changes (so far missing for tornado
context)
* strip cookie name suffixes from cookie names on requests and
* be sure to set cookie name suffixes for cookie names on responses
* include script root in path used for cookies
* some minor refactoring in octoprint.server setup routines
* removed ReverseProxied class (didn't work for tornado context)
* add unit tests for the whole reverse proxy, request and response customization