[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 'sc

[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 it

[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.MappingPr

[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

[issue42276] Bug in adfuller test and a suggested fix

2020-11-06 Thread Guo
New submission from Guo : from statsmodels.tsa.stattools import adfuller adf = adfuller(x, regression=‘c’, autolag=‘t-stat’) Sometimes comes error message: UnboundLocalError: local variable ‘bestlag’ referenced before assignment I found the reason: when using t-stat, bestlag is only assigned

[issue41456] loop.run_in_executor creat thread but not destory it after the task run over

2020-08-01 Thread Guo Xiyong
New submission from Guo Xiyong : code like this: import asyncio import time import threading def sync_test(): time.sleep(1) async def run_test(): loop = asyncio.get_event_loop() for _ in range(10): # r = await loop.getaddrinfo('wq.io', 443) #

[issue36767] Segmentation fault when running c extension on macOS

2019-05-01 Thread Senhui Guo
New submission from Senhui Guo : I was trying to build a c extension with cpython while it keeps crashing when I get it running, the code is quite simple: ```cpp #include "Python.h" int main () { PyObject *p; p = PySet_New(NULL); } ``` I build with command `clang -I/usr/lo

[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) mes

[issue34337] Fail to get a right answer for 1.2%0.2

2018-08-05 Thread Yiwei Guo
New submission from Yiwei Guo : the answer of 1.2%0.2 should be zero -- ___ Python tracker <https://bugs.python.org/issue34337> ___ ___ Python-bugs-list mailin

[issue34337] Fail to get a right answer for 1.2%0.2

2018-08-05 Thread Yiwei Guo
Change by Yiwei Guo : -- components: Tests nosy: qq100460045 priority: normal severity: normal status: open title: Fail to get a right answer for 1.2%0.2 type: compile error versions: Python 3.6 ___ Python tracker <https://bugs.python.

[issue33840] connection limit on listening socket in asyncio

2018-06-12 Thread Lisa Guo
Lisa Guo added the comment: Hi Yury, no, I'm not familiar with the other frameworks (libuv doesn't have this). I'll need to look into it. If anybody else knows, please comment as well. -- ___ Python tracker <https://bugs.pyt

[issue33840] connection limit on listening socket in asyncio

2018-06-11 Thread Lisa Guo
New submission from Lisa Guo : I'd like to re-open the discussion on pause_server/resume_server that's been discussed here: https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!topic/python-tulip/btGHbh5kUUM with PR: https://github.com/python/asyncio/pull/448

[issue33811] asyncio accepting connection limit

2018-06-09 Thread Lisa Guo
Lisa Guo added the comment: One rough idea would be like this: https://github.com/python/cpython/compare/master...lguo2020:fix-issue-33811?expand=1. Another option is to associate it with the loop: loop.set_max_accept(2) and then later self._loop._start_serving(., max_accept=self

[issue33811] asyncio accepting connection limit

2018-06-08 Thread Lisa Guo
New submission from Lisa Guo : https://bugs.python.org/issue27906 describes a situation where accept rate of connection is too slow for use cases where spikes of incoming connection warrants fast accept. The fix for that was to accept socket connection in a tight loop until it reaches

[issue29205] col_offset for AsyncFunctionDef AST nodes is wrong

2017-10-30 Thread Guo Ci Teo
Change by Guo Ci Teo : -- pull_requests: +4144 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue29205> ___ ___ Python-bugs-list mai

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

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

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

2017-10-30 Thread Guo Ci Teo
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

[issue26617] Assertion failed in gc with __del__ and weakref

2016-10-03 Thread JIahua Guo
JIahua Guo added the comment: Hi asvetlov, debug mode of python interpreter should be enabled to reproduce this bug, cause assertion is disabled in release mode. (https://hg.python.org/cpython/file/104259/Modules/gcmodule.c#l365) One environment that can reproduce this bug: $ cat /etc/issue

[issue26617] Assertion failed in gc with __del__ and weakref

2016-05-18 Thread Guo, Jiahua
Changes by Guo, Jiahua : Added file: http://bugs.python.org/file42892/patch ___ Python tracker <http://bugs.python.org/issue26617> ___ ___ Python-bugs-list mailin

[issue26616] A bug in datetime.astimezone() method

2016-03-23 Thread Brian Guo
Brian Guo added the comment: >From the datetime documentation of astimezone(): https://docs.python.org/3.5/library/datetime.html#datetime.datetime.astimezone : 'If called without arguments (or with tz=None) the system local timezone is assumed. The tzinfo attribute of the converted

[issue26617] Assertion failed in gc with __del__ and weakref

2016-03-22 Thread Guo Jiahua
Changes by Guo Jiahua : -- nosy: +Guo Jiahua ___ Python tracker <http://bugs.python.org/issue26617> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26617] Assertion failed in gc with __del__ and weakref

2016-03-22 Thread Guo, Jiahua
New submission from Guo, Jiahua: $ python3.5-dbg crash.py python3.5-dbg: ../Modules/gcmodule.c:364: update_refs: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed. $ python3.5-dbg crash-multithread.py python3.5-dbg: ../Modules/gcmodule.c:364: update_refs: Assertion `((gc)->

[issue26602] argparse doc introduction is inappropriately targeted

2016-03-22 Thread Brian Guo
Brian Guo added the comment: Hi, I agree with your observation about the unnecessarily complicated documentation. I feel that there is not a real necessity to include an example that uses (metavar='N', nargs='+') or even (const='sum', default='max') in

[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.p

[issue21548] pydoc -k IndexError on empty docstring

2014-06-07 Thread Yuyang Guo
Yuyang Guo added the comment: Made change based on Terry J. Reedy's suggestion -- keywords: +patch nosy: +Yuyang.Guo Added file: http://bugs.python.org/file35516/issue21548.patch ___ Python tracker <http://bugs.python.org/is

[issue18411] signal.SIGINT in windows cause process exit directly.

2013-07-08 Thread guo tie
New submission from guo tie: I wrote those test python code as following: import signal import time import os def handler(signum, frame): print "do whatever, like call thread.interrupt_main()" return signal.signal(signal.SIGINT, handler) while 1: try: tim