[issue40416] Calling TextIOWrapper.tell() in the middle of reading a gb2312-encoded file causes UnicodeDecodeError

2020-05-03 Thread Inada Naoki
Inada Naoki added the comment: I think this is not a bug, but a limitation of Python 3.7, and improvement in 3.8. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue40

[issue37626] Documentation:conflict between docs

2020-04-23 Thread Inada Naoki
Inada Naoki added the comment: I don't think they are conflict. "now required to have a valid name." "were allowed to have name set to None [snip] This is no longer permitted." "None" is not "valid name". -- resolution: -> not a bug

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

2020-04-22 Thread Inada Naoki
Inada Naoki added the comment: I close this issue as rejected. If you have opinion about this issue, please post to python-dev mailing list or discuss.python.org. -- resolution: -> rejected stage: -> resolved status: open -> closed _

[issue37846] declare that Text I/O use buffer inside

2020-04-22 Thread Inada Naoki
Inada Naoki added the comment: I still think it's too detailed. Reading C and Python code is much better way to understand such implementation detail. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Pytho

[issue37465] Incorrect documentation for `s#` arguments in C API argument parsing

2020-04-22 Thread Inada Naoki
Inada Naoki added the comment: Fixed via GH-18663. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36299] array: Deprecate 'u' type in array module

2020-04-22 Thread Inada Naoki
Inada Naoki added the comment: While array('u') doesn't use deprecated API with GH-19653, I still don't like 'u' because: * I don't have any reason to use platform dependant wchar_t. [1] * It is not consistent with PEP-3118. [1]: https://mail.python.org/pipermail/python-dev/2019-March

[issue36299] array: Deprecate 'u' type in array module

2020-04-22 Thread Inada Naoki
Inada Naoki added the comment: I closed GH-12497 (Py_UNICODE -> Py_UCS4). I created GH-19653 (Py_UNICODE -> wchar_t) instead. -- ___ Python tracker <https://bugs.python.org/i

[issue36346] Prepare for removing the legacy Unicode C API

2020-04-22 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +18979 pull_request: https://github.com/python/cpython/pull/19653 ___ Python tracker <https://bugs.python.org/issue36

[issue40287] SpooledTemporaryFile.seek returns None

2020-04-17 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

[issue40287] SpooledTemporaryFile.seek returns None

2020-04-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 485e715cb1ff92bc9882cd51ec32589f9cb30503 by Inada Naoki in branch 'master': bpo-40287: Fix SpooledTemporaryFile.seek() return value (GH-19540) https://github.com/python/cpython/commit/485e715cb1ff92bc9882cd51ec32589f9cb30503

[issue40287] SpooledTemporaryFile.seek returns None

2020-04-15 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch nosy: +inada.naoki nosy_count: 1.0 -> 2.0 pull_requests: +1 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19540 ___ Python tracker <https://bugs.python.org/i

[issue39943] Meta: Clean up various issues in C internals

2020-03-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset 62d21c9d900664b2ca30c2d7edd80b6628abdf62 by Andy Lester in branch 'master': bpo-39943: Properly const the pointers in dictkeys_get_index (GH-19170) https://github.com/python/cpython/commit/62d21c9d900664b2ca30c2d7edd80b6628abdf62 -- nosy

[issue39957] bpo39775 not fixed - inspect.Signature.parameters still dict/mappingproxy around dict

2020-03-17 Thread Inada Naoki
Inada Naoki added the comment: New changeset 611836a69a7a98bb106b4d315ed76a1e17266f4f by Jens Reidel in branch 'master': bpo-39957: Change Signature.parameters to OrderedDict (GH-18988) https://github.com/python/cpython/commit/611836a69a7a98bb106b4d315ed76a1e17266f4f

[issue39957] bpo39775 not fixed - inspect.Signature.parameters still dict/mappingproxy around dict

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

[issue39974] A race condition with GIL releasing exists in stringlib_bytes_join

2020-03-16 Thread Inada Naoki
Change by Inada Naoki : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39974> ___ ___ Python-bugs-list

[issue39974] A race condition with GIL releasing exists in stringlib_bytes_join

