[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 9dfefbe3e2dc548ad306870b56cc0cb475aa20a2 by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in `pydoc`. (GH-25644) https://github.com/python/cpython/commit/9dfefbe3e2dc548ad306870b56cc0c

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24338 pull_request: https://github.com/python/cpython/pull/25645 ___ Python tracker <https://bugs.python.org/issue43

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset cfe523b49280cdc8c239c807121ad3f33552f638 by Inada Naoki in branch 'master': bpo-43651: PEP 597: Fix `socket.makefile()` (GH-25645) https://github.com/python/cpython/commit/cfe523b49280cdc8c239c807121ad3

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24339 pull_request: https://github.com/python/cpython/pull/25648 ___ Python tracker <https://bugs.python.org/issue43

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24341 pull_request: https://github.com/python/cpython/pull/25650 ___ Python tracker <https://bugs.python.org/issue43

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset caae717c2903fff4704b59714bc0c65d60108321 by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in zipfile (GH-25650) https://github.com/python/cpython/commit/caae717c2903fff4704b59714bc0c6

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-26 Thread Inada Naoki
Inada Naoki added the comment: New changeset 878bc8b6c2051cf344c594636fa957ce6c9d2188 by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in fileinput and its test (GH-25648) https://github.com/python/cpython/commit/878bc8b6c2051cf344c594636fa957

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24345 pull_request: https://github.com/python/cpython/pull/25654 ___ Python tracker <https://bugs.python.org/issue43

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24346 pull_request: https://github.com/python/cpython/pull/25655 ___ Python tracker <https://bugs.python.org/issue43

[issue43954] Possible missing word on unittest doc

2021-04-27 Thread Inada Naoki
Inada Naoki added the comment: namespace package support is broken since Python 3.7. See https://bugs.python.org/issue23882#msg387549 We can not use namespace package even if top level directory is specified. -- ___ Python tracker <ht

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5c84bb506aaca01f5f750116d8f7a41d41f8124d by Inada Naoki in branch 'master': bpo-37751: Update `codecs.register()` doc. (GH-25643) https://github.com/python/cpython/commit/5c84bb506aaca01f5f750116d8f7a4

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset cf9d65c5af7905d9e9945a297dbbf15d3bcace15 by Miss Islington (bot) in branch '3.9': bpo-37751: Update `codecs.register()` doc. (GH-25643) https://github.com/python/cpython/commit/cf9d65c5af7905d9e9945a297dbbf1

[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Inada Naoki
Inada Naoki added the comment: I propose to remove the namespace package support entirely. * No user (since it has been broken from Python 3.7) * Hard to maintain (we haven't noted it) * Hard to explain (need to specify the top directory. don't search recursively. See

[issue24275] lookdict_* give up too soon

2021-04-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset 8557edbfa8f74514de82feea4c62f5963e4e0aa7 by Hristo Venev in branch 'master': bpo-24275: Don't downgrade unicode-only dicts to mixed on lookups (GH-25186) https://github.com/python/cpython/commit/8557edbfa8f74514de82feea4

[issue24275] lookdict_* give up too soon

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

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset fa51c0c448aca9fe5d4e8bc02e71de528931778b by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in tests. (GH-25655) https://github.com/python/cpython/commit/fa51c0c448aca9fe5d4e8bc02e71de

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset a69256527f93d2aa32e76658deab829e324d97b6 by Inada Naoki in branch 'master': bpo-43651: Fix EncodingWarning in `os.fdopen()` and test_os (GH-25654) https://github.com/python/cpython/commit/a69256527f93d2aa32e76658deab82

[issue41139] cgi uses the locale encoding for log files

2021-04-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f by Inada Naoki in branch 'master': bpo-41139: Deprecate `cgi.log()` (GH-25625) https://github.com/python/cpython/commit/e52ab42cedd2a5ef4c3c1a47d0cf96

[issue41139] cgi uses the locale encoding for log files

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

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-29 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24405 pull_request: https://github.com/python/cpython/pull/25715 ___ Python tracker <https://bugs.python.org/issue43

[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-29 Thread Inada Naoki
Inada Naoki added the comment: New changeset 53dd6c99b39d90935c00bc1558582e494641248e by Inada Naoki in branch 'master': bpo-43651: Fix test_logging (GH-25715) https://github.com/python/cpython/commit/53dd6c99b39d90935c00bc1558582e

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-30 Thread Inada Naoki
Inada Naoki added the comment: +1 to Eryk. > Hence my newbie questions are: 1) What problem are you trying to solve by this "unlinking trick"? Same to TempoaryFile in Unix. 2) Do we need to have a separate issue raised for this problem? I don't think so. We didn't u

[issue43733] PEP 597: netrc uses locale encoding.

2021-05-01 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +24472 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25781 ___ Python tracker <https://bugs.python.org/issu

[issue43733] PEP 597: netrc uses locale encoding.

2021-05-01 Thread Inada Naoki
Inada Naoki added the comment: New changeset fd0bc7e7f4f2c7de98a1ebc7ad1ef65b8f8f7ad6 by Inada Naoki in branch 'master': bpo-43733: netrc try to use UTF-8 before using locale encoding. (GH-25781) https://github.com/python/cpython/commit/fd0bc7e7f4f2c7de98a1ebc7ad1ef6

[issue43733] PEP 597: netrc uses locale encoding.

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

[issue44029] PEP 624: Remove Py_UNICODE APIs

2021-05-04 Thread Inada Naoki
New submission from Inada Naoki : Ref: https://www.python.org/dev/peps/pep-0624/ -- components: C API messages: 392862 nosy: methane priority: normal severity: normal status: open title: PEP 624: Remove Py_UNICODE APIs versions: Python 3.11

[issue44029] PEP 624: Remove Py_UNICODE APIs

2021-05-04 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +24556 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25881 ___ Python tracker <https://bugs.python.org/issu

[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

2021-05-06 Thread Inada Naoki
Inada Naoki added the comment: There is a still warning, not error. https://github.com/python/cpython/blob/985ac016373403e8ad41f8d563c4355ffa8d49ff/Python/getargs.c#L2535-L2542 -- resolution: fixed -> status: closed -> open ___ Python t

[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

2021-05-06 Thread Inada Naoki
Inada Naoki added the comment: >Why PR 20784 has been merged? Was not the plan to emit a deprecation warning >first? We had been emitted DeprecationWarning since Python 3.8. See GH-12473. GH-20784 changed the DeprecationWarning to Syste

[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

2021-05-06 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24605 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/25937 ___ Python tracker <https://bugs.python.org/issu

[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

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

[issue44029] PEP 624: Remove Py_UNICODE APIs

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

[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2021-05-09 Thread Inada Naoki
Inada Naoki added the comment: For the record, I noticed PyUnicode_InternImmortal() is a stable ABI. We may need to keep the function to avoid dynamic link errors. But we can still change its implementation to just raise an exception

[issue44094] Remove PyErr_Set...WithUnicodeFilename APIs

2021-05-09 Thread Inada Naoki
New submission from Inada Naoki : These APIs are deprecated since Python 3.3. They are not documented too. ``` #ifdef MS_WINDOWS Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( PyObject *, const Py_UNICODE *); /* XXX redeclare to use WSTRING

[issue44094] Remove PyErr_Set...WithUnicodeFilename APIs

2021-05-09 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +24661 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26011 ___ Python tracker <https://bugs.python.org/issu

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24739 pull_request: https://github.com/python/cpython/pull/26098 ___ Python tracker <https://bugs.python.org/issue44

[issue44117] [C API] Remove deprecated PyEval_InitThreads()

2021-05-13 Thread Inada Naoki
Inada Naoki added the comment: It seems they are stable ABI. https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L604 https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L614 We may need to keep

[issue44214] PyArg_Parse* for vectorcall?

2021-05-24 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue44214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5758] fileinput.hook_compressed returning bytes from gz file

2021-05-24 Thread Inada Naoki
Inada Naoki added the comment: > I'm struggling with how to adapt the code to provide a uniform interface on > Python 3.6+. It's easy. Just passing `mode="rb"`. ``` FileInput(filelist, mode="rb", openhook=fileinput.hook_compressed) ``` This is be

[issue44206] Add a version number to dict keys.

2021-05-25 Thread Inada Naoki
Inada Naoki added the comment: For class dict, there is a method cache. For instance dict, there is a LOAD_ATTR optimization. https://github.com/python/cpython/blob/b11a951f16f0603d98de24fee5c023df83ea552c/Python/ceval.c#L3458 So I want to see the performance gain of the optimization using

[issue5758] fileinput.hook_compressed returning bytes from gz file

2021-05-25 Thread Inada Naoki
Inada Naoki added the comment: > I did consider and confirm that mode="rb" does also provide a uniform > solution, but it also regresses the behavior of uncompressed inputs, making > them bytes where they were text. Of course, I suggested to use "rb" when yo

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-26 Thread Inada Naoki
Inada Naoki added the comment: > What about normal sets? pyc files don't contain a regular set. So it is out of scope of this issue. -- nosy: +methane ___ Python tracker <https://bugs.python.org

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-05-26 Thread Inada Naoki
Inada Naoki added the comment: > If that's the case, then the argument Raymond provided against preserving > order does not seem that relevant, as we would only need to preserve the > order in the creation operation. Note that PYC files are marshalled from code objects inclu

[issue44256] _functools._lru_list_elem is exposed unintentionally.

2021-05-27 Thread Inada Naoki
New submission from Inada Naoki : _lru_list_elem is internal data strucuture. It is intended to be used only in _lru_cache_wrapper. Until Python 3.9, it is not exposed. But it is exposed by dd3912 accidentally. -- components: Extension Modules keywords: 3.10regression messages: 394626

[issue44256] _functools._lru_list_elem is exposed unintentionally.

2021-05-27 Thread Inada Naoki
Inada Naoki added the comment: Ref: GH-23405. -- ___ Python tracker <https://bugs.python.org/issue44256> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44256] _functools._lru_list_elem is exposed unintentionally.

2021-05-27 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +25010 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26416 ___ Python tracker <https://bugs.python.org/issu

[issue44256] _functools._lru_list_elem is exposed unintentionally.

2021-05-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset 28be3191a9db2769ed05e55c6bcbccdd029656dd by Inada Naoki in branch 'main': bpo-44256: Do not expose _functools._list_elem_type (GH-26416) https://github.com/python/cpython/commit/28be3191a9db2769ed05e55c6bcbcc

[issue44256] _functools._lru_list_elem is exposed unintentionally.

2021-05-28 Thread Inada Naoki
Inada Naoki added the comment: New changeset 35be1f3602c8c66199d8c0a2f2805115864235fb by Miss Islington (bot) in branch '3.10': bpo-44256: Do not expose _functools._list_elem_type (GH-26416) https://github.com/python/cpython/commit/35be1f3602c8c66199d8c0a2f28051

[issue44256] _functools._lru_list_elem is exposed unintentionally.

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

[issue44206] Add a version number to dict keys.

2021-05-30 Thread Inada Naoki
Inada Naoki added the comment: Can we close this issue? -- ___ Python tracker <https://bugs.python.org/issue44206> ___ ___ Python-bugs-list mailing list Unsub

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki
Inada Naoki added the comment: Do you use PowerShell? Please run this command and paste the output. ``` PS> $OutputEncoding PS> [System.Console]::OutputEncoding ``` -- nosy: +methane ___ Python tracker <https://bugs.python.org/i

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki
Inada Naoki added the comment: > In Windows, pydoc uses the old "more.com" pager with a temporary file that's > encoded with the default encoding, which is the process active codepage (i.e. > "ansi" or "mbcs"), unless UTF-8 mode is enabled. The

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki
Inada Naoki added the comment: I confirmed this fixes the mojibake: ``` PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8") PS > [System.Console]::OutputEncoding = $OutputEncoding PS > [System.Console]::InputEncodin

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Inada Naoki
Inada Naoki added the comment: >> PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8") > FYI, $OutputEncoding in PowerShell has nothing to do with the python.exe and > more.com processes, nor the console session to which they're atta

[issue41165] [Python 3.10] Remove APIs deprecated long enough

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

[issue44487] Regression in pathlib.path.read_text

2021-06-22 Thread Inada Naoki
Inada Naoki added the comment: Please write a link to the original issue next time. https://github.com/mesonbuild/meson/issues/8916 -- ___ Python tracker <https://bugs.python.org/issue44

[issue44487] Regression in pathlib.path.read_text

2021-06-22 Thread Inada Naoki
Inada Naoki added the comment: Another upstream issue: https://github.com/mesonbuild/meson/issues/8263 -- ___ Python tracker <https://bugs.python.org/issue44

[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread Inada Naoki
Inada Naoki added the comment: Because this is SSL issue. HTTPS is not the only user of SSL. So we should try to fix SSL issue before reverting GH-12698. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread Inada Naoki
Inada Naoki added the comment: I see. But Python 3.8 is now security fix mode. Let's revert the optimization in the 3.9 branch. -- ___ Python tracker <https://bugs.python.org/is

[issue44555] Dictionary operations are LINEAR for any dictionary (for a particular code).

2021-07-03 Thread Inada Naoki
Inada Naoki added the comment: Can https://bugs.python.org/issue32623 be a fix (or mitigation) of this issue? -- ___ Python tracker <https://bugs.python.org/issue44

[issue44555] Dictionary operations are LINEAR for any dictionary (for a particular code).

2021-07-05 Thread Inada Naoki
Inada Naoki added the comment: iterating whole over the dict is O(n) where n is the historical max size of the dict. On the other hand, there are no guarantee about `next(iter(d))` is O(1). The guarantee is O(n) at worst case. And your example is the worst case. So this is not a bug. As

[issue41137] pdb uses the locale encoding for .pdbrc

2021-07-08 Thread Inada Naoki
Inada Naoki added the comment: New changeset 58248d94379b202ccce3e45b1d1830ca47683273 by Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) in branch 'main': bpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263) https://github.com/python/cpyt

[issue41137] pdb uses the locale encoding for .pdbrc

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

[issue44586] unittest requires __init__.py for test discovery

2021-07-08 Thread Inada Naoki
Inada Naoki added the comment: And https://dev.to/methane/don-t-omit-init-py-3hga too. -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue44

[issue44555] Dictionary operations are LINEAR for any dictionary (for a particular code).

2021-07-08 Thread Inada Naoki
Inada Naoki added the comment: There is a macro benchmark we regularly used. https://pyperformance.readthedocs.io/ You can try micro benchmark for most common use cases with pyperf like this: ``` $ pyperf timeit -s "def f(**kwargs): pass" -- "f(a=1,b=2,c=3)" Mean +- std

[issue38278] Need a more efficient way to perform dict.get(key, default)

2021-07-13 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue38278> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-07-27 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +25938 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27405 ___ Python tracker <https://bugs.python.org/issu

[issue36050] Why does http.client.HTTPResponse._safe_read use MAXAMOUNT

2021-07-28 Thread Inada Naoki
Inada Naoki added the comment: Note that it was reverted only in 3.9 branch. -- ___ Python tracker <https://bugs.python.org/issue36050> ___ ___ Python-bug

[issue44749] LOAD_NAME not using PyObject_GetItem when globals() is a dict subclass

2021-07-28 Thread Inada Naoki
Inada Naoki added the comment: Is this issue duplicate of https://bugs.python.org/issue32615 and https://bugs.python.org/issue1402289 ? -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue44

[issue41103] Removing old buffer support

2021-07-28 Thread Inada Naoki
Inada Naoki added the comment: Oh, I didn't notice that APIs deprecated in Python 3.0 are included in stable ABIs defined at Python 3.2! -- ___ Python tracker <https://bugs.python.org/is

[issue41103] Removing old buffer support

2021-07-29 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +25967 pull_request: https://github.com/python/cpython/pull/27437 ___ Python tracker <https://bugs.python.org/issue41

[issue44609] Buffer support in the stable ABI

2021-07-29 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue44609> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25702] Link Time Optimizations support for GCC and CLANG

2021-07-29 Thread Inada Naoki
Change by Inada Naoki : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue25702> ___ ___ Pyth

[issue41103] Removing old buffer support

2021-07-29 Thread Inada Naoki
Change by Inada Naoki : -- resolution: fixed -> stage: resolved -> status: closed -> open versions: +Python 3.11 ___ Python tracker <https://bugs.python.or

[issue41103] Removing old buffer support

2021-07-29 Thread Inada Naoki
Inada Naoki added the comment: Should I resurrect only function implementation and symbol? Or may I resurrect definitions in header files too? -- ___ Python tracker <https://bugs.python.org/issue41

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-27 Thread Inada Naoki
Inada Naoki added the comment: I'd like to remove docstring from code object at all. func.__doc__ can be set by MAKE_FUNCTION or STORE_ATTR. Pros are: * Code objects can be bit smaller than adding co_doc. * Many code objects don't have docstrings. (e.g. lambdas, somprehensions

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-28 Thread Inada Naoki
Inada Naoki added the comment: > You'd just be moving the problem though -- the docstring would have be > included in the co_consts array of the surrounding code object instead of the > function object. As far as I know, surrounding code objects (e.g. global, class body) wi

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-28 Thread Inada Naoki
Inada Naoki added the comment: > This would actually make it harder to strip docstrings e.g. during > unmarshalling, since you don't know which constants refer to docstrings. We can not strip class docstring anyway. One idea to strip docstring during startup: Add new opcode only

[issue45020] Freeze all modules imported during startup.

2021-08-28 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue45020> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-28 Thread Inada Naoki
Inada Naoki added the comment: > Why all the hating on docstrings? What have docstrings done wrong? Oh, I don't hate docstrings. I just want to move it from code object to function object. Remove docstring during unmarshal is your idea, not mine. My main motivation is reducing c

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-28 Thread Inada Naoki
Inada Naoki added the comment: > If docstring is not in co_consts, all co_consts are empty tuple. The empty > tuple is nearly zero-cost because its a singleton. My wrong. Two setters will have `(None,)` tuple. But such tuple can be merged at compile time for now. And "commo

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-29 Thread Inada Naoki
Inada Naoki added the comment: > I think that would require a change in the signature of PyFunction_New. I don't think so. For example, func_annotation don't require changing PyFunction_New(). ``` case TARGET(MAKE_FUNCTION): { PyObject *

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-30 Thread Inada Naoki
Inada Naoki added the comment: I grepped top 5000 downloaded packages and I can not find any real use of PyFunction_New(WithQualName). So I don't know what is current workflow of PyFunction_New. My current wip implementation adds new API (e.g. PyFunction_NewWithDoc()). Old API keep

[issue45056] compiler: Unnecessary None in co_consts

2021-08-30 Thread Inada Naoki
New submission from Inada Naoki : Python 3.10 compiler adds None to co_consts even when None is not used at all. ``` $ cat x1.py def foo(): "docstring" return 42 import dis dis.dis(foo) print(foo.__code__.co_consts) $ python3.9 x1.py 3 0 LOAD_CONST

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-30 Thread Inada Naoki
Inada Naoki added the comment: This is WIP pull request. https://github.com/methane/cpython/pull/35 Some tests are failing because of bpo-36521. -- ___ Python tracker <https://bugs.python.org/issue36

[issue45056] compiler: Unnecessary None in co_consts

2021-08-30 Thread Inada Naoki
Inada Naoki added the comment: I think LOAD_CONST None + RETURN_VALUE is added here. And it removed by optimize_cfg(). https://github.com/python/cpython/blob/793f55bde9b0299100c12ddb0e6949c6eb4d85e5/Python/compile.c#L7795-L7797 I don't know how easy to remove this unnecessary None

[issue45020] Freeze all modules imported during startup.

2021-08-31 Thread Inada Naoki
Inada Naoki added the comment: I don't want all frozen header files to be committed in git repository. Can't we just build them during build process? -- ___ Python tracker <https://bugs.python.o

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Inada Naoki added the comment: I found anther example for unused constants. The `readall()` function. https://github.com/python/cpython/blob/863154c9292e70c5a8a1a3f22ef4ee42e2304281/Lib/_pyio.py#L663-L675 Python 3.9.5: co_consts = ('Read until EOF, using multiple read() call.', No

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +26551 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28109 ___ Python tracker <https://bugs.python.org/issu

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Inada Naoki added the comment: @Pablo This issue seems an optimization rather than bugfix. But since Python 3.10 produces more unused constants than 3.9, this is a regression. GH-28109 removes not all unused constants, but only trailing unused constants. I think it is enough to fix the

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50252/dump_unused_consts.py ___ Python tracker <https://bugs.python.org/issue45056> ___ ___ Python-bug

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50253/unused_39.txt ___ Python tracker <https://bugs.python.org/issue45056> ___ ___ Python-bugs-list m

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50254/unused_310rc1.txt ___ Python tracker <https://bugs.python.org/issue45056> ___ ___ Python-bugs-list m

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50255/unused_trimmed.txt ___ Python tracker <https://bugs.python.org/issue45056> ___ ___ Python-bug

[issue45082] ctypes: Deprecate c_buffer() alias to create_string_buffer()

2021-09-02 Thread Inada Naoki
Inada Naoki added the comment: I'm +0 to this. Since this alias is not a big maintenance burden, I think we can use deprecation period longer than minimum 2 releases. In sdist files of the top5000 pypi packages, I found 18 packages using it including false positive (e.g. mypi just ha

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-03 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +26577 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28138 ___ Python tracker <https://bugs.python.org/issu

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-03 Thread Inada Naoki
Inada Naoki added the comment: > I am still not convinced that it's a good idea to put the docstring in the > surrounding code object. I'd like to be able to see it when I introspect a > code object, not just when introspecting a function object (I may be > analyzi

[issue45106] Issue formating for log on Linux machines

2021-09-06 Thread Inada Naoki
Inada Naoki added the comment: It is fixed in Python 3.9. * https://github.com/python/cpython/pull/14008 * https://bugs.python.org/issue37111 Python 3.8 is "security" status for now. Non-security issues won't be fixed. Please migrate to Python 3.9. -- nosy: +met

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2021-09-10 Thread Inada Naoki
Inada Naoki added the comment: I think pydantic approach is the best practice. See https://pydantic-docs.helpmanual.io/usage/postponed_annotations/ -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue39

[issue45186] Marshal output isn't completely deterministic.

2021-09-16 Thread Inada Naoki
Inada Naoki added the comment: FYI, This issue is duplicate of https://bugs.python.org/issue34093, and I had made two pull requests to solve the issue. -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue45

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