Start debug server with python option -bb? #4826
Unanswered
dstromberg
asked this question in
Q&A
Replies: 2 comments
-
It just occurred to me I might be able to ditch the explicit /usr/local/bin/tact-python and trust #!/usr/local/bin/tact-python -bb That might cause problems for debugpy later, but for now I don't really care about that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can run
This is the case for most packages that provide entry points, not only Flask. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on porting a somewhat large python project from cpython 2.7 to cpython 3.10. I know, it's a little late.
The strings-vs-bytes thing is, unsurprisingly, the largest issue.
I'd like to run our debug flask with cpython's -bb option to turn str<->bytes comparisons and implicit conversions into errors.
But if I run:
/usr/local/bin/tact-python -bb /app/app/run.py runserver -h 0.0.0.0 -p 5000
(tact-python is just a symlink to cpython 3.10)
If I do that, then I get:
...and I'm not at all confident that the API (served by Flask) is checking for bytes<->str issues. At least, I'm not getting any tracebacks that look like it is, and that pid 18 doesn't have the -bb.
Is there a way to get Flask's debug server to pass -bb to python (tact-python)?
I don't see a way of doing the same thing as -bb using an environment variable, BTW.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions