[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-20 Thread Inada Naoki
Inada Naoki added the comment: > Most of changes are in not performance sensitive code. I do not think there > is a benefit of using new macro there. Because I used just sed. > If PyUnicode_FromString() is slow I prefer to optimize it instead of adding > yet one esoteric priv

[issue37348] add _PyUnicode_FROM_ASCII macro

2019-06-20 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +14097 pull_request: https://github.com/python/cpython/pull/14273 ___ Python tracker <https://bugs.python.org/issue37

[issue37151] Calling code cleanup after PEP 590

2019-06-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 7e1a9aacff95c68d284f31666fe293fa2db5406d by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37151: remove _PyCFunction_FastCallDict (GH-14269) https://github.com/python/cpython/commit/7e1a9aacff95c68d284f31666fe293fa2db5406d

[issue37348] add _PyUnicode_FROM_ASCII macro

2019-06-20 Thread Inada Naoki
Inada Naoki added the comment: Should we make these APIs public? * rename `_PyUnicode_FromASCII` to `PyUnicode_FromASCIIAndSize`. * add `PyUnicode_FromASCII` as static inline function (without ABI). * add `#define _PyUnicode_FromASCII PyUnicode_FromASCIIAndSize` for source code compatibility

[issue37348] add _PyUnicode_FROM_ASCII macro

2019-06-20 Thread Inada Naoki
Inada Naoki added the comment: I confirmed at least one measurable speedup: ./python -m pyperf timeit -s 'd={}' -- 'repr(d)' FromString: Mean +- std dev: 157 ns +- 3 ns FROM_ASCII: Mean +- std dev: 132 ns +- 3 ns >>> (157-132)/157 0.1592356

[issue37348] add _PyUnicode_FROM_ASCII macro

2019-06-20 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +14091 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14264 ___ Python tracker <https://bugs.python.org/issu

[issue37348] add _PyUnicode_FROM_ASCII macro

2019-06-20 Thread Inada Naoki
New submission from Inada Naoki : _PyUnicode_FromASCII(s, len) is faster than PyUnicode_FromString(s) because PyUnicode_FromString() uses temporary _PyUnicodeWriter to support UTF-8. But _PyUnicode_FromASCII("hello", strlen("hello"))` is not as easy as `PyUnico

[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2019-06-19 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.python.o

[issue37340] remove free_list for bound method objects

2019-06-19 Thread Inada Naoki
Inada Naoki added the comment: > Are the benchmark results that you posted above for removing the free list > completely or for the one-element free list as in PR 14232? Yes. I see +3% overhead in several benchmarks and I want to see how one free obj save them. > it's worse tha

[issue37340] remove free_list for bound method objects

2019-06-19 Thread Inada Naoki
Inada Naoki added the comment: Sorry, I just pushed another idea before I leave my office. I will benchmark both ideas after bpo-37337 is finished. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37340] remove free_list for bound method objects

2019-06-19 Thread Inada Naoki
Inada Naoki added the comment: GH-14232 uses only one free object instead of at most 256 free list. -- stage: patch review -> ___ Python tracker <https://bugs.python.org/issu

[issue37340] remove free_list for bound method objects

2019-06-19 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +14068 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14232 ___ Python tracker <https://bugs.python.org/issu

[issue37340] remove free_list for bound method objects

2019-06-19 Thread Inada Naoki
Inada Naoki added the comment: PyCFunction has similar free_list. -- ___ Python tracker <https://bugs.python.org/issue37340> ___ ___ Python-bugs-list mailin

[issue37340] remove free_list for bound method objects

2019-06-19 Thread Inada Naoki
New submission from Inada Naoki : LOAD_METHOD avoids temporary bound method object. PyObject_CallMethodObjArgs now use same optimization. Now I think there is not enough performance benefit from free_list. When free_list is not used often enough, it may bother obmalloc reuse memory pool

[issue27860] Improvements to ipaddress module

2019-06-19 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue27860] Improvements to ipaddress module

2019-06-19 Thread Inada Naoki
Inada Naoki added the comment: New changeset f532fe5583d29d21e12aa22d8fca13e3bca94fb3 by Inada Naoki in branch '3.7': bpo-27860: ipaddress: fix Interface constructor (GH-14200) https://github.com/python/cpython/commit/f532fe5583d29d21e12aa22d8fca13e3bca94fb3

[issue27860] Improvements to ipaddress module

