logger: remove unused trace decorator and TraceRepr class#503
logger: remove unused trace decorator and TraceRepr class#503Akshay-krish wants to merge 1 commit intosugarlabs:masterfrom
Conversation
|
6fc982a has nothing to do with the issue you're trying to fix, I don't see why it's there. You've also made the mistake of assuming what exists in the toolkit is only used in the toolkit, and that isn't true. The toolkit is consumed by Sugar and sugar-datastore, you'll have to check if any of those use this before concluding that it's not used anywhere. What's the advantage of verifying file integrity when fixing this issue? |
e70a54e to
174cd5d
Compare
Remove the @trace decorator and TraceRepr helper class as they are no longer used. Also remove the trace log level (5) and drop the external decorator library dependency. Verified no usage in sugar or sugar-datastore. Fixes sugarlabs#464
174cd5d to
7a64420
Compare
|
Thank you for the feedback, @chimosky. I have addressed the points raised: External Usage: I checked the sugarlabs/sugar and sugarlabs/sugar-datastore repositories. I confirmed that neither repository utilizes the @trace decorator or the TraceRepr class, so removing them is safe for the consumers of the toolkit. Clean History: I performed a git reset --hard to remove the unrelated commits (like 6fc982a) and the security fixes that were accidentally pulled in. This PR now contains exactly one commit with the correct changes. Validation: I agree that py_compile was not a meaningful metric here. I have instead focused on removing the unused import decorator dependency and ensuring the TRACE constant is no longer referenced anywhere in the module to avoid NameError issues. The PR is now clean and ready for review. |
This PR removes the unused trace decorator, its internal helper functions, and the TraceRepr class from logger.py.
TECHNICAL DETAILS:
Verified that no other modules in the toolkit use the @trace decorator or TraceRepr class using grep.
Removed the TRACE log level constant and its registration.
Removed the unused import decorator dependency.
Verified file integrity with python -m py_compile.
Related Issue
Fixes #464