[MERGE] LRUCache changes

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Dec 9 13:22:04 GMT 2008


>>>>> "jam" == John Arbash Meinel <john at arbash-meinel.com> writes:

<snip/>
    jam> +    def __init__(self, max_cache=100, after_cleanup_count=None,
    jam> +                 after_cleanup_size=symbol_versioning.DEPRECATED_PARAMETER):
    jam> +        if symbol_versioning.deprecated_passed(after_cleanup_size):
    jam> +            symbol_versioning.warn('LRUCache.__init__(after_cleanup_size) was'
    jam> +                                   ' deprecated in 1.11. Use'
    jam> +                                   ' after_cleanup_count instead.',
    jam> +                                   DeprecationWarning)


I know we don't have a deprecated_parameter() handy, but may be
you can still use deprecated_in() and more importantly (1, 11) ?
Or just define one_eleven and use it ?

That will make future cleanups easier.

Are you sure you want to use symbol_versioning.warn (which relies
on 'from warnings import warn' in symbol_versioning) ?

BB: approve

    Vincent



More information about the bazaar mailing list