[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-09-14 Thread Jarry Shaw
Jarry Shaw added the comment: Apparently static checkers like mypy doesn't rely on the `typing.get_type_hints` function to implement its type checking functions (as I had browsed through the code repo). $ cat test.py def foo(arg) -> ' str': ... $ mypy test.py Success: no

[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw
Jarry Shaw added the comment: To me, I discovered this issue because of a typo in my code. And apparently, I do not suggest people will write their type annotations with leading whitespaces purposely. Here’s another thing though: aligning the behaviour of the two builtin functions is good

[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw
Jarry Shaw added the comment: > as discussed in https://bugs.python.org/issue41887 After some additional thoughts, I am thinking that changing the behaviour of ``compile`` in ``'eval'`` mode directly might be a better idea, for consistency all over the builtin functions. Es

[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw
Change by Jarry Shaw : -- keywords: +patch pull_requests: +24209 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25484 ___ Python tracker <https://bugs.python.org/issu

[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw
New submission from Jarry Shaw : `typing.get_type_hints` does not accept type annotations (in string capsulated form) with leading whitespaces. ``` >>> def foo(arg) -> ' str': ... >>> typing.get_type_hints(foo) Traceback (most recent call last): File &quo

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2019-02-25 Thread Jarry Shaw
Jarry Shaw added the comment: Chris' patch works on macOS 10.14 (Mojave); but after it terminates, tty attributes are not restored (new-lines are missing). btw, I've implemented a workaround library with solution through either `ps` command or `psutil` package, see `ptyn

[issue34785] pty.spawn -- auto-termination after child process is dead (a zombie)

2019-02-25 Thread Jarry Shaw
Jarry Shaw added the comment: This issue is duplicated with issue26228, sorry. -- stage: patch review -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.org/i

[issue34785] pty.spawn -- auto-termination after child process is dead (a zombie)

2018-09-24 Thread Jarry Shaw
Change by Jarry Shaw : -- pull_requests: +8930 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34785> ___ ___ Python-bugs-list mai

[issue34785] pty.spawn -- auto-termination after child process is dead (a zombie)

2018-09-24 Thread Jarry Shaw
New submission from Jarry Shaw : As in pty.spawn, once started, the parent process will be hanged, even if the child process is already dead (or a zombie), and must wait for a KeyboardInterrupt or else to terminate the whole process. Thus, I propose to revise `_copy` function, where the