Mercurial > public > mercurial-scm > hg-stable
changeset 52899:b8da7eed1657
pycompat: backed out changeset e02c36478284
We also need to back this out as `util.sortdict` no longer support the `[K,V]`
notation.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 15 Feb 2025 15:20:33 +0100 |
parents | abcfb4ce132e |
children | 7132a6dd6c82 |
files | hgext/phabricator.py mercurial/bundle2.py mercurial/hgweb/webutil.py |
diffstat | 3 files changed, 3 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/phabricator.py Sat Feb 15 14:11:43 2025 +0100 +++ b/hgext/phabricator.py Sat Feb 15 15:20:33 2025 +0100 @@ -1691,7 +1691,7 @@ # Map from "hg:meta" keys to header understood by "hg import". The order is # consistent with "hg export" output. -_metanamemap: util.sortdict[bytes, bytes] = util.sortdict( +_metanamemap = util.sortdict( [ (b'user', b'User'), (b'date', b'Date'),
--- a/mercurial/bundle2.py Sat Feb 15 14:11:43 2025 +0100 +++ b/mercurial/bundle2.py Sat Feb 15 15:20:33 2025 +0100 @@ -869,9 +869,7 @@ params = self._processallparams(params) return params - def _processallparams( - self, paramsblock: bytes - ) -> util.sortdict[bytes, bytes]: + def _processallparams(self, paramsblock): """ """ params = util.sortdict() for p in paramsblock.split(b' '):
--- a/mercurial/hgweb/webutil.py Sat Feb 15 14:11:43 2025 +0100 +++ b/mercurial/hgweb/webutil.py Sat Feb 15 15:20:33 2025 +0100 @@ -12,7 +12,6 @@ import difflib import os import re -import typing from ..i18n import _ from ..node import hex, short @@ -44,16 +43,7 @@ from ..utils import stringutil -if typing.TYPE_CHECKING: - from typing import ( - Optional, - ) - - ArchiveSpecT = tuple[bytes, bytes, bytes, Optional[bytes]] - """Tuple of (mime-type, archive-type, file extension, encoding)""" - - -archivespecs: util.sortdict[bytes, ArchiveSpecT] = util.sortdict( +archivespecs = util.sortdict( ( (b'zip', (b'application/zip', b'zip', b'.zip', None)), (b'gz', (b'application/x-gzip', b'tgz', b'.tar.gz', None)),