[issue41835] Speed up dict vectorcall creation using keywords

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: @Marco Sulla > @methane: well, to be honest, I don't see much difference between the two > pulls. The major difference is that you merged insertdict_init in > dict_merge_init. Not only it but also some simplification which make 10% faster than

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: @Mark.Shannon I had seen some speedup on tornado benchmark when I didn't use PGO+LTO. but it was noise. Now I use PGO+LTO. master vs PR-22909: $ ./python -m pyperf compare_to master-opt.json speedup_kw-opt.json -G --min-speed=1 Slower (11): - spectral_norm

[issue24165] Free list for single-digits ints

2020-10-24 Thread Inada Naoki
Inada Naoki added the comment: I close this issue for now. Please reopen or create a new issue if you came up with better idea. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -P

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: @Marco Sulla Please take a look at GH-22909. It is simplified version of your PR. And I wrote another optimization based on it #42126. -- ___ Python tracker <https://bugs.python.org/issue41

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: It is difficult to estimate. Real world applications has different code-style than stdlib. And pyperformance didn't include whole real world applications too. Some application may use dict display in heavy loop. But it is difficult to say how much exactly. One

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m pyperf timeit --compare-to ~/pyenv/versions/3.10-dev/bin/python '{}' /home/inada-n/pyenv/versions/3.10-dev/bin/python: . 23.5 ns +- 0.2 ns /home/inada-n/work/python/cpython/python: . 22.4 ns +- 0.1 ns Mean

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21842 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22911 ___ Python tracker <https://bugs.python.org/issu

[issue42126] Optimize BUILD_CONST_KEY_MAP for distinct keys

2020-10-23 Thread Inada Naoki
New submission from Inada Naoki : BUILD_CONST_KEY_MAP can be optimized based on #41835 optimization. 1. compiler checks keys tuple is distinct. 2. Add distinct flag to BUILD_CONST_KEY_MAP oparg To be considered: * Should we use new opcode, instead of flag in oparg? * Is this technique safe

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: Ok. Performance improvement comes from: a. Presizing b. Bypassing some checks in PyDict_SetItem c. Avoiding duplication check. (b) is relatively small so I tried to focus on (a) and (b). See GH-22909. In case of simple keyword arguments, it is 10% faster than

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-22 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21840 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22909 ___ Python tracker <https://bugs.python.org/issu

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: I had suspected that pypeformance just don't have enough workload for non-small int. For example, spectral_norm is integer heavy + some float warkload. But bm_spectral_norm uses `DEFAULT_N = 130`. So most integers are fit into smallint cache. On the othar

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: I heard pyperformance 1.0.0 works and here is the result of PR-22884. $ ./python-master -m pyperf compare_to master.json patched.json -G --min-speed=1 Slower (8): - pathlib: 26.3 ms +- 0.3 ms -> 26.8 ms +- 0.4 ms: 1.02x slower (+2%) - chameleon: 12.8 ms +-

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: I updated the patch. I can not run pyperformance for now, because: AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64' I added this config, but it can not solve the problem: ``` $ cat ~/.config/pip/pip.conf [global

[issue24165] Free list for single-digits ints

2020-10-22 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21823 pull_request: https://github.com/python/cpython/pull/22884 ___ Python tracker <https://bugs.python.org/issue24

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: One more idea: BINARY_ADD_INT. Operand is int immediate. This idea can be implemented without opcode cache. I will try it. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-22 Thread Inada Naoki
Inada Naoki added the comment: FWIW, php7 is about 5x faster than Python on spectral norm benchmark. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/php-python3.html There two major reasons: * PHP uses scalar type for float and int * PHP uses type-specialized bytecode

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: Thank you for reporting with reproducer. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32431] Two bytes objects of zero length don't compare equal

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset 8f6787d93db1b6022db44b1e1d22460c2b74f60b by Inada Naoki in branch '3.9': bpo-42057: Add a test case (GH-22878) https://github.com/python/cpython/commit/8f6787d93db1b6022db44b1e1d22460c2b74f60b

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21820 pull_request: https://github.com/python/cpython/pull/22878 ___ Python tracker <https://bugs.python.org/issue42

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset 07a44d9572c7746568a7fe2fbcd42127fd6d4019 by Inada Naoki in branch '3.9': bpo-42057: Fix peephole optimizer (GH-22802) https://github.com/python/cpython/commit/07a44d9572c7746568a7fe2fbcd42127fd6d4019

[issue42106] docs.python.org prioritises search horribly

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: Can we add search box using DuckDuckGo? https://duckduckgo.com/?q=site%3Adocs.python.org%2F3%2F+list+append -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue42

[issue41819] Fix some compiler warnings

2020-10-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset c756c2b507b088919ac0c1aa8b0d8c8bdbdd75ee by Miss Skeleton (bot) in branch '3.8': bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332) https://github.com/python/cpython/commit/c756c2b507b088919ac0c1aa8b0d8c8bdbdd75ee

[issue41819] Fix some compiler warnings

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

[issue41316] tarfile: Do not write full path in FNAME field

2020-10-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.or

[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 19019eccdeeb8dea027bd7766ca9fe2892972da4 by Miss Skeleton (bot) in branch '3.9': bpo-41646: Mention path-like objects support in the docs for shutil.copy() (GH-22208) https://github.com/python/cpython/commit

[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6443a8ccc886749f5e83a8ca073006742b605d90 by Miss Skeleton (bot) in branch '3.8': bpo-41646: Mention path-like objects support in the docs for shutil.copy() (GH-22208) https://github.com/python/cpython/commit

[issue41744] NuGet python.props only works in python nuget, not other variants

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset d0bfce992c4ce0e6e71f13a993c91903a97a62f3 by Miss Skeleton (bot) in branch '3.9': bpo-41744: Package python.props with correct name in NuGet package (GH-22154) https://github.com/python/cpython/commit/d0bfce992c4ce0e6e71f13a993c91903a97a62f3

[issue30680] textwrap should treat Unicode em-dash like ASCII em-dash

2020-10-20 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue30680> ___ ___ Python-bugs-list mailing list Unsub

[issue30680] textwrap should treat Unicode em-dash like ASCII em-dash

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: > Agreed. It makes great sense that textwrap started as highly ASCII-centric. > But in the Python 3, Unicode-friendly era, ASCII-biased isn't where we should > leave things. It needs Unicode experts. If we support Unicode, we should implemente UAX

[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: +1 -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue38980> ___ ___ Python-bugs-list mailin

[issue23706] pathlib.Path.write_text should include a newline argument

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: Thank you -- nosy: +methane resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41902] Micro optimization for range.index if step is 1

2020-10-20 Thread Inada Naoki
Inada Naoki added the comment: New changeset 25492a5b59c5b74328278f195540e318ab87674f by Dong-hee Na in branch 'master': bpo-41902: Micro optimization for compute_item of range (GH-22492) https://github.com/python/cpython/commit/25492a5b59c5b74328278f195540e318ab87674f -- nosy

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-19 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22802 ___ Python tracker <https://bugs.python.org/issu

[issue42057] peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH

2020-10-19 Thread Inada Naoki
Change by Inada Naoki : -- title: pytest case which catch exceptions become segfault -> peephole optimizer bug relating to JUMP_IF_NOT_EXC_MATCH ___ Python tracker <https://bugs.python.org/issu

[issue42057] pytest case which catch exceptions become segfault

2020-10-19 Thread Inada Naoki
Inada Naoki added the comment: I confirmed fix42057.patch fix the assertion failure. But I don't know where and how to write test yet. -- keywords: +patch Added file: https://bugs.python.org/file49527/fix42057.patch ___ Python tracker <ht

[issue42057] pytest case which catch exceptions become segfault

2020-10-19 Thread Inada Naoki
Inada Naoki added the comment: I confirmed the issue. The simple version of the reproducer is: ``` def callee(): raise Exception def caller(): try: callee() except Exception or Exception: pass caller() ``` I can see assertion failure consisntently, when I use

[issue38820] Make Python compatible with OpenSSL 3.0.0

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

[issue38094] unneeded assignment to wb.len in PyBytes_Concat using buffer protocol

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

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: > In my implementation, there is guards that do early return in those cases and > there are tests that check that indeed we don't crash of that happens when > calling the exposed functions The guard doesn't help much. _PyObject_GC_UNTRACK() is called

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: and this: https://github.com/python/cpython/blob/b67cbbda3a022cec5e2ad929f0531162166e7c8d/Include/internal/pycore_object.h#L111-L113 -- ___ Python tracker <https://bugs.python.org/issue42

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: I meant this: https://github.com/python/cpython/blob/b67cbbda3a022cec5e2ad929f0531162166e7c8d/Include/internal/pycore_object.h#L75-L78 -- ___ Python tracker <https://bugs.python.org/issue42

[issue42030] Drop support for dynload_aix

2020-10-14 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +Michael.Felt ___ Python tracker <https://bugs.python.org/issue42030> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42030] Drop support for dynload_aix

2020-10-14 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +David.Edelsohn ___ Python tracker <https://bugs.python.org/issue42030> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Inada Naoki
Inada Naoki added the comment: There are many code that an object is tracked/untracked. This API can cause fatal error too easily. I think this API should be exposed only in _testcapi. -- nosy: +methane ___ Python tracker <https://bugs.python.

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread Inada Naoki
Inada Naoki added the comment: Thank you for finding/fixing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2d2af320d94afc6561e8f8adf174c9d3fd9065bc by Kevin Adler in branch 'master': bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466) https://github.com/python/cpython/commit/2d2af320d94afc6561e8f8adf174c9d3fd9065bc

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: Yes, please. -- ___ Python tracker <https://bugs.python.org/issue41894> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: OK. Let's use PyUnicode_DecodeLocale() with surrogateescape for consistency. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: > So the main problem is: should we allow surrogateescape in error message? Note that error message may be written to file, stream, structured log (JSON). They may be UTF-8:strict. We can not write surrogateescape-d string to t

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: > I think that it is more correct to use the locale encoding. If error messages > are translated for readability, we should not ruin this by outputting \xXX. * PyUnicode_DecodeLocale() doesn't support "backslashescape" error handler. * Error me

[issue41376] site.getusersitepackages() incorrectly claims that PYTHONNOUSERSITE is respected

2020-10-08 Thread Inada Naoki
Inada Naoki added the comment: New changeset 35f041dd0171f575fc3adce1709b31fdf45a5ff6 by Phil Elson in branch 'master': bpo-41376: Fix the documentation of `site.getusersitepackages()` (GH-21602) https://github.com/python/cpython/commit/35f041dd0171f575fc3adce1709b31fdf45a5ff6

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-07 Thread Inada Naoki
Inada Naoki added the comment: > I have since changed the PR to use PyUnicode_DecodeFSDefault based on review > feedback. I was going to say that you will have to fight it out with @methane > on GH, but I see that that's you. :D Would have been nice if you would have > left

[issue32222] pygettext doesn't extract docstrings for functions with type annotated params

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

[issue35291] duplicate of memoryview from io.BufferedWriter leaks

2020-10-05 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35291> ___ ___

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-05 Thread Inada Naoki
Inada Naoki added the comment: I succeeded to reproduce it on Ubuntu 20.04. $ sudo vi /var/lib/locales/supported.d/ja # add "ja_JP.EUC-JP EUC-JP" $ sudo locale-gen ja_JP.EUC-JP Generating locales (this might take a while)... ja_JP.EUC-JP... done Generatio

[issue33235] Better help text for dict.setdefault

2020-10-03 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue33235> ___ ___

[issue41835] Speed up dict vectorcall creation using keywords

2020-09-22 Thread Inada Naoki
Inada Naoki added the comment: I have a Linux desktop machine for benchmarking & profiling in my office. But the machine is offline and I am working from home several weeks. So please wait several weeks until I confirm your branch. > This change speeds up the code up to a 30%.

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Inada Naoki
Inada Naoki added the comment: PyUnicode_AsUTF8 is useful "API". But it can be implemented as C macro, C inline function, or functions/macros in any other languages using PyUnicode_AsUTF8AndSize. PyUnicode_AsUTF8AndSize is more importan

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue41784> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Inada Naoki
Inada Naoki added the comment: +1. It is a very important API. -- ___ Python tracker <https://bugs.python.org/issue41784> ___ ___ Python-bugs-list mailin

[issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited

2020-09-02 Thread Inada Naoki
Inada Naoki added the comment: Since we have positional-only argument, can we document it as `seek(offset, whence=SEEK_SET, /)`? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited

2020-09-02 Thread Inada Naoki
Inada Naoki added the comment: For the record, https://github.com/python/cpython/pull/14691/files reintroduced `whence=SEEK_SET`. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue41

[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2020-09-02 Thread Inada Naoki
Inada Naoki added the comment: +1 -- ___ Python tracker <https://bugs.python.org/issue41692> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39102] Increase Enum performance

2020-08-09 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue39102> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41497] Potential UnicodeDecodeError in dis

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

[issue41507] Use utf-8 in "Reading and Writing Files" tutorial.

2020-08-07 Thread Inada Naoki
New submission from Inada Naoki : https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files Current tutorial doesn't mention about encoding and example uses locale encoding. Since UTF-8 is major text encoding and many Windows environment doesn't use UTF-8 by default

[issue41497] Potential UnicodeDecodeError in dis

2020-08-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset a4084b9d1e40c1c9259372263d1fe8c8a562b093 by Konge in branch 'master': bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757) https://github.com/python/cpython/commit/a4084b9d1e40c1c9259372263d1fe8c8a562b093 -- nosy

[issue41098] Deprecating PyUnicodeEncodeError_Create

2020-08-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 46e19b61d31ba99f049258efa4ff1334856a3643 by Inada Naoki in branch 'master': bpo-41098: Doc: Add missing deprecated directives (GH-21162) https://github.com/python/cpython/commit/46e19b61d31ba99f049258efa4ff1334856a3643

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset 54636355805dd2877bb54fbad8d967e1ddd8b553 by Zackery Spytz in branch 'master': bpo-39871: Fix an error in a news entry (GH-21749) https://github.com/python/cpython/commit/54636355805dd2877bb54fbad8d967e1ddd8b553 -- nosy: +inada.naoki

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue41497> ___ ___ Python-bugs-list mailin

[issue41493] Refactoring dictresize to accept only new keysize

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

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset d9323a8c6e07071a59dc4c910661db33236c01b2 by Inada Naoki in branch 'master': bpo-41493: Refactoring dictresize (GH-21751) https://github.com/python/cpython/commit/d9323a8c6e07071a59dc4c910661db33236c01b2

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +20894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21751 ___ Python tracker <https://bugs.python.org/issu

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
New submission from Inada Naoki : dictresize accept `minsize` and calculate `newsize` which is `newsize >= minsize`. Some caller pass the exact dk_size so calculating `newsize` is not necessary. Split calculating `newsize` from `minused` into new function. Additonally, use _Py_bit_len

[issue36346] Prepare for removing the legacy Unicode C API

2020-08-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset 270b4ad4df795783d417ba15080da8f95e598689 by Inada Naoki in branch 'master': bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479) https://github.com/python/cpython/commit/270b4ad4df795783d417ba15080da8f95e598689

[issue41326] Build failure in blurb-it repo: "Failed building wheel for yarl"

2020-08-03 Thread Inada Naoki
Inada Naoki added the comment: For the record, deprecation warning is just a waring. Build failure is coming from here: ``` yarl/_quoting.c:1245:23: error: lvalue required as left operand of assignment Py_SIZE(list) = len+1; ``` It is not relating PEP 623, and it has been fixed

[issue41431] Optimize dict_merge for copy

2020-08-03 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> performance ___ Python tracker <https://bugs.python

[issue41431] Optimize dict_merge for copy

2020-08-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset db6d9a50cee92c0ded7c5cb87331c5f0b1008698 by Inada Naoki in branch 'master': bpo-41431: Optimize dict_merge for copy (GH-21674) https://github.com/python/cpython/commit/db6d9a50cee92c0ded7c5cb87331c5f0b1008698

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-08-01 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41445] Adding configure temporary files to gitignore

2020-07-31 Thread Inada Naoki
Inada Naoki added the comment: Do you know you can use separated build dir? ``` $ mkdir build $ cd build $ ../configure --with-pydebug ``` -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue41

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21674 ___ Python tracker <https://bugs.python.org/issu

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Inada Naoki added the comment: PyDict_Copy() is not used in eval loop or calling functions. So removing clone_combined_dict() is a considerable option. Another option is to use clone_combined_dict() in dict_merge, instead of adding dict_copy2(). Pros: No performance regression. PyDict_Copy

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Inada Naoki added the comment: To reduce code size, I am considering to remove clone_combined_dict. I will check how PyDict_Copy() is performance critical. This is microbenchmark result of d.copy() and dict(d). $ ./python -m pyperf timeit --compare-to ./python-master -s 'd=dict.fromkeys

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Inada Naoki added the comment: Microbenchmark for commit cf4f61ce50e07f7ccd3aef991647050c8da058f9. # timeit -s 'd=dict.fromkeys(range(8))' -- 'dict(d)' Mean +- std dev: [master] 311 ns +- 2 ns -> [patched] 144 ns +- 1 ns: 2.16x faster (-54%) # timeit -s 'd=dict.fromkeys(range(1

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +20813 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21669 ___ Python tracker <https://bugs.python.org/issu

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
New submission from Inada Naoki : Although there are dict.copy() and PyDict_Copy(), dict_merge can be used for copying dict. * d={}; d.update(orig) * d=dict(orig) * d=orig.copy() # orig has many dummy keys. -- components: Interpreter Core messages: 374550 nosy: inada.naoki priority

