python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / aws-sam-cli / use_forward_compatible_log_silencing.patch
blob76297875f36ae9e8eaff65e503e3678eeb5ceff2
1 diff --git a/samcli/local/services/base_local_service.py b/samcli/local/services/base_local_service.py
2 index 7b1ab95895d1..76812f02e00a 100644
3 --- a/samcli/local/services/base_local_service.py
4 +++ b/samcli/local/services/base_local_service.py
5 @@ -56,9 +56,11 @@ class BaseLocalService:
7 LOG.debug("Localhost server is starting up. Multi-threading = %s", multi_threaded)
9 - # This environ signifies we are running a main function for Flask. This is true, since we are using it within
10 - # our cli and not on a production server.
11 - os.environ["WERKZEUG_RUN_MAIN"] = "true"
12 + # Suppress flask dev server output in a forward-compatible way
13 + # Source: https://github.com/cs01/gdbgui/issues/425#issuecomment-1119836533
14 + import flask.cli
16 + flask.cli.show_server_banner = lambda *args: None
18 self._app.run(threaded=multi_threaded, host=self.host, port=self.port)