# Why has \`\_PyThread\_CurrentExceptions\` disappeared from the exported symbols (but \`\_PyThread\_CurrentFrames\` is still there)?

**URL:** <https://discuss.python.org/t/why-has-pythread-currentexceptions-disappeared-from-the-exported-symbols-but-pythread-currentframes-is-still-there/80320>\
**Category:** C API\
**Created:** [February 11, 2025, 1:16pm UTC](https://discuss.python.org/t/why-has-pythread-currentexceptions-disappeared-from-the-exported-symbols-but-pythread-currentframes-is-still-there/80320 "2025-02-11T13:16:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vstinner](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/vstinner/32/15130_2.png) [@vstinner](https://discuss.python.org/u/vstinner)\
**Post date:** [February 17, 2025, 4:48pm UTC](https://discuss.python.org/t/why-has-pythread-currentexceptions-disappeared-from-the-exported-symbols-but-pythread-currentframes-is-still-there/80320/3 "2025-02-17T16:48:53Z")

</div>

On Python 3.13, you can call `sys._current_exceptions()` in C which wraps the internal `_PyThread_CurrentExceptions()` function. Tell me if you need help to write code to call the function. It works on Python 3.12 and older: see [sys.\_current\_exceptions() documentation](https://docs.python.org/dev/library/sys.html#sys._current_exceptions).

> So I was wondering whether it is expected that `_PyThread_CurrentExceptions` is no longer available from symbols, whilst `_PyThread_CurrentFrames` still is.

`mod_wsgi` uses `_PyThread_CurrentFrames()` which triggered to restore the function in Python 3.13 alpha 2:

- [[C API] Revert of private functions removed in Python 3.13 causing most problems · Issue #112026 · python/cpython · GitHub](https://github.com/python/cpython/issues/112026)
- [Ongoing packages' rebuild with Python 3.13 in Fedora](https://discuss.python.org/t/ongoing-packages-rebuild-with-python-3-13-in-fedora/38134)

---

_[View the full topic](https://discuss.python.org/t/why-has-pythread-currentexceptions-disappeared-from-the-exported-symbols-but-pythread-currentframes-is-still-there/80320)._
