Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
  • Loading branch information
pablogsal and hugovk authored Apr 9, 2024
commit 081aaed6f69881d3b8caecb10aa7a2d0615bc5ac
2 changes: 1 addition & 1 deletion .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-20.04
env:
FORCE_COLOR: 1
OPENSSL_VER: 3.0.13
PYTHONSTRICTEXTENSIONBUILD: 1
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- name: Register gcc problem matcher
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"LOOPBACK_TIMEOUT", "INTERNET_TIMEOUT", "SHORT_TIMEOUT", "LONG_TIMEOUT",
"Py_DEBUG", "EXCEEDS_RECURSION_LIMIT", "Py_C_RECURSION_LIMIT",
"skip_on_s390x",
"without_optimizer", "set_not_colorized_globally", "reset_colorized_globally",
"without_optimizer", "reset_colorized_globally",
"force_not_colorized"
]

Expand Down Expand Up @@ -2574,4 +2574,4 @@ def wrapper(*args, **kwargs):
for key, value in variables.items():
if value is not None:
os.environ[key] = value
return wrapper
return wrapper
2 changes: 1 addition & 1 deletion Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -4369,7 +4369,7 @@ def test_colorized_detection_checks_for_environment_variables(self):
else:
virtual_patching = contextlib.nullcontext()
with virtual_patching:
with (unittest.mock.patch("os.isatty") as isatty_mock,
with (unittest.mock.patch("os.isatty") as isatty_mock,
unittest.mock.patch("traceback._can_colorize", ORIGINAL_CAN_COLORIZE)):
isatty_mock.return_value = True
with unittest.mock.patch("os.environ", {'TERM': 'dumb'}):
Expand Down
1 change: 0 additions & 1 deletion Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def _can_colorize():
return False
except (ImportError, AttributeError):
return False

if not sys.flags.ignore_environment:
if os.environ.get("PYTHON_COLORS") == "0":
return False
Expand Down