Skip to content
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

Logger doesn't support weak reference #94

Open
pamelafox opened this issue Sep 24, 2022 · 1 comment
Open

Logger doesn't support weak reference #94

pamelafox opened this issue Sep 24, 2022 · 1 comment
Labels
cpython-incompatibility Relates to an incompatibility with stdlib logging enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@pamelafox
Copy link
Member

CPython Logger supports weak reference, picologging Logger does not.

Supporting weakreference is fairly straightforward:
https://docs.python.org/3.10/extending/newtypes.html#weak-reference-support

I tested that change locally and it works. I haven't been able to ascertain how much of a performance hit it is (if any), however. Let me know what you think and whether you'd like a PR.

@tonybaloney tonybaloney added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed cpython-incompatibility Relates to an incompatibility with stdlib logging labels Oct 10, 2022
@pamelafox
Copy link
Member Author

I actually have this branch locally but wasn't sure if it was desired, as I read it might introduce a slight performance hit. @tonybaloney Is it worth adding?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpython-incompatibility Relates to an incompatibility with stdlib logging enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants