Remove more Python 2 code from unittest.mock (obsolete function attributes)
diff --git a/mock.py b/mock.py
index 8b67c1e..8c9428a 100644
--- a/mock.py
+++ b/mock.py
@@ -2222,10 +2222,6 @@
# MagicMock already does the useful magic methods for us
continue
- if isinstance(spec, FunctionTypes) and entry in FunctionAttributes:
- # allow a mock to actually be a function
- continue
-
# XXXX do we need a better way of getting attributes without
# triggering code execution (?) Probably not - we need the actual
# object to mock it so we would rather trigger a property than mock
@@ -2320,16 +2316,6 @@
type(_ANY.__eq__),
)
-FunctionAttributes = set([
- 'func_closure',
- 'func_code',
- 'func_defaults',
- 'func_dict',
- 'func_doc',
- 'func_globals',
- 'func_name',
-])
-
file_spec = None