-
Notifications
You must be signed in to change notification settings - Fork 956
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
Add support for infinite depth tracing and fix pytest warning #235
base: master
Are you sure you want to change the base?
Conversation
… if _frame_candidate is internal_frame
Body: This commit resolves a DeprecationWarning in the tracer.py file. The deprecated getName() method, which is used to get the name of the current_thread object, has been replaced with the recommended name attribute. Changes: - Updated line 473 in tracer.py to use current_thread.name instead of current_thread.getName() With this change, the deprecation warning will no longer appear when running tests, and the code will be compatible with future releases of Python that may remove the deprecated method.
This commit adds a new feature that enables infinite depth support for function call tracing in pysnooper. The test_infinite_depth_support test case has been added to verify the correct behavior of the feature. The test case covers the case of tracing a recursive function call with unlimited depth and checks the output against the expected values. The feature works by setting the depth parameter to float('inf') in the pysnooper.snoop function.
Thank you, but please separate the 3 issues into 3 separate PRs. You could either do them in parallel, or wait to finish with one before continuing the other, whichever is more convenient for you. Then I'll review. |
Ok, Thanks, will do that! |
@@ -1,4 +1,5 @@ | |||
# Copyright 2019 Ram Rachum and collaborators. | |||
# -*- coding: utf-8 -*- | |||
# Copyright 2023 Elijah Qi and Liuqing Yang. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -1,4 +1,5 @@ | |||
# Copyright 2019 Ram Rachum and collaborators. | |||
# -*- coding: utf-8 -*- | |||
# Copyright 2023 Elijah Qi and Liuqing Yang. | |||
# This program is distributed under the MIT license. | |||
|
|||
import io |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undo changes<
Duplicate of #
Description:
This pull request introduces two improvements to the codebase:
Please review the changes and let me know if you have any questions or suggestions.