Martijn Braam and Gina Häußge
8b3a51c1a0
⏪ Back to frozendict (#4244 )
...
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 >
2021-11-10 12:49:14 +01:00
Gina Häußge
4c1d0338f4
✅ Add basic tests for fast_deepcopy
...
Should handle regular dict and something that's not
pickleable.
2021-09-15 18:17:42 +02:00
Gina Häußge
411b925506
🗑 Deprecate octoprint.util.bom_aware_open
...
The same can be achieved with io.open and a -sig encoding.
To be removed in 2.0
Closes #4228
2021-09-14 18:07:34 +02:00
Flaviu Tamas
f3c0c29f69
Use C YAML loader when possible
...
This is a lot faster:
before _get_options: .339, .317, .220, .321, .315
after _get_options: .037, .106, .037, .145, .089
2021-09-13 16:16:53 +02:00
Gina Häußge
70d07889e2
💚 emoji update changed wolf_face to wolf
2021-08-03 12:03:05 +02:00
Gina Häußge
9cf0802bf2
💚 Fix a typo in a unit test
2021-05-20 15:21:11 +02:00
Gina Häußge
f912adcd33
✨ Support unicode file names on Py3
...
If we are on py3 and thus can rely on pathvalidate, we'll now no longer
slugify uploaded files names, but try to keep them as close to the
original name as possible, including unicode and emoji and whatnot. This
requires the underlying file system to support this, so just in case the
old behaviour can be enforced by setting the config flag
feature.enforceReallyUniversalFilenames to true.
Closes #4078
2021-05-20 10:36:01 +02:00
cp2004
2c03ecdfff
🐛 Fix SameSite=None cookie
...
When passing Python's NoneType down to Werkzeug, it uses this logic:
```python
if samesite is not None:
samesite = samesite.title()
if samesite not in {"Strict", "Lax", "None"}:
raise ValueError("SameSite must be 'Strict', 'Lax', or 'None'.")
```
This means that when OctoPrint converted any strings 'None' into NoneType,
they would not show up in the Set-Cookie header.
Investigation: https://community.octoprint.org/t/unable-to-log-into-octoprint-through-an-iframe-on-home-assistant/33977/20?u=charlie_powell
Link to werkzeug source: https://github.com/pallets/werkzeug/blob/1dde4b1790f9c46b7122bb8225e6b48a5b22a615/src/werkzeug/http.py#L1213-L1217
Docs, while not explicitly clear, here: https://werkzeug.palletsprojects.com/en/1.0.x/http/?highlight=dump_cookie#werkzeug.http.dump_cookie
2021-05-12 16:30:44 +01:00
Gina Häußge
6053cad832
💚 Update cypress dependencies
2021-05-10 16:37:33 +02:00
Gina Häußge
631085f78f
♻️ Extract PiSupport plugin into own repo
2021-03-26 16:46:54 +01:00
Gina Häußge
983dd4d437
♻️ Actually, make it the WHOLE command line indeed
...
See #3972
2021-03-24 16:03:24 +01:00
Gina Häußge
7e37569613
✨ Make ffmpeg command line fully configurable
...
Implements #3972
2021-03-24 15:36:19 +01:00
Gina Häußge
3feb8deb8c
💚 Fix unit tests
...
Some day I'll learn to search in src AND tests...
2021-03-15 17:55:25 +01:00
Gina Häußge
f9745515e1
🎨 Add pyupgrade
2021-03-11 14:34:06 +01:00
Gina Häußge
47cf12e9f3
💚 e2e: fix pmgr endpoint
...
Changed with 084625fe7c
2021-03-09 12:38:59 +01:00
Gina Häußge
97b6f25cfd
Merge branch 'pr/3916' into maintenance
2021-02-23 11:32:55 +01:00
Gina Häußge
fec2f9b83e
🐛 Further firmware line parser fixes
...
Something like _KEY should never get recognized as a key.
2021-02-23 11:32:36 +01:00
cp2004
bd3f7f8897
🎨 Make black happy again
2021-02-22 18:46:24 +00:00
cp2004
e43f4ddb50
💚 Add more tests for firmware info splitting
...
Part of #3916
2021-02-22 18:34:15 +00:00
Gina Häußge
86aa5548c6
✅ Make test fix align with other such cases
2021-02-22 16:47:05 +01:00
Levi Blaney
a628549ad3
Fixes #3999 test fails to reload config file
2021-02-20 10:12:16 -05:00
Gina Häußge
55b08f6b5b
✨ backup: allow retore of backups from newer patch versions
...
E.g. backups from 1.6.3 can be applied on 1.6.2. However, 1.6.x still
won't be possible to restore under 1.5.x or earlier.
2021-02-17 14:05:40 +01:00
Gina Häußge
785a938cc6
Merge branch 'maintenance' into py2numbers
2021-01-22 11:28:48 +01:00
Miroslav Šedivý
acb9e09293
🦕 Remove redundant float conversions from Python2
...
Since we import division from __future__, the division behaves the same in Python 2.7 and 3.x
2021-01-21 19:42:42 +01:00
Gina Häußge
e9adcddf7f
💚 Fix py2.7 test issue
...
We still need to stay compatible to py2, so
we need to import mock, not unittest.mock.
2021-01-18 17:06:08 +01:00
Gina Häußge
20c0833cbc
✏️ Fix file header
2021-01-18 16:52:33 +01:00
Levi Blaney
1be8c23069
add tests for gcode script events
2021-01-18 16:47:24 +01:00
Gina Häußge
6b2485363e
✅ Update e2e dep version
...
Should make dependabot happy about our e2e tests again.
2021-01-11 19:17:39 +01:00
Gina Häußge
221ecad5c8
✅ Update e2e dep version
...
Should make dependabot happy about our e2e tests again.
2021-01-11 16:17:10 +01:00
Gina Häußge
c12447dca2
♻️ Extract slugify/sanitizing into util method
...
Reduces code duplication
2020-11-23 17:14:57 +01:00
Gina Häußge
a4b44a8b0f
🥅 Do not support pyc plugins
...
A pyc file alone should really never happen anyhow in our plugin setup,
and they would not load under Py3 anyhow as we can't parse the
compatibility information right now.
Simply removing their support altogether as it should not have been
utilized anywhere anyhow as far as I am aware, and never was officially
documented as supported to boot.
2020-11-12 10:11:49 +01:00
Gina Häußge
9a57362602
🥅 Better solution for invalid plugin detection
...
Should be done at plugin manager level, not externally. Ignore pyc files
though as we currently can't parse their metadata (looking into that).
Fix tests while at it.
2020-11-11 18:23:29 +01:00
Gina Häußge
dbc012fa4c
🎨 Fix some left over set calls
2020-10-23 16:42:32 +02:00
Gina Häußge
fd319fc82f
🥅 PiSupport: Warning if run on a zero/zero w
2020-10-21 11:54:46 +02:00
Gina Häußge
d3cf2a8e35
🎨 Some additional pre-commit checks
2020-10-07 21:16:48 +02:00
Gina Häußge
6b44909f21
🎨 Add prettier for js, less, yaml, json, ...
2020-10-07 18:53:49 +02:00
Gina Häußge
8427383b31
🐛 Don't touch BOM test files with pre-commit
2020-10-07 17:25:46 +02:00
Gina Häußge
b5be8f3eae
🎨 Add codemods to pre-commit, fix flake8
2020-10-07 16:27:11 +02:00
Gina Häußge
cae6730ea8
🎨 EOF/trailing whitespace/TOML&YAML check
...
And armed and documented pre-commit
2020-10-07 13:45:49 +02:00
Gina Häußge
fbfb34df58
🎨 Switch to use of isort
2020-10-07 13:15:52 +02:00
Gina Häußge
1f93b2355a
🎨 Switch to black formatting
2020-10-07 13:13:06 +02:00
Gina Häußge
26151b3c42
⚡ ️ Even more aggressive caching of uploads
...
The LocalFileStorage now maintains its own internal cache for all
tracked folders and will only refresh entries if the last modification
of a (sub)folder has changed.
2020-10-01 11:44:50 +02:00
Gina Häußge
ef8903902c
✨ PMGR: Support version ranges for notices
2020-09-15 18:21:38 +02:00
Gina Häußge
b80826dd0c
Merge branch 'pr/3719' into maintenance
2020-09-14 12:44:02 +02:00
Tobias Frost
e83e2a4467
Hint mkstemp to create directory in the destination directory.
2020-09-07 15:10:50 +02:00
Gina Häußge
ffb2a0ed73
Merge branch 'master' into maintenance
2020-08-04 14:24:58 +02:00
Gina Häußge
0364130dd3
⬆️ Upgrade cypress
2020-08-04 14:14:47 +02:00
Gina Häußge
e49d0b0c22
💚 Use fixed umask for tests
2020-08-03 10:50:57 +02:00
Gina Häußge
a846fd8f83
✅ Add E2E for basic settings dialog behaviour
2020-08-03 10:31:25 +02:00
Gina Häußge
e7e04271fd
💚 Fix tests broken by 894178918
2020-08-03 09:59:56 +02:00