Add support for infinite depth tracing and fix pytest warning#235
Open
elijahqi wants to merge 6 commits intocool-RR:masterfrom
Open
Add support for infinite depth tracing and fix pytest warning#235elijahqi wants to merge 6 commits intocool-RR:masterfrom
elijahqi wants to merge 6 commits intocool-RR:masterfrom
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.
Owner
|
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. |
Author
|
Ok, Thanks, will do that! |
Lo236816
reviewed
Dec 29, 2023
| @@ -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.
Lo236816
reviewed
Dec 29, 2023
| # 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.