[issue33538] Remove useless check in subprocess

2018-05-17 Thread TaoQingyun
TaoQingyun <845767...@qq.com> added the comment: I can't find the reset code, could you give me a link? Thanks. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33538] Remove useless check in subprocess

2018-05-16 Thread TaoQingyun
New submission from TaoQingyun <845767...@qq.com>: diff --git a/Lib/subprocess.py b/Lib/subprocess.py index bafb501fcf..4a0bb33978 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -766,7 +766,7 @@ class Popen(object): ResourceWarning, source=self) # I

[issue32793] smtplib: duplicated debug message

2018-02-08 Thread TaoQingyun
New submission from TaoQingyun <845767...@qq.com>: ``` if self.debuglevel > 0: self._print_debug('connect:', (host, port)) ``` The above both in _get_socket and connect method, and connect also invoke _get_socket. -- components: Library (L

[issue32358] json.dump: fp must be a text file object

2017-12-17 Thread TaoQingyun
New submission from TaoQingyun <845767...@qq.com>: ``` >>> import json >>> f = open('/tmp/t.json', 'wb') >>> json.dump(123, f) Traceback (most recent call last): File "", line 1, in File "/usr/li

[issue30862] parent logger should also check the level

2017-12-06 Thread TaoQingyun
TaoQingyun <845767...@qq.com> added the comment: Sorry to disturb. When calling `logging.basicConfig(level=logging.ERROR)`, I expect only the ERROR or above level will be logged. so the level argument if set should also pass to the h

[issue30862] parent logger should also check the level

2017-12-03 Thread TaoQingyun
TaoQingyun <845767...@qq.com> added the comment: Maybe I misunderstand. At least the basicConfig should also set the level of the handler that it created. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31208] Simplify `low_fds_to_close` in subprocess.py

2017-08-17 Thread TaoQingyun
Changes by TaoQingyun <845767...@qq.com>: -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue31216] Add ensure_ascii argument to json.tool

2017-08-15 Thread TaoQingyun
New submission from TaoQingyun: Sometimes I want this ``` $ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool --no-escape "你好" ``` not just ``` $ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool "\u4f60

[issue31208] Simplify `low_fds_to_close` in subprocess.py

2017-08-14 Thread TaoQingyun
Changes by TaoQingyun <845767...@qq.com>: -- components: Library (Lib) files: subprocess.patch keywords: patch nosy: qingyunha priority: normal severity: normal status: open title: Simplify `low_fds_to_close` in subprocess.py type: enhancement versions: Python 3.7 Added file

[issue30862] parent logger should also check the level

2017-07-06 Thread TaoQingyun
TaoQingyun added the comment: yes, I understand the effective level. my question is that before call ancestor's handler, should also check `c.isEnabledFor(record.levelno)` ``` def callHandlers(self, record): """ Pass a record to all relevant handlers.

[issue30862] parent logger should also check the level

2017-07-05 Thread TaoQingyun
New submission from TaoQingyun: ``` import logging logging.basicConfig(level=logging.ERROR) l = logging.getLogger("test") l.setLevel(logging.DEBUG) l.debug("Hello world") ``` it will print 'Hello world' -- ___

[issue30862] parent logger should also check the level

2017-07-05 Thread TaoQingyun
Changes by TaoQingyun <845767...@qq.com>: -- components: Library (Lib) nosy: qingyunha priority: normal severity: normal status: open title: parent logger should also check the level type: behavior ___ Python tracker <rep...@bugs.python.o

[issue30240] Add daemon keyword argument to Thread constructor

2017-05-02 Thread TaoQingyun
Changes by TaoQingyun <845767...@qq.com>: -- versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30240] Add daemon keyword argument to Thread constructor

2017-05-02 Thread TaoQingyun
New submission from TaoQingyun: create a daemon thread like this, ``` t = Thread(target=f) t.daemon = True t.start() ``` I wonder the following code is better ``` Thread(target=f, daemon=True).start() ``` -- components: Library (Lib) messages: 292832 nosy: qingyunha priority: normal