Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Prepare Stackless 3.6 #133

Closed
7 tasks done
akruis opened this issue Oct 6, 2017 · 3 comments
Closed
7 tasks done

Prepare Stackless 3.6 #133

akruis opened this issue Oct 6, 2017 · 3 comments

Comments

@akruis
Copy link

akruis commented Oct 6, 2017

Now that we are on github, we can start working on Stackless 3.6.

Plan

  1. Merge all commits which were converted from mercurial into the branches master-slp and upcoming 3.6-slp. These commits are on branch master and 3.6 as well as 3.5-slp. It is important to interleave the branches using the same logic as on mercurial.

    Details:

    • Merge changes into master-slp up to the branch point for 3.6-slp. The branch point for C-Python 3.6 is commit 3c70a99. Up-merge 3.5-slp into master-slp whenever 3.5-slp contains a Stackless specific commit.
    • Create branch 3.6-slp
    • Merge 2a35c93 from 3.6 into 3.6-slp. Up-merge 3.5-slp into 3.6-slp whenever 3.5-slp contains a Stackless specific commit.
    • Merge d2306ce into master-slp. Up-merge 3.6-slp into master-slp whenever 3.6-slp contains a Stackless specific commit.
  2. Once all mercurial commits have been merged, switch to the new git workflow. We still merge the C-Python branches into the corresponding Stackless ("-slp") branches, but we develop Stackless fixes in master-slp or the most recent version branch and cherry-pick them to older branches. (There is no change for 2.7-slp).

    Details:

    • Now master-slp and 3.6-slp should contain all fixes from 3.5-slp. Check it.
    • Then merge 3.6 into 3.6-slp
    • Merge master into master-slp. Because we won't up-merge between Stackless version branches, there is no need to synchronise the work on master-slp and 3.6-slp. Cherry-pick Stackless specific commits.
@akruis akruis added the task label Oct 6, 2017
@akruis akruis modified the milestone: 2.7.12-slp Oct 6, 2017
@akruis akruis added the 3.6-slp label Oct 6, 2017
@akruis akruis added this to the v3.6.x-slp milestone Oct 6, 2017
@akruis
Copy link
Author

akruis commented Oct 6, 2017

Random Notes

  • If HEAD is a merge commit, then git log --graph HEAD^2^! 3c70a99 gives a nice list of the commits to be merged. The last commit is already merged.

  • It is really a good idea to enable git rerere. See man git-rerere(1). It records merge conflict resolutions.

  • Some Stackless test cases in test_pickle fail. Needs to be fixed, before I continue merging. EDIT: fixed by b63015b from upstream

  • I push my working branch to https://github.com/akruis/cpython/tree/slp36 every now and then.

@akruis
Copy link
Author

akruis commented Oct 6, 2017

Changes

  1. Issue bpo bpo-43737: More useful documentation on behavior of % when divisor is negative python/cpython#25220 introduced test.libregrtest, which broke Stackless/unittests/runAll.py. Fixed.

  2. Commit f5c4b99 causes a leak of 2 references in the Stackless test case test_channel.Subclassing.test_init. See issue slp_prepare_slots leaks memory #135.

  3. Commit b0f80b0 changes C-Python to use a 16bit word-code instead of byte-code. The changes to Python/ceval.c reveal that our version in 3.x-slp is unmaintainable. It contains a lot of duplicated code. I'll refactor Python/ceval.c, before I merge b0f80b0.

  4. Commit 9be7e7b adds _PyObject_FastCall(), _PyCFunction_FastCall() and _PyFunction_FastCall(), a new calling convention avoiding a temporary tuple to pass positional parameters in most cases. I have make these functions Stackless aware. See issue Add Stackless support to all *PyObject_Call* API functions #137.

  5. Commit 3cebf93 introduces the frame evaluation API aspect of PEP 523. It causes a compile error in Python/ceval.c, which is simple to fix. Currently I don't oversee how PEP 523 interacts with Stackless calls or pickling of code objects (new field co_extra).

  6. Commit eb63645 implements PEP 525 -- Asynchronous Generators. We should add pickling support for them and for various types related to Asynchronous Generators. See issue Separate pickling of generators, coroutines and asynchronous generators #139. In the end I decided to postpone the enhancement request, because I don't have enough spare time and I don't want to delay the release any further.

  7. Commit 2eea952 fixes bpo-31095: "fix potential crash during GC". This change causes at least one assertion failure in the Stackless test suite. See issue Replace copied code in pricklepit.c dictview_new #144.

  8. Commit d5d7954 revealed a bug in the initialization of Stackless. See issue bomb type not initialized, NULL pointer access on MemoryError #146.

  9. Finally some almost trivial issues: Limit in test/test_doctest to low #145 and The Stackless unit-tests emit many DeprecationWarning messages. #147.

akruis pushed a commit that referenced this issue Oct 29, 2017
Adapt Stackless/unittests/runAll.py to issue python#25220.
akruis pushed a commit that referenced this issue Oct 29, 2017
    
Adapt to changes in test.libregrtest
akruis pushed a commit that referenced this issue Oct 29, 2017
- Reduce duplicate code.
- Move code around reduce the number of differences. This way patches
from upstream are more likely to apply

This commit does not change the outcome of the preprocessor.
akruis pushed a commit that referenced this issue Oct 29, 2017
- Remove a byte-code specific optimization. The next merge from master
will switch to word-code.
- #define PY_LOCAL_AGGRESSIVE, it was undefined by accident in commit
1c7ff3e.
akruis pushed a commit that referenced this issue Oct 29, 2017
Fix the wordcode processing.
akruis pushed a commit that referenced this issue Oct 29, 2017
Fix the wordcode processing again.
akruis pushed a commit that referenced this issue Oct 29, 2017
Add the usual STACKLESS_GETARG(), ... stuff to the new fast-call
functions.
akruis pushed a commit that referenced this issue Oct 29, 2017
Add Stackless support to PyEval_CallObjectWithKeywords().
akruis pushed a commit that referenced this issue Oct 29, 2017
Add Stackless support to call_function_tail().
akruis pushed a commit that referenced this issue Oct 29, 2017
The previous merge broke Python/ceval.c.
akruis pushed a commit that referenced this issue Oct 29, 2017
The previous merge broke Python/ceval.c.
akruis pushed a commit that referenced this issue Oct 29, 2017
Add missing calls to dtrace_function_return().
akruis pushed a commit that referenced this issue Oct 29, 2017
Ensure, that frame->f_lasti is >= -1. This invariant was broken by the
switch to wordcode.
akruis pushed a commit that referenced this issue Nov 1, 2017
Add Stackless support for opcode CALL_METHOD.
akruis pushed a commit that referenced this issue Nov 1, 2017
Always track frames. Otherwise Stackless leaks frames.
akruis pushed a commit that referenced this issue Nov 1, 2017
Only do recursion adjustment if there is no danger of soft-switching,
i.e. if we are not being called by run_cframe. Were a soft-switch to
occur, the re-adjustment of the recursion depth would happen for the
wrong frame.
akruis pushed a commit that referenced this issue Dec 21, 2017
@akruis
Copy link
Author

akruis commented Dec 22, 2017

Yesterday I created tag v3.6.4-slp and compiled the Windows installer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant