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 'sc
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
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 it
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
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
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
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
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
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.MappingPr
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
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
Change by Guo Ci Teo :
--
keywords: +patch
pull_requests: +9089
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34898>
___
___
Python-
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
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
Change by Guo Ci Teo :
--
keywords: +patch
pull_requests: +8760
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34699>
___
___
Python-
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)
mes
Change by Guo Ci Teo :
--
pull_requests: +4144
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue29205>
___
___
Python-bugs-list mai
Change by Guo Ci Teo :
--
keywords: +patch
pull_requests: +4143
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31902>
___
___
Python-
Change by Guo Ci Teo :
--
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, Python 3.7
___
Python tracker
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.p
20 matches
Mail list logo