[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode
New submission from Wei-Cheng Pan : In bpo-32972 we enabled debug mode in IsolatedAsyncioTestCase._setupAsyncioLoop, which may print some warnings that are not that important to tests. (e.g. Executing took 0.110 seconds) I personally don't really like it being turn on by default, but if it needs to be so, maybe include it in document would be a good idea. Add Andrew to nosy list because he was the author. -- components: Tests messages: 355509 nosy: asvetlov, legnaleurc priority: normal severity: normal status: open title: Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue38608> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode
Wei-Cheng Pan added the comment: > Usually, it is a sign of a problem in user code, e.g. something should be > pushed into executor. Sometimes also happens on low-end CI machines. And the message is somewhat unclear to me. I have to grep cpython sources to understand that it is coming from debug mode and it means there is a slow awaitable ... in somewhere, because the displayed file:line is not always the right position. > A test case is executed in debug mode. I think it is reasonable for the test > run, isn't it? Probably. > The mode can be disabled by `asyncio.get_running_loop().set_debug(False)` in > `asyncSetUp()` method. Glad to know that. Thanks. -- ___ Python tracker <https://bugs.python.org/issue38608> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode
Wei-Cheng Pan added the comment: Executing () created at /.../lib/python3.8/asyncio/queues.py:70> took 0.104 seconds Executing () created at /.../lib/python3.8/asyncio/queues.py:70> took 0.121 seconds I was expecting it can display the stack of the awaitable. -- ___ Python tracker <https://bugs.python.org/issue38608> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode
Wei-Cheng Pan added the comment: I cannot import asyncio.task, so I did this instead: import asyncio.tasks asyncio.tasks.Task = asyncio.tasks._PyTask Then it changed to this: Executing wait_for= created at /.../lib/python3.8/unittest/async_case.py:118> took 0.187 seconds I suppose this means the entire test case is slow? -- ___ Python tracker <https://bugs.python.org/issue38608> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30698] asyncio sslproto do not shutdown ssl layer cleanly
Wei-Cheng Pan added the comment: The SSL connection still cannot close cleanly in 3.7.0. It will keep throwing read error during shutdown, so shutdown callback will never be called. I've been test this PR for a while, and at least it fixes my problem. Hope this PR can be included in 3.7.1, or at least 3.7.2. -- nosy: +Wei-Cheng.Pan ___ Python tracker <https://bugs.python.org/issue30698> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
New submission from Wei-Cheng Pan: This patch adds a command line option "--no-escape" that allows json.tool to display non-ASCII characters. e.g.: $ echo '"測試"' | python -m json.tool "\u6e2c\u8a66" $ echo '"測試"' | python -m json.tool --no-escape "測試" -- components: Library (Lib) files: json-add-an-option-to-bypass-non-ascii-characters.patch keywords: patch messages: 269479 nosy: Wei-Cheng.Pan priority: normal severity: normal status: open title: Add an option to json.tool to bypass non-ASCII characters. type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file43578/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker <http://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Wei-Cheng Pan added the comment: If the arguments should be aligned with those in dump/load, then maybe "--no-ensure-ascii" is an option? -- ___ Python tracker <http://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Changes by Wei-Cheng Pan : Removed file: http://bugs.python.org/file43578/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker <http://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Wei-Cheng Pan added the comment: Use "--no-ensure-ascii" instead. -- Added file: http://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker <http://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Wei-Cheng Pan added the comment: > The patch needs tests and documentation. Ok, I'll update it later. >> +parser.add_argument('--no-ensure-ascii', action='store_true', >> default=False, >I'd go with ``action='store_false', default=True``. If I'm not misreading your comment, this will change the original behavior, right? (because options.no_ensure_ascii will be set to True by default) -- ___ Python tracker <http://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Wei-Cheng Pan added the comment: Added doc and test. -- Added file: https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch ___ Python tracker <https://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Changes by Wei-Cheng Pan : Removed file: https://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker <https://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Wei-Cheng Pan added the comment: 1. Replaced non-ASCII literals to \u 2. Removed failed assertion Test passed with LC_ALL=en_US and LC_ALL=en_US.UTF-8 . I've tried to use locale.getdefaultlocale(), but seems the output string will vary in different locales. -- Added file: https://bugs.python.org/file44246/json-add-an-option-to-bypass-non-ascii-characters-v4.patch ___ Python tracker <https://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27413] Add an option to json.tool to bypass non-ASCII characters.
Changes by Wei-Cheng Pan : Removed file: https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch ___ Python tracker <https://bugs.python.org/issue27413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3
Changes by Wei-Cheng Pan : -- components: Library (Lib) files: cookiejar_fix_deprecated_method_calls.patch keywords: patch nosy: Wei-Cheng.Pan priority: normal severity: normal status: open title: DeprecationWarning fix on cookiejar module since Python 3.3 versions: Python 3.3 Added file: http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch ___ Python tracker <http://bugs.python.org/issue17678> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3
New submission from Wei-Cheng Pan: Please ignore previous typo patch. This is the correct version -- Added file: http://bugs.python.org/file29753/cookiejar_fix_deprecated_method_calls.patch ___ Python tracker <http://bugs.python.org/issue17678> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3
Changes by Wei-Cheng Pan : Removed file: http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch ___ Python tracker <http://bugs.python.org/issue17678> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com