Skip to content

Add multi context #158

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

Merged
merged 6 commits into from
Feb 7, 2022
Merged

Add multi context #158

merged 6 commits into from
Feb 7, 2022

Conversation

drew-512
Copy link
Contributor

@drew-512 drew-512 commented Feb 3, 2022

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.

@codecov
Copy link

codecov bot commented Feb 3, 2022

Codecov Report

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

Impacted file tree graph

@@            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.

Copy link
Member

@sbinet sbinet left a comment

Choose a reason for hiding this comment

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

LGTM

@sbinet sbinet merged commit 727b7c4 into go-python:master Feb 7, 2022
@drew-512 drew-512 mentioned this pull request Feb 16, 2022
@drew-512 drew-512 deleted the add-multi-context branch February 17, 2022 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants