-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 7.1.0 (and 7.1.0.post0) break FastAPI/hypercorn #2433
Comments
from multiprocessing import Process, freeze_support
def f():
print("Hello from cx_Freeze")
if __name__ == "__main__":
freeze_support()
Process(target=f).start() Potentially related broken case on macos without fastapi |
@Daniel-I-Am I confirm the bug. I'll work on it. |
I think you're right that the issue you linked is more related |
@Daniel-I-Am I improved the hook for multiprocessing. from hypercorn.__main__ import main
from multiprocessing import freeze_support
if __name__ == "__main__":
freeze_support()
sys.exit(main()) |
I installed the development build and it looks like the problem is fixed now. I see the warning about requiring I will have to check how to insert that call when using the Hypercorn package binary. But it seems Hypercorn is starting fine now. Thanks for the quick fix! |
Added a way to hide the message, check the provisional documentation: |
Release 7.1.1 is out! |
Describe the bug
When running a program built with cx_freeze starting version 7.1.0, it adds additional arguments, which hypercorn does not accept. These arguments seem to be related to multiprocessing integration.
This causes programs built with 7.1.0 or up, to no longer be functional.
A temporary workaround is to downgrade back to 7.0.0.
To Reproduce
All that is required is to run a hypercorn/FastAPI server (or it seems anything that uses multiprocessing) built with cx_Freeze on version 7.0.0 or 7.1.0.post0 (and also 7.1.0 was affected).
I added a full example to a reproduction repository:
https://github.com/Daniel-I-Am/cx_freeze-fastapi-repro
Expected behavior
I would expect programs that can be built with 7.0.0 to also be able to be built with 7.1.0.
Desktop (please complete the following information):
python:3.12-alpine
on linuxThe text was updated successfully, but these errors were encountered: