# Enabling thread\_inherit\_context and context\_aware\_warnings by default on both builds

**URL:** <https://discuss.python.org/t/enabling-thread-inherit-context-and-context-aware-warnings-by-default-on-both-builds/108205>\
**Category:** Core Development\
**Created:** [July 18, 2026, 12:07pm UTC](https://discuss.python.org/t/enabling-thread-inherit-context-and-context-aware-warnings-by-default-on-both-builds/108205 "2026-07-18T12:07:27Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![ngoldbaum](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/ngoldbaum/32/12276_2.png) [@ngoldbaum](https://discuss.python.org/u/ngoldbaum)\
**Post date:** [July 25, 2026, 8:06pm UTC](https://discuss.python.org/t/enabling-thread-inherit-context-and-context-aware-warnings-by-default-on-both-builds/108205/30 "2026-07-25T20:06:25Z")

</div>

Thank you all for finding real-world examples where turning on the warning will cause pain. I now think we shouldn’t warn about this in 3.15 and am no longer advocating for that.

In addition to django/asgiref, this will also cause warnings in `sentry-sdk` and `OpenTelemetry`.

So I think Neil’s `thread_inheritable` idea needs to become a three-way option with the following behaviors:

- `True`: Newly spawned threads capture the context.
- `None`: Threads start with no inherited context. A future Python version may warn about the `thread_inherit_context` startup option changing default values in the future.
- `False`: Threads start with no inherited context. A future Python version will _never_ warn about this.

NumPy can then use `thread_inheritable=True` and other libraries like `asgiref`, `django`, `sentry-sdk`, and `OpenTelemetry` can have the entire 3.16 release cycle to make sure their ContextVars are created with `thread_inheritable=False`.

---

_[View the full topic](https://discuss.python.org/t/enabling-thread-inherit-context-and-context-aware-warnings-by-default-on-both-builds/108205)._
