diff options
-rw-r--r-- | astroid/node_classes.py | 29 | ||||
-rw-r--r-- | astroid/scoped_nodes.py | 16 | ||||
-rw-r--r-- | astroid/tests/unittest_inference.py | 16 |
3 files changed, 0 insertions, 61 deletions
diff --git a/astroid/node_classes.py b/astroid/node_classes.py index ebcb7709..5b65dc13 100644 --- a/astroid/node_classes.py +++ b/astroid/node_classes.py @@ -15,7 +15,6 @@ import abc import builtins as builtins_mod import itertools import pprint -import warnings from functools import lru_cache from functools import singledispatch as _singledispatch @@ -673,20 +672,6 @@ class NodeNG(object): """ return list(self.infer()) - def infered(self): - """A deprecated alias of :meth:`inferred`. - - .. deprecated:: 1.5 - - :returns: The inferred values. - :rtype: list - """ - warnings.warn('%s.infered() is deprecated and slated for removal ' - 'in astroid 2.0, use %s.inferred() instead.' - % (type(self).__name__, type(self).__name__), - PendingDeprecationWarning, stacklevel=2) - return self.inferred() - def instantiate_class(self): """Instantiate a instance of the defined class. @@ -2250,20 +2235,6 @@ class Comprehension(NodeNG): """ return self - def ass_type(self): - """A deprecated alias of :meth:`assign_type`. - - .. deprecated:: 1.5 - - :returns: The assignment type. - :rtype: NodeNG - """ - warnings.warn('%s.ass_type() is deprecated and slated for removal' - 'in astroid 2.0, use %s.assign_type() instead.' - % (type(self).__name__, type(self).__name__), - PendingDeprecationWarning, stacklevel=2) - return self.assign_type() - def _get_filtered_stmts(self, lookup_node, node, stmts, mystmt): """method used in filter_stmts""" if self is mystmt: diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py index 8a2914d7..ccc70e87 100644 --- a/astroid/scoped_nodes.py +++ b/astroid/scoped_nodes.py @@ -18,7 +18,6 @@ import builtins import sys import io import itertools -import warnings from typing import Optional, List from astroid import bases @@ -2251,21 +2250,6 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, """ return bases.Instance(self) - def instanciate_class(self): - """A deprecated alias for :meth:`instanciate_class`. - - .. deprecated:: 1.5 - - :returns: An :class:`Instance` of the :class:`ClassDef` node, - or self if this is not possible. - :rtype: Instance or ClassDef - """ - warnings.warn('%s.instanciate_class() is deprecated and slated for ' - 'removal in astroid 2.0, use %s.instantiate_class() ' - 'instead.' % (type(self).__name__, type(self).__name__), - PendingDeprecationWarning, stacklevel=2) - return self.instantiate_class() - def getattr(self, name, context=None, class_context=True): """Get an attribute from this class, using Python's attribute semantic. diff --git a/astroid/tests/unittest_inference.py b/astroid/tests/unittest_inference.py index 4fbc41a7..0d41c2e7 100644 --- a/astroid/tests/unittest_inference.py +++ b/astroid/tests/unittest_inference.py @@ -15,7 +15,6 @@ import os import sys from functools import partial import unittest -import warnings import pytest @@ -368,21 +367,6 @@ class InferenceTest(resources.SysPathSetup, unittest.TestCase): self.assertEqual(a_inferred[0].value, 1) self.assertEqual(len(a_inferred), 1) - def test_infered_warning(self): - code = ''' - def f(f=1): - return f - - a = f() - ''' - ast = parse(code, __name__) - a = ast['a'] - - with warnings.catch_warnings(record=True) as w: - with test_utils.enable_warning(PendingDeprecationWarning): - a.infered() - self.assertIsInstance(w[0].message, PendingDeprecationWarning) - def test_exc_ancestors(self): code = ''' def f(): |