Be explicit with replacement in `_InventoryItem` warning (#14121)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
M BussonnierandAdam Turner authored and GitHub committed 2025-11-29 21:47:56 +00:00
1 parent 718fae0245
commit e552f8429c
1 file changed
+6 -2
+6 -2
View File
@@ -311,7 +311,9 @@ class _InventoryItem:
def __getitem__(self, key: int | slice) -> str | tuple[str, ...]:
warnings.warn(
'The tuple interface for _InventoryItem objects is deprecated.',
'The tuple interface for _InventoryItem objects is deprecated.'
' Please access the `project_name`, `project_version`, '
'`uri`, and `displayname` attributes directly.',
RemovedInSphinx10Warning,
stacklevel=2,
)
@@ -320,7 +322,9 @@ class _InventoryItem:
def __iter__(self) -> Iterator[str]:
warnings.warn(
'The iter() interface for _InventoryItem objects is deprecated.',
'The iter() interface for _InventoryItem objects is deprecated.'
' Please access the `project_name`, `project_version`, '
'`uri`, and `displayname` attributes directly.',
RemovedInSphinx10Warning,
stacklevel=2,
)