Closed rmartin16 closed 3 months ago
FYI. I've seen this error twice today now.
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pyflakes" due to source code string cannot contain null bytes.
https://github.com/beeware/briefcase/actions/runs/8591482948/job/23540572715?pr=1722#step:11:61
FYI. I've seen this error twice today now.
Any idea of the cause of this one? It's evidently transient, because it doesn't survive a re-run; but it's not a mode of failure I've seen before, and it doesn't read like an obvious networking issue (which is the usual GitHub Actions CI issue). Maybe a glitchy NFS mount?
hmm....I'm inclined to say it wasn't a low-level protocol error/blip....since the error was identical both times:
File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/flake8/plugins/pyflakes.py", line 10, in <module>
import pyflakes.checker
File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/pyflakes/checker.py", line 12, in <module>
import doctest
SyntaxError: source code string cannot contain null bytes
Other instance: https://github.com/beeware/briefcase/actions/runs/8590845652/job/23538952152#step:11:61
I wonder if GitHub has a corrupted version of doctest
in their caches somehow....
Do you have any objections to applying this to the rest of the project?
This was prompted from my work on "build tracking"....so, I think I'll still probably delay actually updating all multi-line output from this PR but wanted to make sure we're on the same page for transitioning from the f"""..."""
text blocks.
P.S. furthermore, I'm targeting to get this PR and my "linux abstractions" updates in before PyCon....since I'm expecting a release before then. just fyi. (third on that list is Toga typing but probably not targeting pre-pycon.)
Do you have any objections to applying this to the rest of the project?
None at all. Anywhere that we're currently doing manual line breaks is definitely a candidate for being cleaned up in this way. The only place that won't be a drop-in replacement are the "banner" warnings (e.g., the warning when JAVA_HOME doesn't point at a JDK - but I'd argue those should be factored out into some sort of common "banner" mechanism as well (although that doesn't need to be part of this PR unless you're feeling enthused).
P.S. furthermore, I'm targeting to get this PR and my "linux abstractions" updates in before PyCon....since I'm expecting a release before then. just fyi. (third on that list is Toga typing but probably not targeting pre-pycon.)
Agreed - I'm expecting a release of both Toga and Briefcase before PyCon. For planning purposes, I'd say we want to have a release candidate around May 1, so that any release issues get caught before we're live in the middle of a tutorial.
All right; good deal. As a correction, I meant I'm targeting to get "build tracking" and "linux abstractions" in before PyCon....so, I'll shoot for May 1...that may turn out to be optimistic, though.
As for this PR, feel free to merge when you're comfortable with it and I'm return to the updating the rest of the text blocks later.
Changes
Console
from its original implementation inNewCommand
.Notes
f"""..."""
string definitions in to strings without newlines soConsole.textwrap()
can format them.**** WARNING ****
messages...but that'll also take some thought for implementation.PR Checklist: