/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/registry.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Classes to provide name-to-object registry-like support."""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
from .pyutils import get_named_object
22
20
 
23
 
from .sixish import viewitems
24
 
 
25
21
 
26
22
class _ObjectGetter(object):
27
23
    """Maintain a reference to an object, and return the object on request.
110
106
 
111
107
    def aliases(self):
112
108
        """Return a set of the format names which are aliases."""
113
 
        return dict(viewitems(self._aliases))
 
109
        return dict(self._aliases.items())
114
110
 
115
111
    def alias_map(self):
116
112
        ret = {}
117
 
        for alias, target in viewitems(self._aliases):
 
113
        for alias, target in self._aliases.items():
118
114
            ret.setdefault(target, []).append(alias)
119
115
        return ret
120
116