Merge branch 'maintenance' into devel

This commit is contained in:
Gina Häußge committed 2022-03-14 12:30:58 +01:00
commit 35a86650fc
4 files changed
+30 -14

No files matched your search

+7 -7
View File
@@ -18,21 +18,21 @@ prerelease
HEAD
\(detached.*
# maintenance is currently the branch for preparation of maintenance release 1.8.0
# maintenance is currently the branch for preparation of maintenance release 1.9.0
# so are any fix/... and improve/... branches
maintenance 1.8.0 3fe45661cd79c5137d9d4f5f4adb4d9519bc2084 pep440-dev
fix/.* 1.8.0 3fe45661cd79c5137d9d4f5f4adb4d9519bc2084 pep440-dev
improve/.* 1.8.0 3fe45661cd79c5137d9d4f5f4adb4d9519bc2084 pep440-dev
maintenance 1.9.0 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev
fix/.* 1.9.0 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev
improve/.* 1.9.0 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev
# staging/bugfix is the branch for preparation of the 1.7.4 bugfix release
# so are any bug/... branches
staging/bugfix 1.7.4 59cbfadf8922d85b9df40f8d0173e8c21724c3b8 pep440-dev
bug/.* 1.7.4 59cbfadf8922d85b9df40f8d0173e8c21724c3b8 pep440-dev
# staging/maintenance is currently the branch for preparation of 1.7.0rc4
# staging/maintenance is currently the branch for preparation of 1.8.0rc1
# so is regressionfix/...
staging/maintenance 1.7.0rc4 f31194f75365787f3eb5da61a24f2f8620111f4f pep440-dev
regressionfix/.* 1.7.0rc4 f31194f75365787f3eb5da61a24f2f8620111f4f pep440-dev
staging/maintenance 1.8.0rc1 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev
regressionfix/.* 1.8.0rc1 fa2c4680cca0d1d6b46e6c1ed68ceea4d9b79afb pep440-dev
# staging/devel is currently inactive (but has the 1.4.1rc4 namespace)
staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev
+1 -1
View File
@@ -60,7 +60,7 @@ core_deps = [
"semantic_version>=2.8.5,<3",
"sentry-sdk>=1.3.1,<2",
"tornado>=6.0.4,<7",
"watchdog==1.0.0",
"watchdog>=1,<2",
"websocket-client>=1.2.1,<2",
"wrapt>=1.13.3,<1.14",
"zeroconf>=0.33,<0.34", # breaking changes can happen on minor version increases
@@ -4,6 +4,7 @@ __copyright__ = "Copyright (C) 2016 The OctoPrint Project - Released under terms
import calendar
import logging
import os
import re
import threading
@@ -436,9 +437,11 @@ class AnnouncementPlugin(
self._logger.debug(f"Loaded channel {key} from cache at {channel_path}")
return d
except Exception:
self._logger.exception(
f"Could not read channel {key} from cache {channel_path}"
)
if self._logger.isEnabledFor(logging.DEBUG):
self._logger.exception(
f"Could not read channel {key} from cache at {channel_path}"
)
try:
os.remove(channel_path)
except OSError:
@@ -54,7 +54,7 @@ GCODE.gCodeReader = (function () {
byteCount = 0;
for (i = 0; i < lines.length; i++) {
byteCount += lines[i].length + 1; // line length + line ending
byteCount += lines[i].length + 1; // line length + '\n'
gcode.push({line: lines[i], percentage: (byteCount * 100) / totalSize});
}
lines = [];
@@ -188,8 +188,21 @@ GCODE.gCodeReader = (function () {
this.clear();
var totalSize = reader.target.result.length;
// With a regex split below as previous, memory usage is huge & takes longer.
lines = reader.target.result.replace("\r\n", "\n").split("\n");
/*
* Split by line ending
*
* Be aware that for windows line endings \r\n this leaves the \r attached to
* the lines. That will not influence our parser, but makes file position
* calculation way easier (line length + 1), so we just leave it in.
*
* This cannot cope with old MacOS \r line endings, but those should
* really not be used anymore and thus we'll happily ignore them here.
*
* Note: A simple string split uses up *much* less memory than regex.
*/
lines = reader.target.result.split("\n");
reader.target.result = null;
prepareGCode(totalSize);