2020-03-16 Thread Inada Naoki
Inada Naoki added the comment: > > > > perhaps add an if to check if the backing object is really mutable ? > (Py_buffer.readonly) > > Py_buffer.readonly doesn't mean immutable. You can create read only buffer from bytearray too. Current logic uses PyBytes_CheckExact.

[issue39974] A race condition with GIL releasing exists in stringlib_bytes_join

2020-03-16 Thread Inada Naoki
Inada Naoki added the comment: static_buffers is not a static variable. It is auto local variable. So I think other thread don't hijack it. -- ___ Python tracker <https://bugs.python.org/issue39

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

2020-03-14 Thread Inada Naoki
Change by Inada Naoki : -- 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.

2020-03-14 Thread Inada Naoki
Inada Naoki added the comment: New changeset 3a8c56295d6272ad2177d2de8af4c3f824f3ef92 by Inada Naoki in branch 'master': Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer()" (GH-18985) https://github.com/python/cpython/commit/3a8c56295d6272ad2177d2de8af4c3

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

2020-03-13 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +18333 pull_request: https://github.com/python/cpython/pull/18985 ___ Python tracker <https://bugs.python.org/issue39

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

2020-03-13 Thread Inada Naoki
Inada Naoki added the comment: I'm sorry about merging PR 18327, but I can not find enough usage example of the _PyUnicode_GetUTF8Buffer. PyUnicode_AsUTF8AndSize is optimized, and utf8_cache is not so bad in most case. So _PyUnicode_GetUTF8Buffer seems not worth enough. I will revert PR

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

2020-03-13 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +18332 pull_request: https://github.com/python/cpython/pull/18984 ___ Python tracker <https://bugs.python.org/issue39

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

2020-03-13 Thread Inada Naoki
Inada Naoki added the comment: New changeset c7ad974d341d3edb6b9d2a2dcae4d3d4794ada6b by Inada Naoki in branch 'master': bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659) https://github.com/python/cpython/commit/c7ad974d341d3edb6b9d2a2dcae4d3d4794ada6b

[issue39957] bpo39775 not fixed - inspect.Signature.parameters still dict/mappingproxy around dict

2020-03-13 Thread Inada Naoki
Inada Naoki added the comment: Would you create a pull request? -- ___ Python tracker <https://bugs.python.org/issue39957> ___ ___ Python-bugs-list mailin

[issue39863] Add trimend option to readline() and readlines()

2020-03-05 Thread Inada Naoki
Inada Naoki added the comment: > It would be better to name it keepends and set it True by default. .readline() returns only one line. Should we use plural form for consistency? > It is also not good for file-like classes which do not inherit IOBase, but > implement a part of met

[issue39863] Add trimend option to readline() and readlines()

2020-03-05 Thread Inada Naoki
New submission from Inada Naoki : str.splitlines() has `keepends` option. Like that, `IOBase.readline([trimend=False])` and `IOBase.readlines([trimends=False])` would be useful. -- components: IO messages: 363430 nosy: inada.naoki priority: normal severity: normal status: open title

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

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

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-03-02 Thread Inada Naoki
Inada Naoki added the comment: New changeset 211055176157545ce98e6c02b09d624719e6dd30 by Inada Naoki in branch 'master': bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684) https://github.com/python/cpython/commit/211055176157545ce98e6c02b09d624719e6dd30

