Skip to content
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

Renames and deprecations for #68 #324

Merged
merged 9 commits into from
Sep 16, 2017

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Sep 15, 2017

Adds:

  • trio.hazmat.TrioToken
  • trio.BlockingTrioToken

Deprecates:

  • current_call_soon_thread_and_signal_safe
  • run_in_trio_thread
  • await_in_trio_thread

The new API has more consistent naming is generally less confusing due
to the use of actual objects instead of the unconventional returning
closures thing.

...and deprecate current_call_soon_thread_and_signal_safe.

Still need to update callers and docs, but tests are passing (with
tons of deprecation warnings).
This lets us use things like:

  @deprecated(..., instead=BlockingTrioPortal.run)
  def current_await_in_trio_thread():
      ...

and the message about BlockingTrioPortal.run now shows up correctly.
@njsmith njsmith mentioned this pull request Sep 15, 2017
17 tasks
@codecov
Copy link

codecov bot commented Sep 15, 2017

Codecov Report

Merging #324 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
+ Coverage   99.24%   99.25%   +<.01%     
==========================================
  Files          86       87       +1     
  Lines       10327    10817     +490     
  Branches      726      786      +60     
==========================================
+ Hits        10249    10736     +487     
- Misses         61       63       +2     
- Partials       17       18       +1
Impacted Files Coverage Δ
trio/__init__.py 100% <ø> (ø) ⬆️
trio/hazmat.py 100% <ø> (ø) ⬆️
trio/_core/__init__.py 100% <100%> (ø) ⬆️
trio/tests/test_threads.py 100% <100%> (ø) ⬆️
trio/_threads.py 100% <100%> (ø) ⬆️
trio/tests/test_util.py 100% <100%> (ø) ⬆️
trio/_core/_entry_queue.py 100% <100%> (ø)
trio/_core/tests/test_ki.py 100% <100%> (ø) ⬆️
trio/testing/_mock_clock.py 100% <100%> (ø) ⬆️
trio/_core/_run.py 100% <100%> (ø) ⬆️
... and 11 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 6107b25...e2df899. Read the comment docs.

@njsmith
Copy link
Member Author

njsmith commented Sep 16, 2017

Coverage changes appear to be spurious, due to #326 being merged in between the Linux/Windows builds and the MacOS builds.

@njsmith njsmith merged commit 1075239 into python-trio:master Sep 16, 2017
@njsmith njsmith deleted the rename-call_soon branch September 16, 2017 01:35
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.

1 participant