Author: Armin Rigo <ar...@tunes.org> Branch: py3.5 Changeset: r89889:82e074d421eb Date: 2017-02-01 16:10 +0100 http://bitbucket.org/pypy/pypy/changeset/82e074d421eb/
Log: hg merge default diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py --- a/pypy/interpreter/function.py +++ b/pypy/interpreter/function.py @@ -213,6 +213,11 @@ self.w_func_dict = space.newdict(instance=True) return self.w_func_dict + def getdictvalue(self, space, attr): + if not self.can_change_code: + return None + return W_Root.getdictvalue(self, space, attr) + def setdict(self, space, w_dict): if not self.can_change_code: raise oefmt(space.w_AttributeError, diff --git a/pypy/interpreter/test/test_function.py b/pypy/interpreter/test/test_function.py --- a/pypy/interpreter/test/test_function.py +++ b/pypy/interpreter/test/test_function.py @@ -168,6 +168,8 @@ raises(AttributeError, "list.append.im_func.efgh = 6") raises(AttributeError, "dir.__dict__") raises(AttributeError, "dir.__dict__ = {}") + c = all.__call__ # this should work + assert c([4, 5, 6]) is True def test_set_module_to_name_eagerly(self): skip("fails on PyPy but works on CPython. Unsure we want to care") _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit