Author: Amaury Forgeot d'Arc <amaur...@gmail.com> Branch: stdlib-2.7.9 Changeset: r75634:6a56bba1899b Date: 2015-02-01 21:43 +0100 http://bitbucket.org/pypy/pypy/changeset/6a56bba1899b/
Log: Note to self: always run tests. diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py --- a/pypy/interpreter/pycode.py +++ b/pypy/interpreter/pycode.py @@ -382,5 +382,8 @@ return "<code object %s, file '%s', line %d>" % ( self.co_name, self.co_filename, self.co_firstlineno) + def __repr__(self): + return self.get_repr() + def repr(self, space): return space.wrap(self.get_repr()) diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py --- a/pypy/interpreter/pyframe.py +++ b/pypy/interpreter/pyframe.py @@ -80,6 +80,12 @@ self.initialize_frame_scopes(outer_func, code) self.f_lineno = code.co_firstlineno + def __repr__(self): + # NOT_RPYTHON: useful in tracebacks + return "<%s.%s executing %s at line %s" % ( + self.__class__.__module__, self.__class__.__name__, + self.pycode, self.get_last_lineno()) + def mark_as_escaped(self): """ Must be called on frames that are exposed to applevel, e.g. by diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py --- a/pypy/module/_ssl/interp_ssl.py +++ b/pypy/module/_ssl/interp_ssl.py @@ -251,8 +251,10 @@ self.socket_type = socket_type self.w_socket = w_sock - assert w_ssl_sock is not None - self.ssl_sock_weakref_w = rweakref.ref(w_ssl_sock) + if w_ssl_sock: + self.ssl_sock_weakref_w = rweakref.ref(w_ssl_sock) + else: + self.ssl_sock_weakref_w = None return self def __del__(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit