♻️ Migrate code base to Python 3 only
* 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
This commit is contained in:
1 parent
853e7f0765
commit
7fb9df9940
206 files changed
+1528
-5389
No files matched your search
@@ -211,7 +211,7 @@ NOT need to convert to bytes when implementing API endpoints that return JSON, a
|
||||
anyhow.
|
||||
|
||||
OctoPrint includes two utility methods you should use to ensure your strings enter/exit your code in the right format,
|
||||
under both Python versions: :py:func:`octoprint.util.to_bytes` and :py:func:`octoprint.util.to_unicode`. Use them to ensure the correct data
|
||||
under both Python versions: :py:func:`octoprint.util.to_bytes` and :py:func:`octoprint.util.to_str`. Use them to ensure the correct data
|
||||
types and to avoid weird conversion and encoding issues during runtime.
|
||||
|
||||
You can read more about this specific issue in the corresponding section of the
|
||||
|
||||
Reference in new issue
Block a user