gh-107710: Speed up logging.getHandlerNames function (#107711)

This commit is contained in:
Nikita Sobolev 2023-08-07 16:52:36 +03:00 committed by GitHub
parent c399b5e1a5
commit 8fcee6b279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -916,8 +916,7 @@ def getHandlerNames():
"""
Return all known handler names as an immutable set.
"""
result = set(_handlers.keys())
return frozenset(result)
return frozenset(_handlers)
class Handler(Filterer):

View file

@ -0,0 +1 @@
Speed up :func:`logging.getHandlerNames`.