/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

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