| Summary: | dev-python/flask-0.11.1: _compat code is broken with pypy3 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
| Component: | Current packages | Assignee: | Python Gentoo Team <python> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | https://github.com/pallets/flask/commit/6e46d0cd3969f6c13ff61c95c81a975192232fed | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
Yay, it's fixed upstream. I'll backport the patch. commit 1abbfd2cf190c0b55fbd0a55f83de1ed3eeb8946 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: Wed Nov 30 18:11:31 2016 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Wed Nov 30 19:05:40 2016 dev-python/flask: Backport PyPy3 fix, #601298 |
# Certain versions of pypy have a bug where clearing the exception stack # breaks the __exit__ function in a very peculiar way. This is currently # true for pypy 2.2.1 for instance. The second level of exception blocks # is necessary because pypy seems to forget to check if an exception # happened until the next bytecode instruction? BROKEN_PYPY_CTXMGR_EXIT = False if hasattr(sys, 'pypy_version_info'): class _Mgr(object): def __enter__(self): return self def __exit__(self, *args): sys.exc_clear() ^- this fails on pypy3 since 'sys.exc_clear()' is python2-ism. I guess it'd be good to make the whole block conditional to py2.