[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-05 Thread Wei-Cheng Pan
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 supp

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-05 Thread Wei-Cheng Pan
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 awa

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-10-28 Thread Wei-Cheng Pan
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 comin

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-10-27 Thread Wei-Cheng Pan
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

[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-10-15 Thread Wei-Cheng Pan
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

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-28 Thread Wei-Cheng Pan
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

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-28 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan <legnale...@gmail.com>: Removed file: https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-27 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan <legnale...@gmail.com>: Removed file: https://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-27 Thread Wei-Cheng Pan
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 <rep...@bugs.python.org> <https://bugs.python.org/i

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-07-01 Thread Wei-Cheng Pan
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 misre

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-30 Thread Wei-Cheng Pan
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 <rep...@bugs.python.org> <http://bugs.py

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-30 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan <legnale...@gmail.com>: Removed file: http://bugs.python.org/file43578/json-add-an-option-to-bypass-non-ascii-characters.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-29 Thread Wei-Cheng Pan
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 <rep...@bugs.python.org> <http://bugs.py

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-29 Thread Wei-Cheng Pan
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 &

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan legnale...@gmail.com: -- 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

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Wei-Cheng Pan
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 rep...@bugs.python.org http

[issue17678] DeprecationWarning fix on cookiejar module since Python 3.3

2013-04-09 Thread Wei-Cheng Pan
Changes by Wei-Cheng Pan legnale...@gmail.com: Removed file: http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17678