[issue31904] Python should support VxWorks RTOS

2020-07-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset 855e68855eeb06f8f0319b3366d3a012c2ff2041 by pxinwr in branch 'master': bpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447) https://github.com/python/cpython/commit/855e68855eeb06f8f0319b3366d3a012c2ff2041 -- nosy

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5798f787779006a94a55ec74a86da4627de90146 by wasiher in branch 'master': bpo-41340: Removed fallback implementation for strdup (GH-21634) https://github.com/python/cpython/commit/5798f787779006a94a55ec74a86da4627de90146

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

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

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-25 Thread Inada Naoki
Inada Naoki added the comment: @fj92f3jj923f923 Would you update the PR to remove the strdup.c? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread Inada Naoki
Inada Naoki added the comment: Thank you. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread Inada Naoki
Inada Naoki added the comment: New changeset 680254a8dc64e3ada00f88a7c42d41eb02108353 by Henry Schreiner in branch 'master': bpo-41366: Fix clang warning for sign conversion (GH-21592) https://github.com/python/cpython/commit/680254a8dc64e3ada00f88a7c42d41eb02108353 -- nosy

[issue10879] cgi memory usage

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue10879> ___

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20706 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21560 ___ Python tracker <https://bugs.python.org/issu

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/i

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-20 Thread Inada Naoki
Inada Naoki added the comment: Can we just remove strdup.c? How about hypot.c? -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue41

[issue36777] unittest discover throws TypeError on namespace packages

2020-07-19 Thread Inada Naoki
Inada Naoki added the comment: This issue is not duplicate of #23882. In the example, test1 and test1.test2 are namespace package. But they are specified explicitly. `./python.exe -m unittest discover test1.test2` -- ___ Python tracker <ht

[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

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

[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

2020-07-19 Thread Inada Naoki
Inada Naoki added the comment: New changeset 902356a7b0564e2c9659aaec56211de4d37109d0 by Inada Naoki in branch 'master': bpo-41338: Fix DeprecationWarning in tests (GH-21542) https://github.com/python/cpython/commit/902356a7b0564e2c9659aaec56211de4d37109d0

<    1   2   3   4   5   6   7   8   9   10   >