[issue46236] PyFunction_GetAnnotations returning Tuple vs Dict

2022-01-04 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +28615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30409 ___ Python tracker <https://bugs.python.org/issu

Re: How to implement freelists in dict 3.10 for previous versions?

2021-12-29 Thread Inada Naoki
nsion module will work well in Python 3.11. > I would implement it also for a C extension that uses CPython < 3.10. > How can I achieve this? See PyModule_GetState() to have per-interpreter module state instead of static variables. https://docs.python.org/3/c-api/module.html#c.PyModule_GetSt

Re: What's the public API alternative to _PyObject_GC_IS_TRACKED()?

2021-12-28 Thread Inada Naoki
ovements. If Python changed its GC to mark-and-sweep, PyObject_GC_IsTracked() can return true always. Regards, -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

Re: Option for venv to upgrade pip automatically?

2021-12-28 Thread Inada Naoki
U pip > > Can't venv have an option for doing this automatically or, better, a > config file where you can put commands that will be launched every > time after you create a venv? > -- > https://mail.python.org/mailman/listinfo/python-list -- Inada Naoki -- https://mail.p

Re: What's the public API alternative to _PyObject_GC_IS_TRACKED()?

2021-12-28 Thread Inada Naoki
has special optimization which tightly coupled with current CPython implementation. So you need to use private APIs for MAINTAIN_TRACKING. But PyObject_GC_Track() is a public API. Regards, -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the public API alternative to _PyObject_GC_IS_TRACKED()?

2021-12-27 Thread Inada Naoki
or optimization based on *current* Python internals. That's why it is not a public API. If we expose it as public API, it makes harder to change Python's GC internals. -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

[issue46143] [docs] IO > Text Encoding info outdated

2021-12-20 Thread Inada Naoki
Inada Naoki added the comment: UTF-8 mode is not enabled by default. So locale encoding is still the default encoding. -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue46

[issue46085] OrderedDict iterator allocates di_result unnecessarily

2021-12-15 Thread Inada Naoki
Inada Naoki added the comment: Nice catch. > if ((kind & _odict_ITER_KEYS) && (kind &_odict_ITER_VALUES)) You can reduce one branch by ``` #define _odict_ITER_ITEMS (_odict_ITER_KEYS|_odict_ITER_VALUES) ... if (kind & _odict_ITER_ITEMS == _odict_ITER_ITEM

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-08 Thread Inada Naoki
Inada Naoki added the comment: That's too bad. We can not compare two Unicode by pointer even if both are interned anymore... It was a nice optimization. -- ___ Python tracker <https://bugs.python.org/issue46

Re: Odd locale error that has disappeared on reboot.

2021-12-08 Thread Inada Naoki
ibilities. * You set the wrong PYTHONHOME PYTHONHOME is very rarely useful. It shouldn't be used if you can not solve this kind of problem. * Your Python installation is broken. Some files are deleted or overwritten. You need to *clean* install Python again. Bets, -- Inada Naoki -- https://mail.python.org/mailman/listinfo/python-list

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-08 Thread Inada Naoki
Inada Naoki added the comment: Should `_PyUnicode_EqualToASCIIId()` support comparing two unicode from different interpreter?? -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue46

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

2021-11-25 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.11 -Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue23882> ___ ___ Python-bug

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

2021-11-24 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +27982 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29745 ___ Python tracker <https://bugs.python.org/issu

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

2021-11-16 Thread Inada Naoki
Inada Naoki added the comment: The another error I found is already reported as #42868. -- ___ Python tracker <https://bugs.python.org/issue38625> ___ ___ Pytho

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

2021-11-16 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

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

2021-11-16 Thread Inada Naoki
Inada Naoki added the comment: I confirmed that this bug is fixed, but I found another error. -- ___ Python tracker <https://bugs.python.org/issue38625> ___ ___

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

2021-11-16 Thread Inada Naoki
Inada Naoki added the comment: Is this bug fixed by #26730? -- ___ Python tracker <https://bugs.python.org/issue38625> ___ ___ Python-bugs-list mailin

[issue45521] obmalloc radix tree typo in code

2021-10-18 Thread Inada Naoki
Inada Naoki added the comment: When I am trying to understand this issue, I see this segfault. https://gist.github.com/methane/1b83e2abc6739017e0490c5f70a27b52 I am not sure this segfault is caused by this issue or not. If this is unrelated, I will create another issue

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

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

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

2021-10-18 Thread Inada Naoki
Inada Naoki added the comment: New changeset 0a4c82ddd34a3578684b45b76f49cd289a08740b by Inada Naoki in branch 'main': bpo-45475: Revert `__iter__` optimization for GzipFile, BZ2File, and LZMAFile. (GH-29016) https://github.com/python/cpython/commit/0a4c82ddd34a3578684b45b76f49cd289a08740b

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

2021-10-17 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +27290 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29016 ___ Python tracker <https://bugs.python.org/issu

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

2021-10-15 Thread Inada Naoki
Inada Naoki added the comment: >>> ll = [l for l in gzip.GzipFile(filename='data/UTF-8-test_for_gzip.txt.gz')] This is bad code pattern because you don't close the file explicitly. Actually, the error caused by the optimization thet iter(GzipFile) returns underlaying faster

[issue32596] Lazy import concurrent.futures.process and thread

2021-10-15 Thread Inada Naoki
Inada Naoki added the comment: See this comment. https://github.com/python/cpython/pull/5241#discussion_r162765765 -- ___ Python tracker <https://bugs.python.org/issue32

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Inada Naoki
Inada Naoki added the comment: Pros: Faster (about 3~5%) faster function creation, when function don't have annotations. When function has annotation, function creation is much slower so performance gain become tiny. Cons: Somewhat backward incompatible: ``` >>> def fo

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +27206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28704 ___ Python tracker <https://bugs.python.org/issu

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Inada Naoki
New submission from Inada Naoki : Move setting `func.__doc__` from PyFunction_New() to __doc__ descriptor, for faster function creation. This issue is spin-off of bpo-36521. -- components: Interpreter Core messages: 403786 nosy: methane priority: normal severity: normal status: open

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-12 Thread Inada Naoki
Inada Naoki added the comment: Although I still feel reducing 16% tuples is attractive, no one support the idea. I leave this as-is for now, and will go to lazy-loading docstring (maybe, co_linetable too) later. -- resolution: -> rejected stage: patch review -> resolved

[issue45421] Remove dead code from html.parser

2021-10-12 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

[issue29410] Moving to SipHash-1-3

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

[issue29410] Moving to SipHash-1-3

2021-10-10 Thread Inada Naoki
Inada Naoki added the comment: New changeset ad970e8623523a8656e8c1ff4e1dff3423498a5a by Inada Naoki in branch 'main': bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752) https://github.com/python/cpython/commit/ad970e8623523a8656e8c1ff4e1dff3423498a5a

