Skip to content

Commit

Permalink
Fix isort, add newsfragment
Browse files Browse the repository at this point in the history
  • Loading branch information
oremanj committed Jul 12, 2023
1 parent fde342f commit f307245
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions newsfragments/2700.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Trio now indicates its presence to `sniffio` using the ``sniffio.thread_local``
interface that is preferred since sniffio v1.3.0. This should be less likely
than the previous approach to cause :func:`sniffio.current_async_library` to
return incorrect results due to unintended inheritance of contextvars.
3 changes: 2 additions & 1 deletion trio/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
from abc import ABCMeta
from functools import update_wrapper

import trio
from sniffio import thread_local as sniffio_loop

import trio

# Equivalent to the C function raise(), which Python doesn't wrap
if os.name == "nt":
# On Windows, os.kill exists but is really weird.
Expand Down

0 comments on commit f307245

Please sign in to comment.