Skip to content

Commit 0a7be9a

Browse files
committed
Upgrade rich to 14.2.0
1 parent cc854e8 commit 0a7be9a

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

news/rich.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade rich to 14.2.0

src/pip/_vendor/rich/style.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import sys
22
from functools import lru_cache
3-
from marshal import dumps, loads
3+
from operator import attrgetter
4+
from pickle import dumps, loads
45
from random import randint
56
from typing import Any, Dict, Iterable, List, Optional, Type, Union, cast
67

@@ -9,6 +10,10 @@
910
from .repr import Result, rich_repr
1011
from .terminal_theme import DEFAULT_TERMINAL_THEME, TerminalTheme
1112

13+
_hash_getter = attrgetter(
14+
"_color", "_bgcolor", "_attributes", "_set_attributes", "_link", "_meta"
15+
)
16+
1217
# Style instances and style definitions are often interchangeable
1318
StyleType = Union[str, "Style"]
1419

@@ -432,16 +437,7 @@ def __ne__(self, other: Any) -> bool:
432437
def __hash__(self) -> int:
433438
if self._hash is not None:
434439
return self._hash
435-
self._hash = hash(
436-
(
437-
self._color,
438-
self._bgcolor,
439-
self._attributes,
440-
self._set_attributes,
441-
self._link,
442-
self._meta,
443-
)
444-
)
440+
self._hash = hash(_hash_getter(self))
445441
return self._hash
446442

447443
@property

src/pip/_vendor/vendor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ requests==2.32.5
99
certifi==2025.10.5
1010
idna==3.10
1111
urllib3==1.26.20
12-
rich==14.1.0
12+
rich==14.2.0
1313
pygments==2.19.2
1414
resolvelib==1.2.0
1515
setuptools==70.3.0

0 commit comments

Comments
 (0)