From 0d725f9cd856c4e634206f27e021cd39395c77ab Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sat, 9 Feb 2019 14:36:19 +0000 Subject: [PATCH] Fix DeprecationWarning in mitogen.utils.run_with_router() ``` 14:20:32.186270 W py.warnings: /home/alex/src/mitogen/mitogen/utils.py:152: DeprecationWarning: invalid escape sequence \* """ ``` --- docs/changelog.rst | 3 +++ mitogen/utils.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 07cff14f..5e572518 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -438,6 +438,9 @@ Core Library * `#523 ` : the test suite didn't generate a code coverage report if any test failed. +* `#524 ` : Python 3.6+ emitted a + :class:`DeprecationWarning` for :func:`mitogen.utils.run_with_router`. + Thanks! ~~~~~~~ diff --git a/mitogen/utils.py b/mitogen/utils.py index 07559d56..ba1fcf27 100644 --- a/mitogen/utils.py +++ b/mitogen/utils.py @@ -143,7 +143,7 @@ def log_to_file(path=None, io=False, level='INFO'): def run_with_router(func, *args, **kwargs): """ - Arrange for `func(router, \*args, \**kwargs)` to run with a temporary + Arrange for `func(router, *args, **kwargs)` to run with a temporary :class:`mitogen.master.Router`, ensuring the Router and Broker are correctly shut down during normal or exceptional return.