Skip to content

WIP: add nanobind leak detector #204

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

WIP: add nanobind leak detector #204

wants to merge 4 commits into from

Conversation

trevor-e
Copy link
Member

No description provided.

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 77.77778% with 8 lines in your changes missing coverage. Please review.

Project coverage is 75.94%. Comparing base (4457ff4) to head (ed53935).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tests/conftest.py 75.00% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #204      +/-   ##
==========================================
+ Coverage   75.70%   75.94%   +0.24%     
==========================================
  Files         125      127       +2     
  Lines        9713     9846     +133     
  Branches     1096     1105       +9     
==========================================
+ Hits         7353     7478     +125     
- Misses       1959     1964       +5     
- Partials      401      404       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +23 to +27
import sys

print("DEBUG: About to write to stderr", file=sys.stdout)
print("nanobind: leaked telkins", file=sys.stderr)
print("DEBUG: Just wrote to stderr", file=sys.stdout)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be test code that intentionally triggers the nanobind leak detector by printing a fake leak message to stderr. These debug print statements should be removed before merging as they will cause the test to fail with a false positive leak detection. If this was added to verify the detector's functionality, consider moving it to a dedicated test case for the detector itself rather than leaving it in an unrelated test.

Suggested change
import sys
print("DEBUG: About to write to stderr", file=sys.stdout)
print("nanobind: leaked telkins", file=sys.stderr)
print("DEBUG: Just wrote to stderr", file=sys.stdout)
import sys

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@trevor-e trevor-e changed the title WIP: add nanobind detector WIP: add nanobind leak detector Jul 21, 2025
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.

1 participant