2019-06-18 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +14038 pull_request: https://github.com/python/cpython/pull/14200 ___ Python tracker <https://bugs.python.org/issue27

[issue27860] Improvements to ipaddress module

2019-06-18 Thread Inada Naoki
Inada Naoki added the comment: OK, I thought I improved only undocumented behavior, but it was documented and previous behavior didn't follow the document. I'll backport PR 12836. -- ___ Python tracker <https://bugs.python.org/issue27

[issue37151] Calling code cleanup after PEP 590

2019-06-18 Thread Inada Naoki
Inada Naoki added the comment: New changeset 59543347d12a7717235f941e7fd363d4df92984a by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37151: remove _PyFunction_FastCallDict (GH-13864) https://github.com/python/cpython/commit/59543347d12a7717235f941e7fd363d4df92984a

[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-06-18 Thread Inada Naoki
Inada Naoki added the comment: New changeset 988e6aa322fb61651812fa5a61ec73316c71b041 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37233: use _PY_FASTCALL_SMALL_STACK in method_vectorcall (GH-13974) https://github.com/python/cpython/commit/988e6aa322fb61651812fa5a61ec73316c71b041

[issue37151] Calling code cleanup after PEP 590

2019-06-18 Thread Inada Naoki
Inada Naoki added the comment: New changeset c78fe320dbb0da3412d640797eb850753d45c07b by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37151: use PyVectorcall_Call for all calls of "method" (GH-13972) https://github.com/python/cpython/commit/c78fe320dbb0da3412d640797eb850

[issue37328] remove deprecated HTMLParser.unescape

2019-06-18 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +14023 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14186 ___ Python tracker <https://bugs.python.org/issu

[issue37328] remove deprecated HTMLParser.unescape

2019-06-18 Thread Inada Naoki
New submission from Inada Naoki : HTMLParser.unescape was removed once but resurrected because of distlib depended on it. (see https://bugs.python.org/issue19688 ) Since it is deprecated from 3.4, it's safe to remove. -- components: Library (Lib) messages: 345954 nosy: inada.naoki

[issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR

2019-06-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2e9954d3472a23919b96323fcd5bb6c1d6927155 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-36922: use Py_TPFLAGS_METHOD_DESCRIPTOR in lookup_maybe_method() (GH-13865) https://github.com/python/cpython/commit

[issue37231] Optimize calling special methods

2019-06-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 0456df4a55ec9a4e8f4425df92bbe63a290f3f2f by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37231: remove _PyObject_FastCall_Prepend (GH-14153) https://github.com/python/cpython/commit/0456df4a55ec9a4e8f4425df92bbe63a290f3f2f

[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-16 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5600b5e1b24a3491e83f1b3038a7ea047a34c0bf by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-28805: document METH_FASTCALL (GH-14079) https://github.com/python/cpython/commit/5600b5e1b24a3491e83f1b3038a7ea047a34c0bf -- nosy

[issue32846] Deletion of large sets of strings is extra slow

2019-06-14 Thread Inada Naoki
Change by Inada Naoki : -- resolution: wont fix -> stage: resolved -> status: closed -> open versions: +Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.or

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Inada Naoki
Inada Naoki added the comment: On Sat, Jun 15, 2019 at 2:43 AM Eryk Sun wrote: > > Eryk Sun added the comment: > > > # Power Shell 6 (use cp65001 by default) > > PS C:¥> python3 -c "print('おはよう')" > ps.txt > > PowerShell standard I/O redirection is

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-14 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37275> ___ ___

[issue37249] Missing declaration of _PyObject_GetMethod

2019-06-14 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37249] Missing declaration of _PyObject_GetMethod

2019-06-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset b2f94730d947f25b8507c5f76202e917683e76f7 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37249: add declaration of _PyObject_GetMethod (GH-14015) https://github.com/python/cpython/commit/b2f94730d947f25b8507c5f76202e917683e76f7

[issue37275] GetConsole(Output)CP is used even when stdin/stdout is redirected

2019-06-13 Thread Inada Naoki
New submission from Inada Naoki : When stdout is redirected to file and cp65001 is used, stdout encoding is unexpectable: # Power Shell 6 (use cp65001 by default) PS C:¥> python3 -c "print('おはよう')" > ps.txt # cmd.exe C:¥> chcp 65001 C:¥> python3 -c "pr

[issue37231] Optimize calling special methods

2019-06-13 Thread Inada Naoki
Inada Naoki added the comment: New changeset b4b814b3988abf69f07f8492d82e855c51b2a75d by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37231: optimize calls of special methods (GH-13973) https://github.com/python/cpython/commit/b4b814b3988abf69f07f8492d82e855c51b2a75d

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-12 Thread Inada Naoki
Inada Naoki added the comment: > What logging does when UnicodeEncodeError is happened? Hm, it seems logging does best job, show enough information to stderr. But sometime, Python is embedded in web servers and there is no stderr. pythonw.exe may not have stderr too I still f

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-12 Thread Inada Naoki
Inada Naoki added the comment: > I've left it as is using the same rationale as I guess open() has at the > moment - "Errors should never pass silently. Unless explicitly silenced". But open() is general purpose, and logging is for logging. Note that stderr uses 'backsla

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-12 Thread Inada Naoki
Inada Naoki added the comment: Hmm,, about encoding, I agree that default encoding of open() should be used. If we change it, encoding of log files are changed unexpectedly after upgrading Python. On the other hand, couldn't we use different default error handler? "re

[issue37206] Incorrect application of Argument Clinic to dict.pop()

2019-06-09 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13803 pull_request: https://github.com/python/cpython/pull/13935 ___ Python tracker <https://bugs.python.org/issue37

[issue37102] Automatically dedent docstring constants by default

2019-06-06 Thread Inada Naoki
Inada Naoki added the comment: How about do `inspect.cleandoc()` instead of just a dedent? Some method has docstring like this: """First line blah blah blah blah example code here ... """ In such docstring, dedent can not strip i

[issue35551] Encoding and alias issues

2019-06-05 Thread Inada Naoki
Inada Naoki added the comment: New changeset cb65202520e7959196a2df8215692de155bf0cc8 by Inada Naoki in branch 'master': bpo-35551: remove mac_centeuro encoding (GH-13856) https://github.com/python/cpython/commit/cb65202520e7959196a2df8215692de155bf0cc8

[issue35551] Encoding and alias issues

2019-06-05 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13731 pull_request: https://github.com/python/cpython/pull/13856 ___ Python tracker <https://bugs.python.org/issue35

[issue36839] Support the buffer protocol in code objects

2019-06-04 Thread Inada Naoki
Inada Naoki added the comment: I'm sorry, I thought "fantasy" was good metaphor. I just meant "the estimation seems too optimistic and rough. discussion should not based on it". -- ___ Python tracker <https://bug

[issue36839] Support the buffer protocol in code objects

2019-06-04 Thread Inada Naoki
Inada Naoki added the comment: > Stefan Krah added the comment: > > 720MB <= "3-4 dozen" * 20 MB <= 960MB. Per server. > > It has all been said. :-) I don't understand what message you are replying. I'm not interested in the number. Who asked MBs / server? A

[issue36839] Support the buffer protocol in code objects

2019-06-03 Thread Inada Naoki
Inada Naoki added the comment: On Tue, Jun 4, 2019 at 8:45 AM Dino Viehland wrote: > > The 20MB of savings is actually the amount of byte code that exists in the IG > code base. Wait, do you expect you can reduce 100% saving of co_code object? co_code takes 0byte? You said &quo

[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-06-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13676 pull_request: https://github.com/python/cpython/pull/13787 ___ Python tracker <https://bugs.python.org/issue33

[issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting

2019-06-03 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +13671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13787 ___ Python tracker <https://bugs.python.org/issu

[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-06-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13663 pull_request: https://github.com/python/cpython/pull/13775 ___ Python tracker <https://bugs.python.org/issue33

[issue26219] implement per-opcode cache in ceval

2019-06-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 395420e2a35937fa9777fc3c8b0086629db95e27 by Inada Naoki in branch 'master': bpo-26219: remove unused code (GH-13775) https://github.com/python/cpython/commit/395420e2a35937fa9777fc3c8b0086629db95e27

[issue26219] implement per-opcode cache in ceval

2019-06-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13662 pull_request: https://github.com/python/cpython/pull/13775 ___ Python tracker <https://bugs.python.org/issue26

[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-06-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13661 pull_request: https://github.com/python/cpython/pull/12884 ___ Python tracker <https://bugs.python.org/issue33

[issue26219] implement per-opcode cache in ceval

2019-06-03 Thread Inada Naoki
Inada Naoki added the comment: I committed cache only for LOAD_GLOBAL, which is much simpler than LOAD_ATTR or LOAD_METHOD. Caches for other instructions will be implemented 3.9 or later. -- ___ Python tracker <https://bugs.python.org/issue26

[issue26219] implement per-opcode cache in ceval

2019-06-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 91234a16367b56ca03ee289f7c03a34d4cfec4c8 by Inada Naoki in branch 'master': bpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884) https://github.com/python/cpython/commit/91234a16367b56ca03ee289f7c03a34d4cfec4c8

[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Inada Naoki
Inada Naoki added the comment: > And I understood that Dino proposed to share one code instance as a memory > mapped file for *all* processes. What instance means? code object? co_code? Anyway, Dino didn't propose such thing. He only proposed accepting buffer object for code const

[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Inada Naoki
Inada Naoki added the comment: On Sat, Jun 1, 2019 at 2:47 AM Brett Cannon wrote: > > Brett Cannon added the comment: > > RE: "I think it needs significant benefits for typical users, not only for > Instagram. If only Instagram get benefit from this, keep it as Instagram

[issue37029] PyObject_Free is O(N) where N = # of arenas

2019-05-31 Thread Inada Naoki
Inada Naoki added the comment: master: build time 0:48:53.664428 teardown time 4:58:20.132930 patched: build time 0:48:08.485639 teardown time 0:01:10.466707 About 250x speedup! -- Added file: https://bugs.python.org/file48382/result.txt

[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Inada Naoki
Inada Naoki added the comment: > In the Instagram case there's about 20mb of byte code total and there are 3-4 > dozen worker processes running per server. The byte code also represents the > second largest section of memory as far as serialized code objects are > concern

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-30 Thread Inada Naoki
Inada Naoki added the comment: Can we dedent docstring too? Is there any string like inspect.cleandoc(s) != inspect.cleandoc(s.dedent())? -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue36

[issue33164] Blake 2 module update

2019-05-29 Thread Inada Naoki
Inada Naoki added the comment: New changeset d8b755167235e0621814eb5ac39163b3db6879bb by Inada Naoki (David Carlier) in branch 'master': bpo-33164: blake2 fix for HP-UX (GH-13633) https://github.com/python/cpython/commit/d8b755167235e0621814eb5ac39163b3db6879bb

[issue36839] Support the buffer protocol in code objects

2019-05-28 Thread Inada Naoki
Inada Naoki added the comment: > Could someone create a buffer object which still allows the underlying memory > to be written? Sure. But I can use ctypes to modify byte code today as well > with something like "ctypes.cast(id(f.__code__.co_code) + 32, > ctypes.POINTER(c

[issue36839] Support the buffer protocol in code objects

2019-05-28 Thread Inada Naoki
Inada Naoki added the comment: read-only is slightly different than const / immutable. const / immutable means anyone can not modify the memory. read-only means only the memory should not be modified through the buffer. But underlaying memory block can be modified by owner who creates

[issue35279] asyncio uses too many threads by default

2019-05-28 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35279] asyncio uses too many threads by default

2019-05-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset 9a7e5b1b42abcedb895b1ce49d83fe067d01835c by Inada Naoki in branch 'master': bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618) https://github.com/python/cpython/commit/9a7e5b1b42abcedb895b1ce49d83fe067d01835c

[issue35279] asyncio uses too many threads by default

2019-05-28 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +13520 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13618 ___ Python tracker <https://bugs.python.org/issu

[issue35279] asyncio uses too many threads by default

2019-05-28 Thread Inada Naoki
Inada Naoki added the comment: > If you want to limit to 16-20 that may be ok but `cpu_count + 4` doesn't work > in this case. On cloud servers, I see 128 or even more cores very often. > 160+4 is not that you want to propose, sure. I proposed cpu_count + 4 because #24882 alm

[issue35279] asyncio uses too many threads by default

2019-05-27 Thread Inada Naoki
Inada Naoki added the comment: Current default value is decided in here: https://bugs.python.org/review/21527/#ps11902 It seems there were no strong reason for current cpu_count * 5. I think cpu_count + 4 is better default value, because: * When people are using threadpool for CPU heavy job

[issue36839] Support the buffer protocol in code objects

2019-05-27 Thread Inada Naoki
Inada Naoki added the comment: I don't like this. It removes guarantee that code object is constant / immutable. > Because the code objects are on random pages and are ref counted the ref > counts can cause all of the code to not be shared across processes. These ref

[issue36891] Additional startup plugin for vendors

2019-05-27 Thread Inada Naoki
Inada Naoki added the comment: I closed this because this proposal is not discussed well in conda community. See https://github.com/python/cpython/pull/13246#issuecomment-492447317 -- ___ Python tracker <https://bugs.python.org/issue36

[issue36891] Additional startup plugin for vendors

2019-05-27 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36891> ___ ___

[issue27860] Improvements to ipaddress module

2019-05-26 Thread Inada Naoki
Inada Naoki added the comment: > I was wondering why it was decided against backporting to 3.7? Because I treats this is just a code cleanup. > 6fa84bd12c4b83bee6a41b989363230d5c03b96c fixes an actual bug #35990 (string > mask in tuple argument for IPv4Interfaces). I didn'

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-26 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 by Inada Naoki (Michael J. Sullivan) in branch 'master': bpo-37017: PyObject_CallMethodObjArgs uses LOAD_METHOD optimization (GH-13516) https://github.com/python/cpython/commit

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-26 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13488 pull_request: https://github.com/python/cpython/pull/13581 ___ Python tracker <https://bugs.python.org/issue27

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset ea2b76bdc5f97f49701213d105b8ec2387ea2fa5 by Inada Naoki in branch '3.7': bpo-27987: align PyGC_Head to alignof(long double) (GH-13335) https://github.com/python/cpython/commit/ea2b76bdc5f97f49701213d105b8ec2387ea2fa5

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37029] PyObject_Free is O(N) where N = # of arenas

2019-05-24 Thread Inada Naoki
Change by Inada Naoki : -- title: PyObject_Free is O(N^2) where N = # of arenas -> PyObject_Free is O(N) where N = # of arenas ___ Python tracker <https://bugs.python.org/issu

[issue37029] PyObject_Free is O(N^2) where N = # of arenas

2019-05-23 Thread Inada Naoki
New submission from Inada Naoki : Reported here: * https://stackoverflow.com/questions/56228799/python-hangs-indefinitely-trying-to-delete-deeply-recursive-object * https://mail.python.org/pipermail/python-dev/2019-May/157635.html -- components: Interpreter Core messages: 343344 nosy

[issue37017] Use LOAD_METHOD optimization in CallMethod C API functions

2019-05-23 Thread Inada Naoki
Inada Naoki added the comment: I want to wait this until PEP 590 is implemented. Unlike CALL_METHOD, we can not avoid prepending self. New method signature may be like this: PyObject_VectorCallMethod(PyObject *name, PyObject **args, Py_ssize_t nargs, PyObject *kwds); And args[0] is self

[issue33164] Blake 2 module update

2019-05-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33164] Blake 2 module update

2019-05-22 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: -7043 ___ Python tracker <https://bugs.python.org/issue33164> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33164] Blake 2 module update

2019-05-22 Thread Inada Naoki
New submission from Inada Naoki : New changeset 51aa35e9e17eef60d04add9619fe2a7eb938358c by Inada Naoki (David Carlier) in branch 'master': bpo-33164: update blake2 implementation (GH-6286) https://github.com/python/cpython/commit/51aa35e9e17eef60d04add9619fe2a7eb938358c -- nosy

[issue24653] Mock.assert_has_calls([]) is surprising for users

2019-05-22 Thread Inada Naoki
Inada Naoki added the comment: > I opened the bug because we have evidence that users find the current > documentation confusing. Saying that its not confusing to us doesn't fix the > confusion. Is there evidence people get confused by the document? I suppose people get confuse

[issue36952] fileinput input's and Fileinput's bufsize=0 marked for removal in 3.8

2019-05-20 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue24653] Mock.assert_has_calls([]) is surprising for users

2019-05-19 Thread Inada Naoki
Inada Naoki added the comment: I concur with Serhiy. Current document and example describe clearly that this API is for checking inclusion, not equality. Current example: """ >>> mock = Mock(return_value=None) >>> mock(1) >>> mock(2) >>&g

[issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes

2019-05-19 Thread Inada Naoki
Inada Naoki added the comment: At first glance, you used ctypes.cdll, which releases GIL. But you called Python/C API in extension module. You shouldn't do it. Try ctypes.pydll, which don't release GIL. If it doesn't help you, please continue it in another communities. I don't want to make

[issue36748] Optimize textio write buffering

2019-05-16 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36748] Optimize textio write buffering

2019-05-16 Thread Inada Naoki
Inada Naoki added the comment: New changeset bfba8c373e362d48d4ee0e0cf55b8d9c169344ae by Inada Naoki in branch 'master': bpo-36748: optimize TextIOWrapper.write() for ASCII string (GH-13002) https://github.com/python/cpython/commit/bfba8c373e362d48d4ee0e0cf55b8d9c169344ae

[issue36338] urlparse of urllib returns wrong hostname

2019-05-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: -13146 ___ Python tracker <https://bugs.python.org/issue36338> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13248 ___ Python tracker <https://bugs.python.org/issue27987> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +13247 ___ Python tracker <https://bugs.python.org/issue27987> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen

2019-05-14 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen

2019-05-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 30cccf084d1560d9e3382e69d828b3be8cdb0286 by Inada Naoki (Miss Islington (bot)) in branch '3.7': bpo-36845: validate integer network prefix when constructing IP networks (GH-13298) https://github.com/python/cpython/commit

[issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen

2019-05-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5e48e3db6f5a937023e99d89cef8884d22bd8533 by Inada Naoki (Nicolai Moore) in branch 'master': bpo-36845: validate integer network prefix when constructing IP networks (GH-13298) https://github.com/python/cpython/commit

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread Inada Naoki
Inada Naoki added the comment: yes. sys.getsizeof(3.14) is 24. And it becomes 32 byte in 16byte aligned pymalloc. (+33%) FYI, jemalloc has 8, 16, 32 size classes, but no 24 too. http://jemalloc.net/jemalloc.3.html#size_classes -- ___ Python

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset f0be4bbb9b3cee876249c23f2ae6f38f43fa7495 by Inada Naoki in branch 'master': bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) https://github.com/python/cpython/commit/f0be4bbb9b3cee876249c23f2ae6f38f43fa7495

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m perf compare_to master.json align16.json -G --min-speed=1 Slower (13): - pickle_list: 4.40 us +- 0.03 us -> 4.59 us +- 0.04 us: 1.04x slower (+4%) - xml_etree_iterparse: 129 ms +- 2 ms -> 133 ms +- 2 ms: 1.04x slower (+4%) - regex_dna: 201 m

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m perf compare_to master-mem.json align16-mem.json -G --min-speed=2 Slower (30): - float: 20.6 MB +- 12.6 kB -> 23.8 MB +- 30.3 kB: 1.16x slower (+16%) - mako: 14.3 MB +- 760.5 kB -> 15.1 MB +- 54.1 kB: 1.06x slower (+6%) - xml_etree_iterparse

[issue36891] Additional startup plugin for vendors

2019-05-13 Thread Inada Naoki
Inada Naoki added the comment: > vx1920 added the comment: > > "sitevendor" is required because "sitecustomize" already "taken": imagine > organization XYZ , they install Python/Anaconda for workers in XYZ. Admin > in XYZ places some XYZ-specific c

[issue36891] Additional startup plugin for vendors

2019-05-13 Thread Inada Naoki
Inada Naoki added the comment: Why is sitevendor required in addition to sitecustomize? -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue36

[issue36684] codecov.io code coverage has not updated since 2019-04-13

2019-05-11 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36684] codecov.io code coverage has not updated since 2019-04-13

2019-05-11 Thread Inada Naoki
Inada Naoki added the comment: New changeset 87068ed00927bdeaa2ae556e4241c16cf8a845eb by Inada Naoki (Gordon P. Hemsley) in branch 'master': bpo-36684: Split out gcc and test coverage builds (GH-13146) https://github.com/python/cpython/commit/87068ed00927bdeaa2ae556e4241c16cf8a845eb

[issue36869] Avoid warning of unused variables

2019-05-10 Thread Inada Naoki
Inada Naoki added the comment: New changeset a2fedd8c910cb5f5b9bd568d6fd44d63f8f5cfa5 by Inada Naoki (Emmanuel Arias) in branch 'master': bpo-36869: fix warning of unused variables (GH-13182) https://github.com/python/cpython/commit/a2fedd8c910cb5f5b9bd568d6fd44d63f8f5cfa5 -- nosy

<    6   7   8   9   10   11   12   13   14   15   >