-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exec_file does not close file #239
Comments
Looks like there was a fix attempt in #52 and in the corresponding #53 , but the fix was reverted, see #53 (comment) . (And BTW I encountered the same bug in boost 1.68.0 with python 3.6.7) |
We're also having this issue with Boost Python 1.70 and Python 3.6.8. |
hajokirchhoff
pushed a commit
to hajokirchhoff/python
that referenced
this issue
Aug 10, 2021
…te: Using FILE* is a bad choice here because of possible exceptions, but Py_RunFile is a C function. This fix works, because Py_RunFile - as a C function - does not throw exceptions.
stefanseefeld
pushed a commit
that referenced
this issue
Aug 10, 2021
…g FILE* is a bad choice here because of possible exceptions, but Py_RunFile is a C function. This fix works, because Py_RunFile - as a C function - does not throw exceptions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run exec_file in a loop, I get an error on the 509th run. Using process monitor I can see that after each call to exec_file, CloseFile is not being called.
I believe fe24ab9 fixed it in Boost Python 1.58.0 but it looks like 99022d2 reverted it for 1.59.0 and the issue is present in all versions after.
It looks as though it was changed back because of issues with Python 2.7, but the original problem with closing files still exists with Python 3.6.
Tested with 1.67.0 and Python 3.6.4.
Code used to reproduce:
The text was updated successfully, but these errors were encountered: