[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue31659] ssl module should not use textwrap for wrapping PEM format.

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

[issue32657] Mutable Objects in SMTP send_message Signature

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

[issue32657] Mutable Objects in SMTP send_message Signature

2019-02-21 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.8 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue32657> ___ ___ Python-bugs-list mailin

[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

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

[issue34981] Unable to install Python from web-based installer and executable installer

2019-02-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34981> ___ ___

[issue36016] Allow gc.getobjects to return the objects tracked by a specific generation

2019-02-22 Thread Inada Naoki
Inada Naoki added the comment: New changeset 175421b58cc97a2555e474f479f30a6c5d2250b0 by Inada Naoki (Pablo Galindo) in branch 'master': bpo-36016: Add generation option to gc.getobjects() (GH-11909) https://github.com/python/cpython/commit/175421b58cc97a2555e474f479f30a

[issue29716] Python 3 Module doc still sounds like __init__.py is required

2017-03-03 Thread INADA Naoki
INADA Naoki added the comment: namespace package is very advanced topic. I don't think tutorial should mention it. Putting __init__.py always in normal package is highly recommended. Otherwise, many tools can't distinguish normal directory and python package. 2017/03/04 εˆε‰6:26 "

[issue29716] Python 3 Module doc still sounds like __init__.py is required

2017-03-03 Thread INADA Naoki
INADA Naoki added the comment: I think so. namespace package is topic for packaging ecosystem developers, like setuptools and pip. Normal python programmer shouldn't omit __init__.py. Python tutorial is for people who want to be normal python programmer. 2017/03/04 午後1:53 "James O&quo

[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-03-04 Thread INADA Naoki
INADA Naoki added the comment: How about increasing default value to 32KiB or 64KiB too? binutils's cp works well for most cases, while it doesn't have option to specify blocksize. I want Python's copy functions works nice enough for common cases too. binutils cp uses 128KiB b

[issue29719] "Date" of what's new is confusing

2017-03-04 Thread INADA Naoki
New submission from INADA Naoki: See https://docs.python.org/3/whatsnew/3.6.html At top: :Release: |release| :Date: |today| :Editors: Elvis Pranskevichus , Yury Selivanov This |today| is replaced with day when HTML is build (like "Last updated:" in footer). This is near to the

[issue29719] "Date" of what's new is confusing

2017-03-04 Thread INADA Naoki
INADA Naoki added the comment: > is the URL for the current 3.6 branch, in other words, what will be in the > next 3.6 release. "next 3.6 release" means 3.6.1? > These are rebuilt as changes are checked in. There are some commit for fixing something after 3.6.0 released.

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +404 ___ Python tracker <http://bugs.python.org/issue29719> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
INADA Naoki added the comment: https://docs.python.org/3.7/whatsnew/3.6.html shows: Release:3.7.0a0 Date: February 15, 2017 Is it make sense for you? -- ___ Python tracker <http://bugs.python.org/issue29

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
INADA Naoki added the comment: Additonally, unlike "changelog", "What's New" only shows difference between 3.5 and 3.6. It won't be updated to describe changes between 3.6.0 and 3.6.1. -- ___ Python tracker <

[issue29719] "Date" of what's new is confusing

2017-03-05 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, I was wrong. https://docs.python.org/3.5/whatsnew/3.5.html asyncio has "Updates in 3.5.1:" section. provisional package will introduce updates in what's new in bugfix release. So is it OK to just removing Date and Release field? &

[issue29719] "Date" of what's new is confusing

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +408 ___ Python tracker <http://bugs.python.org/issue29719> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29410] Moving to SipHash-1-3

2017-03-06 Thread INADA Naoki
INADA Naoki added the comment: microbench result: https://gist.github.com/methane/33c7b01c45ce23b67246f5ddaff9c9e7 Not significant ~ very little difference for small data. For 4KB: Median +- std dev: [python.default] 3.26 us +- 0.03 us -> [python.siphash13] 2.03 us +- 0.02 us: 1.60x fas

[issue29676] verbose output of test_cprofile

2017-03-06 Thread INADA Naoki
INADA Naoki added the comment: OK, now I found what caused this difference. lsprof expect `func` is PyCFunction object. But it can be PyMethodDescrObject when LOAD_METHOD is used to call C method. In Modules/_lsprof.c (line 459): case PyTrace_C_CALL: if ProfilerObject *)self

[issue29676] verbose output of test_cprofile

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +431 ___ Python tracker <http://bugs.python.org/issue29676> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29676] C method is not profiled by lsprof

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- components: +Interpreter Core -Tests title: verbose output of test_cprofile -> C method is not profiled by lsprof ___ Python tracker <http://bugs.python.org/issu

[issue29676] C method is not profiled by lsprof

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29676> ___

[issue29688] Add support for Path.absolute()

2017-03-12 Thread INADA Naoki
INADA Naoki added the comment: > posixpath.abspath() collapses "//.." to "", this is not > correct. Not sure about ntpath.abspath(). I feel this is reasonable limitation, and expected behavior for some cases. So I think adding note about this in document i

[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread INADA Naoki
INADA Naoki added the comment: > 1.On both Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, > using lowercase v's causes a crash on some kind of import. Lowercase -v is not version, it's "verbose". and -vv is "very verbose". So it'

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-03-14 Thread INADA Naoki
Changes by INADA Naoki : -- dependencies: -Document PyEval_Call* functions resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29592] abs_paths() in site.py is slow

2017-03-14 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29592> ___

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread INADA Naoki
INADA Naoki added the comment: Could you give us minimum sample Python code to reproduce the error? -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue29

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread INADA Naoki
INADA Naoki added the comment: I don't know your patch is worth enough or not. (I dislike fprintf(stderr, ...) at least). But my advice is stop mixing multithreading and fork (except fork+exec). It's almost impossible. While Python has GIL, some extension can release GIL and run

[issue29863] Add a COMPACT constant to the json module

2017-03-21 Thread INADA Naoki
INADA Naoki added the comment: -0. COMPACT_SEPARATOR make more sense to me. Because `ensure_ascii=False` may make JSON more compact too. -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue29

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-21 Thread INADA Naoki
INADA Naoki added the comment: OK, perror() writes to stderr too. fair enough. -- ___ Python tracker <http://bugs.python.org/issue29859> ___ ___ Python-bug

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-21 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +666 ___ Python tracker <http://bugs.python.org/issue29859> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28331] "CPython implementation detail:" removed when content translated

2017-03-22 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +676 ___ Python tracker <http://bugs.python.org/issue28331> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28331] "CPython implementation detail:" removed when content translated

2017-03-22 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5 ___ Python tracker <http://bugs.python.or

[issue28331] "CPython implementation detail:" removed when content translated

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 906118d8c68160ed4a3d15cec803d1ee57836517 by INADA Naoki in branch '3.6': bpo-28331: fix impl-detail label is removed when content is translated. (GH-769) https://github.com/python/cpython/commit/906118d8c68160ed4a3d15cec803d1

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset fe30339534c602af1123e1402e44a1463f91f2e5 by INADA Naoki in branch '3.6': bpo-29859: Fix error messages from return codes for pthread_* calls (GH-753) https://github.com/python/cpython/commit/fe30339534c602af1123e1402e44a1

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset d7fa6b259e00fca04dbf816bfcf4115fdda14bb7 by INADA Naoki (Daniel Birnstiel) in branch 'master': bpo-29859: Fix error messages from return codes for pthread_* calls (GH-741) https://github.com/python/cpyt

[issue29592] abs_paths() in site.py is slow

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 2e4e011795d26cab1a3843383d0539c12fea2458 by INADA Naoki in branch 'master': bpo-29592: site: skip abs_paths() when it's redundant (GH-167) https://github.com/python/cpython/commit/2e4e011795d26cab1a3843383

[issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset aa289a59ff6398110e1122877c073c9354ee53db by INADA Naoki in branch 'master': bpo-29548: Recommend PyObject_Call APIs over PyEval_Call APIs. (GH-75) https://github.com/python/cpython/commit/aa289a59ff6398110e1122877c073c

[issue28331] "CPython implementation detail:" removed when content translated

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset c351ce6a2c923c5016e48ecbf7b1e4833031d154 by INADA Naoki in branch 'master': bpo-28331: fix impl-detail label is removed when content is translated. (GH-195) https://github.com/python/cpython/commit/c351ce6a2c923c5016e48ecbf7b1e4

[issue29676] C method is not profiled by lsprof

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 93fac8dd358cd0e85e7b59115db226ce685d3f6f by INADA Naoki in branch 'master': bpo-29676: fix lsprof can't profile C method call. (GH523) https://github.com/python/cpython/commit/93fac8dd358cd0e85e7b59115

[issue29719] "Date" of what's new is confusing

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 4e1a065c20856a00d0fe88ce022b249170608058 by INADA Naoki in branch '3.6': bpo-29719: Remove Date and Release field in whatsnew/3.6 (GH-500) https://github.com/python/cpython/commit/4e1a065c20856a00d0fe88ce022b24

[issue29719] "Date" of what's new is confusing

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 2225ddaa9e64c086b2b6997b0c9ac50921f7aa85 by INADA Naoki in branch 'master': bpo-29719: Remove Date and Release field in whatsnew/3.6 (GH-494) https://github.com/python/cpython/commit/2225ddaa9e64c086b2b6997b0c9ac5

[issue29684] Minor regression in PyEval_CallObjectWithKeywords()

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 023532e558bb0c5bf60195aebbafe63a0bebd85e by INADA Naoki in branch '3.6': bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. (GH-378) https://github.com/python/cpython/commit/023532e558bb0c5bf60195aebbafe6

[issue29684] Minor regression in PyEval_CallObjectWithKeywords()

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3824cd8fd44f287ea2a76120a39ee76eb34bbf32 by INADA Naoki in branch 'master': bpo-29684: Fix regression of PyEval_CallObjectWithKeywords (GH-87) https://github.com/python/cpython/commit/3824cd8fd44f287ea2a76120a39ee7

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 02eb4b0bd4a7d86cf5e40567aaa8710b00e079a4 by INADA Naoki in branch '2.7': bpo-29110: Fix file object leak in aifc.open (GH-356) https://github.com/python/cpython/commit/02eb4b0bd4a7d86cf5e40567aaa871

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset c9131b61fa060a51ec181053cade9f0a7ee91e4f by INADA Naoki in branch '3.6': [3.6] bpo-29110: Fix file object leak in `aifc.open` (#310) https://github.com/python/cpython/commit/c9131b61fa060a51ec181053cade9f

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset b7fb1e25c89a9eb85b95027f4167bc0977687c43 by INADA Naoki in branch '3.5': bpo-29110: Fix file object leak in `aifc.open` (GH-311) https://github.com/python/cpython/commit/b7fb1e25c89a9eb85b95027f4167bc

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5dc33eea538361f8a218255f83db2e9298dd8c53 by INADA Naoki in branch 'master': bpo-29110: add test for Aifc_write. (GH-293) https://github.com/python/cpython/commit/5dc33eea538361f8a218255f83db2e

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 41cea70aa38de50c1d714209aa2b7694d86a7e0c by INADA Naoki (Matthias Bussonnier) in branch 'master': bpo-29637: clean docstring only if not None (GH-267) https://github.com/python/cpython/commit/41cea70aa38de50c1d714209aa2b76

[issue29463] Add `docstring` field to AST nodes

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 4c78c527d215c37472145152cb0e95f196cdddc9 by INADA Naoki in branch 'master': bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249) https://github.com/python/cpyt

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 4c78c527d215c37472145152cb0e95f196cdddc9 by INADA Naoki in branch 'master': bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249) https://github.com/python/cpyt

[issue29438] use after free in key sharing dict

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 89ddffbe9dcb38b79f99563b0d4d594d1105a192 by INADA Naoki in branch '3.6': bpo-29438: fixed use-after-free in key sharing dict (#39) https://github.com/python/cpython/commit/89ddffbe9dcb38b79f99563b0d4d59

[issue29438] use after free in key sharing dict

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 06a4fcb2458c5904968b5c8fe6b64940ba83a50d by INADA Naoki in branch '3.5': bpo-29438: Fixed use-after-free in key sharing dict (#40) https://github.com/python/cpython/commit/06a4fcb2458c5904968b5c8fe6b649

[issue29438] use after free in key sharing dict

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 2294f3aee14a6074b17c67ef936c607430bb3c7a by INADA Naoki in branch 'master': bpo-29438: fixed use-after-free in key sharing dict (#17) https://github.com/python/cpython/commit/2294f3aee14a6074b17c67ef936c60

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
INADA Naoki added the comment: New changeset 8cea5929f52801b0ce5928b46ef836e99a24321a by INADA Naoki (Alex Wang) in branch 'master': bpo-29643: Fix check for --enable-optimizations (GH-129) https://github.com/python/cpython/commit/8cea5929f52801b0ce5928b46ef836e99a24321a -

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +768 ___ Python tracker <http://bugs.python.org/issue29643> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +770 ___ Python tracker <http://bugs.python.org/issue29643> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +771 ___ Python tracker <http://bugs.python.org/issue29643> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
INADA Naoki added the comment: New changeset f01de61a8efea8319c65365898982f929d59a895 by INADA Naoki in branch '3.6': bpo-29643: Fix check for --enable-optimizations (GH-869) https://github.com/python/cpython/commit/f01de61a8efea8319c65365898982f

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
INADA Naoki added the comment: New changeset e6a49531568561fe5aaf662259ecb7b4bc2426be by INADA Naoki in branch '3.5': bpo-29643: Fix check for --enable-optimizations (GH-871) https://github.com/python/cpython/commit/e6a49531568561fe5aaf662259ecb7

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
INADA Naoki added the comment: New changeset 6a04ef7ceddae0930eba6cc57ba2ebfcef00abab by INADA Naoki in branch '2.7': bpo-29643: Fix check for --enable-optimizations (GH-873) https://github.com/python/cpython/commit/6a04ef7ceddae0930eba6cc57ba2eb

[issue29643] --enable-optimizations compiler flag has no effect

2017-03-28 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29643> ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread INADA Naoki
New submission from INADA Naoki: (original thread is https://mail.python.org/pipermail/python-list/2017-March/720391.html) https://github.com/python/cpython/commit/4897300276d870f99459c82b937f0ac22450f0b6 this commit doubles sizeof set object created by set_merge(). It is used by constructor

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: https://gist.github.com/methane/8faf12621cdb2166019bbcee65987e99 This patch fixes the regression. But I think it is still larger than idiomatic. See this code: code: minused *= 2; /* Find the smallest table size > minused. */ /* XXX speed-up w

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset cdcac039fb447f2ab04efcacbe663751bb2cb4ec by INADA Naoki (cocoatomo) in branch 'master': bpo-29952: Use usual terminology of dict (GH-917) https://github.com/python/cpython/commit/cdcac039fb447f2ab04efcacbe663751bb2cb4ec -

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +819 ___ Python tracker <http://bugs.python.org/issue29952> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +820 ___ Python tracker <http://bugs.python.org/issue29952> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +821 ___ Python tracker <http://bugs.python.org/issue29952> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset 4c75fbb485c0e42181aab95c2ae92c597915827c by INADA Naoki in branch '3.6': bpo-29952: Use usual terminology of dict (GH-922) https://github.com/python/cpython/commit/4c75fbb485c0e42181aab95c2ae92c

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset f3158121132a1519439bf4c7dbab07802d6d by INADA Naoki in branch '3.5': bpo-29952: Use usual terminology of dict (GH-923) https://github.com/python/cpython/commit/f3158121132a1519439bf4c7dba333

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5aa913d72317d7632781fb71a7b45a2b5e31558e by INADA Naoki in branch '2.7': bpo-29952: Use usual terminology of dict (GH-924) https://github.com/python/cpython/commit/5aa913d72317d7632781fb71a7b45a

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread INADA Naoki
INADA Naoki added the comment: See set_update_internal(). https://github.com/python/cpython/blob/master/Objects/setobject.c#L969-L1016 This happens only when iterable is set or dict. >>> import sys >>> sys.getsizeof(set(range(10))) 736 >>> sys.getsizeo

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread INADA Naoki
INADA Naoki added the comment: > frozenset(range(n)) is slightly larger in 3.7 than in 3.6. It is 4 times > larger for about 10% of sizes. This is intensional: https://github.com/python/cpython/commit/5cd87a8d61246b0a6233bfb8503d4718b693cef0 load factor is reduced from 66% to 60%

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread INADA Naoki
INADA Naoki added the comment: I agree. Before thinking about rebalance between size and speed, resolving regression is important. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-31 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1125 ___ Python tracker <http://bugs.python.org/issue29949> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-04-01 Thread INADA Naoki
INADA Naoki added the comment: New changeset e82cf8675bacd7a03de508ed11865fc2701dcef5 by INADA Naoki in branch 'master': bpo-29949: Fix set memory usage regression (GH-943) https://github.com/python/cpython/commit/e82cf8675bacd7a03de508ed11865f

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-04-01 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1127 ___ Python tracker <http://bugs.python.org/issue29949> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-04-01 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29949> ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-04-01 Thread INADA Naoki
INADA Naoki added the comment: New changeset efde51ad54c58353f25ff80c8d30dbee82ef33a3 by INADA Naoki in branch '3.6': bpo-29949: Fix set memory usage regression (GH-945) https://github.com/python/cpython/commit/efde51ad54c58353f25ff80c8d30db

[issue29961] More compact sets and frozensets created from sets

2017-04-01 Thread INADA Naoki
INADA Naoki added the comment: I also feel set created from iterator is too large sometimes. Especially, frozenset is used for "unordered tuple" dict key sometimes. $ python -c 'N = 6000; from sys import getsizeof; s = [getsizeof(frozenset(range(n))) for n in range(N)]; print( [

[issue29961] More compact sets and frozensets created from sets

2017-04-01 Thread INADA Naoki
INADA Naoki added the comment: OK, sorry about bothering you. -- ___ Python tracker <http://bugs.python.org/issue29961> ___ ___ Python-bugs-list mailing list Unsub

[issue30028] make test.support.temp_cwd() fork-safe

2017-04-10 Thread INADA Naoki
INADA Naoki added the comment: #28156 added HAVE_GETPID check. Maybe, we should have dummy getpid() for CloudABI? -- nosy: +inada.naoki ___ Python tracker <http://bugs.python.org/issue30

[issue30028] make test.support.temp_cwd() fork-safe

2017-04-10 Thread INADA Naoki
INADA Naoki added the comment: > Oh. If os.getpid() is not always available, the documentation should be > updated. Yes, but CloudABI is not officially supported platform. They have many patches to run Python on CloudABI. https://github.com/NuxiNL/cloudabi-ports/tree/master/packages/

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
New submission from INADA Naoki: dict.clear() make the dict to empty key-sharing dict to reduce it's size. New dict can use same technique. $ ./python.default Python 3.7.0a0 (heads/master:6dfcc81, Apr 10 2017, 19:55:52) [GCC 6.2.0 20161005] on linux Type "help", "copy

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1223 ___ Python tracker <http://bugs.python.org/issue30040> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
INADA Naoki added the comment: performance impact best case: $ ./python.patched -m perf timeit --compare-to=`pwd`/python.default -- '{}' python.default: . 36.9 ns +- 0.9 ns python.patched: . 25.3 ns +- 0.7 ns Mean +- std dev: [python.defaul

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
Changes by INADA Naoki : -- components: +Interpreter Core type: -> resource usage versions: +Python 3.7 ___ Python tracker <http://bugs.python.org/issu

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
INADA Naoki added the comment: > Isn't the latter case the more common one? Creating an empty dict and then > populate it. This is memory usage optimization, not performance optimization. (But I think memory efficiency makes multi process application faster because L3 cache size

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
INADA Naoki added the comment: macro bench result: $ ./python.default -m perf compare_to -G --min-speed=1 default.json patched.json Slower (11): - scimark_lu: 362 ms +- 13 ms -> 383 ms +- 22 ms: 1.06x slower (+6%) - unpickle_pure_python: 882 us +- 18 us -> 924 us +- 18 us: 1.05x slow

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
INADA Naoki added the comment: While I think it's preferable that {} and d.clear() have same memory footprint, I need real world example which empty dict affects overall memory usage. I'll check memory usage difference with application I used in this ML thread. https://mail.python.org

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
INADA Naoki added the comment: Thank you for your reply. Would you try to check how the patch [1] affects memory usage of your application? I think the patch can be applied to 3.6 easily. [1] https://patch-diff.githubusercontent.com/raw/python/cpython/pull/1080.patch

[issue30040] new empty dict can be more small

2017-04-11 Thread INADA Naoki
INADA Naoki added the comment: > I mean creating a solo empty dict doesn't seem to make much sense. Although > it saves memory, but when it's populated, it's resized and the memory > occupation comes back. But sometimes it's not populated. class A:

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: When task.cancel() called, CancelledError is thrown to coro2. But coro2 doesn't call `yield from` after task.cancel(). So the exception is never raised. If you add `yield from` after `task.cancel()`, the script runs expected. --- $ cat at.py import asyncio

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: This behavior is documented as: https://docs.python.org/3.6/library/asyncio-task.html#asyncio.Task.cancel > Unlike Future.cancel(), this does not guarantee that the task will be > cancelled: the exception might be caught and acted upon, delaying > can

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: FYI, Tornado 4.5b switched buffer implementation from deque-of-bytes to bytearray like asyncio. I sent PR for fixing "unreleased memoryview". https://github.com/tornadoweb/tornado/pull/2008 This is common pitfall when implement

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: > The problem is that the task doesn't catch CancelledError, yet it disappears. The problem is CancelledError is not raised, even it's thrown. Task can't catch exception not raised. See below example which demonstrates how task works. --- f

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: > In Evgeny's example the 'task' is 'coro1' (not 'coro2'). It has plenty of > yield points after being cancelled. Since coro1 waiting coro2 when cancelling, Task(coro1).cancel() redirect to Task(coro2).cancel(). But I

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1240 ___ Python tracker <http://bugs.python.org/issue30048> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29617] Drop Python 3.4 support from asyncio

2017-04-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3e2ad8ec61a322370a6fbdfb2209cf74546f5e08 by INADA Naoki in branch 'master': bpo-29617: Remove Python 3.3 support from asyncio (GH-232) https://github.com/python/cpython/commit/3e2ad8ec61a322370a6fbdfb2209cf

[issue29617] Drop Python 3.4 support from asyncio

2017-04-24 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue29617> ___

<    9   10   11   12   13   14   15   16   17   18   >