[issue31286] import in finally results in SystemError

2017-08-29 Thread Thomas Caswell
Thomas Caswell added the comment: Your welcome! Matplotlib ended up just moving the import out of the finally block once we understood the issue. Tom On Tue, Aug 29, 2017 at 8:50 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Thank you for

[issue31286] import in finally results in SystemError

2017-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Thomas! Don't forget to remove pyc-files before re-running the Matplotlib test suite. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31286] import in finally results in SystemError

2017-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 265fcc5fc25d65afb33fda480c603f1e974e374e by Serhiy Storchaka in branch 'master': bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217) https://github.com/python/cpython/commit/265fcc5fc25d65afb33fda480c603f1e974e374e

[issue31286] import in finally results in SystemError

2017-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 3217 implements the first way. It also includes some refactoring. Remove all pyc-files before testing. -- stage: -> patch review ___ Python tracker

[issue31286] import in finally results in SystemError

2017-08-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3257 ___ Python tracker ___ ___

[issue31286] import in finally results in SystemError

2017-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The regression was introduced in issue30024. It was missed a difference between LOAD_ATTR and IMPORT_FROM. LOAD_ATTR replaces the object with the value of the attribute (do not changing the stack pointer). IMPORT_FROM keeps the original module on the stack

[issue31286] import in finally results in SystemError

2017-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Confirmed. The bug is 3.7 only. -- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka ___ Python tracker ___

[issue31286] import in finally results in SystemError

2017-08-26 Thread Thomas Caswell
New submission from Thomas Caswell: Code to reproduce: def import_in_finally_fail(): try: print('yo') finally: import asyncio.queues as aq Results in: In [68]: import_in_finally_fail() yo ---