diff --git a/news/platformdirs.vendor.rst b/news/platformdirs.vendor.rst new file mode 100644 index 00000000000..40d6733f157 --- /dev/null +++ b/news/platformdirs.vendor.rst @@ -0,0 +1 @@ +Upgrade platformdirs to 4.9.2 diff --git a/news/rich.vendor.rst b/news/rich.vendor.rst new file mode 100644 index 00000000000..2d251402e9d --- /dev/null +++ b/news/rich.vendor.rst @@ -0,0 +1 @@ +Upgrade rich to 14.3.2 diff --git a/src/pip/_vendor/platformdirs/__init__.py b/src/pip/_vendor/platformdirs/__init__.py index 2325ec2eb6f..23a09507b41 100644 --- a/src/pip/_vendor/platformdirs/__init__.py +++ b/src/pip/_vendor/platformdirs/__init__.py @@ -1,5 +1,7 @@ -""" -Utilities for determining application-specific dirs. +"""Utilities for determining application-specific dirs. + +Provides convenience functions (e.g. :func:`user_data_dir`, :func:`user_config_path`), a :data:`PlatformDirs` class that +auto-detects the current platform, and the :class:`~platformdirs.api.PlatformDirsABC` base class. See for details and usage. @@ -50,20 +52,23 @@ def _set_platform_dir_class() -> type[PlatformDirsABC]: AppDirs = PlatformDirs #: Backwards compatibility with appdirs -def user_data_dir( +def user_data_dir( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, roaming: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param roaming: See `roaming `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: data directory tied to the user + """ return PlatformDirs( appname=appname, @@ -71,6 +76,7 @@ def user_data_dir( version=version, roaming=roaming, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_data_dir @@ -81,13 +87,14 @@ def site_data_dir( multipath: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param multipath: See `roaming `. + :param multipath: See `multipath `. :param ensure_exists: See `ensure_exists `. + :returns: data directory shared by users + """ return PlatformDirs( appname=appname, @@ -98,20 +105,23 @@ def site_data_dir( ).site_data_dir -def user_config_dir( +def user_config_dir( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, roaming: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param roaming: See `roaming `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: config directory tied to the user + """ return PlatformDirs( appname=appname, @@ -119,6 +129,7 @@ def user_config_dir( version=version, roaming=roaming, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_config_dir @@ -129,13 +140,14 @@ def site_config_dir( multipath: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param multipath: See `roaming `. + :param multipath: See `multipath `. :param ensure_exists: See `ensure_exists `. - :returns: config directory shared by the users + + :returns: config directory shared by users + """ return PlatformDirs( appname=appname, @@ -146,20 +158,23 @@ def site_config_dir( ).site_config_dir -def user_cache_dir( +def user_cache_dir( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param opinion: See `roaming `. + :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: cache directory tied to the user + """ return PlatformDirs( appname=appname, @@ -167,6 +182,7 @@ def user_cache_dir( version=version, opinion=opinion, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_cache_dir @@ -177,13 +193,14 @@ def site_cache_dir( opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. - :returns: cache directory tied to the user + + :returns: cache directory shared by users + """ return PlatformDirs( appname=appname, @@ -194,20 +211,23 @@ def site_cache_dir( ).site_cache_dir -def user_state_dir( +def user_state_dir( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, roaming: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param roaming: See `roaming `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: state directory tied to the user + """ return PlatformDirs( appname=appname, @@ -215,23 +235,49 @@ def user_state_dir( version=version, roaming=roaming, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_state_dir -def user_log_dir( +def site_state_dir( appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, - opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> str: + """:param appname: See `appname `. + :param appauthor: See `appauthor `. + :param version: See `version `. + :param ensure_exists: See `ensure_exists `. + + :returns: state directory shared by users + """ - :param appname: See `appname `. + return PlatformDirs( + appname=appname, + appauthor=appauthor, + version=version, + ensure_exists=ensure_exists, + ).site_state_dir + + +def user_log_dir( # noqa: PLR0913, PLR0917 + appname: str | None = None, + appauthor: str | Literal[False] | None = None, + version: str | None = None, + opinion: bool = True, # noqa: FBT001, FBT002 + ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 +) -> str: + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param opinion: See `roaming `. + :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: log directory tied to the user + """ return PlatformDirs( appname=appname, @@ -239,9 +285,35 @@ def user_log_dir( version=version, opinion=opinion, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_log_dir +def site_log_dir( + appname: str | None = None, + appauthor: str | Literal[False] | None = None, + version: str | None = None, + opinion: bool = True, # noqa: FBT001, FBT002 + ensure_exists: bool = False, # noqa: FBT001, FBT002 +) -> str: + """:param appname: See `appname `. + :param appauthor: See `appauthor `. + :param version: See `version `. + :param opinion: See `opinion `. + :param ensure_exists: See `ensure_exists `. + + :returns: log directory shared by users + + """ + return PlatformDirs( + appname=appname, + appauthor=appauthor, + version=version, + opinion=opinion, + ensure_exists=ensure_exists, + ).site_log_dir + + def user_documents_dir() -> str: """:returns: documents directory tied to the user""" return PlatformDirs().user_documents_dir @@ -272,20 +344,54 @@ def user_desktop_dir() -> str: return PlatformDirs().user_desktop_dir -def user_runtime_dir( +def user_bin_dir() -> str: + """:returns: bin directory tied to the user""" + return PlatformDirs().user_bin_dir + + +def site_bin_dir() -> str: + """:returns: bin directory shared by users""" + return PlatformDirs().site_bin_dir + + +def user_applications_dir() -> str: + """:returns: applications directory tied to the user""" + return PlatformDirs().user_applications_dir + + +def site_applications_dir( + multipath: bool = False, # noqa: FBT001, FBT002 + ensure_exists: bool = False, # noqa: FBT001, FBT002 +) -> str: + """:param multipath: See `multipath `. + :param ensure_exists: See `ensure_exists `. + + :returns: applications directory shared by users + + """ + return PlatformDirs( + multipath=multipath, + ensure_exists=ensure_exists, + ).site_applications_dir + + +def user_runtime_dir( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: runtime directory tied to the user + """ return PlatformDirs( appname=appname, @@ -293,6 +399,7 @@ def user_runtime_dir( version=version, opinion=opinion, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_runtime_dir @@ -303,13 +410,14 @@ def site_runtime_dir( opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> str: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :returns: runtime directory shared by users + """ return PlatformDirs( appname=appname, @@ -320,20 +428,23 @@ def site_runtime_dir( ).site_runtime_dir -def user_data_path( +def user_data_path( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, roaming: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param roaming: See `roaming `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: data path tied to the user + """ return PlatformDirs( appname=appname, @@ -341,6 +452,7 @@ def user_data_path( version=version, roaming=roaming, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_data_path @@ -351,13 +463,14 @@ def site_data_path( multipath: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param multipath: See `multipath `. :param ensure_exists: See `ensure_exists `. + :returns: data path shared by users + """ return PlatformDirs( appname=appname, @@ -368,20 +481,23 @@ def site_data_path( ).site_data_path -def user_config_path( +def user_config_path( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, roaming: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param roaming: See `roaming `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: config path tied to the user + """ return PlatformDirs( appname=appname, @@ -389,6 +505,7 @@ def user_config_path( version=version, roaming=roaming, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_config_path @@ -399,13 +516,14 @@ def site_config_path( multipath: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param multipath: See `roaming `. + :param multipath: See `multipath `. :param ensure_exists: See `ensure_exists `. - :returns: config path shared by the users + + :returns: config path shared by users + """ return PlatformDirs( appname=appname, @@ -423,13 +541,14 @@ def site_cache_path( opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. - :returns: cache directory tied to the user + + :returns: cache path shared by users + """ return PlatformDirs( appname=appname, @@ -440,20 +559,23 @@ def site_cache_path( ).site_cache_path -def user_cache_path( +def user_cache_path( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param opinion: See `roaming `. + :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: cache path tied to the user + """ return PlatformDirs( appname=appname, @@ -461,23 +583,27 @@ def user_cache_path( version=version, opinion=opinion, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_cache_path -def user_state_path( +def user_state_path( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, roaming: bool = False, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param roaming: See `roaming `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: state path tied to the user + """ return PlatformDirs( appname=appname, @@ -485,23 +611,49 @@ def user_state_path( version=version, roaming=roaming, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_state_path -def user_log_path( +def site_state_path( appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, - opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> Path: + """:param appname: See `appname `. + :param appauthor: See `appauthor `. + :param version: See `version `. + :param ensure_exists: See `ensure_exists `. + + :returns: state path shared by users + """ - :param appname: See `appname `. + return PlatformDirs( + appname=appname, + appauthor=appauthor, + version=version, + ensure_exists=ensure_exists, + ).site_state_path + + +def user_log_path( # noqa: PLR0913, PLR0917 + appname: str | None = None, + appauthor: str | Literal[False] | None = None, + version: str | None = None, + opinion: bool = True, # noqa: FBT001, FBT002 + ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 +) -> Path: + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. - :param opinion: See `roaming `. + :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: log path tied to the user + """ return PlatformDirs( appname=appname, @@ -509,11 +661,37 @@ def user_log_path( version=version, opinion=opinion, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_log_path +def site_log_path( + appname: str | None = None, + appauthor: str | Literal[False] | None = None, + version: str | None = None, + opinion: bool = True, # noqa: FBT001, FBT002 + ensure_exists: bool = False, # noqa: FBT001, FBT002 +) -> Path: + """:param appname: See `appname `. + :param appauthor: See `appauthor `. + :param version: See `version `. + :param opinion: See `opinion `. + :param ensure_exists: See `ensure_exists `. + + :returns: log path shared by users + + """ + return PlatformDirs( + appname=appname, + appauthor=appauthor, + version=version, + opinion=opinion, + ensure_exists=ensure_exists, + ).site_log_path + + def user_documents_path() -> Path: - """:returns: documents a path tied to the user""" + """:returns: documents path tied to the user""" return PlatformDirs().user_documents_path @@ -542,20 +720,54 @@ def user_desktop_path() -> Path: return PlatformDirs().user_desktop_path -def user_runtime_path( +def user_bin_path() -> Path: + """:returns: bin path tied to the user""" + return PlatformDirs().user_bin_path + + +def site_bin_path() -> Path: + """:returns: bin path shared by users""" + return PlatformDirs().site_bin_path + + +def user_applications_path() -> Path: + """:returns: applications path tied to the user""" + return PlatformDirs().user_applications_path + + +def site_applications_path( + multipath: bool = False, # noqa: FBT001, FBT002 + ensure_exists: bool = False, # noqa: FBT001, FBT002 +) -> Path: + """:param multipath: See `multipath `. + :param ensure_exists: See `ensure_exists `. + + :returns: applications path shared by users + + """ + return PlatformDirs( + multipath=multipath, + ensure_exists=ensure_exists, + ).site_applications_path + + +def user_runtime_path( # noqa: PLR0913, PLR0917 appname: str | None = None, appauthor: str | Literal[False] | None = None, version: str | None = None, opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :param use_site_for_root: See `use_site_for_root `. + :returns: runtime path tied to the user + """ return PlatformDirs( appname=appname, @@ -563,6 +775,7 @@ def user_runtime_path( version=version, opinion=opinion, ensure_exists=ensure_exists, + use_site_for_root=use_site_for_root, ).user_runtime_path @@ -573,13 +786,14 @@ def site_runtime_path( opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 ) -> Path: - """ - :param appname: See `appname `. + """:param appname: See `appname `. :param appauthor: See `appauthor `. :param version: See `version `. :param opinion: See `opinion `. :param ensure_exists: See `ensure_exists `. + :returns: runtime path shared by users + """ return PlatformDirs( appname=appname, @@ -596,14 +810,26 @@ def site_runtime_path( "PlatformDirsABC", "__version__", "__version_info__", + "site_applications_dir", + "site_applications_path", + "site_bin_dir", + "site_bin_path", "site_cache_dir", "site_cache_path", "site_config_dir", "site_config_path", "site_data_dir", "site_data_path", + "site_log_dir", + "site_log_path", "site_runtime_dir", "site_runtime_path", + "site_state_dir", + "site_state_path", + "user_applications_dir", + "user_applications_path", + "user_bin_dir", + "user_bin_path", "user_cache_dir", "user_cache_path", "user_config_dir", diff --git a/src/pip/_vendor/platformdirs/__main__.py b/src/pip/_vendor/platformdirs/__main__.py index fa8a677a336..58c12e0f644 100644 --- a/src/pip/_vendor/platformdirs/__main__.py +++ b/src/pip/_vendor/platformdirs/__main__.py @@ -15,10 +15,16 @@ "user_pictures_dir", "user_videos_dir", "user_music_dir", + "user_bin_dir", + "site_bin_dir", + "user_applications_dir", "user_runtime_dir", "site_data_dir", "site_config_dir", "site_cache_dir", + "site_state_dir", + "site_log_dir", + "site_applications_dir", "site_runtime_dir", ) diff --git a/src/pip/_vendor/platformdirs/_xdg.py b/src/pip/_vendor/platformdirs/_xdg.py new file mode 100644 index 00000000000..c4aadd6d031 --- /dev/null +++ b/src/pip/_vendor/platformdirs/_xdg.py @@ -0,0 +1,143 @@ +"""XDG environment variable mixin for Unix and macOS.""" + +from __future__ import annotations + +import os + +from .api import PlatformDirsABC + + +class XDGMixin(PlatformDirsABC): + """Mixin that checks XDG environment variables, falling back to platform-specific defaults via ``super()``.""" + + @property + def user_data_dir(self) -> str: + """:returns: data directory tied to the user, from ``$XDG_DATA_HOME`` if set, else platform default""" + if path := os.environ.get("XDG_DATA_HOME", "").strip(): + return self._append_app_name_and_version(path) + return super().user_data_dir + + @property + def _site_data_dirs(self) -> list[str]: + if xdg_dirs := os.environ.get("XDG_DATA_DIRS", "").strip(): + return [self._append_app_name_and_version(p) for p in xdg_dirs.split(os.pathsep) if p.strip()] + return super()._site_data_dirs # type: ignore[misc] + + @property + def site_data_dir(self) -> str: + """:returns: data directories shared by users, from ``$XDG_DATA_DIRS`` if set, else platform default""" + dirs = self._site_data_dirs + return os.pathsep.join(dirs) if self.multipath else dirs[0] + + @property + def user_config_dir(self) -> str: + """:returns: config directory tied to the user, from ``$XDG_CONFIG_HOME`` if set, else platform default""" + if path := os.environ.get("XDG_CONFIG_HOME", "").strip(): + return self._append_app_name_and_version(path) + return super().user_config_dir + + @property + def _site_config_dirs(self) -> list[str]: + if xdg_dirs := os.environ.get("XDG_CONFIG_DIRS", "").strip(): + return [self._append_app_name_and_version(p) for p in xdg_dirs.split(os.pathsep) if p.strip()] + return super()._site_config_dirs # type: ignore[misc] + + @property + def site_config_dir(self) -> str: + """:returns: config directories shared by users, from ``$XDG_CONFIG_DIRS`` if set, else platform default""" + dirs = self._site_config_dirs + return os.pathsep.join(dirs) if self.multipath else dirs[0] + + @property + def user_cache_dir(self) -> str: + """:returns: cache directory tied to the user, from ``$XDG_CACHE_HOME`` if set, else platform default""" + if path := os.environ.get("XDG_CACHE_HOME", "").strip(): + return self._append_app_name_and_version(path) + return super().user_cache_dir + + @property + def user_state_dir(self) -> str: + """:returns: state directory tied to the user, from ``$XDG_STATE_HOME`` if set, else platform default""" + if path := os.environ.get("XDG_STATE_HOME", "").strip(): + return self._append_app_name_and_version(path) + return super().user_state_dir + + @property + def user_runtime_dir(self) -> str: + """:returns: runtime directory tied to the user, from ``$XDG_RUNTIME_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_RUNTIME_DIR", "").strip(): + return self._append_app_name_and_version(path) + return super().user_runtime_dir + + @property + def site_runtime_dir(self) -> str: + """:returns: runtime directory shared by users, from ``$XDG_RUNTIME_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_RUNTIME_DIR", "").strip(): + return self._append_app_name_and_version(path) + return super().site_runtime_dir + + @property + def user_documents_dir(self) -> str: + """:returns: documents directory tied to the user, from ``$XDG_DOCUMENTS_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_DOCUMENTS_DIR", "").strip(): + return os.path.expanduser(path) # noqa: PTH111 + return super().user_documents_dir + + @property + def user_downloads_dir(self) -> str: + """:returns: downloads directory tied to the user, from ``$XDG_DOWNLOAD_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_DOWNLOAD_DIR", "").strip(): + return os.path.expanduser(path) # noqa: PTH111 + return super().user_downloads_dir + + @property + def user_pictures_dir(self) -> str: + """:returns: pictures directory tied to the user, from ``$XDG_PICTURES_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_PICTURES_DIR", "").strip(): + return os.path.expanduser(path) # noqa: PTH111 + return super().user_pictures_dir + + @property + def user_videos_dir(self) -> str: + """:returns: videos directory tied to the user, from ``$XDG_VIDEOS_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_VIDEOS_DIR", "").strip(): + return os.path.expanduser(path) # noqa: PTH111 + return super().user_videos_dir + + @property + def user_music_dir(self) -> str: + """:returns: music directory tied to the user, from ``$XDG_MUSIC_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_MUSIC_DIR", "").strip(): + return os.path.expanduser(path) # noqa: PTH111 + return super().user_music_dir + + @property + def user_desktop_dir(self) -> str: + """:returns: desktop directory tied to the user, from ``$XDG_DESKTOP_DIR`` if set, else platform default""" + if path := os.environ.get("XDG_DESKTOP_DIR", "").strip(): + return os.path.expanduser(path) # noqa: PTH111 + return super().user_desktop_dir + + @property + def user_applications_dir(self) -> str: + """:returns: applications directory tied to the user, from ``$XDG_DATA_HOME`` if set, else platform default""" + if path := os.environ.get("XDG_DATA_HOME", "").strip(): + return os.path.join(os.path.expanduser(path), "applications") # noqa: PTH111, PTH118 + return super().user_applications_dir + + @property + def _site_applications_dirs(self) -> list[str]: + if xdg_dirs := os.environ.get("XDG_DATA_DIRS", "").strip(): + return [os.path.join(p, "applications") for p in xdg_dirs.split(os.pathsep) if p.strip()] # noqa: PTH118 + return super()._site_applications_dirs # type: ignore[misc] + + @property + def site_applications_dir(self) -> str: + """:returns: applications directories shared by users, from ``$XDG_DATA_DIRS`` if set, else platform default""" + dirs = self._site_applications_dirs + return os.pathsep.join(dirs) if self.multipath else dirs[0] + + +__all__ = [ + "XDGMixin", +] diff --git a/src/pip/_vendor/platformdirs/android.py b/src/pip/_vendor/platformdirs/android.py index 92efc852d38..38243dfc96a 100644 --- a/src/pip/_vendor/platformdirs/android.py +++ b/src/pip/_vendor/platformdirs/android.py @@ -11,100 +11,124 @@ from .api import PlatformDirsABC -class Android(PlatformDirsABC): - """ - Follows the guidance `from here `_. +class Android(PlatformDirsABC): # noqa: PLR0904 + """Platform directories for Android. + + Follows the guidance `from here `_. Directories are typically located + under the app's private storage (``/data/user///``). Makes use of the `appname `, `version - `, `ensure_exists `. + `, `opinion `, `ensure_exists + `. """ @property def user_data_dir(self) -> str: - """:return: data directory tied to the user, e.g. ``/data/user///files/``""" + """:returns: data directory tied to the user, e.g. ``/data/user///files/``""" return self._append_app_name_and_version(cast("str", _android_folder()), "files") @property def site_data_dir(self) -> str: - """:return: data directory shared by users, same as `user_data_dir`""" + """:returns: data directory shared by users, same as `user_data_dir`""" return self.user_data_dir @property def user_config_dir(self) -> str: - """ - :return: config directory tied to the user, e.g. \ - ``/data/user///shared_prefs/`` - """ + """:returns: config directory tied to the user, e.g. ``/data/user///shared_prefs/``""" return self._append_app_name_and_version(cast("str", _android_folder()), "shared_prefs") @property def site_config_dir(self) -> str: - """:return: config directory shared by the users, same as `user_config_dir`""" + """:returns: config directory shared by users, same as `user_config_dir`""" return self.user_config_dir @property def user_cache_dir(self) -> str: - """:return: cache directory tied to the user, e.g.,``/data/user///cache/``""" + """:returns: cache directory tied to the user, e.g.,``/data/user///cache/``""" return self._append_app_name_and_version(cast("str", _android_folder()), "cache") @property def site_cache_dir(self) -> str: - """:return: cache directory shared by users, same as `user_cache_dir`""" + """:returns: cache directory shared by users, same as `user_cache_dir`""" return self.user_cache_dir @property def user_state_dir(self) -> str: - """:return: state directory tied to the user, same as `user_data_dir`""" + """:returns: state directory tied to the user, same as `user_data_dir`""" return self.user_data_dir + @property + def site_state_dir(self) -> str: + """:returns: state directory shared by users, same as `user_state_dir`""" + return self.user_state_dir + @property def user_log_dir(self) -> str: - """ - :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it, - e.g. ``/data/user///cache//log`` - """ + """:returns: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it, e.g. ``/data/user///cache//log``""" path = self.user_cache_dir if self.opinion: path = os.path.join(path, "log") # noqa: PTH118 return path + @property + def site_log_dir(self) -> str: + """:returns: log directory shared by users, same as `user_log_dir`""" + return self.user_log_dir + @property def user_documents_dir(self) -> str: - """:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``""" + """:returns: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``""" return _android_documents_folder() @property def user_downloads_dir(self) -> str: - """:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``""" + """:returns: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``""" return _android_downloads_folder() @property def user_pictures_dir(self) -> str: - """:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``""" + """:returns: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``""" return _android_pictures_folder() @property def user_videos_dir(self) -> str: - """:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``""" + """:returns: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``""" return _android_videos_folder() @property def user_music_dir(self) -> str: - """:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``""" + """:returns: music directory tied to the user e.g. ``/storage/emulated/0/Music``""" return _android_music_folder() @property def user_desktop_dir(self) -> str: - """:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``""" + """:returns: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``""" return "/storage/emulated/0/Desktop" + @property + def user_bin_dir(self) -> str: + """:returns: bin directory tied to the user, e.g. ``/data/user///files/bin``""" + return os.path.join(cast("str", _android_folder()), "files", "bin") # noqa: PTH118 + + @property + def site_bin_dir(self) -> str: + """:returns: bin directory shared by users, same as `user_bin_dir`""" + return self.user_bin_dir + + @property + def user_applications_dir(self) -> str: + """:returns: applications directory tied to the user, same as `user_data_dir`""" + return self.user_data_dir + + @property + def site_applications_dir(self) -> str: + """:returns: applications directory shared by users, same as `user_applications_dir`""" + return self.user_applications_dir + @property def user_runtime_dir(self) -> str: - """ - :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it, - e.g. ``/data/user///cache//tmp`` - """ + """:returns: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it, e.g. ``/data/user///cache//tmp``""" path = self.user_cache_dir if self.opinion: path = os.path.join(path, "tmp") # noqa: PTH118 @@ -112,13 +136,13 @@ def user_runtime_dir(self) -> str: @property def site_runtime_dir(self) -> str: - """:return: runtime directory shared by users, same as `user_runtime_dir`""" + """:returns: runtime directory shared by users, same as `user_runtime_dir`""" return self.user_runtime_dir @lru_cache(maxsize=1) def _android_folder() -> str | None: # noqa: C901 - """:return: base folder for the Android OS or None if it cannot be found""" + """:returns: base folder for the Android OS or None if it cannot be found""" result: str | None = None # type checker isn't happy with our "import android", just don't do this when type checking see # https://stackoverflow.com/a/61394121 @@ -135,7 +159,7 @@ def _android_folder() -> str | None: # noqa: C901 try: # ...and fall back to using plain pyjnius, if python4android isn't available or doesn't deliver any useful # result... - from jnius import autoclass # noqa: PLC0415 + from jnius import autoclass # noqa: PLC0415 # ty: ignore[unresolved-import] context = autoclass("android.content.Context") result = context.getFilesDir().getParentFile().getAbsolutePath() @@ -166,10 +190,10 @@ def _android_folder() -> str | None: # noqa: C901 @lru_cache(maxsize=1) def _android_documents_folder() -> str: - """:return: documents folder for the Android OS""" + """:returns: documents folder for the Android OS""" # Get directories with pyjnius try: - from jnius import autoclass # noqa: PLC0415 + from jnius import autoclass # noqa: PLC0415 # ty: ignore[unresolved-import] context = autoclass("android.content.Context") environment = autoclass("android.os.Environment") @@ -182,10 +206,10 @@ def _android_documents_folder() -> str: @lru_cache(maxsize=1) def _android_downloads_folder() -> str: - """:return: downloads folder for the Android OS""" + """:returns: downloads folder for the Android OS""" # Get directories with pyjnius try: - from jnius import autoclass # noqa: PLC0415 + from jnius import autoclass # noqa: PLC0415 # ty: ignore[unresolved-import] context = autoclass("android.content.Context") environment = autoclass("android.os.Environment") @@ -198,10 +222,10 @@ def _android_downloads_folder() -> str: @lru_cache(maxsize=1) def _android_pictures_folder() -> str: - """:return: pictures folder for the Android OS""" + """:returns: pictures folder for the Android OS""" # Get directories with pyjnius try: - from jnius import autoclass # noqa: PLC0415 + from jnius import autoclass # noqa: PLC0415 # ty: ignore[unresolved-import] context = autoclass("android.content.Context") environment = autoclass("android.os.Environment") @@ -214,10 +238,10 @@ def _android_pictures_folder() -> str: @lru_cache(maxsize=1) def _android_videos_folder() -> str: - """:return: videos folder for the Android OS""" + """:returns: videos folder for the Android OS""" # Get directories with pyjnius try: - from jnius import autoclass # noqa: PLC0415 + from jnius import autoclass # noqa: PLC0415 # ty: ignore[unresolved-import] context = autoclass("android.content.Context") environment = autoclass("android.os.Environment") @@ -230,10 +254,10 @@ def _android_videos_folder() -> str: @lru_cache(maxsize=1) def _android_music_folder() -> str: - """:return: music folder for the Android OS""" + """:returns: music folder for the Android OS""" # Get directories with pyjnius try: - from jnius import autoclass # noqa: PLC0415 + from jnius import autoclass # noqa: PLC0415 # ty: ignore[unresolved-import] context = autoclass("android.content.Context") environment = autoclass("android.os.Environment") diff --git a/src/pip/_vendor/platformdirs/api.py b/src/pip/_vendor/platformdirs/api.py index 251600e6d1b..1ee29adb5be 100644 --- a/src/pip/_vendor/platformdirs/api.py +++ b/src/pip/_vendor/platformdirs/api.py @@ -13,7 +13,13 @@ class PlatformDirsABC(ABC): # noqa: PLR0904 - """Abstract base class for platform directories.""" + """Abstract base class defining all platform directory properties, their :class:`~pathlib.Path` variants, and iterators. + + Platform-specific subclasses (e.g. :class:`~platformdirs.windows.Windows`, :class:`~platformdirs.macos.MacOS`, + :class:`~platformdirs.unix.Unix`) implement the abstract properties to return the appropriate paths for each + operating system. + + """ def __init__( # noqa: PLR0913, PLR0917 self, @@ -24,9 +30,9 @@ def __init__( # noqa: PLR0913, PLR0917 multipath: bool = False, # noqa: FBT001, FBT002 opinion: bool = True, # noqa: FBT001, FBT002 ensure_exists: bool = False, # noqa: FBT001, FBT002 + use_site_for_root: bool = False, # noqa: FBT001, FBT002 ) -> None: - """ - Create a new platform directory. + """Create a new platform directory. :param appname: See `appname`. :param appauthor: See `appauthor`. @@ -35,48 +41,57 @@ def __init__( # noqa: PLR0913, PLR0917 :param multipath: See `multipath`. :param opinion: See `opinion`. :param ensure_exists: See `ensure_exists`. + :param use_site_for_root: See `use_site_for_root`. """ - self.appname = appname #: The name of application. + self.appname = appname #: The name of the application. self.appauthor = appauthor - """ - The name of the app author or distributing body for this application. + """The name of the app author or distributing body for this application. Typically, it is the owning company name. Defaults to `appname`. You may pass ``False`` to disable it. """ self.version = version - """ - An optional version path element to append to the path. + """An optional version path element to append to the path. You might want to use this if you want multiple versions of your app to be able to run independently. If used, this would typically be ``.``. """ self.roaming = roaming - """ - Whether to use the roaming appdata directory on Windows. + """Whether to use the roaming appdata directory on Windows. That means that for users on a Windows network setup for roaming profiles, this user data will be synced on - login (see - `here `_). + login (see `here `_). """ self.multipath = multipath + """An optional parameter which indicates that the entire list of data dirs should be returned. + + By default, the first item would only be returned. Only affects ``site_data_dir`` and ``site_config_dir`` on + Unix and macOS. + """ - An optional parameter which indicates that the entire list of data dirs should be returned. + self.opinion = opinion + """Whether to use opinionated values. - By default, the first item would only be returned. + When enabled, appends an additional subdirectory for certain directories: e.g. ``Cache`` for cache and ``Logs`` + for logs on Windows, ``log`` for logs on Unix. """ - self.opinion = opinion #: A flag to indicating to use opinionated values. self.ensure_exists = ensure_exists - """ - Optionally create the directory (and any missing parents) upon access if it does not exist. + """Optionally create the directory (and any missing parents) upon access if it does not exist. By default, no directories are created. """ + self.use_site_for_root = use_site_for_root + """Whether to redirect ``user_*_dir`` calls to their ``site_*_dir`` equivalents when running as root (uid 0). + + Only has an effect on Unix. Disabled by default for backwards compatibility. When enabled, XDG user environment + variables (e.g. ``XDG_DATA_HOME``) are bypassed for the redirected directories. + + """ def _append_app_name_and_version(self, *base: str) -> str: params = list(base[1:]) @@ -101,161 +116,221 @@ def _first_item_as_path_if_multipath(self, directory: str) -> Path: @property @abstractmethod def user_data_dir(self) -> str: - """:return: data directory tied to the user""" + """:returns: data directory tied to the user""" @property @abstractmethod def site_data_dir(self) -> str: - """:return: data directory shared by users""" + """:returns: data directory shared by users""" @property @abstractmethod def user_config_dir(self) -> str: - """:return: config directory tied to the user""" + """:returns: config directory tied to the user""" @property @abstractmethod def site_config_dir(self) -> str: - """:return: config directory shared by the users""" + """:returns: config directory shared by users""" @property @abstractmethod def user_cache_dir(self) -> str: - """:return: cache directory tied to the user""" + """:returns: cache directory tied to the user""" @property @abstractmethod def site_cache_dir(self) -> str: - """:return: cache directory shared by users""" + """:returns: cache directory shared by users""" @property @abstractmethod def user_state_dir(self) -> str: - """:return: state directory tied to the user""" + """:returns: state directory tied to the user""" + + @property + @abstractmethod + def site_state_dir(self) -> str: + """:returns: state directory shared by users""" @property @abstractmethod def user_log_dir(self) -> str: - """:return: log directory tied to the user""" + """:returns: log directory tied to the user""" + + @property + @abstractmethod + def site_log_dir(self) -> str: + """:returns: log directory shared by users""" @property @abstractmethod def user_documents_dir(self) -> str: - """:return: documents directory tied to the user""" + """:returns: documents directory tied to the user""" @property @abstractmethod def user_downloads_dir(self) -> str: - """:return: downloads directory tied to the user""" + """:returns: downloads directory tied to the user""" @property @abstractmethod def user_pictures_dir(self) -> str: - """:return: pictures directory tied to the user""" + """:returns: pictures directory tied to the user""" @property @abstractmethod def user_videos_dir(self) -> str: - """:return: videos directory tied to the user""" + """:returns: videos directory tied to the user""" @property @abstractmethod def user_music_dir(self) -> str: - """:return: music directory tied to the user""" + """:returns: music directory tied to the user""" @property @abstractmethod def user_desktop_dir(self) -> str: - """:return: desktop directory tied to the user""" + """:returns: desktop directory tied to the user""" + + @property + @abstractmethod + def user_bin_dir(self) -> str: + """:returns: bin directory tied to the user""" + + @property + @abstractmethod + def site_bin_dir(self) -> str: + """:returns: bin directory shared by users""" + + @property + @abstractmethod + def user_applications_dir(self) -> str: + """:returns: applications directory tied to the user""" + + @property + @abstractmethod + def site_applications_dir(self) -> str: + """:returns: applications directory shared by users""" @property @abstractmethod def user_runtime_dir(self) -> str: - """:return: runtime directory tied to the user""" + """:returns: runtime directory tied to the user""" @property @abstractmethod def site_runtime_dir(self) -> str: - """:return: runtime directory shared by users""" + """:returns: runtime directory shared by users""" @property def user_data_path(self) -> Path: - """:return: data path tied to the user""" + """:returns: data path tied to the user""" return Path(self.user_data_dir) @property def site_data_path(self) -> Path: - """:return: data path shared by users""" + """:returns: data path shared by users""" return Path(self.site_data_dir) @property def user_config_path(self) -> Path: - """:return: config path tied to the user""" + """:returns: config path tied to the user""" return Path(self.user_config_dir) @property def site_config_path(self) -> Path: - """:return: config path shared by the users""" + """:returns: config path shared by users""" return Path(self.site_config_dir) @property def user_cache_path(self) -> Path: - """:return: cache path tied to the user""" + """:returns: cache path tied to the user""" return Path(self.user_cache_dir) @property def site_cache_path(self) -> Path: - """:return: cache path shared by users""" + """:returns: cache path shared by users""" return Path(self.site_cache_dir) @property def user_state_path(self) -> Path: - """:return: state path tied to the user""" + """:returns: state path tied to the user""" return Path(self.user_state_dir) + @property + def site_state_path(self) -> Path: + """:returns: state path shared by users""" + return Path(self.site_state_dir) + @property def user_log_path(self) -> Path: - """:return: log path tied to the user""" + """:returns: log path tied to the user""" return Path(self.user_log_dir) + @property + def site_log_path(self) -> Path: + """:returns: log path shared by users""" + return Path(self.site_log_dir) + @property def user_documents_path(self) -> Path: - """:return: documents a path tied to the user""" + """:returns: documents path tied to the user""" return Path(self.user_documents_dir) @property def user_downloads_path(self) -> Path: - """:return: downloads path tied to the user""" + """:returns: downloads path tied to the user""" return Path(self.user_downloads_dir) @property def user_pictures_path(self) -> Path: - """:return: pictures path tied to the user""" + """:returns: pictures path tied to the user""" return Path(self.user_pictures_dir) @property def user_videos_path(self) -> Path: - """:return: videos path tied to the user""" + """:returns: videos path tied to the user""" return Path(self.user_videos_dir) @property def user_music_path(self) -> Path: - """:return: music path tied to the user""" + """:returns: music path tied to the user""" return Path(self.user_music_dir) @property def user_desktop_path(self) -> Path: - """:return: desktop path tied to the user""" + """:returns: desktop path tied to the user""" return Path(self.user_desktop_dir) + @property + def user_bin_path(self) -> Path: + """:returns: bin path tied to the user""" + return Path(self.user_bin_dir) + + @property + def site_bin_path(self) -> Path: + """:returns: bin path shared by users""" + return Path(self.site_bin_dir) + + @property + def user_applications_path(self) -> Path: + """:returns: applications path tied to the user""" + return Path(self.user_applications_dir) + + @property + def site_applications_path(self) -> Path: + """:returns: applications path shared by users""" + return Path(self.site_applications_dir) + @property def user_runtime_path(self) -> Path: - """:return: runtime path tied to the user""" + """:returns: runtime path tied to the user""" return Path(self.user_runtime_dir) @property def site_runtime_path(self) -> Path: - """:return: runtime path shared by users""" + """:returns: runtime path shared by users""" return Path(self.site_runtime_dir) def iter_config_dirs(self) -> Iterator[str]: @@ -273,6 +348,16 @@ def iter_cache_dirs(self) -> Iterator[str]: yield self.user_cache_dir yield self.site_cache_dir + def iter_state_dirs(self) -> Iterator[str]: + """:yield: all user and site state directories.""" + yield self.user_state_dir + yield self.site_state_dir + + def iter_log_dirs(self) -> Iterator[str]: + """:yield: all user and site log directories.""" + yield self.user_log_dir + yield self.site_log_dir + def iter_runtime_dirs(self) -> Iterator[str]: """:yield: all user and site runtime directories.""" yield self.user_runtime_dir @@ -293,6 +378,16 @@ def iter_cache_paths(self) -> Iterator[Path]: for path in self.iter_cache_dirs(): yield Path(path) + def iter_state_paths(self) -> Iterator[Path]: + """:yield: all user and site state paths.""" + for path in self.iter_state_dirs(): + yield Path(path) + + def iter_log_paths(self) -> Iterator[Path]: + """:yield: all user and site log paths.""" + for path in self.iter_log_dirs(): + yield Path(path) + def iter_runtime_paths(self) -> Iterator[Path]: """:yield: all user and site runtime paths.""" for path in self.iter_runtime_dirs(): diff --git a/src/pip/_vendor/platformdirs/macos.py b/src/pip/_vendor/platformdirs/macos.py index 30ab3689130..249324672b0 100644 --- a/src/pip/_vendor/platformdirs/macos.py +++ b/src/pip/_vendor/platformdirs/macos.py @@ -6,77 +6,60 @@ import sys from typing import TYPE_CHECKING +if TYPE_CHECKING: + from collections.abc import Iterator + +from ._xdg import XDGMixin from .api import PlatformDirsABC if TYPE_CHECKING: from pathlib import Path -class MacOS(PlatformDirsABC): - """ - Platform directories for the macOS operating system. +class _MacOSDefaults(PlatformDirsABC): # noqa: PLR0904 + """Default platform directories for macOS without XDG environment variable overrides. - Follows the guidance from - `Apple documentation `_. - Makes use of the `appname `, - `version `, - `ensure_exists `. + Follows the guidance from `Apple's File System Programming Guide + `_. + The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`. """ @property def user_data_dir(self) -> str: - """:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``""" + """:returns: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``""" return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support")) # noqa: PTH111 @property - def site_data_dir(self) -> str: - """ - :return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``. - If we're using a Python binary managed by `Homebrew `_, the directory - will be under the Homebrew prefix, e.g. ``$homebrew_prefix/share/$appname/$version``. - If `multipath ` is enabled, and we're in Homebrew, - the response is a multi-path string separated by ":", e.g. - ``$homebrew_prefix/share/$appname/$version:/Library/Application Support/$appname/$version`` - """ + def _site_data_dirs(self) -> list[str]: is_homebrew = "/opt/python" in sys.prefix homebrew_prefix = sys.prefix.split("/opt/python")[0] if is_homebrew else "" path_list = [self._append_app_name_and_version(f"{homebrew_prefix}/share")] if is_homebrew else [] path_list.append(self._append_app_name_and_version("/Library/Application Support")) - if self.multipath: - return os.pathsep.join(path_list) - return path_list[0] + return path_list @property def site_data_path(self) -> Path: - """:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" + """:returns: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" return self._first_item_as_path_if_multipath(self.site_data_dir) @property def user_config_dir(self) -> str: - """:return: config directory tied to the user, same as `user_data_dir`""" + """:returns: config directory tied to the user, same as `user_data_dir`""" return self.user_data_dir @property - def site_config_dir(self) -> str: - """:return: config directory shared by the users, same as `site_data_dir`""" - return self.site_data_dir + def _site_config_dirs(self) -> list[str]: + return self._site_data_dirs @property def user_cache_dir(self) -> str: - """:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``""" + """:returns: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``""" return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches")) # noqa: PTH111 @property def site_cache_dir(self) -> str: - """ - :return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. - If we're using a Python binary managed by `Homebrew `_, the directory - will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. - If `multipath ` is enabled, and we're in Homebrew, - the response is a multi-path string separated by ":", e.g. - ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version`` - """ + """:returns: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. If we're using a Python binary managed by `Homebrew `_, the directory will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. If `multipath ` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``""" is_homebrew = "/opt/python" in sys.prefix homebrew_prefix = sys.prefix.split("/opt/python")[0] if is_homebrew else "" path_list = [self._append_app_name_and_version(f"{homebrew_prefix}/var/cache")] if is_homebrew else [] @@ -87,59 +70,117 @@ def site_cache_dir(self) -> str: @property def site_cache_path(self) -> Path: - """:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" + """:returns: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" return self._first_item_as_path_if_multipath(self.site_cache_dir) @property def user_state_dir(self) -> str: - """:return: state directory tied to the user, same as `user_data_dir`""" + """:returns: state directory tied to the user, same as `user_data_dir`""" return self.user_data_dir + @property + def site_state_dir(self) -> str: + """:returns: state directory shared by users, same as `site_data_dir`""" + return self.site_data_dir + @property def user_log_dir(self) -> str: - """:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``""" + """:returns: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``""" return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs")) # noqa: PTH111 + @property + def site_log_dir(self) -> str: + """:returns: log directory shared by users, e.g. ``/Library/Logs/$appname/$version``""" + return self._append_app_name_and_version("/Library/Logs") + @property def user_documents_dir(self) -> str: - """:return: documents directory tied to the user, e.g. ``~/Documents``""" + """:returns: documents directory tied to the user, e.g. ``~/Documents``""" return os.path.expanduser("~/Documents") # noqa: PTH111 @property def user_downloads_dir(self) -> str: - """:return: downloads directory tied to the user, e.g. ``~/Downloads``""" + """:returns: downloads directory tied to the user, e.g. ``~/Downloads``""" return os.path.expanduser("~/Downloads") # noqa: PTH111 @property def user_pictures_dir(self) -> str: - """:return: pictures directory tied to the user, e.g. ``~/Pictures``""" + """:returns: pictures directory tied to the user, e.g. ``~/Pictures``""" return os.path.expanduser("~/Pictures") # noqa: PTH111 @property def user_videos_dir(self) -> str: - """:return: videos directory tied to the user, e.g. ``~/Movies``""" + """:returns: videos directory tied to the user, e.g. ``~/Movies``""" return os.path.expanduser("~/Movies") # noqa: PTH111 @property def user_music_dir(self) -> str: - """:return: music directory tied to the user, e.g. ``~/Music``""" + """:returns: music directory tied to the user, e.g. ``~/Music``""" return os.path.expanduser("~/Music") # noqa: PTH111 @property def user_desktop_dir(self) -> str: - """:return: desktop directory tied to the user, e.g. ``~/Desktop``""" + """:returns: desktop directory tied to the user, e.g. ``~/Desktop``""" return os.path.expanduser("~/Desktop") # noqa: PTH111 + @property + def user_bin_dir(self) -> str: + """:returns: bin directory tied to the user, e.g. ``~/.local/bin``""" + return os.path.expanduser("~/.local/bin") # noqa: PTH111 + + @property + def site_bin_dir(self) -> str: + """:returns: bin directory shared by users, e.g. ``/usr/local/bin``""" + return "/usr/local/bin" + + @property + def user_applications_dir(self) -> str: + """:returns: applications directory tied to the user, e.g. ``~/Applications``""" + return os.path.expanduser("~/Applications") # noqa: PTH111 + + @property + def _site_applications_dirs(self) -> list[str]: + return ["/Applications"] + + @property + def site_applications_dir(self) -> str: + """:returns: applications directory shared by users, e.g. ``/Applications``""" + dirs = self._site_applications_dirs + return os.pathsep.join(dirs) if self.multipath else dirs[0] + @property def user_runtime_dir(self) -> str: - """:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``""" + """:returns: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``""" return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems")) # noqa: PTH111 @property def site_runtime_dir(self) -> str: - """:return: runtime directory shared by users, same as `user_runtime_dir`""" + """:returns: runtime directory shared by users, same as `user_runtime_dir`""" return self.user_runtime_dir + def iter_config_dirs(self) -> Iterator[str]: + """:yield: all user and site configuration directories.""" + yield self.user_config_dir + yield from self._site_config_dirs + + def iter_data_dirs(self) -> Iterator[str]: + """:yield: all user and site data directories.""" + yield self.user_data_dir + yield from self._site_data_dirs + + +class MacOS(XDGMixin, _MacOSDefaults): + """Platform directories for the macOS operating system. + + Follows the guidance from `Apple documentation + `_. + Makes use of the `appname `, `version + `, `ensure_exists `. + + XDG environment variables (e.g. ``$XDG_DATA_HOME``) are supported and take precedence over macOS defaults. + + """ + __all__ = [ "MacOS", diff --git a/src/pip/_vendor/platformdirs/unix.py b/src/pip/_vendor/platformdirs/unix.py index fc75d8d0747..53cba338cb9 100644 --- a/src/pip/_vendor/platformdirs/unix.py +++ b/src/pip/_vendor/platformdirs/unix.py @@ -5,9 +5,12 @@ import os import sys from configparser import ConfigParser +from functools import cached_property from pathlib import Path +from tempfile import gettempdir from typing import TYPE_CHECKING, NoReturn +from ._xdg import XDGMixin from .api import PlatformDirsABC if TYPE_CHECKING: @@ -23,202 +26,175 @@ def getuid() -> NoReturn: from os import getuid -class Unix(PlatformDirsABC): # noqa: PLR0904 - """ - On Unix/Linux, we follow the `XDG Basedir Spec `_. +class _UnixDefaults(PlatformDirsABC): # noqa: PLR0904 + """Default directories for Unix/Linux without XDG environment variable overrides. - The spec allows overriding directories with environment variables. The examples shown are the default values, - alongside the name of the environment variable that overrides them. Makes use of the `appname - `, `version `, `multipath - `, `opinion `, `ensure_exists - `. + The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`. """ + @cached_property + def _use_site(self) -> bool: + return self.use_site_for_root and getuid() == 0 + @property def user_data_dir(self) -> str: - """ - :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or - ``$XDG_DATA_HOME/$appname/$version`` - """ - path = os.environ.get("XDG_DATA_HOME", "") - if not path.strip(): - path = os.path.expanduser("~/.local/share") # noqa: PTH111 - return self._append_app_name_and_version(path) + """:returns: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or ``$XDG_DATA_HOME/$appname/$version``""" + return self._append_app_name_and_version(os.path.expanduser("~/.local/share")) # noqa: PTH111 @property def _site_data_dirs(self) -> list[str]: - path = os.environ.get("XDG_DATA_DIRS", "") - if not path.strip(): - path = f"/usr/local/share{os.pathsep}/usr/share" - return [self._append_app_name_and_version(p) for p in path.split(os.pathsep)] - - @property - def site_data_dir(self) -> str: - """ - :return: data directories shared by users (if `multipath ` is - enabled and ``XDG_DATA_DIRS`` is set and a multi path the response is also a multi path separated by the - OS path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version`` - """ - # XDG default for $XDG_DATA_DIRS; only first, if multipath is False - dirs = self._site_data_dirs - if not self.multipath: - return dirs[0] - return os.pathsep.join(dirs) + return [self._append_app_name_and_version("/usr/local/share"), self._append_app_name_and_version("/usr/share")] @property def user_config_dir(self) -> str: - """ - :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or - ``$XDG_CONFIG_HOME/$appname/$version`` - """ - path = os.environ.get("XDG_CONFIG_HOME", "") - if not path.strip(): - path = os.path.expanduser("~/.config") # noqa: PTH111 - return self._append_app_name_and_version(path) + """:returns: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or ``$XDG_CONFIG_HOME/$appname/$version``""" + return self._append_app_name_and_version(os.path.expanduser("~/.config")) # noqa: PTH111 @property def _site_config_dirs(self) -> list[str]: - path = os.environ.get("XDG_CONFIG_DIRS", "") - if not path.strip(): - path = "/etc/xdg" - return [self._append_app_name_and_version(p) for p in path.split(os.pathsep)] - - @property - def site_config_dir(self) -> str: - """ - :return: config directories shared by users (if `multipath ` - is enabled and ``XDG_CONFIG_DIRS`` is set and a multi path the response is also a multi path separated by - the OS path separator), e.g. ``/etc/xdg/$appname/$version`` - """ - # XDG default for $XDG_CONFIG_DIRS only first, if multipath is False - dirs = self._site_config_dirs - if not self.multipath: - return dirs[0] - return os.pathsep.join(dirs) + return [self._append_app_name_and_version("/etc/xdg")] @property def user_cache_dir(self) -> str: - """ - :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or - ``~/$XDG_CACHE_HOME/$appname/$version`` - """ - path = os.environ.get("XDG_CACHE_HOME", "") - if not path.strip(): - path = os.path.expanduser("~/.cache") # noqa: PTH111 - return self._append_app_name_and_version(path) + """:returns: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or ``$XDG_CACHE_HOME/$appname/$version``""" + return self._append_app_name_and_version(os.path.expanduser("~/.cache")) # noqa: PTH111 @property def site_cache_dir(self) -> str: - """:return: cache directory shared by users, e.g. ``/var/cache/$appname/$version``""" + """:returns: cache directory shared by users, e.g. ``/var/cache/$appname/$version``""" return self._append_app_name_and_version("/var/cache") @property def user_state_dir(self) -> str: - """ - :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or - ``$XDG_STATE_HOME/$appname/$version`` - """ - path = os.environ.get("XDG_STATE_HOME", "") - if not path.strip(): - path = os.path.expanduser("~/.local/state") # noqa: PTH111 - return self._append_app_name_and_version(path) + """:returns: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or ``$XDG_STATE_HOME/$appname/$version``""" + return self._append_app_name_and_version(os.path.expanduser("~/.local/state")) # noqa: PTH111 + + @property + def site_state_dir(self) -> str: + """:returns: state directory shared by users, e.g. ``/var/lib/$appname/$version``""" + return self._append_app_name_and_version("/var/lib") @property def user_log_dir(self) -> str: - """:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it""" + """:returns: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it""" path = self.user_state_dir if self.opinion: path = os.path.join(path, "log") # noqa: PTH118 self._optionally_create_directory(path) return path + @property + def site_log_dir(self) -> str: + """:returns: log directory shared by users, e.g. ``/var/log/$appname/$version`` + + Unlike `user_log_dir`, ``opinion`` has no effect since ``/var/log`` is inherently a log directory. + + """ + return self._append_app_name_and_version("/var/log") + @property def user_documents_dir(self) -> str: - """:return: documents directory tied to the user, e.g. ``~/Documents``""" + """:returns: documents directory tied to the user, e.g. ``~/Documents``""" return _get_user_media_dir("XDG_DOCUMENTS_DIR", "~/Documents") @property def user_downloads_dir(self) -> str: - """:return: downloads directory tied to the user, e.g. ``~/Downloads``""" + """:returns: downloads directory tied to the user, e.g. ``~/Downloads``""" return _get_user_media_dir("XDG_DOWNLOAD_DIR", "~/Downloads") @property def user_pictures_dir(self) -> str: - """:return: pictures directory tied to the user, e.g. ``~/Pictures``""" + """:returns: pictures directory tied to the user, e.g. ``~/Pictures``""" return _get_user_media_dir("XDG_PICTURES_DIR", "~/Pictures") @property def user_videos_dir(self) -> str: - """:return: videos directory tied to the user, e.g. ``~/Videos``""" + """:returns: videos directory tied to the user, e.g. ``~/Videos``""" return _get_user_media_dir("XDG_VIDEOS_DIR", "~/Videos") @property def user_music_dir(self) -> str: - """:return: music directory tied to the user, e.g. ``~/Music``""" + """:returns: music directory tied to the user, e.g. ``~/Music``""" return _get_user_media_dir("XDG_MUSIC_DIR", "~/Music") @property def user_desktop_dir(self) -> str: - """:return: desktop directory tied to the user, e.g. ``~/Desktop``""" + """:returns: desktop directory tied to the user, e.g. ``~/Desktop``""" return _get_user_media_dir("XDG_DESKTOP_DIR", "~/Desktop") + @property + def user_bin_dir(self) -> str: + """:returns: bin directory tied to the user, e.g. ``~/.local/bin``""" + return os.path.expanduser("~/.local/bin") # noqa: PTH111 + + @property + def site_bin_dir(self) -> str: + """:returns: bin directory shared by users, e.g. ``/usr/local/bin``""" + return "/usr/local/bin" + + @property + def user_applications_dir(self) -> str: + """:returns: applications directory tied to the user, e.g. ``~/.local/share/applications``""" + return os.path.join(os.path.expanduser("~/.local/share"), "applications") # noqa: PTH111, PTH118 + + @property + def _site_applications_dirs(self) -> list[str]: + return [os.path.join(p, "applications") for p in ["/usr/local/share", "/usr/share"]] # noqa: PTH118 + + @property + def site_applications_dir(self) -> str: + """:returns: applications directory shared by users, e.g. ``/usr/share/applications``""" + dirs = self._site_applications_dirs + return os.pathsep.join(dirs) if self.multipath else dirs[0] + @property def user_runtime_dir(self) -> str: - """ - :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or - ``$XDG_RUNTIME_DIR/$appname/$version``. + """:returns: runtime directory tied to the user, e.g. ``$XDG_RUNTIME_DIR/$appname/$version``. + + If ``$XDG_RUNTIME_DIR`` is unset, tries the platform default (``/tmp/run/user/$(id -u)`` on OpenBSD, ``/var/run/user/$(id -u)`` on FreeBSD/NetBSD, ``/run/user/$(id -u)`` otherwise). If the default is not writable, falls back to a temporary directory. - For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if - exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR`` - is not set. """ - path = os.environ.get("XDG_RUNTIME_DIR", "") - if not path.strip(): - if sys.platform.startswith(("freebsd", "openbsd", "netbsd")): - path = f"/var/run/user/{getuid()}" - if not Path(path).exists(): - path = f"/tmp/runtime-{getuid()}" # noqa: S108 - else: - path = f"/run/user/{getuid()}" + if sys.platform.startswith("openbsd"): + path = f"/tmp/run/user/{getuid()}" # noqa: S108 + elif sys.platform.startswith(("freebsd", "netbsd")): + path = f"/var/run/user/{getuid()}" + else: + path = f"/run/user/{getuid()}" + if not os.access(path, os.W_OK): + path = f"{gettempdir()}/runtime-{getuid()}" return self._append_app_name_and_version(path) @property def site_runtime_dir(self) -> str: - """ - :return: runtime directory shared by users, e.g. ``/run/$appname/$version`` or \ - ``$XDG_RUNTIME_DIR/$appname/$version``. + """:returns: runtime directory shared by users, e.g. ``/run/$appname/$version`` or ``$XDG_RUNTIME_DIR/$appname/$version``. - Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will - fall back to paths associated to the root user instead of a regular logged-in user if it's not set. + Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will fall back to paths associated to the root user instead of a regular logged-in user if it's not set. - If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir` - instead. + If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir` instead. For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set. + """ - path = os.environ.get("XDG_RUNTIME_DIR", "") - if not path.strip(): - if sys.platform.startswith(("freebsd", "openbsd", "netbsd")): - path = "/var/run" - else: - path = "/run" + if sys.platform.startswith(("freebsd", "openbsd", "netbsd")): + path = "/var/run" + else: + path = "/run" return self._append_app_name_and_version(path) @property def site_data_path(self) -> Path: - """:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" + """:returns: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" return self._first_item_as_path_if_multipath(self.site_data_dir) @property def site_config_path(self) -> Path: - """:return: config path shared by the users, returns the first item, even if ``multipath`` is set to ``True``""" + """:returns: config path shared by users, returns the first item, even if ``multipath`` is set to ``True``""" return self._first_item_as_path_if_multipath(self.site_config_dir) @property def site_cache_path(self) -> Path: - """:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" + """:returns: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``""" return self._first_item_as_path_if_multipath(self.site_cache_dir) def iter_config_dirs(self) -> Iterator[str]: @@ -232,36 +208,81 @@ def iter_data_dirs(self) -> Iterator[str]: yield from self._site_data_dirs -def _get_user_media_dir(env_var: str, fallback_tilde_path: str) -> str: - media_dir = _get_user_dirs_folder(env_var) - if media_dir is None: - media_dir = os.environ.get(env_var, "").strip() - if not media_dir: - media_dir = os.path.expanduser(fallback_tilde_path) # noqa: PTH111 +class Unix(XDGMixin, _UnixDefaults): + """On Unix/Linux, we follow the `XDG Basedir Spec `_. - return media_dir + The spec allows overriding directories with environment variables. The examples shown are the default values, + alongside the name of the environment variable that overrides them. Makes use of the `appname + `, `version `, `multipath + `, `opinion `, `ensure_exists + `. + + """ + + @property + def user_data_dir(self) -> str: + """:returns: data directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_data_dir if self._use_site else super().user_data_dir + + @property + def user_config_dir(self) -> str: + """:returns: config directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_config_dir if self._use_site else super().user_config_dir + + @property + def user_cache_dir(self) -> str: + """:returns: cache directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_cache_dir if self._use_site else super().user_cache_dir + + @property + def user_state_dir(self) -> str: + """:returns: state directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_state_dir if self._use_site else super().user_state_dir + + @property + def user_log_dir(self) -> str: + """:returns: log directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_log_dir if self._use_site else super().user_log_dir + + @property + def user_applications_dir(self) -> str: + """:returns: applications directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_applications_dir if self._use_site else super().user_applications_dir + + @property + def user_runtime_dir(self) -> str: + """:returns: runtime directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_runtime_dir if self._use_site else super().user_runtime_dir + + @property + def user_bin_dir(self) -> str: + """:returns: bin directory tied to the user, or site equivalent when root with ``use_site_for_root``""" + return self.site_bin_dir if self._use_site else super().user_bin_dir + + +def _get_user_media_dir(env_var: str, fallback_tilde_path: str) -> str: + if media_dir := _get_user_dirs_folder(env_var): + return media_dir + return os.path.expanduser(fallback_tilde_path) # noqa: PTH111 def _get_user_dirs_folder(key: str) -> str | None: - """ - Return directory from user-dirs.dirs config file. + """Return directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/. """ - user_dirs_config_path = Path(Unix().user_config_dir) / "user-dirs.dirs" + user_dirs_config_path = Path(os.path.expanduser("~/.config")) / "user-dirs.dirs" # noqa: PTH111 if user_dirs_config_path.exists(): parser = ConfigParser() with user_dirs_config_path.open() as stream: - # Add fake section header, so ConfigParser doesn't complain parser.read_string(f"[top]\n{stream.read()}") if key not in parser["top"]: return None path = parser["top"][key].strip('"') - # Handle relative home paths return path.replace("$HOME", os.path.expanduser("~")) # noqa: PTH111 return None diff --git a/src/pip/_vendor/platformdirs/version.py b/src/pip/_vendor/platformdirs/version.py index fcf6f03a1cc..db2fb3f4924 100644 --- a/src/pip/_vendor/platformdirs/version.py +++ b/src/pip/_vendor/platformdirs/version.py @@ -28,7 +28,7 @@ commit_id: COMMIT_ID __commit_id__: COMMIT_ID -__version__ = version = '4.5.1' -__version_tuple__ = version_tuple = (4, 5, 1) +__version__ = version = '4.9.2' +__version_tuple__ = version_tuple = (4, 9, 2) __commit_id__ = commit_id = None diff --git a/src/pip/_vendor/platformdirs/windows.py b/src/pip/_vendor/platformdirs/windows.py index 8d523a9c665..47403dea5ef 100644 --- a/src/pip/_vendor/platformdirs/windows.py +++ b/src/pip/_vendor/platformdirs/windows.py @@ -4,18 +4,19 @@ import os import sys -from functools import lru_cache -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Final from .api import PlatformDirsABC if TYPE_CHECKING: from collections.abc import Callable +# Not exposed by CPython; defined in the Windows SDK (shlobj_core.h) +_KF_FLAG_DONT_VERIFY: Final[int] = 0x00004000 -class Windows(PlatformDirsABC): - """ - `MSDN on where to store app data files `_. + +class Windows(PlatformDirsABC): # noqa: PLR0904 + """`MSDN on where to store app data files `_. Makes use of the `appname `, `appauthor `, `version `, `roaming @@ -26,11 +27,7 @@ class Windows(PlatformDirsABC): @property def user_data_dir(self) -> str: - """ - :return: data directory tied to the user, e.g. - ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or - ``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming) - """ + r""":returns: data directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)""" const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA" path = os.path.normpath(get_win_folder(const)) return self._append_parts(path) @@ -52,91 +49,119 @@ def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str: @property def site_data_dir(self) -> str: - """:return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``""" + r""":returns: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``""" path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA")) return self._append_parts(path) @property def user_config_dir(self) -> str: - """:return: config directory tied to the user, same as `user_data_dir`""" + """:returns: config directory tied to the user, same as `user_data_dir`""" return self.user_data_dir @property def site_config_dir(self) -> str: - """:return: config directory shared by the users, same as `site_data_dir`""" + """:returns: config directory shared by users, same as `site_data_dir`""" return self.site_data_dir @property def user_cache_dir(self) -> str: - """ - :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g. - ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version`` - """ + r""":returns: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g. ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``""" path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA")) return self._append_parts(path, opinion_value="Cache") @property def site_cache_dir(self) -> str: - """:return: cache directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname\\Cache\\$version``""" + r""":returns: cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``""" path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA")) return self._append_parts(path, opinion_value="Cache") @property def user_state_dir(self) -> str: - """:return: state directory tied to the user, same as `user_data_dir`""" + """:returns: state directory tied to the user, same as `user_data_dir`""" return self.user_data_dir + @property + def site_state_dir(self) -> str: + """:returns: state directory shared by users, same as `site_data_dir`""" + return self.site_data_dir + @property def user_log_dir(self) -> str: - """:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it""" + """:returns: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it""" path = self.user_data_dir if self.opinion: path = os.path.join(path, "Logs") # noqa: PTH118 self._optionally_create_directory(path) return path + @property + def site_log_dir(self) -> str: + """:returns: log directory shared by users, same as `site_data_dir` if not opinionated else ``Logs`` in it""" + path = self.site_data_dir + if self.opinion: + path = os.path.join(path, "Logs") # noqa: PTH118 + self._optionally_create_directory(path) + return path + @property def user_documents_dir(self) -> str: - """:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``""" + r""":returns: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``""" return os.path.normpath(get_win_folder("CSIDL_PERSONAL")) @property def user_downloads_dir(self) -> str: - """:return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``""" + r""":returns: downloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``""" return os.path.normpath(get_win_folder("CSIDL_DOWNLOADS")) @property def user_pictures_dir(self) -> str: - """:return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``""" + r""":returns: pictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``""" return os.path.normpath(get_win_folder("CSIDL_MYPICTURES")) @property def user_videos_dir(self) -> str: - """:return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``""" + r""":returns: videos directory tied to the user e.g. ``%USERPROFILE%\Videos``""" return os.path.normpath(get_win_folder("CSIDL_MYVIDEO")) @property def user_music_dir(self) -> str: - """:return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``""" + r""":returns: music directory tied to the user e.g. ``%USERPROFILE%\Music``""" return os.path.normpath(get_win_folder("CSIDL_MYMUSIC")) @property def user_desktop_dir(self) -> str: - """:return: desktop directory tied to the user, e.g. ``%USERPROFILE%\\Desktop``""" + r""":returns: desktop directory tied to the user, e.g. ``%USERPROFILE%\Desktop``""" return os.path.normpath(get_win_folder("CSIDL_DESKTOPDIRECTORY")) + @property + def user_bin_dir(self) -> str: + r""":returns: bin directory tied to the user, e.g. ``%LOCALAPPDATA%\Programs``""" + return os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Programs")) # noqa: PTH118 + + @property + def site_bin_dir(self) -> str: + """:returns: bin directory shared by users, e.g. ``C:\\ProgramData\bin``""" + return os.path.normpath(os.path.join(get_win_folder("CSIDL_COMMON_APPDATA"), "bin")) # noqa: PTH118 + + @property + def user_applications_dir(self) -> str: + r""":returns: applications directory tied to the user, e.g. ``Start Menu\Programs``""" + return os.path.normpath(get_win_folder("CSIDL_PROGRAMS")) + + @property + def site_applications_dir(self) -> str: + r""":returns: applications directory shared by users, e.g. ``C:\ProgramData\Microsoft\Windows\Start Menu\Programs``""" + return os.path.normpath(get_win_folder("CSIDL_COMMON_PROGRAMS")) + @property def user_runtime_dir(self) -> str: - """ - :return: runtime directory tied to the user, e.g. - ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname`` - """ + r""":returns: runtime directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``""" path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp")) # noqa: PTH118 return self._append_parts(path) @property def site_runtime_dir(self) -> str: - """:return: runtime directory shared by users, same as `user_runtime_dir`""" + """:returns: runtime directory shared by users, same as `user_runtime_dir`""" return self.user_runtime_dir @@ -161,7 +186,7 @@ def get_win_folder_from_env_vars(csidl_name: str) -> str: return result -def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None: +def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None: # noqa: PLR0911 """Get a folder for a CSIDL name that does not exist as an environment variable.""" if csidl_name == "CSIDL_PERSONAL": return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents") # noqa: PTH118 @@ -177,12 +202,29 @@ def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None: if csidl_name == "CSIDL_MYMUSIC": return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Music") # noqa: PTH118 + + if csidl_name == "CSIDL_PROGRAMS": + return os.path.join( # noqa: PTH118 + os.path.normpath(os.environ["APPDATA"]), + "Microsoft", + "Windows", + "Start Menu", + "Programs", + ) + + if csidl_name == "CSIDL_COMMON_PROGRAMS": + return os.path.join( # noqa: PTH118 + os.path.normpath(os.environ.get("PROGRAMDATA", os.environ.get("ALLUSERSPROFILE", "C:\\ProgramData"))), + "Microsoft", + "Windows", + "Start Menu", + "Programs", + ) return None def get_win_folder_from_registry(csidl_name: str) -> str: - """ - Get folder from the registry. + """Get folder from the registry. This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer for all CSIDL_* names. @@ -190,6 +232,7 @@ def get_win_folder_from_registry(csidl_name: str) -> str: """ machine_names = { "CSIDL_COMMON_APPDATA", + "CSIDL_COMMON_PROGRAMS", } shell_folder_name = { "CSIDL_APPDATA": "AppData", @@ -200,6 +243,8 @@ def get_win_folder_from_registry(csidl_name: str) -> str: "CSIDL_MYPICTURES": "My Pictures", "CSIDL_MYVIDEO": "My Video", "CSIDL_MYMUSIC": "My Music", + "CSIDL_PROGRAMS": "Programs", + "CSIDL_COMMON_PROGRAMS": "Common Programs", }.get(csidl_name) if shell_folder_name is None: msg = f"Unknown CSIDL name: {csidl_name}" @@ -216,53 +261,86 @@ def get_win_folder_from_registry(csidl_name: str) -> str: return str(directory) +_KNOWN_FOLDER_GUIDS: dict[str, str] = { + "CSIDL_APPDATA": "{3EB685DB-65F9-4CF6-A03A-E3EF65729F3D}", + "CSIDL_COMMON_APPDATA": "{62AB5D82-FDC1-4DC3-A9DD-070D1D495D97}", + "CSIDL_LOCAL_APPDATA": "{F1B32785-6FBA-4FCF-9D55-7B8E7F157091}", + "CSIDL_PERSONAL": "{FDD39AD0-238F-46AF-ADB4-6C85480369C7}", + "CSIDL_MYPICTURES": "{33E28130-4E1E-4676-835A-98395C3BC3BB}", + "CSIDL_MYVIDEO": "{18989B1D-99B5-455B-841C-AB7C74E4DDFC}", + "CSIDL_MYMUSIC": "{4BD8D571-6D19-48D3-BE97-422220080E43}", + "CSIDL_DOWNLOADS": "{374DE290-123F-4565-9164-39C4925E467B}", + "CSIDL_DESKTOPDIRECTORY": "{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}", + "CSIDL_PROGRAMS": "{A77F5D77-2E2B-44C3-A6A2-ABA601054A51}", + "CSIDL_COMMON_PROGRAMS": "{0139D44E-6AFE-49F2-8690-3DAFCAE6FFB8}", +} + + def get_win_folder_via_ctypes(csidl_name: str) -> str: - """Get folder with ctypes.""" - # There is no 'CSIDL_DOWNLOADS'. - # Use 'CSIDL_PROFILE' (40) and append the default folder 'Downloads' instead. - # https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid - - import ctypes # noqa: PLC0415 - - csidl_const = { - "CSIDL_APPDATA": 26, - "CSIDL_COMMON_APPDATA": 35, - "CSIDL_LOCAL_APPDATA": 28, - "CSIDL_PERSONAL": 5, - "CSIDL_MYPICTURES": 39, - "CSIDL_MYVIDEO": 14, - "CSIDL_MYMUSIC": 13, - "CSIDL_DOWNLOADS": 40, - "CSIDL_DESKTOPDIRECTORY": 16, - }.get(csidl_name) - if csidl_const is None: + """Get folder via :func:`SHGetKnownFolderPath`. + + See https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath. + + """ + if sys.platform != "win32": # only needed for type checker to know that this code runs only on Windows + raise NotImplementedError + from ctypes import HRESULT, POINTER, Structure, WinDLL, byref, create_unicode_buffer, wintypes # noqa: PLC0415 + + class _GUID(Structure): + _fields_ = [ + ("Data1", wintypes.DWORD), + ("Data2", wintypes.WORD), + ("Data3", wintypes.WORD), + ("Data4", wintypes.BYTE * 8), + ] + + ole32 = WinDLL("ole32") + ole32.CLSIDFromString.restype = HRESULT + ole32.CLSIDFromString.argtypes = [wintypes.LPCOLESTR, POINTER(_GUID)] + ole32.CoTaskMemFree.restype = None + ole32.CoTaskMemFree.argtypes = [wintypes.LPVOID] + + shell32 = WinDLL("shell32") + shell32.SHGetKnownFolderPath.restype = HRESULT + shell32.SHGetKnownFolderPath.argtypes = [POINTER(_GUID), wintypes.DWORD, wintypes.HANDLE, POINTER(wintypes.LPWSTR)] + + kernel32 = WinDLL("kernel32") + kernel32.GetShortPathNameW.restype = wintypes.DWORD + kernel32.GetShortPathNameW.argtypes = [wintypes.LPWSTR, wintypes.LPWSTR, wintypes.DWORD] + + folder_guid = _KNOWN_FOLDER_GUIDS.get(csidl_name) + if folder_guid is None: msg = f"Unknown CSIDL name: {csidl_name}" raise ValueError(msg) - buf = ctypes.create_unicode_buffer(1024) - windll = getattr(ctypes, "windll") # noqa: B009 # using getattr to avoid false positive with mypy type checker - windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf) + guid = _GUID() + ole32.CLSIDFromString(folder_guid, byref(guid)) - # Downgrade to short path name if it has high-bit chars. - if any(ord(c) > 255 for c in buf): # noqa: PLR2004 - buf2 = ctypes.create_unicode_buffer(1024) - if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024): - buf = buf2 + path_ptr = wintypes.LPWSTR() + shell32.SHGetKnownFolderPath(byref(guid), _KF_FLAG_DONT_VERIFY, None, byref(path_ptr)) + result = path_ptr.value + ole32.CoTaskMemFree(path_ptr) - if csidl_name == "CSIDL_DOWNLOADS": - return os.path.join(buf.value, "Downloads") # noqa: PTH118 + if result is None: + msg = f"SHGetKnownFolderPath returned NULL for {csidl_name}" + raise ValueError(msg) + + if any(ord(c) > 255 for c in result): # noqa: PLR2004 + buf = create_unicode_buffer(1024) + if kernel32.GetShortPathNameW(result, buf, 1024): + result = buf.value - return buf.value + return result def _pick_get_win_folder() -> Callable[[str], str]: + """Select the best method to resolve Windows folder paths: ctypes, then registry, then environment variables.""" try: - import ctypes # noqa: PLC0415 + import ctypes # noqa: PLC0415, F401 except ImportError: pass else: - if hasattr(ctypes, "windll"): - return get_win_folder_via_ctypes + return get_win_folder_via_ctypes try: import winreg # noqa: PLC0415, F401 except ImportError: @@ -271,7 +349,20 @@ def _pick_get_win_folder() -> Callable[[str], str]: return get_win_folder_from_registry -get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder()) +_resolve_win_folder = _pick_get_win_folder() + + +def get_win_folder(csidl_name: str) -> str: + """Get a Windows folder path, checking for ``WIN_PD_OVERRIDE_*`` environment variable overrides first. + + For example, ``CSIDL_LOCAL_APPDATA`` can be overridden by setting ``WIN_PD_OVERRIDE_LOCAL_APPDATA``. + + """ + env_var = f"WIN_PD_OVERRIDE_{csidl_name.removeprefix('CSIDL_')}" + if override := os.environ.get(env_var, "").strip(): + return override + return _resolve_win_folder(csidl_name) + __all__ = [ "Windows", diff --git a/src/pip/_vendor/rich/__init__.py b/src/pip/_vendor/rich/__init__.py index 73f58d77408..f60d5d6146b 100644 --- a/src/pip/_vendor/rich/__init__.py +++ b/src/pip/_vendor/rich/__init__.py @@ -148,7 +148,7 @@ def inspect( docs (bool, optional): Also render doc strings. Defaults to True. private (bool, optional): Show private attributes (beginning with underscore). Defaults to False. dunder (bool, optional): Show attributes starting with double underscore. Defaults to False. - sort (bool, optional): Sort attributes alphabetically. Defaults to True. + sort (bool, optional): Sort attributes alphabetically, callables at the top, leading and trailing underscores ignored. Defaults to True. all (bool, optional): Show all attributes. Defaults to False. value (bool, optional): Pretty print value. Defaults to True. """ diff --git a/src/pip/_vendor/rich/__main__.py b/src/pip/_vendor/rich/__main__.py index a583f1efae3..248165bc1ab 100644 --- a/src/pip/_vendor/rich/__main__.py +++ b/src/pip/_vendor/rich/__main__.py @@ -234,12 +234,12 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: console.print(f"[dim]rendered in [not dim]{taken}ms[/] (warm cache)") console.print() console.print( - Panel.fit( + Panel( "[b magenta]Hope you enjoy using Rich![/]\n\n" - "Please consider sponsoring me if you get value from my work.\n\n" - "Even the price of a ☕ can brighten my day!\n\n" - "https://github.com/sponsors/willmcgugan", - border_style="red", + "Consider sponsoring to ensure this project is maintained.\n\n" + "[cyan]https://github.com/sponsors/willmcgugan[/cyan]", + border_style="green", title="Help ensure Rich is maintained", + padding=(1, 2), ) ) diff --git a/src/pip/_vendor/rich/_cell_widths.py b/src/pip/_vendor/rich/_cell_widths.py deleted file mode 100644 index 608ae3a75d1..00000000000 --- a/src/pip/_vendor/rich/_cell_widths.py +++ /dev/null @@ -1,454 +0,0 @@ -# Auto generated by make_terminal_widths.py - -CELL_WIDTHS = [ - (0, 0, 0), - (1, 31, -1), - (127, 159, -1), - (173, 173, 0), - (768, 879, 0), - (1155, 1161, 0), - (1425, 1469, 0), - (1471, 1471, 0), - (1473, 1474, 0), - (1476, 1477, 0), - (1479, 1479, 0), - (1536, 1541, 0), - (1552, 1562, 0), - (1564, 1564, 0), - (1611, 1631, 0), - (1648, 1648, 0), - (1750, 1757, 0), - (1759, 1764, 0), - (1767, 1768, 0), - (1770, 1773, 0), - (1807, 1807, 0), - (1809, 1809, 0), - (1840, 1866, 0), - (1958, 1968, 0), - (2027, 2035, 0), - (2045, 2045, 0), - (2070, 2073, 0), - (2075, 2083, 0), - (2085, 2087, 0), - (2089, 2093, 0), - (2137, 2139, 0), - (2192, 2193, 0), - (2200, 2207, 0), - (2250, 2307, 0), - (2362, 2364, 0), - (2366, 2383, 0), - (2385, 2391, 0), - (2402, 2403, 0), - (2433, 2435, 0), - (2492, 2492, 0), - (2494, 2500, 0), - (2503, 2504, 0), - (2507, 2509, 0), - (2519, 2519, 0), - (2530, 2531, 0), - (2558, 2558, 0), - (2561, 2563, 0), - (2620, 2620, 0), - (2622, 2626, 0), - (2631, 2632, 0), - (2635, 2637, 0), - (2641, 2641, 0), - (2672, 2673, 0), - (2677, 2677, 0), - (2689, 2691, 0), - (2748, 2748, 0), - (2750, 2757, 0), - (2759, 2761, 0), - (2763, 2765, 0), - (2786, 2787, 0), - (2810, 2815, 0), - (2817, 2819, 0), - (2876, 2876, 0), - (2878, 2884, 0), - (2887, 2888, 0), - (2891, 2893, 0), - (2901, 2903, 0), - (2914, 2915, 0), - (2946, 2946, 0), - (3006, 3010, 0), - (3014, 3016, 0), - (3018, 3021, 0), - (3031, 3031, 0), - (3072, 3076, 0), - (3132, 3132, 0), - (3134, 3140, 0), - (3142, 3144, 0), - (3146, 3149, 0), - (3157, 3158, 0), - (3170, 3171, 0), - (3201, 3203, 0), - (3260, 3260, 0), - (3262, 3268, 0), - (3270, 3272, 0), - (3274, 3277, 0), - (3285, 3286, 0), - (3298, 3299, 0), - (3315, 3315, 0), - (3328, 3331, 0), - (3387, 3388, 0), - (3390, 3396, 0), - (3398, 3400, 0), - (3402, 3405, 0), - (3415, 3415, 0), - (3426, 3427, 0), - (3457, 3459, 0), - (3530, 3530, 0), - (3535, 3540, 0), - (3542, 3542, 0), - (3544, 3551, 0), - (3570, 3571, 0), - (3633, 3633, 0), - (3636, 3642, 0), - (3655, 3662, 0), - (3761, 3761, 0), - (3764, 3772, 0), - (3784, 3790, 0), - (3864, 3865, 0), - (3893, 3893, 0), - (3895, 3895, 0), - (3897, 3897, 0), - (3902, 3903, 0), - (3953, 3972, 0), - (3974, 3975, 0), - (3981, 3991, 0), - (3993, 4028, 0), - (4038, 4038, 0), - (4139, 4158, 0), - (4182, 4185, 0), - (4190, 4192, 0), - (4194, 4196, 0), - (4199, 4205, 0), - (4209, 4212, 0), - (4226, 4237, 0), - (4239, 4239, 0), - (4250, 4253, 0), - (4352, 4447, 2), - (4448, 4607, 0), - (4957, 4959, 0), - (5906, 5909, 0), - (5938, 5940, 0), - (5970, 5971, 0), - (6002, 6003, 0), - (6068, 6099, 0), - (6109, 6109, 0), - (6155, 6159, 0), - (6277, 6278, 0), - (6313, 6313, 0), - (6432, 6443, 0), - (6448, 6459, 0), - (6679, 6683, 0), - (6741, 6750, 0), - (6752, 6780, 0), - (6783, 6783, 0), - (6832, 6862, 0), - (6912, 6916, 0), - (6964, 6980, 0), - (7019, 7027, 0), - (7040, 7042, 0), - (7073, 7085, 0), - (7142, 7155, 0), - (7204, 7223, 0), - (7376, 7378, 0), - (7380, 7400, 0), - (7405, 7405, 0), - (7412, 7412, 0), - (7415, 7417, 0), - (7616, 7679, 0), - (8203, 8207, 0), - (8232, 8238, 0), - (8288, 8292, 0), - (8294, 8303, 0), - (8400, 8432, 0), - (8986, 8987, 2), - (9001, 9002, 2), - (9193, 9196, 2), - (9200, 9200, 2), - (9203, 9203, 2), - (9725, 9726, 2), - (9748, 9749, 2), - (9800, 9811, 2), - (9855, 9855, 2), - (9875, 9875, 2), - (9889, 9889, 2), - (9898, 9899, 2), - (9917, 9918, 2), - (9924, 9925, 2), - (9934, 9934, 2), - (9940, 9940, 2), - (9962, 9962, 2), - (9970, 9971, 2), - (9973, 9973, 2), - (9978, 9978, 2), - (9981, 9981, 2), - (9989, 9989, 2), - (9994, 9995, 2), - (10024, 10024, 2), - (10060, 10060, 2), - (10062, 10062, 2), - (10067, 10069, 2), - (10071, 10071, 2), - (10133, 10135, 2), - (10160, 10160, 2), - (10175, 10175, 2), - (11035, 11036, 2), - (11088, 11088, 2), - (11093, 11093, 2), - (11503, 11505, 0), - (11647, 11647, 0), - (11744, 11775, 0), - (11904, 11929, 2), - (11931, 12019, 2), - (12032, 12245, 2), - (12272, 12329, 2), - (12330, 12335, 0), - (12336, 12350, 2), - (12353, 12438, 2), - (12441, 12442, 0), - (12443, 12543, 2), - (12549, 12591, 2), - (12593, 12686, 2), - (12688, 12771, 2), - (12783, 12830, 2), - (12832, 12871, 2), - (12880, 19903, 2), - (19968, 42124, 2), - (42128, 42182, 2), - (42607, 42610, 0), - (42612, 42621, 0), - (42654, 42655, 0), - (42736, 42737, 0), - (43010, 43010, 0), - (43014, 43014, 0), - (43019, 43019, 0), - (43043, 43047, 0), - (43052, 43052, 0), - (43136, 43137, 0), - (43188, 43205, 0), - (43232, 43249, 0), - (43263, 43263, 0), - (43302, 43309, 0), - (43335, 43347, 0), - (43360, 43388, 2), - (43392, 43395, 0), - (43443, 43456, 0), - (43493, 43493, 0), - (43561, 43574, 0), - (43587, 43587, 0), - (43596, 43597, 0), - (43643, 43645, 0), - (43696, 43696, 0), - (43698, 43700, 0), - (43703, 43704, 0), - (43710, 43711, 0), - (43713, 43713, 0), - (43755, 43759, 0), - (43765, 43766, 0), - (44003, 44010, 0), - (44012, 44013, 0), - (44032, 55203, 2), - (55216, 55295, 0), - (63744, 64255, 2), - (64286, 64286, 0), - (65024, 65039, 0), - (65040, 65049, 2), - (65056, 65071, 0), - (65072, 65106, 2), - (65108, 65126, 2), - (65128, 65131, 2), - (65279, 65279, 0), - (65281, 65376, 2), - (65504, 65510, 2), - (65529, 65531, 0), - (66045, 66045, 0), - (66272, 66272, 0), - (66422, 66426, 0), - (68097, 68099, 0), - (68101, 68102, 0), - (68108, 68111, 0), - (68152, 68154, 0), - (68159, 68159, 0), - (68325, 68326, 0), - (68900, 68903, 0), - (69291, 69292, 0), - (69373, 69375, 0), - (69446, 69456, 0), - (69506, 69509, 0), - (69632, 69634, 0), - (69688, 69702, 0), - (69744, 69744, 0), - (69747, 69748, 0), - (69759, 69762, 0), - (69808, 69818, 0), - (69821, 69821, 0), - (69826, 69826, 0), - (69837, 69837, 0), - (69888, 69890, 0), - (69927, 69940, 0), - (69957, 69958, 0), - (70003, 70003, 0), - (70016, 70018, 0), - (70067, 70080, 0), - (70089, 70092, 0), - (70094, 70095, 0), - (70188, 70199, 0), - (70206, 70206, 0), - (70209, 70209, 0), - (70367, 70378, 0), - (70400, 70403, 0), - (70459, 70460, 0), - (70462, 70468, 0), - (70471, 70472, 0), - (70475, 70477, 0), - (70487, 70487, 0), - (70498, 70499, 0), - (70502, 70508, 0), - (70512, 70516, 0), - (70709, 70726, 0), - (70750, 70750, 0), - (70832, 70851, 0), - (71087, 71093, 0), - (71096, 71104, 0), - (71132, 71133, 0), - (71216, 71232, 0), - (71339, 71351, 0), - (71453, 71467, 0), - (71724, 71738, 0), - (71984, 71989, 0), - (71991, 71992, 0), - (71995, 71998, 0), - (72000, 72000, 0), - (72002, 72003, 0), - (72145, 72151, 0), - (72154, 72160, 0), - (72164, 72164, 0), - (72193, 72202, 0), - (72243, 72249, 0), - (72251, 72254, 0), - (72263, 72263, 0), - (72273, 72283, 0), - (72330, 72345, 0), - (72751, 72758, 0), - (72760, 72767, 0), - (72850, 72871, 0), - (72873, 72886, 0), - (73009, 73014, 0), - (73018, 73018, 0), - (73020, 73021, 0), - (73023, 73029, 0), - (73031, 73031, 0), - (73098, 73102, 0), - (73104, 73105, 0), - (73107, 73111, 0), - (73459, 73462, 0), - (73472, 73473, 0), - (73475, 73475, 0), - (73524, 73530, 0), - (73534, 73538, 0), - (78896, 78912, 0), - (78919, 78933, 0), - (92912, 92916, 0), - (92976, 92982, 0), - (94031, 94031, 0), - (94033, 94087, 0), - (94095, 94098, 0), - (94176, 94179, 2), - (94180, 94180, 0), - (94192, 94193, 0), - (94208, 100343, 2), - (100352, 101589, 2), - (101632, 101640, 2), - (110576, 110579, 2), - (110581, 110587, 2), - (110589, 110590, 2), - (110592, 110882, 2), - (110898, 110898, 2), - (110928, 110930, 2), - (110933, 110933, 2), - (110948, 110951, 2), - (110960, 111355, 2), - (113821, 113822, 0), - (113824, 113827, 0), - (118528, 118573, 0), - (118576, 118598, 0), - (119141, 119145, 0), - (119149, 119170, 0), - (119173, 119179, 0), - (119210, 119213, 0), - (119362, 119364, 0), - (121344, 121398, 0), - (121403, 121452, 0), - (121461, 121461, 0), - (121476, 121476, 0), - (121499, 121503, 0), - (121505, 121519, 0), - (122880, 122886, 0), - (122888, 122904, 0), - (122907, 122913, 0), - (122915, 122916, 0), - (122918, 122922, 0), - (123023, 123023, 0), - (123184, 123190, 0), - (123566, 123566, 0), - (123628, 123631, 0), - (124140, 124143, 0), - (125136, 125142, 0), - (125252, 125258, 0), - (126980, 126980, 2), - (127183, 127183, 2), - (127374, 127374, 2), - (127377, 127386, 2), - (127488, 127490, 2), - (127504, 127547, 2), - (127552, 127560, 2), - (127568, 127569, 2), - (127584, 127589, 2), - (127744, 127776, 2), - (127789, 127797, 2), - (127799, 127868, 2), - (127870, 127891, 2), - (127904, 127946, 2), - (127951, 127955, 2), - (127968, 127984, 2), - (127988, 127988, 2), - (127992, 127994, 2), - (127995, 127999, 0), - (128000, 128062, 2), - (128064, 128064, 2), - (128066, 128252, 2), - (128255, 128317, 2), - (128331, 128334, 2), - (128336, 128359, 2), - (128378, 128378, 2), - (128405, 128406, 2), - (128420, 128420, 2), - (128507, 128591, 2), - (128640, 128709, 2), - (128716, 128716, 2), - (128720, 128722, 2), - (128725, 128727, 2), - (128732, 128735, 2), - (128747, 128748, 2), - (128756, 128764, 2), - (128992, 129003, 2), - (129008, 129008, 2), - (129292, 129338, 2), - (129340, 129349, 2), - (129351, 129535, 2), - (129648, 129660, 2), - (129664, 129672, 2), - (129680, 129725, 2), - (129727, 129733, 2), - (129742, 129755, 2), - (129760, 129768, 2), - (129776, 129784, 2), - (131072, 196605, 2), - (196608, 262141, 2), - (917505, 917505, 0), - (917536, 917631, 0), - (917760, 917999, 0), -] diff --git a/src/pip/_vendor/rich/_inspect.py b/src/pip/_vendor/rich/_inspect.py index 27d65cec93b..ac78ffe296a 100644 --- a/src/pip/_vendor/rich/_inspect.py +++ b/src/pip/_vendor/rich/_inspect.py @@ -29,7 +29,7 @@ class Inspect(JupyterMixin): docs (bool, optional): Also render doc strings. Defaults to True. private (bool, optional): Show private attributes (beginning with underscore). Defaults to False. dunder (bool, optional): Show attributes starting with double underscore. Defaults to False. - sort (bool, optional): Sort attributes alphabetically. Defaults to True. + sort (bool, optional): Sort attributes alphabetically, callables at the top, leading and trailing underscores ignored. Defaults to True. all (bool, optional): Show all attributes. Defaults to False. value (bool, optional): Pretty print value of object. Defaults to True. """ @@ -101,6 +101,10 @@ def _get_signature(self, name: str, obj: Any) -> Optional[Text]: signature_text = self.highlighter(_signature) qualname = name or getattr(obj, "__qualname__", name) + if not isinstance(qualname, str): + qualname = getattr(obj, "__name__", name) + if not isinstance(qualname, str): + qualname = name # If obj is a module, there may be classes (which are callable) to display if inspect.isclass(obj): diff --git a/src/pip/_vendor/rich/_unicode_data/__init__.py b/src/pip/_vendor/rich/_unicode_data/__init__.py new file mode 100644 index 00000000000..df8bfcee0ba --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/__init__.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +import bisect +import os +import sys + +if sys.version_info[:2] >= (3, 9): + from functools import cache +else: + from functools import lru_cache as cache # pragma: no cover + +from importlib import import_module +from typing import TYPE_CHECKING, cast + +from pip._vendor.rich._unicode_data._versions import VERSIONS + +if TYPE_CHECKING: + from pip._vendor.rich.cells import CellTable + +VERSION_ORDER = sorted( + [ + tuple( + map(int, version.split(".")), + ) + for version in VERSIONS + ] +) +VERSION_SET = frozenset(VERSIONS) + + +def _parse_version(version: str) -> tuple[int, int, int]: + """Parse a version string into a tuple of 3 integers. + + Args: + version: A version string. + + Raises: + ValueError: If the version string is invalid. + + Returns: + A tuple of 3 integers. + """ + version_integers: tuple[int, ...] + try: + version_integers = tuple( + map(int, version.split(".")), + ) + except ValueError: + raise ValueError( + f"unicode version string {version!r} is badly formatted" + ) from None + while len(version_integers) < 3: + version_integers = version_integers + (0,) + triple = cast("tuple[int, int, int]", version_integers[:3]) + return triple + + +@cache +def load(unicode_version: str = "auto") -> CellTable: + """Load a cell table for the given unicode version. + + Args: + unicode_version: Unicode version, or `None` to auto-detect. + + """ + if unicode_version == "auto": + unicode_version = os.environ.get("UNICODE_VERSION", "latest") + try: + _parse_version(unicode_version) + except ValueError: + # The environment variable is invalid + # Fallback to using the latest version seems reasonable + unicode_version = "latest" + + if unicode_version == "latest": + version = VERSIONS[-1] + else: + try: + version_numbers = _parse_version(unicode_version) + except ValueError: + version_numbers = _parse_version(VERSIONS[-1]) + major, minor, patch = version_numbers + version = f"{major}.{minor}.{patch}" + if version not in VERSION_SET: + insert_position = bisect.bisect_left(VERSION_ORDER, version_numbers) + version = VERSIONS[max(0, insert_position - 1)] + + version_path_component = version.replace(".", "-") + module_name = f".unicode{version_path_component}" + module = import_module(module_name, "rich._unicode_data") + if TYPE_CHECKING: + assert isinstance(module.cell_table, CellTable) + return module.cell_table diff --git a/src/pip/_vendor/rich/_unicode_data/_versions.py b/src/pip/_vendor/rich/_unicode_data/_versions.py new file mode 100644 index 00000000000..be98418d13d --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/_versions.py @@ -0,0 +1,23 @@ +VERSIONS = ( + "4.1.0", + "5.0.0", + "5.1.0", + "5.2.0", + "6.0.0", + "6.1.0", + "6.2.0", + "6.3.0", + "7.0.0", + "8.0.0", + "9.0.0", + "10.0.0", + "11.0.0", + "12.0.0", + "12.1.0", + "13.0.0", + "14.0.0", + "15.0.0", + "15.1.0", + "16.0.0", + "17.0.0", +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode10-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode10-0-0.py new file mode 100644 index 00000000000..0f3ce9ebc7d --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode10-0-0.py @@ -0,0 +1,611 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "10.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2260, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7415, 7417, 0), + (7616, 7673, 0), + (7675, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12590, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70090, 70092, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70460, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (94176, 94177, 2), + (94208, 100332, 2), + (100352, 101106, 2), + (110592, 110878, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128747, 128748, 2), + (128756, 128760, 2), + (129296, 129342, 2), + (129344, 129356, 2), + (129360, 129387, 2), + (129408, 129431, 2), + (129472, 129472, 2), + (129488, 129510, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode11-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode11-0-0.py new file mode 100644 index 00000000000..eaaf317cb78 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode11-0-0.py @@ -0,0 +1,625 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "11.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2259, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7415, 7417, 0), + (7616, 7673, 0), + (7675, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69446, 69456, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (94176, 94177, 2), + (94208, 100337, 2), + (100352, 101106, 2), + (110592, 110878, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128747, 128748, 2), + (128756, 128761, 2), + (129296, 129342, 2), + (129344, 129392, 2), + (129395, 129398, 2), + (129402, 129402, 2), + (129404, 129442, 2), + (129456, 129465, 2), + (129472, 129474, 2), + (129488, 129535, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode12-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode12-0-0.py new file mode 100644 index 00000000000..9cefcc7cbd4 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode12-0-0.py @@ -0,0 +1,637 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "12.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2259, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7673, 0), + (7675, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69446, 69456, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (78896, 78904, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94208, 100343, 2), + (100352, 101106, 2), + (110592, 110878, 2), + (110928, 110930, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123184, 123190, 0), + (123628, 123631, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128725, 2), + (128747, 128748, 2), + (128756, 128762, 2), + (128992, 129003, 2), + (129293, 129393, 2), + (129395, 129398, 2), + (129402, 129442, 2), + (129445, 129450, 2), + (129454, 129482, 2), + (129485, 129535, 2), + (129648, 129651, 2), + (129656, 129658, 2), + (129664, 129666, 2), + (129680, 129685, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode12-1-0.py b/src/pip/_vendor/rich/_unicode_data/unicode12-1-0.py new file mode 100644 index 00000000000..d87162c0f42 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode12-1-0.py @@ -0,0 +1,636 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "12.1.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2259, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7673, 0), + (7675, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69446, 69456, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (78896, 78904, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94208, 100343, 2), + (100352, 101106, 2), + (110592, 110878, 2), + (110928, 110930, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123184, 123190, 0), + (123628, 123631, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128725, 2), + (128747, 128748, 2), + (128756, 128762, 2), + (128992, 129003, 2), + (129293, 129393, 2), + (129395, 129398, 2), + (129402, 129442, 2), + (129445, 129450, 2), + (129454, 129482, 2), + (129485, 129535, 2), + (129648, 129651, 2), + (129656, 129658, 2), + (129664, 129666, 2), + (129680, 129685, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode13-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode13-0-0.py new file mode 100644 index 00000000000..5e07e8882ba --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode13-0-0.py @@ -0,0 +1,648 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "13.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2259, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2901, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3457, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6848, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7673, 0), + (7675, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43052, 43052, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69291, 69292, 0), + (69446, 69456, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70094, 70095, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (71984, 71989, 0), + (71991, 71992, 0), + (71995, 71998, 0), + (72000, 72000, 0), + (72002, 72003, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (78896, 78904, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94180, 94180, 0), + (94192, 94193, 0), + (94208, 100343, 2), + (100352, 101589, 2), + (101632, 101640, 2), + (110592, 110878, 2), + (110928, 110930, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123184, 123190, 0), + (123628, 123631, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128727, 2), + (128747, 128748, 2), + (128756, 128764, 2), + (128992, 129003, 2), + (129292, 129338, 2), + (129340, 129349, 2), + (129351, 129400, 2), + (129402, 129483, 2), + (129485, 129535, 2), + (129648, 129652, 2), + (129656, 129658, 2), + (129664, 129670, 2), + (129680, 129704, 2), + (129712, 129718, 2), + (129728, 129730, 2), + (129744, 129750, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode14-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode14-0-0.py new file mode 100644 index 00000000000..a9a7caf77d5 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode14-0-0.py @@ -0,0 +1,661 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "14.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2200, 2207, 0), + (2250, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2901, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3132, 3132, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3457, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5909, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6159, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6862, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43052, 43052, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69291, 69292, 0), + (69446, 69456, 0), + (69506, 69509, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69744, 69744, 0), + (69747, 69748, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69826, 69826, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70094, 70095, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (71984, 71989, 0), + (71991, 71992, 0), + (71995, 71998, 0), + (72000, 72000, 0), + (72002, 72003, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (78896, 78904, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94180, 94180, 0), + (94192, 94193, 0), + (94208, 100343, 2), + (100352, 101589, 2), + (101632, 101640, 2), + (110576, 110579, 2), + (110581, 110587, 2), + (110589, 110590, 2), + (110592, 110882, 2), + (110928, 110930, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (118528, 118573, 0), + (118576, 118598, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123184, 123190, 0), + (123566, 123566, 0), + (123628, 123631, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128727, 2), + (128733, 128735, 2), + (128747, 128748, 2), + (128756, 128764, 2), + (128992, 129003, 2), + (129008, 129008, 2), + (129292, 129338, 2), + (129340, 129349, 2), + (129351, 129535, 2), + (129648, 129652, 2), + (129656, 129660, 2), + (129664, 129670, 2), + (129680, 129708, 2), + (129712, 129722, 2), + (129728, 129733, 2), + (129744, 129753, 2), + (129760, 129767, 2), + (129776, 129782, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode15-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode15-0-0.py new file mode 100644 index 00000000000..e1aacc40c66 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode15-0-0.py @@ -0,0 +1,671 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "15.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2200, 2207, 0), + (2250, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2901, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3132, 3132, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3315, 3315, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3457, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3790, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5909, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6159, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6862, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43052, 43052, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69291, 69292, 0), + (69373, 69375, 0), + (69446, 69456, 0), + (69506, 69509, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69744, 69744, 0), + (69747, 69748, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69826, 69826, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70094, 70095, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70209, 70209, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (71984, 71989, 0), + (71991, 71992, 0), + (71995, 71998, 0), + (72000, 72000, 0), + (72002, 72003, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (73472, 73473, 0), + (73475, 73475, 0), + (73524, 73530, 0), + (73534, 73538, 0), + (78896, 78912, 0), + (78919, 78933, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94180, 94180, 0), + (94192, 94193, 0), + (94208, 100343, 2), + (100352, 101589, 2), + (101632, 101640, 2), + (110576, 110579, 2), + (110581, 110587, 2), + (110589, 110590, 2), + (110592, 110882, 2), + (110898, 110898, 2), + (110928, 110930, 2), + (110933, 110933, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (118528, 118573, 0), + (118576, 118598, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123023, 123023, 0), + (123184, 123190, 0), + (123566, 123566, 0), + (123628, 123631, 0), + (124140, 124143, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128727, 2), + (128732, 128735, 2), + (128747, 128748, 2), + (128756, 128764, 2), + (128992, 129003, 2), + (129008, 129008, 2), + (129292, 129338, 2), + (129340, 129349, 2), + (129351, 129535, 2), + (129648, 129660, 2), + (129664, 129672, 2), + (129680, 129725, 2), + (129727, 129733, 2), + (129742, 129755, 2), + (129760, 129768, 2), + (129776, 129784, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode15-1-0.py b/src/pip/_vendor/rich/_unicode_data/unicode15-1-0.py new file mode 100644 index 00000000000..0569fdfbd2d --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode15-1-0.py @@ -0,0 +1,670 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "15.1.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2200, 2207, 0), + (2250, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2901, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3132, 3132, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3315, 3315, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3457, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3790, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5909, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6159, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6862, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12771, 2), + (12783, 12830, 2), + (12832, 12871, 2), + (12880, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43052, 43052, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (69291, 69292, 0), + (69373, 69375, 0), + (69446, 69456, 0), + (69506, 69509, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69744, 69744, 0), + (69747, 69748, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69826, 69826, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70094, 70095, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70209, 70209, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (71984, 71989, 0), + (71991, 71992, 0), + (71995, 71998, 0), + (72000, 72000, 0), + (72002, 72003, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (73472, 73473, 0), + (73475, 73475, 0), + (73524, 73530, 0), + (73534, 73538, 0), + (78896, 78912, 0), + (78919, 78933, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94180, 94180, 0), + (94192, 94193, 0), + (94208, 100343, 2), + (100352, 101589, 2), + (101632, 101640, 2), + (110576, 110579, 2), + (110581, 110587, 2), + (110589, 110590, 2), + (110592, 110882, 2), + (110898, 110898, 2), + (110928, 110930, 2), + (110933, 110933, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (118528, 118573, 0), + (118576, 118598, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123023, 123023, 0), + (123184, 123190, 0), + (123566, 123566, 0), + (123628, 123631, 0), + (124140, 124143, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128727, 2), + (128732, 128735, 2), + (128747, 128748, 2), + (128756, 128764, 2), + (128992, 129003, 2), + (129008, 129008, 2), + (129292, 129338, 2), + (129340, 129349, 2), + (129351, 129535, 2), + (129648, 129660, 2), + (129664, 129672, 2), + (129680, 129725, 2), + (129727, 129733, 2), + (129742, 129755, 2), + (129760, 129768, 2), + (129776, 129784, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode16-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode16-0-0.py new file mode 100644 index 00000000000..87fe87178b8 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode16-0-0.py @@ -0,0 +1,683 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "16.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2199, 2207, 0), + (2250, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2901, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3132, 3132, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3315, 3315, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3457, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3790, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5909, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6159, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6862, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9776, 9783, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9866, 9871, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12773, 2), + (12783, 12830, 2), + (12832, 12871, 2), + (12880, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43052, 43052, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (68969, 68973, 0), + (69291, 69292, 0), + (69372, 69375, 0), + (69446, 69456, 0), + (69506, 69509, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69744, 69744, 0), + (69747, 69748, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69826, 69826, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70094, 70095, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70209, 70209, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70584, 70592, 0), + (70594, 70594, 0), + (70597, 70597, 0), + (70599, 70602, 0), + (70604, 70608, 0), + (70610, 70610, 0), + (70625, 70626, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (71984, 71989, 0), + (71991, 71992, 0), + (71995, 71998, 0), + (72000, 72000, 0), + (72002, 72003, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (73472, 73473, 0), + (73475, 73475, 0), + (73524, 73530, 0), + (73534, 73538, 0), + (73562, 73562, 0), + (78896, 78912, 0), + (78919, 78933, 0), + (90398, 90415, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94180, 94180, 0), + (94192, 94193, 0), + (94208, 100343, 2), + (100352, 101589, 2), + (101631, 101640, 2), + (110576, 110579, 2), + (110581, 110587, 2), + (110589, 110590, 2), + (110592, 110882, 2), + (110898, 110898, 2), + (110928, 110930, 2), + (110933, 110933, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (118528, 118573, 0), + (118576, 118598, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (119552, 119638, 2), + (119648, 119670, 2), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123023, 123023, 0), + (123184, 123190, 0), + (123566, 123566, 0), + (123628, 123631, 0), + (124140, 124143, 0), + (124398, 124399, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128727, 2), + (128732, 128735, 2), + (128747, 128748, 2), + (128756, 128764, 2), + (128992, 129003, 2), + (129008, 129008, 2), + (129292, 129338, 2), + (129340, 129349, 2), + (129351, 129535, 2), + (129648, 129660, 2), + (129664, 129673, 2), + (129679, 129734, 2), + (129742, 129756, 2), + (129759, 129769, 2), + (129776, 129784, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode17-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode17-0-0.py new file mode 100644 index 00000000000..b14ff57143d --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode17-0-0.py @@ -0,0 +1,691 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "17.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2045, 2045, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2199, 2207, 0), + (2250, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2558, 2558, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2810, 2815, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2901, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3076, 0), + (3132, 3132, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3315, 3315, 0), + (3328, 3331, 0), + (3387, 3388, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3457, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3772, 0), + (3784, 3790, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5909, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6159, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6877, 0), + (6880, 6891, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7412, 7412, 0), + (7415, 7417, 0), + (7616, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9776, 9783, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9866, 9871, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12591, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12773, 2), + (12783, 12830, 2), + (12832, 12871, 2), + (12880, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43052, 43052, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43263, 43263, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (68900, 68903, 0), + (68969, 68973, 0), + (69291, 69292, 0), + (69370, 69375, 0), + (69446, 69456, 0), + (69506, 69509, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69744, 69744, 0), + (69747, 69748, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69826, 69826, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (69957, 69958, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70089, 70092, 0), + (70094, 70095, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70209, 70209, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70459, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70584, 70592, 0), + (70594, 70594, 0), + (70597, 70597, 0), + (70599, 70602, 0), + (70604, 70608, 0), + (70610, 70610, 0), + (70625, 70626, 0), + (70709, 70726, 0), + (70750, 70750, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (71724, 71738, 0), + (71984, 71989, 0), + (71991, 71992, 0), + (71995, 71998, 0), + (72000, 72000, 0), + (72002, 72003, 0), + (72145, 72151, 0), + (72154, 72160, 0), + (72164, 72164, 0), + (72193, 72202, 0), + (72243, 72249, 0), + (72251, 72254, 0), + (72263, 72263, 0), + (72273, 72283, 0), + (72330, 72345, 0), + (72544, 72551, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (73009, 73014, 0), + (73018, 73018, 0), + (73020, 73021, 0), + (73023, 73029, 0), + (73031, 73031, 0), + (73098, 73102, 0), + (73104, 73105, 0), + (73107, 73111, 0), + (73459, 73462, 0), + (73472, 73473, 0), + (73475, 73475, 0), + (73524, 73530, 0), + (73534, 73538, 0), + (73562, 73562, 0), + (78896, 78912, 0), + (78919, 78933, 0), + (90398, 90415, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94031, 94031, 0), + (94033, 94087, 0), + (94095, 94098, 0), + (94176, 94179, 2), + (94180, 94180, 0), + (94192, 94193, 0), + (94194, 94198, 2), + (94208, 101589, 2), + (101631, 101662, 2), + (101760, 101874, 2), + (110576, 110579, 2), + (110581, 110587, 2), + (110589, 110590, 2), + (110592, 110882, 2), + (110898, 110898, 2), + (110928, 110930, 2), + (110933, 110933, 2), + (110948, 110951, 2), + (110960, 111355, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (118528, 118573, 0), + (118576, 118598, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (119552, 119638, 2), + (119648, 119670, 2), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (123023, 123023, 0), + (123184, 123190, 0), + (123566, 123566, 0), + (123628, 123631, 0), + (124140, 124143, 0), + (124398, 124399, 0), + (124643, 124643, 0), + (124646, 124646, 0), + (124654, 124655, 0), + (124661, 124661, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127584, 127589, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128725, 128728, 2), + (128732, 128735, 2), + (128747, 128748, 2), + (128756, 128764, 2), + (128992, 129003, 2), + (129008, 129008, 2), + (129292, 129338, 2), + (129340, 129349, 2), + (129351, 129535, 2), + (129648, 129660, 2), + (129664, 129674, 2), + (129678, 129734, 2), + (129736, 129736, 2), + (129741, 129756, 2), + (129759, 129770, 2), + (129775, 129784, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode4-1-0.py b/src/pip/_vendor/rich/_unicode_data/unicode4-1-0.py new file mode 100644 index 00000000000..590e836a8b4 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode4-1-0.py @@ -0,0 +1,425 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "4.1.0", + [ + (0, 8, 0), + (14, 31, 0), + (127, 132, 0), + (134, 159, 0), + (768, 879, 0), + (1155, 1158, 0), + (1160, 1161, 0), + (1425, 1465, 0), + (1467, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1539, 0), + (1552, 1557, 0), + (1611, 1630, 0), + (1648, 1648, 0), + (1750, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2305, 2307, 0), + (2364, 2364, 0), + (2366, 2381, 0), + (2385, 2388, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2672, 2673, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2883, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3330, 3331, 0), + (3390, 3395, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3984, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4140, 4146, 0), + (4150, 4153, 0), + (4182, 4185, 0), + (4352, 4441, 2), + (4447, 4447, 2), + (4448, 4607, 0), + (4959, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (7616, 7619, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8427, 0), + (9001, 9002, 2), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12588, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12727, 2), + (12736, 12751, 2), + (12784, 12830, 2), + (12832, 12867, 2), + (12880, 13054, 2), + (13056, 19893, 2), + (19968, 40891, 2), + (40960, 42124, 2), + (42128, 42182, 2), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (44032, 55203, 2), + (55216, 57343, 0), + (63744, 64045, 2), + (64048, 64106, 2), + (64112, 64217, 2), + (64286, 64286, 0), + (64976, 65007, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65059, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (65534, 65535, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (131070, 131071, 0), + (131072, 196605, 2), + (196606, 196607, 0), + (196608, 262141, 2), + (262142, 262143, 0), + (327678, 327679, 0), + (393214, 393215, 0), + (458750, 458751, 0), + (524286, 524287, 0), + (589822, 589823, 0), + (655358, 655359, 0), + (720894, 720895, 0), + (786430, 786431, 0), + (851966, 851967, 0), + (917502, 921599, 0), + (983038, 983039, 0), + (1048574, 1048575, 0), + (1114110, 1114111, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode5-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode5-0-0.py new file mode 100644 index 00000000000..a7f66d75b89 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode5-0-0.py @@ -0,0 +1,430 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "5.0.0", + [ + (0, 8, 0), + (14, 31, 0), + (127, 132, 0), + (134, 159, 0), + (768, 879, 0), + (1155, 1158, 0), + (1160, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1539, 0), + (1552, 1557, 0), + (1611, 1630, 0), + (1648, 1648, 0), + (1750, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2305, 2307, 0), + (2364, 2364, 0), + (2366, 2381, 0), + (2385, 2388, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2672, 2673, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2883, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3395, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3984, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4140, 4146, 0), + (4150, 4153, 0), + (4182, 4185, 0), + (4352, 4441, 2), + (4447, 4447, 2), + (4448, 4607, 0), + (4959, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7616, 7626, 0), + (7678, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8431, 0), + (9001, 9002, 2), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12588, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12727, 2), + (12736, 12751, 2), + (12784, 12830, 2), + (12832, 12867, 2), + (12880, 13054, 2), + (13056, 19893, 2), + (19968, 40891, 2), + (40960, 42124, 2), + (42128, 42182, 2), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (44032, 55203, 2), + (55216, 57343, 0), + (63744, 64045, 2), + (64048, 64106, 2), + (64112, 64217, 2), + (64286, 64286, 0), + (64976, 65007, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65059, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (65534, 65535, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (131070, 131071, 0), + (131072, 196605, 2), + (196606, 196607, 0), + (196608, 262141, 2), + (262142, 262143, 0), + (327678, 327679, 0), + (393214, 393215, 0), + (458750, 458751, 0), + (524286, 524287, 0), + (589822, 589823, 0), + (655358, 655359, 0), + (720894, 720895, 0), + (786430, 786431, 0), + (851966, 851967, 0), + (917502, 921599, 0), + (983038, 983039, 0), + (1048574, 1048575, 0), + (1114110, 1114111, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode5-1-0.py b/src/pip/_vendor/rich/_unicode_data/unicode5-1-0.py new file mode 100644 index 00000000000..9af912db8da --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode5-1-0.py @@ -0,0 +1,433 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "5.1.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1539, 0), + (1552, 1562, 0), + (1611, 1630, 0), + (1648, 1648, 0), + (1750, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2305, 2307, 0), + (2364, 2364, 0), + (2366, 2381, 0), + (2385, 2388, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3984, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4352, 4441, 2), + (4447, 4447, 2), + (4448, 4607, 0), + (4959, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7082, 0), + (7204, 7223, 0), + (7616, 7654, 0), + (7678, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12727, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12867, 2), + (12880, 13054, 2), + (13056, 19893, 2), + (19968, 40899, 2), + (40960, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42620, 42621, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64045, 2), + (64048, 64106, 2), + (64112, 64217, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65062, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode5-2-0.py b/src/pip/_vendor/rich/_unicode_data/unicode5-2-0.py new file mode 100644 index 00000000000..f8b66a7f699 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode5-2-0.py @@ -0,0 +1,461 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "5.2.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1539, 0), + (1552, 1562, 0), + (1611, 1630, 0), + (1648, 1648, 0), + (1750, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2304, 2307, 0), + (2364, 2364, 0), + (2366, 2382, 0), + (2385, 2389, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3984, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4959, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7082, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7410, 0), + (7616, 7654, 0), + (7677, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12727, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42620, 42621, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43643, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65062, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (69760, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (127488, 127488, 2), + (127504, 127537, 2), + (127552, 127560, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode6-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode6-0-0.py new file mode 100644 index 00000000000..d050cf85ac5 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode6-0-0.py @@ -0,0 +1,469 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "6.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1539, 0), + (1552, 1562, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1757, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2304, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7082, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7410, 0), + (7616, 7654, 0), + (7676, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42620, 42621, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43643, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65062, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69760, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (110592, 110593, 2), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (127488, 127490, 2), + (127504, 127546, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode6-1-0.py b/src/pip/_vendor/rich/_unicode_data/unicode6-1-0.py new file mode 100644 index 00000000000..0820c026236 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode6-1-0.py @@ -0,0 +1,480 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "6.1.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1540, 0), + (1552, 1562, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1757, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2276, 2302, 0), + (2304, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7616, 7654, 0), + (7676, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42655, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43643, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65062, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69760, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (71339, 71351, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (110592, 110593, 2), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (127488, 127490, 2), + (127504, 127546, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode6-2-0.py b/src/pip/_vendor/rich/_unicode_data/unicode6-2-0.py new file mode 100644 index 00000000000..94c06515abe --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode6-2-0.py @@ -0,0 +1,480 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "6.2.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1540, 0), + (1552, 1562, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1757, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2276, 2302, 0), + (2304, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6157, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7616, 7654, 0), + (7676, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42655, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43643, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65062, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69760, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (71339, 71351, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (110592, 110593, 2), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (127488, 127490, 2), + (127504, 127546, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode6-3-0.py b/src/pip/_vendor/rich/_unicode_data/unicode6-3-0.py new file mode 100644 index 00000000000..3ae9a47e6cb --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode6-3-0.py @@ -0,0 +1,481 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "6.3.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1540, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1757, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2276, 2302, 0), + (2304, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3073, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3202, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3330, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7616, 7654, 0), + (7676, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42655, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43643, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65062, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69760, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (71339, 71351, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (110592, 110593, 2), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (127488, 127490, 2), + (127504, 127546, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode7-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode7-0-0.py new file mode 100644 index 00000000000..729ee91928e --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode7-0-0.py @@ -0,0 +1,507 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "7.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1541, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1757, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2276, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3329, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6576, 6592, 0), + (6600, 6601, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7416, 7417, 0), + (7616, 7669, 0), + (7676, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42655, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65069, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70188, 70199, 0), + (70367, 70378, 0), + (70401, 70403, 0), + (70460, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (110592, 110593, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (125136, 125142, 0), + (127488, 127490, 2), + (127504, 127546, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode8-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode8-0-0.py new file mode 100644 index 00000000000..fba6edb9498 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode8-0-0.py @@ -0,0 +1,515 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "8.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1536, 1541, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1757, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1807, 1807, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3329, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7416, 7417, 0), + (7616, 7669, 0), + (7676, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (9001, 9002, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43204, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69821, 69821, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70090, 70092, 0), + (70188, 70199, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70460, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (110592, 110593, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (125136, 125142, 0), + (127488, 127490, 2), + (127504, 127546, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127995, 127999, 0), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/_unicode_data/unicode9-0-0.py b/src/pip/_vendor/rich/_unicode_data/unicode9-0-0.py new file mode 100644 index 00000000000..89c70091a38 --- /dev/null +++ b/src/pip/_vendor/rich/_unicode_data/unicode9-0-0.py @@ -0,0 +1,598 @@ +# Auto generated by tools/make_width_tables.py +# Data from wcwidth project (https://github.com/jquast/wcwidth) + +from pip._vendor.rich.cells import CellTable + +cell_table = CellTable( + "9.0.0", + [ + (0, 0, 0), + (768, 879, 0), + (1155, 1161, 0), + (1425, 1469, 0), + (1471, 1471, 0), + (1473, 1474, 0), + (1476, 1477, 0), + (1479, 1479, 0), + (1552, 1562, 0), + (1564, 1564, 0), + (1611, 1631, 0), + (1648, 1648, 0), + (1750, 1756, 0), + (1759, 1764, 0), + (1767, 1768, 0), + (1770, 1773, 0), + (1809, 1809, 0), + (1840, 1866, 0), + (1958, 1968, 0), + (2027, 2035, 0), + (2070, 2073, 0), + (2075, 2083, 0), + (2085, 2087, 0), + (2089, 2093, 0), + (2137, 2139, 0), + (2260, 2273, 0), + (2275, 2307, 0), + (2362, 2364, 0), + (2366, 2383, 0), + (2385, 2391, 0), + (2402, 2403, 0), + (2433, 2435, 0), + (2492, 2492, 0), + (2494, 2500, 0), + (2503, 2504, 0), + (2507, 2509, 0), + (2519, 2519, 0), + (2530, 2531, 0), + (2561, 2563, 0), + (2620, 2620, 0), + (2622, 2626, 0), + (2631, 2632, 0), + (2635, 2637, 0), + (2641, 2641, 0), + (2672, 2673, 0), + (2677, 2677, 0), + (2689, 2691, 0), + (2748, 2748, 0), + (2750, 2757, 0), + (2759, 2761, 0), + (2763, 2765, 0), + (2786, 2787, 0), + (2817, 2819, 0), + (2876, 2876, 0), + (2878, 2884, 0), + (2887, 2888, 0), + (2891, 2893, 0), + (2902, 2903, 0), + (2914, 2915, 0), + (2946, 2946, 0), + (3006, 3010, 0), + (3014, 3016, 0), + (3018, 3021, 0), + (3031, 3031, 0), + (3072, 3075, 0), + (3134, 3140, 0), + (3142, 3144, 0), + (3146, 3149, 0), + (3157, 3158, 0), + (3170, 3171, 0), + (3201, 3203, 0), + (3260, 3260, 0), + (3262, 3268, 0), + (3270, 3272, 0), + (3274, 3277, 0), + (3285, 3286, 0), + (3298, 3299, 0), + (3329, 3331, 0), + (3390, 3396, 0), + (3398, 3400, 0), + (3402, 3405, 0), + (3415, 3415, 0), + (3426, 3427, 0), + (3458, 3459, 0), + (3530, 3530, 0), + (3535, 3540, 0), + (3542, 3542, 0), + (3544, 3551, 0), + (3570, 3571, 0), + (3633, 3633, 0), + (3636, 3642, 0), + (3655, 3662, 0), + (3761, 3761, 0), + (3764, 3769, 0), + (3771, 3772, 0), + (3784, 3789, 0), + (3864, 3865, 0), + (3893, 3893, 0), + (3895, 3895, 0), + (3897, 3897, 0), + (3902, 3903, 0), + (3953, 3972, 0), + (3974, 3975, 0), + (3981, 3991, 0), + (3993, 4028, 0), + (4038, 4038, 0), + (4139, 4158, 0), + (4182, 4185, 0), + (4190, 4192, 0), + (4194, 4196, 0), + (4199, 4205, 0), + (4209, 4212, 0), + (4226, 4237, 0), + (4239, 4239, 0), + (4250, 4253, 0), + (4352, 4447, 2), + (4448, 4607, 0), + (4957, 4959, 0), + (5906, 5908, 0), + (5938, 5940, 0), + (5970, 5971, 0), + (6002, 6003, 0), + (6068, 6099, 0), + (6109, 6109, 0), + (6155, 6158, 0), + (6277, 6278, 0), + (6313, 6313, 0), + (6432, 6443, 0), + (6448, 6459, 0), + (6679, 6683, 0), + (6741, 6750, 0), + (6752, 6780, 0), + (6783, 6783, 0), + (6832, 6846, 0), + (6912, 6916, 0), + (6964, 6980, 0), + (7019, 7027, 0), + (7040, 7042, 0), + (7073, 7085, 0), + (7142, 7155, 0), + (7204, 7223, 0), + (7376, 7378, 0), + (7380, 7400, 0), + (7405, 7405, 0), + (7410, 7412, 0), + (7416, 7417, 0), + (7616, 7669, 0), + (7675, 7679, 0), + (8203, 8207, 0), + (8232, 8238, 0), + (8288, 8303, 0), + (8400, 8432, 0), + (8986, 8987, 2), + (9001, 9002, 2), + (9193, 9196, 2), + (9200, 9200, 2), + (9203, 9203, 2), + (9725, 9726, 2), + (9748, 9749, 2), + (9800, 9811, 2), + (9855, 9855, 2), + (9875, 9875, 2), + (9889, 9889, 2), + (9898, 9899, 2), + (9917, 9918, 2), + (9924, 9925, 2), + (9934, 9934, 2), + (9940, 9940, 2), + (9962, 9962, 2), + (9970, 9971, 2), + (9973, 9973, 2), + (9978, 9978, 2), + (9981, 9981, 2), + (9989, 9989, 2), + (9994, 9995, 2), + (10024, 10024, 2), + (10060, 10060, 2), + (10062, 10062, 2), + (10067, 10069, 2), + (10071, 10071, 2), + (10133, 10135, 2), + (10160, 10160, 2), + (10175, 10175, 2), + (11035, 11036, 2), + (11088, 11088, 2), + (11093, 11093, 2), + (11503, 11505, 0), + (11647, 11647, 0), + (11744, 11775, 0), + (11904, 11929, 2), + (11931, 12019, 2), + (12032, 12245, 2), + (12272, 12283, 2), + (12288, 12329, 2), + (12330, 12335, 0), + (12336, 12350, 2), + (12353, 12438, 2), + (12441, 12442, 0), + (12443, 12543, 2), + (12549, 12589, 2), + (12593, 12643, 2), + (12644, 12644, 0), + (12645, 12686, 2), + (12688, 12730, 2), + (12736, 12771, 2), + (12784, 12830, 2), + (12832, 12871, 2), + (12880, 13054, 2), + (13056, 19903, 2), + (19968, 42124, 2), + (42128, 42182, 2), + (42607, 42610, 0), + (42612, 42621, 0), + (42654, 42655, 0), + (42736, 42737, 0), + (43010, 43010, 0), + (43014, 43014, 0), + (43019, 43019, 0), + (43043, 43047, 0), + (43136, 43137, 0), + (43188, 43205, 0), + (43232, 43249, 0), + (43302, 43309, 0), + (43335, 43347, 0), + (43360, 43388, 2), + (43392, 43395, 0), + (43443, 43456, 0), + (43493, 43493, 0), + (43561, 43574, 0), + (43587, 43587, 0), + (43596, 43597, 0), + (43643, 43645, 0), + (43696, 43696, 0), + (43698, 43700, 0), + (43703, 43704, 0), + (43710, 43711, 0), + (43713, 43713, 0), + (43755, 43759, 0), + (43765, 43766, 0), + (44003, 44010, 0), + (44012, 44013, 0), + (44032, 55203, 2), + (55216, 55295, 0), + (63744, 64255, 2), + (64286, 64286, 0), + (65024, 65039, 0), + (65040, 65049, 2), + (65056, 65071, 0), + (65072, 65106, 2), + (65108, 65126, 2), + (65128, 65131, 2), + (65279, 65279, 0), + (65281, 65376, 2), + (65440, 65440, 0), + (65504, 65510, 2), + (65520, 65531, 0), + (66045, 66045, 0), + (66272, 66272, 0), + (66422, 66426, 0), + (68097, 68099, 0), + (68101, 68102, 0), + (68108, 68111, 0), + (68152, 68154, 0), + (68159, 68159, 0), + (68325, 68326, 0), + (69632, 69634, 0), + (69688, 69702, 0), + (69759, 69762, 0), + (69808, 69818, 0), + (69888, 69890, 0), + (69927, 69940, 0), + (70003, 70003, 0), + (70016, 70018, 0), + (70067, 70080, 0), + (70090, 70092, 0), + (70188, 70199, 0), + (70206, 70206, 0), + (70367, 70378, 0), + (70400, 70403, 0), + (70460, 70460, 0), + (70462, 70468, 0), + (70471, 70472, 0), + (70475, 70477, 0), + (70487, 70487, 0), + (70498, 70499, 0), + (70502, 70508, 0), + (70512, 70516, 0), + (70709, 70726, 0), + (70832, 70851, 0), + (71087, 71093, 0), + (71096, 71104, 0), + (71132, 71133, 0), + (71216, 71232, 0), + (71339, 71351, 0), + (71453, 71467, 0), + (72751, 72758, 0), + (72760, 72767, 0), + (72850, 72871, 0), + (72873, 72886, 0), + (92912, 92916, 0), + (92976, 92982, 0), + (94033, 94078, 0), + (94095, 94098, 0), + (94176, 94176, 2), + (94208, 100332, 2), + (100352, 101106, 2), + (110592, 110593, 2), + (113821, 113822, 0), + (113824, 113827, 0), + (119141, 119145, 0), + (119149, 119170, 0), + (119173, 119179, 0), + (119210, 119213, 0), + (119362, 119364, 0), + (121344, 121398, 0), + (121403, 121452, 0), + (121461, 121461, 0), + (121476, 121476, 0), + (121499, 121503, 0), + (121505, 121519, 0), + (122880, 122886, 0), + (122888, 122904, 0), + (122907, 122913, 0), + (122915, 122916, 0), + (122918, 122922, 0), + (125136, 125142, 0), + (125252, 125258, 0), + (126980, 126980, 2), + (127183, 127183, 2), + (127374, 127374, 2), + (127377, 127386, 2), + (127488, 127490, 2), + (127504, 127547, 2), + (127552, 127560, 2), + (127568, 127569, 2), + (127744, 127776, 2), + (127789, 127797, 2), + (127799, 127868, 2), + (127870, 127891, 2), + (127904, 127946, 2), + (127951, 127955, 2), + (127968, 127984, 2), + (127988, 127988, 2), + (127992, 127994, 2), + (127995, 127999, 0), + (128000, 128062, 2), + (128064, 128064, 2), + (128066, 128252, 2), + (128255, 128317, 2), + (128331, 128334, 2), + (128336, 128359, 2), + (128378, 128378, 2), + (128405, 128406, 2), + (128420, 128420, 2), + (128507, 128591, 2), + (128640, 128709, 2), + (128716, 128716, 2), + (128720, 128722, 2), + (128747, 128748, 2), + (128756, 128758, 2), + (129296, 129310, 2), + (129312, 129319, 2), + (129328, 129328, 2), + (129331, 129342, 2), + (129344, 129355, 2), + (129360, 129374, 2), + (129408, 129425, 2), + (129472, 129472, 2), + (131072, 196605, 2), + (196608, 262141, 2), + (917504, 921599, 0), + ], + frozenset( + [ + "#", + "*", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "©", + "®", + "‼", + "⁉", + "™", + "ℹ", + "↔", + "↕", + "↖", + "↗", + "↘", + "↙", + "↩", + "↪", + "⌨", + "⏏", + "⏭", + "⏮", + "⏯", + "⏱", + "⏲", + "⏸", + "⏹", + "⏺", + "Ⓜ", + "▪", + "▫", + "▶", + "◀", + "◻", + "◼", + "☀", + "☁", + "☂", + "☃", + "☄", + "☎", + "☑", + "☘", + "☝", + "☠", + "☢", + "☣", + "☦", + "☪", + "☮", + "☯", + "☸", + "☹", + "☺", + "♀", + "♂", + "♟", + "♠", + "♣", + "♥", + "♦", + "♨", + "♻", + "♾", + "⚒", + "⚔", + "⚕", + "⚖", + "⚗", + "⚙", + "⚛", + "⚜", + "⚠", + "⚧", + "⚰", + "⚱", + "⛈", + "⛏", + "⛑", + "⛓", + "⛩", + "⛰", + "⛱", + "⛴", + "⛷", + "⛸", + "⛹", + "✂", + "✈", + "✉", + "✌", + "✍", + "✏", + "✒", + "✔", + "✖", + "✝", + "✡", + "✳", + "✴", + "❄", + "❇", + "❣", + "❤", + "➡", + "⤴", + "⤵", + "⬅", + "⬆", + "⬇", + "🅰", + "🅱", + "🅾", + "🅿", + "🌡", + "🌤", + "🌥", + "🌦", + "🌧", + "🌨", + "🌩", + "🌪", + "🌫", + "🌬", + "🌶", + "🍽", + "🎖", + "🎗", + "🎙", + "🎚", + "🎛", + "🎞", + "🎟", + "🏋", + "🏌", + "🏍", + "🏎", + "🏔", + "🏕", + "🏖", + "🏗", + "🏘", + "🏙", + "🏚", + "🏛", + "🏜", + "🏝", + "🏞", + "🏟", + "🏳", + "🏵", + "🏷", + "🐿", + "👁", + "📽", + "🕉", + "🕊", + "🕯", + "🕰", + "🕳", + "🕴", + "🕵", + "🕶", + "🕷", + "🕸", + "🕹", + "🖇", + "🖊", + "🖋", + "🖌", + "🖍", + "🖐", + "🖥", + "🖨", + "🖱", + "🖲", + "🖼", + "🗂", + "🗃", + "🗄", + "🗑", + "🗒", + "🗓", + "🗜", + "🗝", + "🗞", + "🗡", + "🗣", + "🗨", + "🗯", + "🗳", + "🗺", + "🛋", + "🛍", + "🛎", + "🛏", + "🛠", + "🛡", + "🛢", + "🛣", + "🛤", + "🛥", + "🛩", + "🛰", + "🛳", + ] + ), +) diff --git a/src/pip/_vendor/rich/align.py b/src/pip/_vendor/rich/align.py index e65dc5ba256..81b6935adc8 100644 --- a/src/pip/_vendor/rich/align.py +++ b/src/pip/_vendor/rich/align.py @@ -28,6 +28,20 @@ class Align(JupyterMixin): Raises: ValueError: if ``align`` is not one of the expected values. + + Example: + .. code-block:: python + + from pip._vendor.rich.console import Console + from pip._vendor.rich.align import Align + from pip._vendor.rich.panel import Panel + + console = Console() + # Create a panel 20 characters wide + p = Panel("Hello, [b]World[/b]!", style="on green", width=20) + + # Renders the panel centered in the terminal + console.print(Align(p, align="center")) """ def __init__( diff --git a/src/pip/_vendor/rich/cells.py b/src/pip/_vendor/rich/cells.py index a85462271c9..b34c5483782 100644 --- a/src/pip/_vendor/rich/cells.py +++ b/src/pip/_vendor/rich/cells.py @@ -1,9 +1,14 @@ from __future__ import annotations from functools import lru_cache -from typing import Callable +from operator import itemgetter +from typing import Callable, NamedTuple, Sequence, Tuple -from ._cell_widths import CELL_WIDTHS +from pip._vendor.rich._unicode_data import load as load_cell_table + +CellSpan = Tuple[int, int, int] + +_span_get_cell_len = itemgetter(2) # Ranges of unicode ordinals that produce a 1-cell wide character # This is non-exhaustive, but covers most common Western characters @@ -16,7 +21,7 @@ (0x02800, 0x028FF), # Braille ] -# A set of characters that are a single cell wide +# A frozen set of characters that are a single cell wide _SINGLE_CELLS = frozenset( [ character @@ -30,8 +35,51 @@ _is_single_cell_widths: Callable[[str], bool] = _SINGLE_CELLS.issuperset +class CellTable(NamedTuple): + """Contains unicode data required to measure the cell widths of glyphs.""" + + unicode_version: str + widths: Sequence[tuple[int, int, int]] + narrow_to_wide: frozenset[str] + + +@lru_cache(maxsize=4096) +def get_character_cell_size(character: str, unicode_version: str = "auto") -> int: + """Get the cell size of a character. + + Args: + character (str): A single character. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. + + Returns: + int: Number of cells (0, 1 or 2) occupied by that character. + """ + codepoint = ord(character) + if codepoint and codepoint < 32 or 0x07F <= codepoint < 0x0A0: + return 0 + table = load_cell_table(unicode_version).widths + + last_entry = table[-1] + if codepoint > last_entry[1]: + return 1 + + lower_bound = 0 + upper_bound = len(table) - 1 + + while lower_bound <= upper_bound: + index = (lower_bound + upper_bound) >> 1 + start, end, width = table[index] + if codepoint < start: + upper_bound = index - 1 + elif codepoint > end: + lower_bound = index + 1 + else: + return width + return 1 + + @lru_cache(4096) -def cached_cell_len(text: str) -> int: +def cached_cell_len(text: str, unicode_version: str = "auto") -> int: """Get the number of cells required to display text. This method always caches, which may use up a lot of memory. It is recommended to use @@ -39,69 +87,210 @@ def cached_cell_len(text: str) -> int: Args: text (str): Text to display. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. Returns: int: Get the number of cells required to display text. """ - if _is_single_cell_widths(text): - return len(text) - return sum(map(get_character_cell_size, text)) + return _cell_len(text, unicode_version) -def cell_len(text: str, _cell_len: Callable[[str], int] = cached_cell_len) -> int: - """Get the number of cells required to display text. +def cell_len(text: str, unicode_version: str = "auto") -> int: + """Get the cell length of a string (length as it appears in the terminal). Args: - text (str): Text to display. + text: String to measure. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. Returns: - int: Get the number of cells required to display text. + Length of string in terminal cells. """ if len(text) < 512: - return _cell_len(text) + return cached_cell_len(text, unicode_version) + return _cell_len(text, unicode_version) + + +def _cell_len(text: str, unicode_version: str) -> int: + """Get the cell length of a string (length as it appears in the terminal). + + Args: + text: String to measure. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. + + Returns: + Length of string in terminal cells. + """ + if _is_single_cell_widths(text): return len(text) - return sum(map(get_character_cell_size, text)) + # "\u200d" is zero width joiner + # "\ufe0f" is variation selector 16 + if "\u200d" not in text and "\ufe0f" not in text: + # Simplest case with no unicode stuff that changes the size + return sum( + get_character_cell_size(character, unicode_version) for character in text + ) -@lru_cache(maxsize=4096) -def get_character_cell_size(character: str) -> int: - """Get the cell size of a character. + cell_table = load_cell_table(unicode_version) + total_width = 0 + last_measured_character: str | None = None + + SPECIAL = {"\u200d", "\ufe0f"} + + index = 0 + character_count = len(text) + + while index < character_count: + character = text[index] + if character in SPECIAL: + if character == "\u200d": + index += 1 + elif last_measured_character: + total_width += last_measured_character in cell_table.narrow_to_wide + last_measured_character = None + else: + if character_width := get_character_cell_size(character, unicode_version): + last_measured_character = character + total_width += character_width + index += 1 + + return total_width + + +def split_graphemes( + text: str, unicode_version: str = "auto" +) -> "tuple[list[CellSpan], int]": + """Divide text into spans that define a single grapheme. Args: - character (str): A single character. + text: String to split. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. Returns: - int: Number of cells (0, 1 or 2) occupied by that character. + List of spans. """ - codepoint = ord(character) - _table = CELL_WIDTHS - lower_bound = 0 - upper_bound = len(_table) - 1 - index = (lower_bound + upper_bound) // 2 + + cell_table = load_cell_table(unicode_version) + codepoint_count = len(text) + index = 0 + last_measured_character: str | None = None + + total_width = 0 + spans: list[tuple[int, int, int]] = [] + SPECIAL = {"\u200d", "\ufe0f"} + while index < codepoint_count: + if (character := text[index]) in SPECIAL: + if character == "\u200d": + # zero width joiner + index += 2 + if spans: + start, _end, cell_length = spans[-1] + spans[-1] = (start, index, cell_length) + elif last_measured_character: + # variation selector 16 + index += 1 + if spans: + start, _end, cell_length = spans[-1] + if last_measured_character in cell_table.narrow_to_wide: + last_measured_character = None + cell_length += 1 + total_width += 1 + spans[-1] = (start, index, cell_length) + continue + + if character_width := get_character_cell_size(character, unicode_version): + last_measured_character = character + spans.append((index, index := index + 1, character_width)) + total_width += character_width + elif spans: + # zero width characters are associated with the previous character + start, _end, cell_length = spans[-1] + spans[-1] = (start, index := index + 1, cell_length) + + return (spans, total_width) + + +def _split_text( + text: str, cell_position: int, unicode_version: str = "auto" +) -> tuple[str, str]: + """Split text by cell position. + + If the cell position falls within a double width character, it is converted to two spaces. + + Args: + text: Text to split. + cell_position Offset in cells. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. + + Returns: + Tuple to two split strings. + """ + if cell_position <= 0: + return "", text + + spans, cell_length = split_graphemes(text, unicode_version) + + # Guess initial offset + offset = int((cell_position / cell_length) * len(spans)) + left_size = sum(map(_span_get_cell_len, spans[:offset])) + while True: - start, end, width = _table[index] - if codepoint < start: - upper_bound = index - 1 - elif codepoint > end: - lower_bound = index + 1 - else: - return 0 if width == -1 else width - if upper_bound < lower_bound: - break - index = (lower_bound + upper_bound) // 2 - return 1 + if left_size == cell_position: + if offset >= len(spans): + return text, "" + split_index = spans[offset][0] + return text[:split_index], text[split_index:] + if left_size < cell_position: + start, end, cell_size = spans[offset] + if left_size + cell_size > cell_position: + return text[:start] + " ", " " + text[end:] + offset += 1 + left_size += cell_size + else: # left_size > cell_position + start, end, cell_size = spans[offset - 1] + if left_size - cell_size < cell_position: + return text[:start] + " ", " " + text[end:] + offset -= 1 + left_size -= cell_size + + +def split_text( + text: str, cell_position: int, unicode_version: str = "auto" +) -> tuple[str, str]: + """Split text by cell position. + + If the cell position falls within a double width character, it is converted to two spaces. + + Args: + text: Text to split. + cell_position Offset in cells. + unicode_version: Unicode version, `"auto"` to auto detect, `"latest"` for the latest unicode version. + + Returns: + Tuple to two split strings. + """ + if _is_single_cell_widths(text): + return text[:cell_position], text[cell_position:] + return _split_text(text, cell_position, unicode_version) + +def set_cell_size(text: str, total: int, unicode_version: str = "auto") -> str: + """Adjust a string by cropping or padding with spaces such that it fits within the given number of cells. -def set_cell_size(text: str, total: int) -> str: - """Set the length of a string to fit within given number of cells.""" + Args: + text: String to adjust. + total: Desired size in cells. + unicode_version: Unicode version. + Returns: + A string with cell size equal to total. + """ if _is_single_cell_widths(text): size = len(text) if size < total: return text + " " * (total - size) return text[:total] - if total <= 0: return "" cell_size = cell_len(text) @@ -109,29 +298,11 @@ def set_cell_size(text: str, total: int) -> str: return text if cell_size < total: return text + " " * (total - cell_size) - - start = 0 - end = len(text) - - # Binary search until we find the right size - while True: - pos = (start + end) // 2 - before = text[: pos + 1] - before_len = cell_len(before) - if before_len == total + 1 and cell_len(before[-1]) == 2: - return before[:-1] + " " - if before_len == total: - return before - if before_len > total: - end = pos - else: - start = pos + text, _ = _split_text(text, total, unicode_version) + return text -def chop_cells( - text: str, - width: int, -) -> list[str]: +def chop_cells(text: str, width: int, unicode_version: str = "auto") -> list[str]: """Split text into lines such that each line fits within the available (cell) width. Args: @@ -142,33 +313,19 @@ def chop_cells( A list of strings such that each string in the list has cell width less than or equal to the available width. """ - _get_character_cell_size = get_character_cell_size - lines: list[list[str]] = [[]] - - append_new_line = lines.append - append_to_last_line = lines[-1].append - - total_width = 0 - - for character in text: - cell_width = _get_character_cell_size(character) - char_doesnt_fit = total_width + cell_width > width - - if char_doesnt_fit: - append_new_line([character]) - append_to_last_line = lines[-1].append - total_width = cell_width - else: - append_to_last_line(character) - total_width += cell_width - - return ["".join(line) for line in lines] - - -if __name__ == "__main__": # pragma: no cover - print(get_character_cell_size("😽")) - for line in chop_cells("""这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。""", 8): - print(line) - for n in range(80, 1, -1): - print(set_cell_size("""这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。""", n) + "|") - print("x" * n) + if _is_single_cell_widths(text): + return [text[index : index + width] for index in range(0, len(text), width)] + spans, _ = split_graphemes(text, unicode_version) + line_size = 0 # Size of line in cells + lines: list[str] = [] + line_offset = 0 # Offset (in codepoints) of start of line + for start, end, cell_size in spans: + if line_size + cell_size > width: + lines.append(text[line_offset:start]) + line_offset = start + line_size = 0 + line_size += cell_size + if line_size: + lines.append(text[line_offset:]) + + return lines diff --git a/src/pip/_vendor/rich/console.py b/src/pip/_vendor/rich/console.py index db2ba55abd1..c49465af6ee 100644 --- a/src/pip/_vendor/rich/console.py +++ b/src/pip/_vendor/rich/console.py @@ -1723,12 +1723,16 @@ def print( for renderable in renderables: extend(render(renderable, render_options)) else: + render_style = self.get_style(style) + new_line = Segment.line() for renderable in renderables: - extend( - Segment.apply_style( - render(renderable, render_options), self.get_style(style) - ) - ) + for line, add_new_line in Segment.split_lines_terminator( + render(renderable, render_options) + ): + extend(Segment.apply_style(line, render_style)) + if add_new_line: + new_segments.append(new_line) + if new_line_start: if ( len("".join(segment.text for segment in new_segments).splitlines()) diff --git a/src/pip/_vendor/rich/default_styles.py b/src/pip/_vendor/rich/default_styles.py index 61797bf312c..66d23448234 100644 --- a/src/pip/_vendor/rich/default_styles.py +++ b/src/pip/_vendor/rich/default_styles.py @@ -149,20 +149,22 @@ "markdown.block_quote": Style(color="magenta"), "markdown.list": Style(color="cyan"), "markdown.item": Style(), - "markdown.item.bullet": Style(color="yellow", bold=True), - "markdown.item.number": Style(color="yellow", bold=True), - "markdown.hr": Style(color="yellow"), + "markdown.item.bullet": Style(bold=True), + "markdown.item.number": Style(color="cyan"), + "markdown.hr": Style(dim=True), "markdown.h1.border": Style(), - "markdown.h1": Style(bold=True), - "markdown.h2": Style(bold=True, underline=True), - "markdown.h3": Style(bold=True), - "markdown.h4": Style(bold=True, dim=True), - "markdown.h5": Style(underline=True), - "markdown.h6": Style(italic=True), + "markdown.h1": Style(bold=True, underline=True), + "markdown.h2": Style(color="magenta", underline=True), + "markdown.h3": Style(color="magenta", bold=True), + "markdown.h4": Style(color="magenta", italic=True), + "markdown.h5": Style(italic=True), + "markdown.h6": Style(dim=True), "markdown.h7": Style(italic=True, dim=True), "markdown.link": Style(color="bright_blue"), "markdown.link_url": Style(color="blue", underline=True), "markdown.s": Style(strike=True), + "markdown.table.border": Style(color="cyan"), + "markdown.table.header": Style(color="cyan", bold=False), "iso8601.date": Style(color="blue"), "iso8601.time": Style(color="magenta"), "iso8601.timezone": Style(color="yellow"), diff --git a/src/pip/_vendor/rich/highlighter.py b/src/pip/_vendor/rich/highlighter.py index e4c462e2b63..df28048f884 100644 --- a/src/pip/_vendor/rich/highlighter.py +++ b/src/pip/_vendor/rich/highlighter.py @@ -1,6 +1,6 @@ import re from abc import ABC, abstractmethod -from typing import List, Union +from typing import ClassVar, Sequence, Union from .text import Span, Text @@ -61,8 +61,8 @@ def highlight(self, text: Text) -> None: class RegexHighlighter(Highlighter): """Applies highlighting from a list of regular expressions.""" - highlights: List[str] = [] - base_style: str = "" + highlights: ClassVar[Sequence[str]] = [] + base_style: ClassVar[str] = "" def highlight(self, text: Text) -> None: """Highlight :class:`rich.text.Text` using regular expressions. @@ -81,7 +81,7 @@ class ReprHighlighter(RegexHighlighter): """Highlights the text typically produced from ``__repr__`` methods.""" base_style = "repr." - highlights = [ + highlights: ClassVar[Sequence[str]] = [ r"(?P<)(?P[-\w.:|]*)(?P[\w\W]*)(?P>)", r'(?P[\w_]{1,50})=(?P"?[\w_]+"?)?', r"(?P[][{}()])", @@ -110,8 +110,8 @@ class JSONHighlighter(RegexHighlighter): JSON_STR = r"(?b?\".*?(?[\{\[\(\)\]\}])", r"\b(?Ptrue)\b|\b(?Pfalse)\b|\b(?Pnull)\b", @@ -145,8 +145,8 @@ class ISO8601Highlighter(RegexHighlighter): Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html """ - base_style = "iso8601." - highlights = [ + base_style: ClassVar[str] = "iso8601." + highlights: ClassVar[Sequence[str]] = [ # # Dates # diff --git a/src/pip/_vendor/rich/live.py b/src/pip/_vendor/rich/live.py index cc3a39bd577..2fd893b0086 100644 --- a/src/pip/_vendor/rich/live.py +++ b/src/pip/_vendor/rich/live.py @@ -166,7 +166,11 @@ def stop(self) -> None: finally: self._disable_redirect_io() self.console.pop_render_hook() - if not self._alt_screen and self.console.is_terminal: + if ( + not self._alt_screen + and self.console.is_terminal + and self._live_render.last_render_height + ): self.console.line() self.console.show_cursor(True) if self._alt_screen: diff --git a/src/pip/_vendor/rich/live_render.py b/src/pip/_vendor/rich/live_render.py index d3da5111d82..e7ec970a781 100644 --- a/src/pip/_vendor/rich/live_render.py +++ b/src/pip/_vendor/rich/live_render.py @@ -1,5 +1,4 @@ -from typing import Optional, Tuple, Literal - +from typing import Literal, Optional, Tuple from ._loop import loop_last from .console import Console, ConsoleOptions, RenderableType, RenderResult @@ -30,6 +29,17 @@ def __init__( self.vertical_overflow = vertical_overflow self._shape: Optional[Tuple[int, int]] = None + @property + def last_render_height(self) -> int: + """The number of lines in the last render (may be 0 if nothing was rendered). + + Returns: + Height in lines + """ + if self._shape is None: + return 0 + return self._shape[1] + def set_renderable(self, renderable: RenderableType) -> None: """Set a new renderable. diff --git a/src/pip/_vendor/rich/pretty.py b/src/pip/_vendor/rich/pretty.py index c4a274f8cd7..f0f1e3246ec 100644 --- a/src/pip/_vendor/rich/pretty.py +++ b/src/pip/_vendor/rich/pretty.py @@ -234,7 +234,7 @@ def __call__(self, value: Any) -> Any: if self.pprint: return _ipy_display_hook( value, - console=get_console(), + console=console, overflow=overflow, indent_guides=indent_guides, max_length=max_length, diff --git a/src/pip/_vendor/rich/progress.py b/src/pip/_vendor/rich/progress.py index ef6ad60f08d..c2de125aec8 100644 --- a/src/pip/_vendor/rich/progress.py +++ b/src/pip/_vendor/rich/progress.py @@ -1064,7 +1064,7 @@ class Progress(JupyterMixin): Args: console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout. auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`. - refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None. + refresh_per_second (float, optional): Number of times per second to refresh the progress information. Defaults to 10. speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30. transient: (bool, optional): Clear the progress on exit. Defaults to False. redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True. @@ -1172,9 +1172,10 @@ def start(self) -> None: def stop(self) -> None: """Stop the progress display.""" - self.live.stop() - if not self.console.is_interactive and not self.console.is_jupyter: - self.console.print() + if not self.disable: + self.live.stop() + if not self.console.is_interactive and not self.console.is_jupyter: + self.console.print() def __enter__(self) -> Self: self.start() @@ -1492,7 +1493,7 @@ def reset( start (bool, optional): Start the task after reset. Defaults to True. total (float, optional): New total steps in task, or None to use current total. Defaults to None. completed (int, optional): Number of steps completed. Defaults to 0. - visible (bool, optional): Enable display of the task. Defaults to True. + visible (bool, optional): Set visible flag if not None. description (str, optional): Change task description if not None. Defaults to None. **fields (str): Additional data fields required for rendering. """ diff --git a/src/pip/_vendor/rich/prompt.py b/src/pip/_vendor/rich/prompt.py index fccb70dbd29..025f1d55a33 100644 --- a/src/pip/_vendor/rich/prompt.py +++ b/src/pip/_vendor/rich/prompt.py @@ -262,7 +262,7 @@ def on_validate_error(self, value: str, error: InvalidResponse) -> None: value (str): String entered by user. error (InvalidResponse): Exception instance the initiated the error. """ - self.console.print(error) + self.console.print(error, markup=True) def pre_prompt(self) -> None: """Hook to display something before the prompt.""" diff --git a/src/pip/_vendor/rich/scope.py b/src/pip/_vendor/rich/scope.py index c9d134cc3ce..0d7eb021dd7 100644 --- a/src/pip/_vendor/rich/scope.py +++ b/src/pip/_vendor/rich/scope.py @@ -8,7 +8,7 @@ from .text import Text, TextType if TYPE_CHECKING: - from .console import ConsoleRenderable + from .console import ConsoleRenderable, OverflowMethod def render_scope( @@ -19,6 +19,8 @@ def render_scope( indent_guides: bool = False, max_length: Optional[int] = None, max_string: Optional[int] = None, + max_depth: Optional[int] = None, + overflow: Optional["OverflowMethod"] = None, ) -> "ConsoleRenderable": """Render python variables in a given scope. @@ -30,6 +32,8 @@ def render_scope( max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation. Defaults to None. max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None. + max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None. + overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None. Returns: ConsoleRenderable: A renderable object. @@ -57,6 +61,8 @@ def sort_items(item: Tuple[str, Any]) -> Tuple[bool, str]: indent_guides=indent_guides, max_length=max_length, max_string=max_string, + max_depth=max_depth, + overflow=overflow, ), ) return Panel.fit( diff --git a/src/pip/_vendor/rich/segment.py b/src/pip/_vendor/rich/segment.py index 4b5f9979221..719040d46bc 100644 --- a/src/pip/_vendor/rich/segment.py +++ b/src/pip/_vendor/rich/segment.py @@ -275,6 +275,37 @@ def split_lines(cls, segments: Iterable["Segment"]) -> Iterable[List["Segment"]] if line: yield line + @classmethod + def split_lines_terminator( + cls, segments: Iterable["Segment"] + ) -> Iterable[Tuple[List["Segment"], bool]]: + """Split a sequence of segments in to a list of lines and a boolean to indicate if there was a new line. + + Args: + segments (Iterable[Segment]): Segments potentially containing line feeds. + + Yields: + Iterable[List[Segment]]: Iterable of segment lists, one per line. + """ + line: List[Segment] = [] + append = line.append + + for segment in segments: + if "\n" in segment.text and not segment.control: + text, style, _ = segment + while text: + _text, new_line, text = text.partition("\n") + if _text: + append(cls(_text, style)) + if new_line: + yield (line, True) + line = [] + append = line.append + else: + append(segment) + if line: + yield (line, False) + @classmethod def split_and_crop_lines( cls, diff --git a/src/pip/_vendor/rich/table.py b/src/pip/_vendor/rich/table.py index 2b9e3b5d7e8..caff940a675 100644 --- a/src/pip/_vendor/rich/table.py +++ b/src/pip/_vendor/rich/table.py @@ -49,7 +49,6 @@ class Column: padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1). collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False. pad_edge (bool, optional): Enable padding of edge cells. Defaults to True. - expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False. show_header (bool, optional): Show a header row. Defaults to True. show_footer (bool, optional): Show a footer row. Defaults to False. show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True. @@ -485,6 +484,7 @@ def __rich_console__( max_width = self.width extra_width = self._extra_width + widths = self._calculate_column_widths( console, options.update_width(max_width - extra_width) ) @@ -530,6 +530,7 @@ def _calculate_column_widths( self._measure_column(console, options, column) for column in columns ] widths = [_range.maximum or 1 for _range in width_ranges] + get_padding_width = self._get_padding_width extra_width = self._extra_width if self.expand: @@ -699,9 +700,17 @@ def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]: def _get_padding_width(self, column_index: int) -> int: """Get extra width from padding.""" _, pad_right, _, pad_left = self.padding + if self.collapse_padding: - if column_index > 0: - pad_left = max(0, pad_left - pad_right) + pad_left = 0 + pad_right = abs(pad_left - pad_right) + + if not self.pad_edge: + if column_index == 0: + pad_left = 0 + if column_index == len(self.columns) - 1: + pad_right = 0 + return pad_left + pad_right def _measure_column( @@ -717,7 +726,6 @@ def _measure_column( return Measurement(0, 0) padding_width = self._get_padding_width(column._index) - if column.width is not None: # Fixed width column return Measurement( @@ -754,6 +762,7 @@ def _render( self._get_cells(console, column_index, column) for column_index, column in enumerate(self.columns) ) + row_cells: List[Tuple[_Cell, ...]] = list(zip(*_column_cells)) _box = ( self.box.substitute( diff --git a/src/pip/_vendor/rich/text.py b/src/pip/_vendor/rich/text.py index 5a0c6b142b8..1ca54c3fbe8 100644 --- a/src/pip/_vendor/rich/text.py +++ b/src/pip/_vendor/rich/text.py @@ -691,7 +691,6 @@ def __rich_console__( ) -> Iterable[Segment]: tab_size: int = console.tab_size if self.tab_size is None else self.tab_size justify = self.justify or options.justify or DEFAULT_JUSTIFY - overflow = self.overflow or options.overflow or DEFAULT_OVERFLOW lines = self.wrap( @@ -1007,7 +1006,7 @@ def append( return self def append_text(self, text: "Text") -> "Text": - """Append another Text instance. This method is more performant that Text.append, but + """Append another Text instance. This method is more performant than Text.append, but only works for Text. Args: @@ -1105,7 +1104,7 @@ def flatten_spans() -> Iterable[int]: return lines def divide(self, offsets: Iterable[int]) -> Lines: - """Divide text in to a number of lines at given offsets. + """Divide text into a number of lines at given offsets. Args: offsets (Iterable[int]): Offsets used to divide text. @@ -1232,12 +1231,15 @@ def wrap( if "\t" in line: line.expand_tabs(tab_size) if no_wrap: + if overflow == "ignore": + lines.append(line) + continue new_lines = Lines([line]) else: offsets = divide_line(str(line), width, fold=wrap_overflow == "fold") new_lines = line.divide(offsets) - for line in new_lines: - line.rstrip_end(width) + for line in new_lines: + line.rstrip_end(width) if wrap_justify: new_lines.justify( console, width, justify=wrap_justify, overflow=wrap_overflow diff --git a/src/pip/_vendor/rich/traceback.py b/src/pip/_vendor/rich/traceback.py index 01b2f5023bb..8f254c21225 100644 --- a/src/pip/_vendor/rich/traceback.py +++ b/src/pip/_vendor/rich/traceback.py @@ -33,6 +33,7 @@ Console, ConsoleOptions, ConsoleRenderable, + OverflowMethod, Group, RenderResult, group, @@ -91,8 +92,10 @@ def install( show_locals: bool = False, locals_max_length: int = LOCALS_MAX_LENGTH, locals_max_string: int = LOCALS_MAX_STRING, + locals_max_depth: Optional[int] = None, locals_hide_dunder: bool = True, locals_hide_sunder: Optional[bool] = None, + locals_overflow: Optional[OverflowMethod] = None, indent_guides: bool = True, suppress: Iterable[Union[str, ModuleType]] = (), max_frames: int = 100, @@ -114,8 +117,10 @@ def install( locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation. Defaults to 10. locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80. + locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None. locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True. locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False. + locals_overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None. indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True. suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback. @@ -148,8 +153,10 @@ def excepthook( show_locals=show_locals, locals_max_length=locals_max_length, locals_max_string=locals_max_string, + locals_max_depth=locals_max_depth, locals_hide_dunder=locals_hide_dunder, locals_hide_sunder=bool(locals_hide_sunder), + locals_overflow=locals_overflow, indent_guides=indent_guides, suppress=suppress, max_frames=max_frames, @@ -268,8 +275,10 @@ class Traceback: locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation. Defaults to 10. locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80. + locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None. locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True. locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False. + locals_overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None. suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback. max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100. @@ -295,8 +304,10 @@ def __init__( show_locals: bool = False, locals_max_length: int = LOCALS_MAX_LENGTH, locals_max_string: int = LOCALS_MAX_STRING, + locals_max_depth: Optional[int] = None, locals_hide_dunder: bool = True, locals_hide_sunder: bool = False, + locals_overlow: Optional[OverflowMethod] = None, indent_guides: bool = True, suppress: Iterable[Union[str, ModuleType]] = (), max_frames: int = 100, @@ -320,8 +331,10 @@ def __init__( self.indent_guides = indent_guides self.locals_max_length = locals_max_length self.locals_max_string = locals_max_string + self.locals_max_depth = locals_max_depth self.locals_hide_dunder = locals_hide_dunder self.locals_hide_sunder = locals_hide_sunder + self.locals_overflow = locals_overlow self.suppress: Sequence[str] = [] for suppress_entity in suppress: @@ -351,8 +364,10 @@ def from_exception( show_locals: bool = False, locals_max_length: int = LOCALS_MAX_LENGTH, locals_max_string: int = LOCALS_MAX_STRING, + locals_max_depth: Optional[int] = None, locals_hide_dunder: bool = True, locals_hide_sunder: bool = False, + locals_overflow: Optional[OverflowMethod] = None, indent_guides: bool = True, suppress: Iterable[Union[str, ModuleType]] = (), max_frames: int = 100, @@ -372,9 +387,11 @@ def from_exception( indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True. locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation. Defaults to 10. + locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None. locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80. locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True. locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False. + locals_overflow (OverflowMethod, optional): How to handle overflowing locals, or None to disable. Defaults to None. suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback. max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100. @@ -388,6 +405,7 @@ def from_exception( show_locals=show_locals, locals_max_length=locals_max_length, locals_max_string=locals_max_string, + locals_max_depth=locals_max_depth, locals_hide_dunder=locals_hide_dunder, locals_hide_sunder=locals_hide_sunder, ) @@ -403,8 +421,10 @@ def from_exception( indent_guides=indent_guides, locals_max_length=locals_max_length, locals_max_string=locals_max_string, + locals_max_depth=locals_max_depth, locals_hide_dunder=locals_hide_dunder, locals_hide_sunder=locals_hide_sunder, + locals_overlow=locals_overflow, suppress=suppress, max_frames=max_frames, ) @@ -419,6 +439,7 @@ def extract( show_locals: bool = False, locals_max_length: int = LOCALS_MAX_LENGTH, locals_max_string: int = LOCALS_MAX_STRING, + locals_max_depth: Optional[int] = None, locals_hide_dunder: bool = True, locals_hide_sunder: bool = False, _visited_exceptions: Optional[Set[BaseException]] = None, @@ -433,6 +454,7 @@ def extract( locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation. Defaults to 10. locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80. + locals_max_depth (int, optional): Maximum depths of locals before truncating, or None to disable. Defaults to None. locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True. locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False. @@ -560,6 +582,7 @@ def get_locals( value, max_length=locals_max_length, max_string=locals_max_string, + max_depth=locals_max_depth, ) for key, value in get_locals(frame_summary.f_locals.items()) if not (inspect.isfunction(value) or inspect.isclass(value)) @@ -754,6 +777,8 @@ def render_locals(frame: Frame) -> Iterable[ConsoleRenderable]: indent_guides=self.indent_guides, max_length=self.locals_max_length, max_string=self.locals_max_string, + max_depth=self.locals_max_depth, + overflow=self.locals_overflow, ) exclude_frames: Optional[range] = None diff --git a/src/pip/_vendor/vendor.txt b/src/pip/_vendor/vendor.txt index dd2f5f34853..adffeaf0772 100644 --- a/src/pip/_vendor/vendor.txt +++ b/src/pip/_vendor/vendor.txt @@ -3,13 +3,13 @@ distlib==0.4.0 distro==1.9.0 msgpack==1.1.2 packaging==26.0 -platformdirs==4.5.1 +platformdirs==4.9.2 pyproject-hooks==1.2.0 requests==2.32.5 certifi==2026.1.4 idna==3.11 urllib3==1.26.20 -rich==14.2.0 +rich==14.3.2 pygments==2.19.2 resolvelib==1.2.1 setuptools==70.3.0