xonsh/news/fix-tracer-shutdown.rst
Łukasz Langa 1183813ff7
Some checks are pending
Build and deploy docs / Xonsh docs to gh-pages (push) Waiting to run
CI Tests / Test Python 3.10 macOS-latest (push) Waiting to run
CI Tests / Test Python 3.11 macOS-latest (push) Waiting to run
CI Tests / Test Python 3.12 macOS-latest (push) Waiting to run
CI Tests / Test Python 3.13 macOS-latest (push) Waiting to run
CI Tests / Test Python 3.10 ubuntu-latest (push) Waiting to run
CI Tests / Test Python 3.11 ubuntu-latest (push) Waiting to run
CI Tests / Test Python 3.12 ubuntu-latest (push) Waiting to run
CI Tests / Test Python 3.13 ubuntu-latest (push) Waiting to run
CI Tests / Test Python 3.10 windows-latest (push) Waiting to run
CI Tests / Test Python 3.11 windows-latest (push) Waiting to run
CI Tests / Test Python 3.12 windows-latest (push) Waiting to run
CI Tests / Test Python 3.13 windows-latest (push) Waiting to run
Fix ignored exception in tracer shutdown related to module deletion (#5806)
With the tracer on, modules at shutdown can be destroyed in an order
that prevents the `trace()` function from working. This was currently
the case with Python 3.13 where the function was still being called
during the `xonsh.tracer` module's destruction.

This change adds a test to prevent this from happening in the future,
and works around the issue by creating local references to necessary
functions that were otherwise set to None at shutdown.
2025-03-03 18:07:18 +06:00

5 lines
153 B
ReStructuredText

**Fixed:**
* Using ``trace on`` with ``.xsh`` scripts could previously lead to
a spurious ignored exception showing up on stderr. This is now fixed.