mirror of
https://github.com/python/cpython.git
synced 2025-10-30 21:21:22 +00:00
[3.13] gh-127873: Only check sys.flags.ignore_environment for PYTHON* env vars (GH-127877) (#129138)
This commit is contained in:
parent
f7f8b8b758
commit
cc3dc8ab24
22 changed files with 91 additions and 28 deletions
|
|
@ -101,16 +101,6 @@ def handle_all_events(
|
|||
)
|
||||
|
||||
|
||||
def make_clean_env() -> dict[str, str]:
|
||||
clean_env = os.environ.copy()
|
||||
for k in clean_env.copy():
|
||||
if k.startswith("PYTHON"):
|
||||
clean_env.pop(k)
|
||||
clean_env.pop("FORCE_COLOR", None)
|
||||
clean_env.pop("NO_COLOR", None)
|
||||
return clean_env
|
||||
|
||||
|
||||
class FakeConsole(Console):
|
||||
def __init__(self, events, encoding="utf-8") -> None:
|
||||
self.events = iter(events)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue