From 7fadf5f9c441a2e6f4ad4b0cefc590ac634c7157 Mon Sep 17 00:00:00 2001 From: sapunyangkut <302607731+sapunyangkut@users.noreply.github.com> Date: Mon, 13 Jul 2026 18:03:52 +0800 Subject: [PATCH] docs: add direct URL helper version markers --- src/packaging/direct_url.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/packaging/direct_url.py b/src/packaging/direct_url.py index 4de7acc0a..7b18c86dd 100644 --- a/src/packaging/direct_url.py +++ b/src/packaging/direct_url.py @@ -154,7 +154,10 @@ def __init__(self, key: str) -> None: @dataclasses.dataclass(frozen=True, init=False) class VcsInfo: - """The version control information of a :class:`DirectUrl`.""" + """The version control information of a :class:`DirectUrl`. + + .. versionadded:: 26.1 + """ vcs: str commit_id: str @@ -183,7 +186,10 @@ def _from_dict(cls, d: Mapping[str, Any]) -> Self: @dataclasses.dataclass(frozen=True, init=False) class ArchiveInfo: - """The archive information of a :class:`DirectUrl`.""" + """The archive information of a :class:`DirectUrl`. + + .. versionadded:: 26.1 + """ hashes: Mapping[str, str] | None = None @@ -231,7 +237,10 @@ def _from_dict(cls, d: Mapping[str, Any]) -> Self: @dataclasses.dataclass(frozen=True, init=False) class DirInfo: - """The local directory information of a :class:`DirectUrl`.""" + """The local directory information of a :class:`DirectUrl`. + + .. versionadded:: 26.1 + """ editable: bool | None = None