Files
firefox/third_party/python/pip_tools/piptools/__init__.py
T
ahochheiden 1f74b463e3 Bug 1857470 - Vendor pip-tools at version 7.4.1 r=mach-reviewers,ahal
While nothing explicitly prompted updating this, letting `pip` and
`pip-tools` diverage too greatly in version release dates seems like
a bad idea, especially with the various deprecations in
`pip` and `python3.12`.

This also vendors the implicit dependencies `build`, `tomli`, and
`pyproject_hooks`.

Differential Revision: https://phabricator.services.mozilla.com/D210526
2024-05-27 23:06:19 +00:00

14 lines
398 B
Python

from __future__ import annotations
import locale
from click import secho
# Needed for locale.getpreferredencoding(False) to work
# in pip._internal.utils.encoding.auto_decode
try:
locale.setlocale(locale.LC_ALL, "")
except locale.Error as e: # pragma: no cover
# setlocale can apparently crash if locale are uninitialized
secho(f"Ignoring error when setting locale: {e}", fg="red")