Skip to content

Commit

Permalink
Stackless issue python#218: Fix using Stackless as embedded Python in…
Browse files Browse the repository at this point in the history
…terpreter

The fix for Stackless issue 186 (support for sub-interpreters) broke
some typical use cases.

(cherry picked from commit 5b29b24)
  • Loading branch information
Anselm Kruis committed Jul 1, 2019
1 parent bcd0122 commit b80c026
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Stackless/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ What's New in Stackless 3.X.X?

*Release date: 20XX-XX-XX*

- https://github.com/stackless-dev/stackless/issues/218
Fix using Stackless as embedded Python interpreter. The fix for Stackless
issue 186 (support for sub-interpreters) broke some typical use cases.

- https://github.com/stackless-dev/stackless/issues/220
Improve the error handling in case of failed stack transfers / hard tasklet
switches. Call Py_FatalError, if a clean recovery is impossible.
Expand All @@ -17,7 +21,7 @@ What's New in Stackless 3.X.X?
C-API documentation update: update the names of watchdog flags to match the
implementation.

- https://github.com/stackless-dev/stackless/issues/221
- https://github.com/stackless-dev/stackless/issues/222
Fix a bug that could cause an assertion failure and a reference leak during
the termination of a main-tasklet, if an application embeds Stackless Python.

Expand Down
2 changes: 1 addition & 1 deletion Stackless/core/stacklesseval.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ slp_eval_frame(PyFrameObject *f)
retval = climb_stack_and_eval_frame(f);
initial_stub = ts->st.initial_stub;
/* cst might be NULL in OOM conditions */
if (initial_stub != NULL) {
if (ts->interp != _PyRuntime.interpreters.main && initial_stub != NULL) {
PyCStackObject *cst;
register int found = 0;
assert(initial_stub->startaddr == ts->st.cstack_base);
Expand Down
1 change: 0 additions & 1 deletion Stackless/unittests/test_slp_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def setUp(self):
from test.support import verbose


@unittest.skip("Stackless issue 218")
class EmbeddingTests(EmbeddingTestsMixin, unittest.TestCase):
def test_schedule(self):
env = dict(os.environ)
Expand Down

0 comments on commit b80c026

Please sign in to comment.