[issue43881] [doc] add platform availabity information for os.sched_getaffinity

2022-03-29 Thread Guo Ci Teo
Guo Ci Teo added the comment: `os.sched_getaffinity` is only available on some Unix platforms, as documented in https://docs.python.org/dev/library/os.html#interface-to-the-scheduler For example, on Windows we will get the error: AttributeError: module 'os' has no attribute 'sched_getaffinity

[issue46186] replace `io.IncrementalNewlineDecoder` with non incremental newline decoders

2022-01-27 Thread Guo Ci Teo
Guo Ci Teo added the comment: The old code has an incorrect usage of `io.IncrementalNewlineDecoder`. Since the `decode` method is called only once, is it the final call and needs the `final=True` argument as documented in https://docs.python.org/dev/library/codecs.html

[issue46186] replace `io.IncrementalNewlineDecoder` with non incremental newline decoders

2022-01-01 Thread Guo Ci Teo
Guo Ci Teo added the comment: Some uses of the `decode` method of `io.IncrementalNewlineDecoder` were incorrect without the `final=True` argument. One way to fix it would be to add the `final=True` in all cases. But the incremental decoding feature is not used, so I decided to replace

[issue46209] add documentation for decoding newlines in the `io` module

2021-12-30 Thread Guo Ci Teo
Change by Guo Ci Teo : -- keywords: +patch pull_requests: +28521 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30308 ___ Python tracker <https://bugs.python.org/issu

[issue46209] add documentation for decoding newlines in the `io` module

2021-12-30 Thread Guo Ci Teo
New submission from Guo Ci Teo : add documentation for `io.IncrementalNewlineDecoder` `io.TextIOWrapper` `io.StringIO`, listing various ways to decode newlines -- messages: 409388 nosy: guoci priority: normal severity: normal status: open title: add documentation for decoding newlines

[issue46186] replace `io.IncrementalNewlineDecoder` with non incremental newline decoders

2021-12-27 Thread Guo Ci Teo
Guo Ci Teo added the comment: In any case, the use of an incremental newline decoder is not required -- ___ Python tracker <https://bugs.python.org/issue46

[issue46186] replace `io.IncrementalNewlineDecoder` with non incremental newline decoders

2021-12-27 Thread Guo Ci Teo
Change by Guo Ci Teo : -- keywords: +patch pull_requests: +28491 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30276 ___ Python tracker <https://bugs.python.org/issu

[issue46186] replace `io.IncrementalNewlineDecoder` with non incremental newline decoders

2021-12-27 Thread Guo Ci Teo
New submission from Guo Ci Teo : replace unnecessary use of `io.IncrementalNewlineDecoder` in code. Some uses of the `decode` method were also incorrect without the `final=True` argument. -- messages: 409235 nosy: guoci priority: normal severity: normal status: open title: replace

[issue44867] types.MappingProxyType and collections.defaultdict

2021-08-08 Thread Guo Ci Teo
New submission from Guo Ci Teo : `types.MappingProxyType` is documented as 'Read-only proxy of a mapping'. But if used with a `collections.defaultdict` mapping, it can modify the underlying mapping. ``` import collections, types dd = collections.defaultdict(set) mpt = types.MappingProxyType(dd

[issue43881] add platform availabity information for os.sched_getaffinity

2021-04-17 Thread Guo Ci Teo
Change by Guo Ci Teo : -- keywords: +patch pull_requests: +24185 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25459 ___ Python tracker <https://bugs.python.org/issu

[issue43881] add platform availabity information for os.sched_getaffinity

2021-04-17 Thread Guo Ci Teo
Change by Guo Ci Teo : -- assignee: docs@python components: Documentation nosy: docs@python, guoci priority: normal severity: normal status: open title: add platform availabity information for os.sched_getaffinity type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python

[issue34898] add mtime argument to gzip.compress

2018-10-04 Thread Guo Ci Teo
Change by Guo Ci Teo : -- keywords: +patch pull_requests: +9089 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34898> ___ ___ Python-

[issue34898] add mtime argument to gzip.compress

2018-10-04 Thread Guo Ci Teo
New submission from Guo Ci Teo : With the `mtime` argument, the output from `gzip.compress` can be reproducible. -- components: Library (Lib) messages: 327088 nosy: guoci priority: normal severity: normal status: open title: add mtime argument to gzip.compress versions: Python 3.6

[issue34699] allow path-like objects in program arguments in Windows

2018-09-15 Thread Guo Ci Teo
Change by Guo Ci Teo : -- title: allows path-like objects in program arguments in Windows -> allow path-like objects in program arguments in Windows ___ Python tracker <https://bugs.python.org/issu

[issue34699] allows path-like objects in program arguments in Windows

2018-09-15 Thread Guo Ci Teo
Change by Guo Ci Teo : -- keywords: +patch pull_requests: +8760 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34699> ___ ___ Python-

[issue34699] allows path-like objects in program arguments in Windows

2018-09-15 Thread Guo Ci Teo
New submission from Guo Ci Teo : Currently, the `subprocess.Popen` function allows for path-like objects in the argument list for POSIX but not in Windows. This PR makes Windows' `subprocess.Popen` accept path-like objects in the argument list. -- components: Library (Lib) messages

[issue29205] col_offset for AsyncFunctionDef AST nodes is wrong

2017-10-30 Thread Guo Ci Teo
Change by Guo Ci Teo <zgu...@gmail.com>: -- pull_requests: +4144 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31902] Fix col_offset for ast nodes: AsyncFor, AsyncFunctionDef, AsyncWith

2017-10-30 Thread Guo Ci Teo
Change by Guo Ci Teo <zgu...@gmail.com>: -- keywords: +patch pull_requests: +4143 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31902] Fix col_offset for ast nodes: AsyncFor, AsyncFunctionDef, AsyncWith

2017-10-30 Thread Guo Ci Teo
Change by Guo Ci Teo <zgu...@gmail.com>: -- components: Library (Lib) nosy: guoci priority: normal severity: normal status: open title: Fix col_offset for ast nodes: AsyncFor, AsyncFunctionDef, AsyncWith versions: Python 3.5, Python 3.6, Pyth

[issue26489] dictionary unpacking operator in dict expression

2016-03-05 Thread Guo Ci Teo
New submission from Guo Ci Teo: The attached patch enables the unparse.py tool to unparse dictionary unpacking operators (**) in a dict expression, for example, {**{'y': 2}, 'x': 1} , as described in PEP 0448. -- components: Demos and Tools files: unpack_in_dict.patch keywords: patch