Browse Source

ref: remove reopening of stderr / stdout (#69325)

we're now on python 3.11!

<!-- Describe your PR here. -->
anthony sottile 10 months ago
parent
commit
5b99100a3f
1 changed files with 0 additions and 6 deletions
  1. 0 6
      src/sentry/runner/initializer.py

+ 0 - 6
src/sentry/runner/initializer.py

@@ -3,7 +3,6 @@ from __future__ import annotations
 import importlib.metadata
 import logging
 import os
-import sys
 from typing import IO, Any
 
 import click
@@ -307,11 +306,6 @@ def show_big_error(message: str | list[str]) -> None:
 def initialize_app(config: dict[str, Any], skip_service_validation: bool = False) -> None:
     settings = config["settings"]
 
-    if settings.DEBUG and hasattr(sys.stderr, "fileno"):
-        # Enable line buffering for stderr, TODO(py3.9) can be removed after py3.9, see bpo-13601
-        sys.stderr = os.fdopen(sys.stderr.fileno(), "w", 1)
-        sys.stdout = os.fdopen(sys.stdout.fileno(), "w", 1)
-
     # Just reuse the integration app for Single Org / Self-Hosted as
     # it doesn't make much sense to use 2 separate apps for SSO and
     # integration.