Skip to content

Updated core handlers in logging#3269

Merged
srittau merged 1 commit intopython:masterfrom
brianjyoung:logging-core-handlers
Sep 27, 2019
Merged

Updated core handlers in logging#3269
srittau merged 1 commit intopython:masterfrom
brianjyoung:logging-core-handlers

Conversation

@brianjyoung
Copy link
Contributor

Updated/slightly corrected several type annotations in the logging module, primarily surrounding the built-in handlers (which are confusingly documented with the logging.handlers module). The most significant changes are the addition of the StreamHandler.setStream method (new as of 3.7) and making FileHandler a proper subclass of StreamHandler—it's documented as such (and, well, implemented as such), so I have to assume it's just an oversight in the stub. I don't think there's anything too controversial there.

@srittau srittau merged commit d1ed2b2 into python:master Sep 27, 2019
msullivan added a commit that referenced this pull request Oct 1, 2019
PR #3269 added some version checks for the argument type to setLevel
and the existence of NullHandler. While these features weren't present
in early versions of Python 3, they *are* present in Python 2.7, which
leads to false positives.

We could expand the check to include Python 2, but since the affected
Python 3 versions are super old and unsupported, I'm just removing the
checks.
srittau pushed a commit that referenced this pull request Oct 2, 2019
PR #3269 added some version checks for the argument type to setLevel
and the existence of NullHandler. While these features weren't present
in early versions of Python 3, they *are* present in Python 2.7, which
leads to false positives.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants