/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/lru_cache.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-05-30 21:24:59 UTC
  • mfrom: (6630.1.4 deprecation)
  • Revision ID: breezy.the.bot@gmail.com-20170530212459-7n9a7isyb3nbim9y
Remove all deprecated arguments, functions and methods.

Merged from https://code.launchpad.net/~jelmer/brz/deprecation/+merge/324814

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from __future__ import absolute_import
20
20
 
21
21
from . import (
22
 
    symbol_versioning,
23
22
    trace,
24
23
    )
25
24
 
93
92
    def __len__(self):
94
93
        return len(self._cache)
95
94
 
96
 
    @symbol_versioning.deprecated_method(
97
 
        symbol_versioning.deprecated_in((2, 5, 0)))
98
 
    def add(self, key, value, cleanup=None):
99
 
        if cleanup is not None:
100
 
            raise ValueError("Per-node cleanup functions no longer supported")
101
 
        return self.__setitem__(key, value)
102
 
 
103
95
    def __setitem__(self, key, value):
104
96
        """Add a new value to the cache"""
105
97
        if key is _null_key:
143
135
        """Get a new dict with the same key:value pairs as the cache"""
144
136
        return dict((k, n.value) for k, n in self._cache.iteritems())
145
137
 
146
 
    items = symbol_versioning.deprecated_method(
147
 
        symbol_versioning.deprecated_in((2, 5, 0)))(as_dict)
148
 
 
149
138
    def cleanup(self):
150
139
        """Clear the cache until it shrinks to the requested size.
151
140