8000 gh-115032: Deprecate support for custom logging handlers with 'strm' argument. by felixxm · Pull Request #115314 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115032: Deprecate support for custom logging handlers with 'strm' argument. #115314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Retarget to Python 3.14.
  • Loading branch information
felixxm committed Apr 26, 2025
commit de5d3ec840b35a27015c63e08b948cf359f6aec0
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,11 @@ Deprecated
or *sequence* as keyword arguments is now deprecated.
(Contributed by Kirill Podoprigora in :gh:`121676`.)

* :mod:`logging`:
Support for custom logging handlers with the *strm* argument is deprecated
and scheduled for removal in Python 3.16. Define handlers with the *stream*
argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)

* :mod:`!nturl2path`: This module is now deprecated. Call
:func:`urllib.request.url2pathname` and :func:`~urllib.request.pathname2url`
instead.
Expand Down
2 changes: 1 addition & 1 deletion Lib/logging/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def configure_handler(self, config):
import warnings
warnings.warn(
"Support for custom logging handlers with the 'strm' argument "
"is deprecated and scheduled for removal in Python 3.15. "
"is deprecated and scheduled for removal in Python 3.16. "
"Define handlers with the 'stream' argument instead.",
DeprecationWarning,
stacklevel=2,
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -3404,7 +3404,7 @@ def test_config5_ok(self):
def test_deprecation_warning_custom_handler_with_strm_arg(self):
msg = (
"Support for custom logging handlers with the 'strm' argument "
"is deprecated and scheduled for removal in Python 3.15. "
"is deprecated and scheduled for removal in Python 3.16. "
"Define handlers with the 'stream' argument instead."
)
with self.assertWarnsRegex(DeprecationWarning, msg):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Support for custom logging handlers with the *strm* argument is deprecated
and scheduled for removal in Python 3.15. Define handlers with the *stream*
and scheduled for removal in Python 3.16. Define handlers with the *stream*
argument instead. Patch by Mariusz Felisiak.
Loading
0