[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

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

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-02-27 Thread Inada Naoki
Inada Naoki added the comment: Would you review the PR 18684? -- ___ Python tracker <https://bugs.python.org/issue39775> ___ ___ Python-bugs-list mailin

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

2020-02-27 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +18044 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18684 ___ Python tracker <https://bugs.python.org/issu

[issue39775] inspect.Signature.parameters should be an OrderedDict, not a plain dict

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

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

2020-02-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 02a4d57263a9846de35b0db12763ff9e7326f62c by Inada Naoki in branch 'master': bpo-39087: Optimize PyUnicode_AsUTF8AndSize() (GH-18327) https://github.com/python/cpython/commit/02a4d57263a9846de35b0db12763ff9e7326f62c

[issue35950] io.BufferedReader.writabe is False, but io.BufferedReader.truncate does not raise OSError

2020-02-21 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

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread Inada Naoki
Inada Naoki added the comment: https://github.com/python/cpython/blob/95905ce0f41fd42eb1ef60ddb83f057401c3d52f/Include/cpython/objimpl.h#L89 _Py_AS_GC and all APIs to get PyGC_Head from PyObject* are not only unstable, but also private. I thought PyGC_Head must not be used directly from

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

2020-02-03 Thread Inada Naoki
Inada Naoki added the comment: Attached patch is the benchmark function I used in previous post. -- Added file: https://bugs.python.org/file48879/bench-asutf8.patch ___ Python tracker <https://bugs.python.org/issue39

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

2020-02-03 Thread Inada Naoki
Inada Naoki added the comment: I am still not sure about we should add new API only for avoiding cache. * PyUnicode_AsUTF8String : When we need bytes or want to avoid cache. * PyUnicode_AsUTF8AndSize : When we need C string, and cache is acceptable. With PR-18327, PyUnicode_AsUTF8AndSize

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

2020-02-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17701 pull_request: https://github.com/python/cpython/pull/18327 ___ Python tracker <https://bugs.python.org/issue39

[issue17659] no way to determine First weekday (based on locale)

2020-02-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17700 pull_request: https://github.com/python/cpython/pull/18327 ___ Python tracker <https://bugs.python.org/issue17

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

2020-02-03 Thread Inada Naoki
Change by Inada Naoki : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36051> ___ ___ Pyth

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

2020-02-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 869c0c99b94ff9527acc1ca060164ab3d1bdcc53 by Inada Naoki in branch 'master': bpo-36051: Fix compiler warning. (GH-18325) https://github.com/python/cpython/commit/869c0c99b94ff9527acc1ca060164ab3d1bdcc53

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

2020-02-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17698 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18325 ___ Python tracker <https://bugs.python.org/issu

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

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

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

2020-01-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset d07d9f4c43bc85a77021bcc7d77643f8ebb605cf by Bruce Merry in branch 'master': bpo-36051: Drop GIL during large bytes.join() (GH-17757) https://github.com/python/cpython/commit/d07d9f4c43bc85a77021bcc7d77643f8ebb605cf

[issue36350] inspect.Signature.parameters and inspect.BoundArguments.arguments should be dicts instead of OrderedDicts

2020-01-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2cca8efe46935c39c445f585bce54954fad2485b by Inada Naoki (Rémi Lapeyre) in branch 'master': bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412) https://github.com/python/cpython/commit/2cca8efe46935c39c445f585bce54954fad2485b

[issue36350] inspect.Signature.parameters and inspect.BoundArguments.arguments should be dicts instead of OrderedDicts

2020-01-28 Thread Inada Naoki
Change by Inada Naoki : -- nosy: -inada.naoki resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.or

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

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

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

2020-01-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset 148610d88a2785751ed435a4e60f07a9f1bc50a6 by Inada Naoki in branch 'master': bpo-39287: Doc: Add UTF-8 mode section in using/windows. (GH-17935) https://github.com/python/cpython/commit/148610d88a2785751ed435a4e60f07a9f1bc50a6

[issue39380] ftplib uses latin-1 as default encoding

2020-01-26 Thread Inada Naoki
Inada Naoki added the comment: I'm not FTP user so I don't have strong opinion. If it is too late to change already, change it in 3.9 might be OK. > However, shouldn't it be a FutureWarning, so it will be reported by default > at initialisation? If it is warning for end users, it

[issue39380] ftplib uses latin-1 as default encoding

2020-01-24 Thread Inada Naoki
Inada Naoki added the comment: Can we have some deprecation period? def __init__(self, ..., encoding=None): ... if encoding is not None: self.encoding = encoding else: warnings.warn("The default encoding of the FTP class will be changed from 'latin1' to '

[issue39397] Mac : fail to launch Python 3.8

2020-01-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39397> ___ ___

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue39377> ___ ___ Python-bugs-list

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-22 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402 by Inada Naoki in branch 'master': bpo-39377: json: Update doc about the encoding option. (GH-18076) https://github.com/python/cpython/commit/5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402

[issue39397] Mac : fail to launch Python 3.8

2020-01-21 Thread Inada Naoki
Inada Naoki added the comment: > doing env I get this (no LC_ALL ) [snip] > LC_CTYPE=en_US This is wrong setting. Find where this environment variable is set and remove it. -- ___ Python tracker <https://bugs.python.org/i

[issue39397] Mac : fail to launch Python 3.8

2020-01-20 Thread Inada Naoki
Inada Naoki added the comment: Try `locale` command. What is shown? -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue39397> ___ ___ Pytho

[issue29258] __init__.py required for pkgutil.walk_packages in python3

2020-01-20 Thread Inada Naoki
Inada Naoki added the comment: I am totally agree with Wolfgang: > they make it impossible to know whether a directory found on the filesystem > is *intended* as a Python package or not. I think we shouldn't treat normal directory as namespace package until some portion in the dir

[issue29258] __init__.py required for pkgutil.walk_packages in python3

2020-01-20 Thread Inada Naoki
Change by Inada Naoki : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python resolution: rejected -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.8, Python 3.9 -Python 3.5

[issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py

2020-01-20 Thread Inada Naoki
Inada Naoki added the comment: I think it is just a noise for the tutorial readers. I created a post about misunderstanding of PEP 420. https://dev.to/methane/don-t-omit-init-py-3hga How about adding note in top of the PEP 420 instead? .. note:: Namespace packages are not regular

[issue29258] __init__.py required for pkgutil.walk_packages in python3

2020-01-20 Thread Inada Naoki
Inada Naoki added the comment: > PEP420 makes __init__.py files optional This is almost wrong. PEP 420 added a new way for "namespace pacakge." PEP 420 doesn't make empty __init__.py file in regular package. (See https://dev.to/methane/don-t-omit-init-py-3hga)

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki
Inada Naoki added the comment: If this broke some real-world software and the pain is high enough, we can revert the change and add one more deprecation period, like all other removals. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17469 pull_request: https://github.com/python/cpython/pull/18076 ___ Python tracker <https://bugs.python.org/issue39

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

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

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-19 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5492bfcefec67b016e8239c0e9135bc2f03e3058 by Inada Naoki in branch 'master': bpo-39377: json: Remove the encoding option. (GH-18075) https://github.com/python/cpython/commit/5492bfcefec67b016e8239c0e9135bc2f03e3058

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

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

[issue38536] Trailing space in formatted currency with international=True and symbol following value

2020-01-19 Thread Inada Naoki
Inada Naoki added the comment: I'm not sure this fix should be backported. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.or

[issue38536] Trailing space in formatted currency with international=True and symbol following value

2020-01-19 Thread Inada Naoki
Inada Naoki added the comment: New changeset e96d954527aa376457451e32a9d75ae3ea9ab4bd by Inada Naoki in branch 'master': bpo-38536: locale: Remove trailing space in formatted currency (GH-16864) https://github.com/python/cpython/commit/e96d954527aa376457451e32a9d75ae3ea9ab4bd

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-17 Thread Inada Naoki
Inada Naoki added the comment: > Ironically, to let people prototype better, more efficient ways to deal with > namespace access, it should be possible to override an object used as a > namespace. You can benchmark your prototype namespace object by regular Python code:

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-17 Thread Inada Naoki
Inada Naoki added the comment: This is duplicate of #1402289, which was rejected. I agree with Victor. Python should be free to optimize namespace access. Namespace access is an implementation detail and user should not assume such "consistency" here. It is like this: x = 10

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Inada Naoki
Change by Inada Naoki : -- superseder: -> Allow mappings as globals (was: Fix dictionary subclass ...) ___ Python tracker <https://bugs.python.org/issu

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

2020-01-14 Thread Inada Naoki
Inada Naoki added the comment: Uh, my understanding "But ProcessPoolExecutor starts worker processes on demand from old." was wrong. I think this should be fixed like ThreadPoolExecutor. -- ___ Python tracker <https://bugs.python.o

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

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

[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

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