Commit 3373bfac authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'mnt/deprecation' into 'master'

Mnt/deprecation

See merge request fsl/fsleyes/props!31
parents 473d8b0e 59d5672e
......@@ -2,6 +2,17 @@ This document contains the ``fsleyes-props`` release history in reverse
chronological order.
1.6.5 (Monday January 7th 2019)
-------------------------------
Changed
^^^^^^^
* Removed the ``deprecation`` library as a dependency.
1.6.4 (Friday October 5th 2018)
-------------------------------
......
......@@ -21,8 +21,7 @@ application code.
import weakref
import logging
import deprecation
import warnings
from . import properties_value
from . import bindable
......@@ -239,19 +238,19 @@ class PropertyBase(object):
else: instData.propVal.removeListener(name)
@deprecation.deprecated(deprecated_in='1.2.0',
removed_in='2.0.0',
details='Use getAttribute instead')
def getConstraint(self, instance, constraint):
"""See :meth:`getAttribute`. """
warnings.warn('getConstraint is deprecated - use getAttribute instead',
category=DeprecationWarning,
stacklevel=2)
return self.getAttribute(instance, constraint)
@deprecation.deprecated(deprecated_in='1.2.0',
removed_in='2.0.0',
details='Use setAttribute instead')
def setConstraint(self, instance, constraint, value):
"""See :meth:`setAttribute`. """
warnings.warn('setConstraint is deprecated - use setAttribute instead',
category=DeprecationWarning,
stacklevel=2)
return self.setAttribute(instance, constraint, value)
......@@ -520,12 +519,12 @@ class ListPropertyBase(PropertyBase):
else: return None
class PropertyOwner(type): # noqa
class PropertyOwner(type):
"""Deprecated. """
@deprecation.deprecated(deprecated_in='1.7.0',
removed_in='2.0.0',
details='PropertyOwner is no longer used')
def __new__(cls, name, bases, attrs):
warnings.warn('PropertyOwner is deprecated and is no longer used',
category=DeprecationWarning,
stacklevel=2)
return super(PropertyOwner, cls).__new__(cls, name, bases, attrs)
......@@ -896,19 +895,19 @@ class HasProperties(object):
self.getPropVal(propName).propNotify()
@deprecation.deprecated(deprecated_in='1.2.0',
removed_in='2.0.0',
details='Use getAttribute instead')
def getConstraint(self, propName, constraint):
"""See :meth:`getAttribute`. """
warnings.warn('getConstraint is deprecated - use getAttribute instead',
category=DeprecationWarning,
stacklevel=2)
return self.getAttribute(propName, constraint)
@deprecation.deprecated(deprecated_in='1.2.0',
removed_in='2.0.0',
details='Use setAttribute instead')
def setConstraint(self, propName, constraint, value):
"""See :meth:`setAttribute`. """
warnings.warn('setConstraint is deprecated - use setAttribute instead',
category=DeprecationWarning,
stacklevel=2)
return self.setAttribute(propName, constraint, value)
......
six==1.*
numpy==1.*
matplotlib>=1.5,<3
wxPython>=3.0.2.0,<4.1
deprecation>=1.*,<=2.*
fsleyes-widgets>=0.6.*,<1
fslpy>=1.4,<2
matplotlib>=1.5
wxPython>=3.0.2.0
fsleyes-widgets>=0.6.*
fslpy>=1.4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment