mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-127873: Only check sys.flags.ignore_environment
for PYTHON*
env vars (#127877)
This commit is contained in:
parent
13475e0a5a
commit
05d12eecbd
22 changed files with 94 additions and 65 deletions
|
@ -101,16 +101,6 @@ handle_events_narrow_console = partial(
|
|||
)
|
||||
|
||||
|
||||
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