Repository navigation
Remove setup_logging from comtypes.logutil. - #967
Merged
junkmd merged 2 commits intoOct 13, 2026
Merged
Conversation
junkmd
force-pushed
the
remove_setup_logging
branch
from
October 13, 2026 14:53
1717b33 to
8229380
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## remove_code_template_for_interface_comment #967 +/- ##
==============================================================================
+ Coverage 89.20% 89.34% +0.14%
==============================================================================
Files 142 142
Lines 13902 13856 -46
==============================================================================
- Hits 12401 12380 -21
+ Misses 1501 1476 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #920
1. Summary
This PR cleans up legacy and over-engineered components in preparation for upcoming releases (such as Python 3.15 support), including intentional breaking removals of previously deprecated utilities.
Warning
Breaking Change:
setup_loggingand the internaldeprecateddecorator have been completely removed fromcomtypes.logutil.2. Motivation & Background
Ahead of supporting Python 3.15, we are addressing legacy inconsistencies, deprecated APIs, and over-engineered utilities to improve codebase health and maintainability:
setup_logging: See Proposal: FixNTDebugHandlerand Deprecatesetup_logginginlogutil.py. #920.setup_logginginlogutil.pywas previously deprecated (withDeprecationWarning). INI-based logging setup is better handled directly via standard librarylogging.config.fileConfig.3. Breaking Changes & Migration Guide
Removal of
setup_loggingfromcomtypes.logutilDescription of the Incompatibility
comtypes.logutilprovided asetup_logging(*pathnames)helper configuring root logging from INI-style config files (deprecated since Proposal: FixNTDebugHandlerand Deprecatesetup_logginginlogutil.py. #920).setup_loggingand the internaldeprecateddecorator have been removed entirely fromcomtypes.logutil. The module now only exposesNTDebugHandler.Impact on Your Code
comtypes.logutil.setup_logging(...)will raiseAttributeError.Migration Action
Configure logging directly using the standard
logginglibrary. If routing debug output to the Windows debug console viaNTDebugHandler:For INI-based configuration, use
logging.config.fileConfigfrom the standard library.4. Key Changes
comtypes.logutil:setup_logginganddeprecateddecorator (Proposal: FixNTDebugHandlerand Deprecatesetup_logginginlogutil.py. #920).NTDebugHandler.emit.comtypes.test.test_logutil:Test_deprecatedtest class.