[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Inada Naoki
Inada Naoki added the comment: > I recommend that you add SipHash-1-3 as an additional algorithm and make it > the default. The removal of --with-hash-algorithm=siphash24 should go through > regular deprecation cycle of two Python versions. I am not sure its worth enough. Adding

[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Inada Naoki
Inada Naoki added the comment: > I know that it's not a popular opinion, but I don't think that this denial of > service (DoS) is important. IMO there are enough other ways to crash a > server. Moreover, the initial attack vector was a HTTP request with tons of >

[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Inada Naoki
Inada Naoki added the comment: I am not sure this is worth doing. Microbenchmarks: ## import time ``` $ main/opt/bin/pyperf command main/opt/bin/python3 -c 'import typing,asyncio' . command: Mean +- std dev: 49.6 ms +- 0.1 ms $ siphash13/opt/bin/pyperf command siphash13

[issue29410] Moving to SipHash-1-3

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

[issue45330] dulwich_log performance regression in 3.10

2021-10-05 Thread Inada Naoki
Inada Naoki added the comment: I can not confirm performance regression between 33ec88ac and 23ae2c3b. ``` Performance version: 1.0.2 Python version: 3.10.0a7+ (64-bit) revision 33ec88ac81 Report on Linux-5.4.0-81-generic-x86_64-with-glibc2.31 Number of logical CPUs: 8 Start date: 2021-10-06

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Inada Naoki
Inada Naoki added the comment: Lazy filling func.__doc__ has only 3~5% performance gain. And it has small backward incompatibility. ``` >>> def foo(): "foo" ... >>> def bar(): "bar" ... >>> bar.__code__ = foo.__code__ >>> bar.__doc__ '

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +27065 pull_request: https://github.com/python/cpython/pull/28704 ___ Python tracker <https://bugs.python.org/issue36

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Inada Naoki
Inada Naoki added the comment: > Do you have any explanation of this? I think its because current PyFunction_New tries to get docstring always. See this pull request (lazy-func-doc). https://github.com/python/cpython/pull/28704 lazy-func-doc is faster than co-docstring and remove-docstr

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: > So overhead is around 2%. And this 2% is problem only for "creating function > with annotation, without docstring, never called, in loop" situation. My bad, "creating function with docstring, without annotation, nevercalle

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: And as a bonus, creating function without docstring is little faster. ``` $ cpython/release/bin/pyperf timeit --duplicate=100 "def f(): pass" . Mean +- std dev: 62.5 ns +- 1.2 ns $ load-none-remove-docstring/release/bin/pyp

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: > The difference 5.1 ns is the cost of additional LOAD_CONST. It is around 8% > (but can be 12% or 2%). The cost of setting docstring externally will be the > same. I don't have bare metal machine for now so I don't know why annotation is so slow.

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: > For the sqlalchemy example: the saving in co_consts is about 1.6k (200 > pointers), but an increase in bytecode size of 2.4k. Please see number of co_constatns tuples. (d) saved 1307 tuples compared to (b). `sys.getsizeof(())` is 40 on 64bit machine. S

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Inada Naoki
Inada Naoki added the comment: My machine at the office (used for benchmarking) is hanged up and I need to go to the office to reboot. So I don't have benchmark machine for now. Please prioritize LOAD_NONE/LOAD_COMMON_CONST than this. It is hard to maintain merged branches. Merging

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Inada Naoki
Inada Naoki added the comment: I used this tool to count co_const size and numbers. https://github.com/faster-cpython/tools/pull/6 Target is asyncio in the main branch. main (b34dd58f): Total: 31 files; 1,068 code objects; 12,741 lines; 39,208 opcodes; 3,880 total size of co_consts; 738

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-29 Thread Inada Naoki
Inada Naoki added the comment: > I'm not in favor of (c) co_doc either any more (for the reasons you state). I > would go for (b), a CO_DOCSTRING flag plus co_consts[0]. I expect that > co_consts sharing to be a very minor benefit, but you could easily count this > with another

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-29 Thread Inada Naoki
Inada Naoki added the comment: > There is a clear disadvantage in moving the docstring from the function's > code object to the enclosing code object: > > Docstrings are rarely looked at (relative to other operations on functions). > Inner functions and comprehensions are cre

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-27 Thread Inada Naoki
Inada Naoki added the comment: Mark, would you take a look, please? -- ___ Python tracker <https://bugs.python.org/issue36521> ___ ___ Python-bugs-list mailin

[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

[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

[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: +methane

[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 > analyzing code on

[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

[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 have

[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

[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/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/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
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

[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: 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.', None) Python

[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.org/issue45

[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

[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
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: 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 using

[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 *codeobj =

[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-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 code s

[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: > 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 for s

[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) will be

[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-28 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, and PEP

[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

[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

[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:

[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

[issue41103] Removing old buffer support

2021-07-29 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/issue41

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

2021-07-29 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

[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

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

2021-07-28 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

[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:

[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

[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

[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

[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/cpython/commit

[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

[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

[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/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: 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

[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

[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

[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

[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 attached.

[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-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: 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

[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

[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

[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/35be1f3602c8c66199d8c0a2f2805115864235fb

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