← Winnitude! Search  ·  Reader Mode (1827 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 69 LINKS

Add multi context by drew-512 · Pull Request #158 · go-python/gpython

Repository navigation

Add multi context - #158


Merged
sbinet merged 6 commits into go-python:master from drew-512:add-multi-context Feb 7, 2022
Merged

Add multi context #158 sbinet merged 6 commits into go-python:master from drew-512:add-multi-context

Conversation

drew-512 commented Feb 3, 2022



Copy link Copy Markdown
Contributor

Hi @sbinet

So this PR has all the py.Context stuff wrapped into it minus:

  • examples/embedded
  • examples/multi-context
  • py/util.go (consumed by examples/embedded)
  • README.md edits

On the sync.CloseSync issue you raised in the prev thread, the intention is to ensure that multiple holders of a py.Context can all call Close() without any (future) consequences. IMO, this is congruent with multiple holders of a py.Context (and how it's annoying when ya have to ensure that only one Close() is called). People see that close code and they can feel comforted it's an interface ready for the real world. And it basically comes at no cost or allocations.

The last commit on this PR should prevent any conflicts (assuming you merge PR 156 and 157 first)

Otherwise, lmk what you'd like to add/remove to this, otherwise I'll wait for this merge and then I'll immediately submit a PR with the above items rolled into a final PR or lmk what I should separate, etc. Thanks.

Drew O'Meara added 6 commits February 3, 2022 03:57 introducing py.Context fd02d90 revised module model for py.Context 2b3aa67 added py.CompileMode instead of string fc528c7 high level edits for py.Context additions 57bf0c8 go.mod up to date 6ba4973 anticipated congruency for PR 156 and 157 87d5755

codecov
Bot
commented Feb 3, 2022



Copy link Copy Markdown

Codecov Report

Merging #158 (87d5755 ) into master (3068cb5 ) will decrease coverage by 0.17%.
The diff coverage is 66.12%.

@@            Coverage Diff             @@
##           master     #158      +/-   ##
==========================================
- Coverage   74.55%   74.38%   -0.18%     
==========================================
  Files          64       66       +2     
  Lines       11187    11395     +208     
==========================================
+ Hits         8341     8476     +135     
- Misses       2297     2352      +55     
- Partials      549      567      +18     
Impacted Files Coverage Δ
py/int.go 77.13% <0.00%> (+0.26%) ⬆️
py/traceback.go 22.22% <ø> (-2.11%) ⬇️
py/import.go 15.62% <45.16%> (-0.86%) ⬇️
modules/runtime.go 45.86% <45.86%> (ø)
py/run.go 60.46% <60.46%> (ø)
py/module.go 71.69% <72.50%> (+11.69%) ⬆️
pytest/pytest.go 49.09% <81.81%> (+1.92%) ⬆️
py/list.go 64.13% <83.33%> (+0.03%) ⬆️
sys/sys.go 60.75% <88.23%> (+1.60%) ⬆️
builtin/builtin.go 80.06% <88.88%> (+0.03%) ⬆️
... and 13 more

Continue to review full report at Codecov .

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov . Last update 3068cb5...87d5755 . Read the comment docs .

sbinet approved these changes Feb 7, 2022
View reviewed changes

sbinet left a comment



Copy link Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

LGTM

sbinet merged commit 727b7c4 into go-python : master Feb 7, 2022 sbinet mentioned this pull request Feb 7, 2022 Multi-context execution (py.Context) #144 Closed sbinet mentioned this pull request Feb 16, 2022 Is it safe to use gpython interpreter in concurrent processing? #132 Closed drew-512 mentioned this pull request Feb 16, 2022 Multiple Interpreters #69 Closed drew-512 deleted the add-multi-context branch February 17, 2022 02:04 sbinet mentioned this pull request Feb 22, 2022 Is there anything like GIL? #64 Closed Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

2 participants