Skip to content

Modernize sniffio integration #2700

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 5 commits into from
Sep 3, 2023

Conversation

oremanj
Copy link
Member

@oremanj oremanj commented Jul 12, 2023

Use sniffio.thread_local to indicate which async library is running, instead of the deprecated sniffio.current_async_library_cvar. This allows us to remove a number of workarounds for the contextvar being inherited where it shouldn't be.

oremanj added 2 commits July 12, 2023 15:13
Use `sniffio.thread_local` to indicate which async library is running, instead of the deprecated `sniffio.current_async_library_cvar`. This allows us to remove a number of workarounds for the contextvar being inherited where it shouldn't be.
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #2700 (d3a5cb1) into master (55db083) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2700   +/-   ##
=======================================
  Coverage   98.94%   98.94%           
=======================================
  Files         113      113           
  Lines       16885    16917   +32     
  Branches     3036     3049   +13     
=======================================
+ Hits        16707    16739   +32     
  Misses        123      123           
  Partials       55       55           
Files Changed Coverage Δ
trio/_threads.py 100.00% <ø> (ø)
trio/_core/_run.py 99.44% <100.00%> (+<0.01%) ⬆️
trio/_core/_tests/test_guest_mode.py 99.69% <100.00%> (+0.01%) ⬆️
trio/_core/_tests/test_run.py 100.00% <100.00%> (ø)
trio/_tests/test_threads.py 100.00% <100.00%> (ø)
trio/_util.py 100.00% <100.00%> (ø)

@richardsheridan richardsheridan merged commit 8304dce into python-trio:master Sep 3, 2023
@CoolCat467
Copy link
Member

Why was this merged with failing mypy run?

@A5rocks
Copy link
Contributor

A5rocks commented Sep 3, 2023

Because mypy was already failing on master, I think.

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.

4 participants