-
Notifications
You must be signed in to change notification settings - Fork 60
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
Unexpected increase of nesting level #9
Comments
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @akruis on 2013-04-12 18:02:42 said: Obviously setting of the class attribute The function type_new() (tp_new) contains a check, that sets Py_TPFLAGS_HAVE_STACKLESS_CALL if a the attribute Could anybody please have a look at this patch. |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @ctismer on 2013-04-12 22:38:17 said: I examined the patch and also the addition to the tests. Do you want me to test it? Otherwise feel free to check it in! cheers - chris |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @akruis on 2013-04-13 20:41:12 said: Replying to [comment:3 ctismer]:
Thanks. The use case is not so uncommon: if the unpickler creates a class, that was pickled "by value", the unpickler first creates a almost empty class object and then add methods and other attributes. This strategy reduces problems with reference cycles.
What happens, if Py_TPFLAGS_HAVE_STACKLESS_CALL is incorrectly set? Consider something like this:
Cheers |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @akruis on 2013-04-16 19:51:18 said: Unfortunately my patch is not correct, because it does not handle subclasses correctly. After some debugging, I'm fairly confident to understand the code, but today I'm to tired to work on this problem.
I'm currently in a JEE project at a customers site. Therefore I'll need a few days to complete this task. |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @akruis on 2013-04-24 16:13:26 said: I fixed the issue for 2.7-slp. Changeset [7d4f4b6fdf06] Additionally, I found that we can safely set the Py_TPFLAGS_HAVE_STACKLESS_CALL if the tp_call function is slot_tp_call. This is much faster and enables soft switching for some rare cases. (One of these cases was a recursion test in Lib/test/test_descr. See #20). Changeset [7513dc7259b3]. To do: port to Python3 |
* Fix some deprecation warnings in Doc/conf.py * Fix an rst error in Misc/NEWS
Originally reported by: RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew)
(originally reported in Trac by @akruis on 2013-04-12 15:30:16)
Hi,
thanks to my colleague Michael Bauer I was able to identify the following issue:
Version: 2.7-slp
If I define the following callable class
and execute
c=C(); c()
in a tasklet then some_function runs at nesting level 1.If I change the definition of class C to
the nesting level does not increase.
The attached test script demonstrates this problem.
I would like to fix this issue for v2.7.4-slp.
The text was updated successfully, but these errors were encountered: