Don't use versions in _DeprecateSubset

The _DeprecateSubset helper was developed during Mitaka, but it will
be used for many versions. The version information should not be
hard-coded. Instead we emit deprecation messages without any version
information.

Example warning before this patch:

  DeprecationWarning: IPV6_MODES in version 'mitaka' and will be
  removed in version 'newton': moved to neutron_lib.constants

After:

  DeprecationWarning: IPV6_MODES: moved to neutron_lib.constants

Change-Id: Iaae5b58a406d4021ff22e8a28e30ae4f746ce211
This commit is contained in:
Henry Gessau 2016-08-05 15:03:18 -04:00
parent 4d432de95e
commit 114de17bf5
1 changed files with 0 additions and 2 deletions

View File

@ -40,8 +40,6 @@ class _DeprecateSubset(object):
debtcollector.deprecate(
name,
message='moved to %s' % other_mod.__name__,
version='mitaka',
removal_version='newton',
stacklevel=4)
return vars(other_mod)[name]