[issue39287] Document UTF-8 mode in the using/windows.

2020-01-10 Thread Inada Naoki
New submission from Inada Naoki : I think the UTF-8 mode is very useful for Windows users. Let's add section for the UTF-8 mode in the using/windows. -- assignee: docs@python components: Documentation messages: 359722 nosy: docs@python, inada.naoki priority: normal severity: normal

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2020-01-09 Thread Inada Naoki
Inada Naoki added the comment: Does the name "locale.localize" have some origin? I feel the name doesn't represent well about it is for formatting numeric based on LC_NUMERIC. -- nosy: +inada.naoki ___ Python tracker <https://bu

[issue38623] Python documentation should mention how to find site-packages

2020-01-07 Thread Inada Naoki
Inada Naoki added the comment: > The tutorial currently mentions its special role only briefly [7], saying: > >> * The installation-dependent default. > > We should explain that part. I'll give it a shot replacing my earlier > proposal. I don't think so. At there,

[issue38623] Python documentation should mention how to find site-packages

2020-01-07 Thread Inada Naoki
Inada Naoki added the comment: It is tempting that putting some paragraphs to the tutorial when you think "this should be documented!" but there is no good place in the library reference. HOWTOs is the document for advanced topics. But it doesn't cover wide area yet. There i

[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset ca94677a6216e2d41b04574986ce49d31a0b329c by Inada Naoki in branch 'master': bpo-38623: Doc: Add section for site module CLI. (GH-17858) https://github.com/python/cpython/commit/ca94677a6216e2d41b04574986ce49d31a0b329c

[issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks()

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

[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2020-01-06 Thread Inada Naoki
Inada Naoki added the comment: > I've tried writing some Python code to reproduce this bug, but I'm unable to > -- I should be missing something. Is there a simple snippet showing the > issue? Note that this is a bug from long ago. Why this bug had lived long is it can n

[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread Inada Naoki
Inada Naoki added the comment: > There is a specific question this change attempts to answer: "Where is the > module I imported located in the file system?" So `print(the_module.__file__)` is better answer. (or `pip list -v` if the module is third party package installed vi

[issue38623] Python documentation should mention how to find site-packages

2020-01-05 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17278 pull_request: https://github.com/python/cpython/pull/17858 ___ Python tracker <https://bugs.python.org/issue38

[issue38623] Python documentation should mention how to find site-packages

2020-01-05 Thread Inada Naoki
Inada Naoki added the comment: There is a document about it in Doc/library/site.rst already. I'm not sure this should be documented in the tutorial. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue38

[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3

2020-01-04 Thread Inada Naoki
Inada Naoki added the comment: I can not get what you say. If "unicodedata.normalize() produces the correct sequence", isn't it just a your terminal behavior? If you think it is Python's issue, could you be more specific and write a simple sample code? -- nosy: +i

[issue39196] json fails to encode dictionary view types

2020-01-03 Thread Inada Naoki
Inada Naoki added the comment: If we support more types by default, user can not customize serialization of the type using `default` option. That's why we don't accept "any iterable" but only list and tuple. -- nosy: +inada.naoki

[issue39196] json fails to encode dictionary view types

2020-01-03 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39196> ___ ___

[issue39207] concurrent.futures.ProcessPoolExecutor does not properly reap jobs and spawns too many workers

2020-01-03 Thread Inada Naoki
Inada Naoki added the comment: > ProcessPoolExecutor does not properly spin down and spin up new processes. It is because Process "Pool" is for reusing processes. If you don't want to reuse process, you can use the Process. https://docs.python.org/3/library/multiprocessing.htm

[issue36051] Drop the GIL during large bytes.join operations?

2020-01-02 Thread Inada Naoki
Inada Naoki added the comment: > (slowdowns because releasing/acquiring the GIL is not free, particularly when > contended) Yes, it's relatively high. We shouldn't release the GIL only for ~0.5ms. That's why 1MB~ seems nice threshold. > If the threshold is too low then users c

[issue36051] Drop the GIL during large bytes.join operations?

2020-01-01 Thread Inada Naoki
Inada Naoki added the comment: > In the single-threaded case, the benchmark seems to show that for 64K+, > performance is improved by dropping the GIL (which I'm guessing must be > statistical noise, since there shouldn't be anything contending for it), > which is my reas

[issue18858] dummy_threading lacks threading.get_ident() equivalent

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

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: > 2. If the thread tries to change the size of the bytearrays during the join > (ba1 += b'123'), it'll die with a BufferError that wasn't previously possible Makes sense. We shouldn't drop GIL while having buffer of arbitrary o

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: New changeset dfef986f12dd92bd6434117bba0db3cbb4e65243 by Inada Naoki in branch 'master': bpo-38588: Optimize list comparison. (GH-17766) https://github.com/python/cpython/commit/dfef986f12dd92bd6434117bba0db3cbb4e65243

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: >> This makes list comparison 2x slower. > > This is affected by PR 17734? or PyObject_RichCompare patched? Caused by PR 17734. > Would you like to revert PR 17734? Calling Py_INCREF and Py_DECREF in > PyObject_RichCompare or do_richcompare

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17202 pull_request: https://github.com/python/cpython/pull/17766 ___ Python tracker <https://bugs.python.org/issue38

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m pyperf timeit -s 'a = ["a"]*100; b = ["a"]*100;' -- 'a == b' master : Mean +- std dev: 276 ns +- 1 ns patched: Mean +- std dev: 572 ns +- 3 ns This makes list comparison 2x slower. -- __

[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2019-12-30 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue33777> ___ ___

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: If we can not add INCREF and DECREF in the PyObject_RichCompare, we can add v == w check in the caller side. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38588] Use-after-free in dict/list

2019-12-29 Thread Inada Naoki
Inada Naoki added the comment: Would you benchmark the performance? How about calling Py_INCREF and Py_DECREF in PyObject_RichCompare or do_richcompare? It is safer than checking all caller of the PyObject_RichCompare and PyObject_RichCompareBool. And it would be faster when

[issue39132] Adding funcitonality to determine if a constant string node is triple quoted

2019-12-25 Thread Inada Naoki
Inada Naoki added the comment: I'm not sure the usage should be covered by "Abstract" syntax tree. Isn't it a "Concrete" syntax tree? -- nosy: +inada.naoki ___ Python tracker <https://bug

[issue28158] Implement LOAD_GLOBAL opcode cache

2019-12-25 Thread Inada Naoki
Inada Naoki added the comment: This is implemented in #26219. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue10401] Globals / builtins cache

2019-12-25 Thread Inada Naoki
Inada Naoki added the comment: This is implemented in #26219. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33609] Document that dicts preserve insertion order

2019-12-25 Thread Inada Naoki
Inada Naoki added the comment: GH-9807 fixed it. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-24 Thread Inada Naoki
Inada Naoki added the comment: > I like this idea, but I think that we should at least notify Python-Dev about > all additions to the public C API. If somebody have objections or better > idea, it is better to know earlier. I created a post about this issue in discuss.python.o

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-23 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17140 pull_request: https://github.com/python/cpython/pull/17683 ___ Python tracker <https://bugs.python.org/issue39

[issue39117] Performance regression for making bound methods

2019-12-23 Thread Inada Naoki
Inada Naoki added the comment: Is this regression is large enough to revive the free_list for bound methods? -- ___ Python tracker <https://bugs.python.org/issue39

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-22 Thread Inada Naoki
Inada Naoki added the comment: https://github.com/python/cpython/blob/068768faf6b82478de239d7ab903dfb249ad96a4/Objects/stringlib/join.h#L105-L126 It seems we can release GIL during iterating the buffer array. Even though there is no one big chunk, it would be beneficial if the output size

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

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

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-19 Thread Inada Naoki
Inada Naoki added the comment: > Don't you need to DECREF bytes somehow, at least, in case of failure? Thanks. I will create a pull request with suggested changes. -- ___ Python tracker <https://bugs.python.org/issu

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-19 Thread Inada Naoki
Inada Naoki added the comment: s/return NULL/return -1/g -- ___ Python tracker <https://bugs.python.org/issue39087> ___ ___ Python-bugs-list mailing list Unsub

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-19 Thread Inada Naoki
Inada Naoki added the comment: > Would it be possible to use a "container" object like a Py_buffer? Is there a > way to customize the code executed when a Py_buffer is "released"? It looks nice idea! Py_buffer.obj is decref-ed when releasing the buffer. https

[issue39087] No efficient API to get UTF-8 string from unicode object.

2019-12-18 Thread Inada Naoki
New submission from Inada Naoki : Assume you are writing an extension module that reads string. For example, HTML escape or JSON encode. There are two courses: (a) Support three KINDs in the flexible unicode representation. (b) Get UTF-8 data from the unicode. (a) will be the fastest

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-17 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

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 75bb07e92baa7267a61056d03d7e6b475588e793 by Inada Naoki (Sebastian Berg) in branch 'master': bpo-39028: Performance enhancement in keyword extraction (GH-17576) https://github.com/python/cpython/commit/75bb07e92baa7267a61056d03d7e6b475588e793

Re: Pickle caching objects?

2019-12-16 Thread Inada Naoki
gt; Notice that memory usage increases noticeably specially on files 4 and > 5, the biggest ones, and doesn't come down as I would expect it to. But > the loading time is constant, so I think I can disregard any pickle > caching mechanisms. > > So I guess now my question is: can anyone give me any pointers as to why > is this happening? Any help is appreciated. > > Thanks, > > -- > José María (Chema) Mateos || https://rinzewind.org/ > -- > https://mail.python.org/mailman/listinfo/python-list -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17093 pull_request: https://github.com/python/cpython/pull/17623 ___ Python tracker <https://bugs.python.org/issue39

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17092 pull_request: https://github.com/python/cpython/pull/17622 ___ Python tracker <https://bugs.python.org/issue39

[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki
Inada Naoki added the comment: Many files and directories in the "C:\Developing\Python\Lib" are disappeared. I don't know why. But since you tried clean install, I suppose your antivirus killed Python. -- ___ Python track

[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki
Inada Naoki added the comment: Where did you install the portion? What is in the C:\Developing\Python and C:\Developing\Python\Lib? What happen when you unset both environment variables? Do you use any antivirus software? -- ___ Python tracker

[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki
Inada Naoki added the comment: The most common cause of this error is the PYTHONPATH and PYTHONHOME environment variables. You can see what environment variables are set by the "set" command. -- nosy: +inada.naoki ___ Python track

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset de4481339dec395d70e350aa2e22d7990d2b3635 by Inada Naoki in branch '2.7': bpo-39035: travis: Don't use beta group (GH-17605) https://github.com/python/cpython/commit/de4481339dec395d70e350aa2e22d7990d2b3635

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset be7489cb43e25b6d8bfa077589c18cc0a2367efd by Inada Naoki in branch '3.7': bpo-39035: travis: Don't use beta group (GH-17604) https://github.com/python/cpython/commit/be7489cb43e25b6d8bfa077589c18cc0a2367efd

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5c5d8f63d7d235e557ad20e7d722b22772681759 by Inada Naoki in branch '3.8': bpo-39035: travis: Don't use beta group (GH-17603) https://github.com/python/cpython/commit/5c5d8f63d7d235e557ad20e7d722b22772681759

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17074 pull_request: https://github.com/python/cpython/pull/17605 ___ Python tracker <https://bugs.python.org/issue39

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17073 pull_request: https://github.com/python/cpython/pull/17604 ___ Python tracker <https://bugs.python.org/issue39

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17072 pull_request: https://github.com/python/cpython/pull/17603 ___ Python tracker <https://bugs.python.org/issue39

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 94d2c8df1a7657015a2fcdb4c4d43392f91f8348 by Inada Naoki in branch 'master': bpo-39035: travis: Don't use beta group (GH-17602) https://github.com/python/cpython/commit/94d2c8df1a7657015a2fcdb4c4d43392f91f8348

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-14 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +17071 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17602 ___ Python tracker <https://bugs.python.org/issu

Re: mysqlclient==1.4.6 none wheel doesn't work on ubuntu 18

2019-12-12 Thread Inada Naoki
Regards, -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-12 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue39028> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2019-12-11 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue36054> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29636] Specifying indent in the json.tool command

2019-12-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 15fb7fa88187f5841088721a43609bffe64a8dc7 by Inada Naoki (Daniel Himmelstein) in branch 'master': bpo-29636: json.tool: Add document for indentation options. (GH-17482) https://github.com/python/cpython/commit

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2019-12-05 Thread Inada Naoki
Inada Naoki added the comment: New changeset efefe25443c56988841ab96cdac01352123ba268 by Inada Naoki (wim glenn) in branch 'master': bpo-27413: json.tool: Add --no-ensure-ascii option. (GH-17472) https://github.com/python/cpython/commit/efefe25443c56988841ab96cdac01352123ba268

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

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

[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki
Change by Inada Naoki : -- components: +Library (Lib) -Unicode ___ Python tracker <https://bugs.python.org/issue33684> ___ ___ Python-bugs-list mailing list Unsub

[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset e0f148e6635480521036415bd782c3424fe6c619 by Inada Naoki in branch '3.7': bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460) https://github.com/python/cpython/commit/e0f148e6635480521036415bd782c3424fe6c619

[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +16944 pull_request: https://github.com/python/cpython/pull/17465 ___ Python tracker <https://bugs.python.org/issue33

[issue33684] parse failed for mutibytes characters, encode will show in \xxx

2019-12-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset 808769f3a4cbdc47cf1a5708dd61b1787bb192d4 by Inada Naoki in branch 'master': bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460) https://github.com/python/cpython/commit/808769f3a4cbdc47cf1a5708dd61b1787bb192d4 -- nosy

[issue33684] parse failed for mutibytes characters, encode will show in \xxx

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

[issue29636] Specifying indent in the json.tool command

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

[issue29636] Specifying indent in the json.tool command

2019-12-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 03257949bc02a4afdf2ea1eb07a73f8128129579 by Inada Naoki (Daniel Himmelstein) in branch 'master': bpo-29636: Add --(no-)indent arguments to json.tool (GH-345) https://github.com/python/cpython/commit/03257949bc02a4afdf2ea1eb07a73f8128129579

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Inada Naoki added the comment: > Do we need to explicitly document the return value change of _file which is > documented with a separate versionchanged directive for 3.7 and 3.8? I feel it is too detailed. Note that the _file attribute may be TextIOWrapper after rollover()

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

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

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset e65b3fa9f16537d20f5f37c25673ac899fcd7099 by Inada Naoki in branch '3.7': bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400) https://github.com/python/cpython/commit/e65b3fa9f16537d20f5f37c25673ac899fcd7099

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +16887 pull_request: https://github.com/python/cpython/pull/17407 ___ Python tracker <https://bugs.python.org/issue26

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset ea9835c5d154ab6a54eed627958473b6768b28cc by Inada Naoki in branch 'master': bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400) https://github.com/python/cpython/commit/ea9835c5d154ab6a54eed627958473b6768b28cc

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-26 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +16880 pull_request: https://github.com/python/cpython/pull/17400 ___ Python tracker <https://bugs.python.org/issue26

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-26 Thread Inada Naoki
Inada Naoki added the comment: @Serhiy, would you create a pull request based on your patch? Or may I? @James it doesn't make sense at all. It breaks the file even when only ASCII characters are used. f = SpooledTemporaryFile(mode="w+") f.write("foobar") f.seek(3)

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2019-11-26 Thread Inada Naoki
Inada Naoki added the comment: But poor performance is better than silent data corruption. If we can not fix the rollover right now, stop the spooling is a considerable option for next bugfix release. -- ___ Python tracker <ht

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2019-11-26 Thread Inada Naoki
Inada Naoki added the comment: Creating files is slow on Windows too. But I think we should fix the data corruption ASAP. While Serhiy's patch looks good to me, there is a more quick and safe way to fix the data corruption. Use TemporaryFile at first if it is text mode

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2019-11-26 Thread Inada Naoki
Change by Inada Naoki : -- priority: normal -> critical ___ Python tracker <https://bugs.python.org/issue26730> ___ ___ Python-bugs-list mailing list Un

[issue27145] long_add and long_sub might return a new int where _ints[x] could be returned

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

[issue27145] long_add and long_sub might return a new int where _ints[x] could be returned

2019-11-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset 036fe85bd3e6cd01093d836d71792a1966f961e8 by Inada Naoki (HongWeipeng) in branch 'master': bpo-27145: small_ints[x] could be returned in long_add and long_sub (GH-15716) https://github.com/python/cpython/commit

[issue38328] Speed up the creation time of constant list and set literals.

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

[issue38328] Speed up the creation time of constant list and set literals.

2019-11-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6dd9b64770af8905bef293c81d541eaaf8d8df52 by Inada Naoki (Brandt Bucher) in branch 'master': bpo-38328: Speed up the creation time of constant list and set display. (GH-17114) https://github.com/python/cpython/commit

[issue38625] SpooledTemporaryFile does not seek correctly after being rolled over

2019-11-24 Thread Inada Naoki
Inada Naoki added the comment: SpooledTemporaryFile has very serious bug which causes data corruption (#26730). Please don't use it with text mode until it is fixed. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38866] test_pyclbr replace asyncore

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

[issue37073] clarify functions docs in IO modules and Bytes Objects

2019-11-22 Thread Inada Naoki
Inada Naoki added the comment: > The function actually copies `len` bytes from string v instead of the whole > string. "and length *len*" means it. So it is not a bug. If you want to rewrite it to "the first *len* bytes of", you should remove "and

[issue37073] clarify functions docs in IO modules and Bytes Objects

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

[issue38866] test_pyclbr replace asyncore

2019-11-22 Thread Inada Naoki
Inada Naoki added the comment: New changeset 138e7bbb0a5ed44bdd54605e8c58c8f3d3865321 by Inada Naoki (jacksonriley) in branch 'master': bpo-38866: Remove asyncore from test_pyclbr.py (GH-17316) https://github.com/python/cpython/commit/138e7bbb0a5ed44bdd54605e8c58c8f3d3865321

[issue24084] pstats: sub-millisecond display

2019-11-22 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue24084> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38784] ip_network does not clear/update the broadcast_address cache when network_address is changed.

2019-11-13 Thread Inada Naoki
Inada Naoki added the comment: It is documented, if you read it carefully. "Network objects are hashable, so they can be used as keys in dictionaries." https://docs.python.org/3/library/ipaddress.html#network-objects """ An object is hashable if it has a hash

[issue38784] ip_network does not clear/update the broadcast_address cache when network_address is changed.

2019-11-13 Thread Inada Naoki
Inada Naoki added the comment: All classes in the ipaddress module are designed as immutable. While it is not documented, you can see __hash__ is overridden. It means you must not change the object state. -- assignee: -> docs@python components: +Documentation nosy: +docs@pyt

[issue35856] bundled pip syntaxwarning

2019-11-12 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35856> ___ ___

[issue38613] Optimize some set operations in dictkeys object

2019-11-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6cbc84fb99acb33dd659d7adb29a20adbe62b74a by Inada Naoki in branch 'master': bpo-38613: Optimize set operations of dict keys. (GH-16961) https://github.com/python/cpython/commit/6cbc84fb99acb33dd659d7adb29a20adbe62b74a

[issue38613] Optimize some set operations in dictkeys object

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

[issue38613] Optimize some set operations in dictkeys object

2019-10-30 Thread Inada Naoki
Inada Naoki added the comment: done. -- ___ Python tracker <https://bugs.python.org/issue38613> ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: fileinput

2019-10-29 Thread Inada Naoki
use we have much more sophisticated > > | | | h...@hjp.at | management tools. > > __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/> > > you're right, the log file came from Windows and was encoded in iso-8859-1, > but my question was about the difference in result between reading a file and > reading from stdin. > -- > https://mail.python.org/mailman/listinfo/python-list -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

[issue38613] Optimize some set operations in dictkeys object

2019-10-29 Thread Inada Naoki
Inada Naoki added the comment: > How does it work with dict subclasses? PySet_New(iterable) uses fast path only when `PyDict_CheckExact(iterable)` is true. So there is no change for dict subclasses. -- ___ Python tracker <

[issue38613] Optimize some set operations in dictkeys object

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

[issue38613] Optimize some set operations in dictkeys object

2019-10-28 Thread Inada Naoki
New submission from Inada Naoki : -, |, and ^ of dictkeys are implemented as: PyObject *result = PySet_New(self); // Call set.difference_update, set.update, set.symmetric_difference_update with other. PySet_New(iterable) has optimized step for iterable is dict. But since iterable is dictkeys

[issue38604] Schedule Py_UNICODE API removal

2019-10-28 Thread Inada Naoki
Inada Naoki added the comment: I want to remove them in 3.10 too. If we chose the annual release cycle, I'm OK to postpone the removal to 3.11. FWIW, ujson is apopular extension that uses these APIs. But it is not maintained for a long time, and there are many alternative JSON libraries

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-28 Thread Inada Naoki
Inada Naoki added the comment: > but it's not that simple as the __or__ of dictviews is less strict that the > __or__ of set: __or__ of dictview accept any iterable, __or__ of set only > accepts sets. I want to make it same to set. But it is a backward inc

<    4   5   6   7   8   9   10   11   12   13   >