[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

[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

[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

[issue45661] [meta] Freeze commonly used stdlib modules.

2022-01-06 Thread Inada Naoki
Inada Naoki added the comment: I don't against deep freezing functools and contextlib. But I think we should optimize and utilize zipimport or something similar, because we can not deep-freeze all stdlib or 3rd party libraries. See also: https://github.com/faster-cpython/ideas/discus

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

2022-01-09 Thread Inada Naoki
Inada Naoki added the comment: New changeset 0b2b9d251374c5ed94265e28039f82b37d039e3e by Inada Naoki in branch 'main': bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745) https://github.com/python/cpython/commit/0b2b9d251374c5ed94265e28039f82

[issue46376] PyMapping_Check returns 1 for list

2022-01-14 Thread Inada Naoki
Inada Naoki added the comment: collections.abc.Mapping is fixed by https://bugs.python.org/issue43977 We can be same thing if backward compatibility allows it. -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue46

[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode

2022-01-16 Thread Inada Naoki
Inada Naoki added the comment: Mercurial still use it. https://www.mercurial-scm.org/repo/hg-stable/file/tip/mercurial/pycompat.py#l113 Mercurial has plan to move filesystem name from ANSI Code Page to UTF-8, but I don't know about its progress. https://www.mercurial-scm.org

[issue45644] Make json.tool soak up input before opening output for writing

2022-01-18 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane nosy_count: 4.0 -> 5.0 pull_requests: +28860 pull_request: https://github.com/python/cpython/pull/30659 ___ Python tracker <https://bugs.python.org/issu

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-18 Thread Inada Naoki
Inada Naoki added the comment: I am not happy about exposing every internal types. I prefer duck typing. Like OrderedDict, not all dict subtypes uses `dict_keys`, `dict_views`, and `dict_items`. If typeshed annotate dict.keys() returns `dict_keys`, "incompatible override" c

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Inada Naoki
Inada Naoki added the comment: > I agree with Inada that not every internal type should be exposed, but I > would make an exception for the dict views classes due to the fact that dict > subclasses are much more common than subclasses of other mappings, such as > OrderedDict. I

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Inada Naoki
Inada Naoki added the comment: In other words, a. If `.keys()` in all dict subclasses must return subclass of `dict_keys`: `dict.keys() -> dict_keys`. b. If `.keys().mapping` must be accessible for all dict subclasses: Add `.mapping` to `KeysView`. c. If `.keys().mapping` is optional

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-20 Thread Inada Naoki
Inada Naoki added the comment: > If we literally ignore the attribute, any usage of `.mapping` will be an > error, which basically makes the whole `.mapping` feature useless for > statically typed code. It also wouldn't appear in IDE autocompletions. `.mapping` is not exist

[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Inada Naoki
Inada Naoki added the comment: > The only way to safely launch worker processes on demand is to spawn a worker > launcher process spawned prior to any thread creation that remains idle, with > a sole job of spawn new worker processes for us. That sounds complicated. > That&#x

[issue44723] Codec name normalization breaks custom codecs

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

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-26 Thread Inada Naoki
Inada Naoki added the comment: We do not have *fill* since Python 3.6. There is a `dk_nentries` instead. But when `insertion_resize()` is called, `dk_nentries` is equal to `USABLE_FRACTION(dk_size)` (dk_size is `1 << dk_log2_size` for now). So it is different from *fill* in the old di

[issue36346] Prepare for removing the legacy Unicode C API

2022-01-28 Thread Inada Naoki
Inada Naoki added the comment: No. I just waiting Python 3.11 become Bata. -- ___ Python tracker <https://bugs.python.org/issue36346> ___ ___ Python-bugs-list m

[issue36346] Prepare for removing the legacy Unicode C API

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

[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread Inada Naoki
Inada Naoki added the comment: FWIW, it seems -O0 don't merge local variables in different path or lifetime. For example, see _Py_abspath ``` if (path[0] == '\0' || !wcscmp(path, L".")) { wchar_t cwd[MAXPATHLEN + 1]; //(snip) } //(snip)

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

2022-02-01 Thread Inada Naoki
New submission from Inada Naoki : I checked stack usage for bpo-46600 and found this two functions use a lot of stack. os_setgroups: 262200 bytes os_getgroups_impl: 262184 bytes Both function has local variable like this: gid_t grouplist[MAX_GROUPS]; MAX_GROUPS is defined as

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

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

[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-02 Thread Inada Naoki
Inada Naoki added the comment: I didn't mean _Py_abspath is problem. I just used it to describe why -O0 and -Og is so different. We can reduce stack usage of it easily, but it is not a problem than _PyEval_EvalFrameDefault. It is difficult to reduce stack usage of _PyEval_EvalFrameDe

[issue46688] Add sys.is_interned

2022-02-08 Thread Inada Naoki
New submission from Inada Naoki : deepfreeze.py needs to know the unicode object is interned. Ref: https://bugs.python.org/issue46430 -- components: Interpreter Core messages: 412890 nosy: methane priority: normal severity: normal status: open title: Add sys.is_interned versions

[issue46688] Add sys.is_interned

2022-02-08 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +29397 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31227 ___ Python tracker <https://bugs.python.org/issu

[issue46688] Add sys.is_interned

2022-02-08 Thread Inada Naoki
Inada Naoki added the comment: I thought sys.is_interned() is needed to implement bpo-46430, but GH-30683 looks nice to me. I will close this issue after GH-30683 is merged. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46688] Add sys.is_interned

2022-02-08 Thread Inada Naoki
Inada Naoki added the comment: Thank you, I can not find it because it is too old. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add sys.isinterned() ___ Python tracker <https://

[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-02-11 Thread Inada Naoki
Inada Naoki added the comment: I think making more objects immortal by default will reduce the gap, although I am not sure it can be 2%. (I guess 3% and I think it is acceptable gap.) * Code attributes (contents of co_consts, co_names, etc...) in deep frozen modules. * only if

[issue29992] Expose parse_string in JSONDecoder

2022-02-16 Thread Inada Naoki
Inada Naoki added the comment: > Generally speaking, parsing some things as decimal or datetime are schema > dependent. Totally agree with this. > In order to provide maximal flexibility it would be much nicer to have a > streaming interface available (like SAX for XML parsin

[issue46813] Allow developer to resize the dictionary

2022-02-21 Thread Inada Naoki
Inada Naoki added the comment: As I commented in https://github.com/faster-cpython/ideas/discussions/288, your benchmark is not fair. Include `{}` and `{}.resize(len(cases))` into the measured function. -- nosy: +methane ___ Python tracker

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

2022-02-21 Thread Inada Naoki
Inada Naoki added the comment: New changeset 74127b89a8224d021fc76f679422b76510844ff9 by Inada Naoki in branch 'main': bpo-46606: Reduce stack usage of getgroups and setgroups (GH-31073) https://github.com/python/cpython/commit/74127b89a8224d021fc76f679422b7

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

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

[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-02-21 Thread Inada Naoki
Inada Naoki added the comment: All of these optimizations should be disabled by default. * It will cause leak when Python is embedded. * Even for python command, it will break __del__ and weakref callbacks. -- ___ Python tracker <ht

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2022-02-23 Thread Inada Naoki
Inada Naoki added the comment: I found regression caused by GH-28520. ``` class C: def __init__(self, n): if n: self.a = 1 self.b = 2 self.c = 3 else: self.c = 1 self.b = 2 self.a = 3 o1 = C(True) o2

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2022-02-23 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +29671 pull_request: https://github.com/python/cpython/pull/31550 ___ Python tracker <https://bugs.python.org/issue40

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-23 Thread Inada Naoki
New submission from Inada Naoki : Currently, PyDictKeyEntry is 24bytes (hash, key, and value). We can drop the hash from entry when all keys are unicode, because unicode objects caches hash already. This will cause some performance regression on microbenchmark because dict need one more

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2022-02-23 Thread Inada Naoki
Inada Naoki added the comment: PyDict_Keys(), PyDict_Values(), and PyDict_Items() don't respect insertion order too. -- ___ Python tracker <https://bugs.python.org/is

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

2022-02-24 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +29684 pull_request: https://github.com/python/cpython/pull/31561 ___ Python tracker <https://bugs.python.org/issue46

[issue43364] Windows: Make UTF-8 mode more accessible

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

[issue46606] Large C stack usage of os.getgroups() and os.setgroups()

2022-02-24 Thread Inada Naoki
Inada Naoki added the comment: New changeset ad6c7003e38a9f8bdf8d865fb5fa0f3c03690315 by Inada Naoki in branch 'main': bpo-46606: Remove redundant +1. (GH-31561) https://github.com/python/cpython/commit/ad6c7003e38a9f8bdf8d865fb5fa0f

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-24 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +29686 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31564 ___ Python tracker <https://bugs.python.org/issu

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-25 Thread Inada Naoki
Inada Naoki added the comment: > > > Do you propose to > 1. Only use StringKeyDicts when non-string keys are not possible? (Where > would this be?) > 2. Switch to a normal dict when a non-string key is added? (But likely > not switch back when the last non-string

[issue46864] Deprecate ob_shash in BytesObject

2022-02-26 Thread Inada Naoki
New submission from Inada Naoki : Code objects have more and more bytes attributes for now. To reduce the RAM by code, I want to remove ob_shash (cached hash value) from bytes object. Sets and dicts have own hash cache. Unless checking same bytes object against dicts/sets many times, this

[issue46864] Deprecate ob_shash in BytesObject

2022-02-26 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +29721 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31598 ___ Python tracker <https://bugs.python.org/issu

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-26 Thread Inada Naoki
Inada Naoki added the comment: In most case, first PyDict_SetItem decides which format should be used. But _PyDict_NewPresized() can be a problem. It creates a hash table before inserting the first key, when 5 < (expected size) < 87382. In CPython code base, _PyDict_NewPresized() is

[issue46864] Deprecate ob_shash in BytesObject

2022-02-26 Thread Inada Naoki
Inada Naoki added the comment: > But some programs can still work with encoded bytes instead of strings. In > particular os.environ and os.environb are implemented as dict of bytes on > non-Windows. This change doesn't affect to os.environ. os.environ[key] do

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-02-26 Thread Inada Naoki
Inada Naoki added the comment: I added _PyDict_FromItems() to the PR. It checks that all keys are Unicode or not before creating dict. _PyDict_NewPresized() just returns general-purpose dict. But it isn't used from CPython core. It is just kept for compatibility (for Cython). ``` $ ./p

[issue46864] Deprecate ob_shash in BytesObject

2022-02-26 Thread Inada Naoki
Inada Naoki added the comment: When removed shash: ``` ## small key $ ./python -m pyperf timeit --compare-to ../cpython/python -s 'd={b"foo":1, b"bar":2, b"buzz":3}' -- 'b"key" in d' /home/inada-n/work/python/cpython/python: ..

[issue45373] ./configure --enable-optimizations should enable LTO

2022-03-01 Thread Inada Naoki
Inada Naoki added the comment: Can we use --lto=thin when availabe? And can we not use --lto when building profiling python? -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue45

[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-03-01 Thread Inada Naoki
Inada Naoki added the comment: New changeset 9833bb91e4d5c2606421d9ec2085f5c2dfb6f72c by Inada Naoki in branch 'main': bpo-46845: Reduce dict size when all keys are Unicode (GH-31564) https://github.com/python/cpython/commit/9833bb91e4d5c2606421d9ec2085f5

[issue46845] dict: Use smaller entry for Unicode-key only dict.

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

[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

2022-03-02 Thread Inada Naoki
New submission from Inada Naoki : Original issue. https://github.com/msgpack/msgpack-python/issues/497 _PyFloat_(Pack|Unpack)(4|8) is very nice API for serializers like msgpack. Converting double and float into char[] is not trivial and these APIs do it in very efficient way. And these APIs

[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)

2022-03-02 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane ___ Python tracker <https://bugs.python.org/issue46903> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

2022-03-02 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +29769 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31649 ___ Python tracker <https://bugs.python.org/issu

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2022-03-02 Thread Inada Naoki
Inada Naoki added the comment: New changeset 4f74052b455a54ac736f38973693aeea2ec14116 by Inada Naoki in branch 'main': bpo-40116: dict: Add regression test for iteration order. (GH-31550) https://github.com/python/cpython/commit/4f74052b455a54ac736f38973693ae

[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

2022-03-03 Thread Inada Naoki
Inada Naoki added the comment: OK. By quick grepping, I found only msgpack and bitstruct use these API. It is not enough number to make them public. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

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

[issue46864] Deprecate ob_shash in BytesObject

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

[issue46864] Deprecate ob_shash in BytesObject

2022-03-05 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2d8b764210c8de10893665aaeec8277b687975cd by Inada Naoki in branch 'main': bpo-46864: Deprecate PyBytesObject.ob_shash. (GH-31598) https://github.com/python/cpython/commit/2d8b764210c8de10893665aaeec827

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

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

[issue46925] Document dict behavior when setting equal but not identical key

2022-03-06 Thread Inada Naoki
Inada Naoki added the comment: I don't know much about Java, but Java's WeakHashMap is same to Python's WeakKeyDictionary. https://docs.oracle.com/javase/9/docs/api/java/util/WeakHashMap.html """ This class is intended primarily for use with key objects whose e

[issue13367] PyCapsule_New's argument *must* not a NULL.

2011-11-07 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/c-api/capsule.html?highlight=capsule#PyCapsule_New > The pointer argument may not be NULL. I think "must not" is correct. -- assignee: docs@python components: Documentation messages: 147269 nosy: docs@python, n

[issue13467] Typo in doc for library/sysconfig

2011-11-23 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/library/sysconfig.html#sysconfig.get_path > If scheme is provided, it must be a value from the list returned by > get_path_names(). s/get_path_names/get_scheme_names/ -- assignee: docs@python components: Documentation me

[issue13663] pootle.python.org is outdated.

2011-12-26 Thread INADA Naoki
New submission from INADA Naoki : I am one of Japanese translate of Python documents. We have done translating Python 2.7 document and will start translating Python 3.2 or 3.3. I want to use sphinx-i18n and pootle to translate. But http://pootle.python.org/ is very outdated. Anyone can update

[issue13663] pootle.python.org is outdated.

2011-12-31 Thread INADA Naoki
INADA Naoki added the comment: On Sat, Dec 31, 2011 at 11:31 PM, Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > naoki: what is your actual complaint about the installation being outdated? > Are you referring to the message catalog (documentation v

[issue11418] Method's global scope is module containing function definition, not class.

2012-01-09 Thread INADA Naoki
INADA Naoki added the comment: > Any objections to changing > > "The global scope associated with a method is the module containing the class > definition. (The class itself is never used as a global scope.)" > > to > > "The global scope associated wit

[issue12822] NewGIL should use CLOCK_MONOTONIC if possible.

2011-08-23 Thread INADA Naoki
New submission from INADA Naoki : Using CLOCK_MONOTONIC is better than CLOCK_REALTIME (default) for GIL because settimeofday() may break the pthread_cond_timedwait(). Attached patch uses CLOCK_MONOTONIC and clock_gettime. But I don't know how to write appropriate configure script. &quo

[issue5911] built-in compile() should take encoding option.

2010-08-24 Thread INADA Naoki
INADA Naoki added the comment: This problem is not heavy on Python 3. Because Python 3's byte string can't contain non-ASCII string directory. So passing unicode string to the compile() is good enough for all cases I can imagine. --

[issue10410] Is iterable a container type?

2010-11-13 Thread INADA Naoki
New submission from INADA Naoki : In http://docs.python.org/release/2.6.6/glossary.html, "iterable" is described as "A container object capable of returning its members one at a time." Is it correct? Is stream object like file a container type? Container ABC require

[issue10410] Is iterable a container type?

2010-11-14 Thread INADA Naoki
INADA Naoki added the comment: >> Likewise, "and objects of any classes you define >> with an __iter__() or __getitem__() method." is >> wrong because __getitem__ method is not relate to >> iterable > > That wording is correct.  Sequences are automatica

[issue10420] Document of Bdb.effective is wrong.

2010-11-14 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/library/bdb.html#bdb.effective >Determine if there is an effective (active) breakpoint at this line of code. >Return breakpoint number or 0 if none. bdb.effective doesn't return 0. If no breakpoint is found, it returns

[issue11405] Wrong reference to string module in tutorial/inputoutput.rst

2011-03-04 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting > The standard module string contains some useful operations for padding > strings to a given column width; these will be discussed shortly. The document uses str.rjust,

[issue11418] Method's global scope is module containing function definition, not class.

2011-03-06 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/py3k/tutorial/classes.html#random-remarks > Methods may reference global names in the same way as ordinary > functions. The global scope associated with a method is the module > containing the class definition. (The class itself

[issue11418] Method's global scope is module containing function definition, not class.

2011-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issu

[issue11425] Cleanup sample codes in tutorial.

2011-03-06 Thread INADA Naoki
New submission from INADA Naoki : * Insert spaces around operators and after commas. * Split one liner blocks (ex. def foo(x, y): return x + y) to multi-line blocks. * Insert empty line after def block for scripts (not interactive mode). * Use new-style raise (s/ralse KeyboardInterrupt/raise

[issue11425] Cleanup sample codes in tutorial.

2011-03-06 Thread INADA Naoki
INADA Naoki added the comment: This patch inserts spaces around ** operator but I prefer no spaces around **. Any thoughts? -- ___ Python tracker <http://bugs.python.org/issue11

[issue10579] Is ``o[key]`` equivalent to PyMapping_HasKeyString?

2010-11-29 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/c-api/mapping.html#PyMapping_HasKeyString and http://docs.python.org/c-api/mapping.html#PyMapping_HasKey says: > This is equivalent to ``o[key]`` I think it should be ``key in o``. -- assignee: d...@python compone

[issue10579] Is ``o[key]`` equivalent to PyMapping_HasKeyString?

2010-11-29 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, I've misreaded. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.py

[issue10594] Typo in PyList_New doc.

2010-11-30 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/c-api/list.html#PyList_New > Note: If length is greater than zero, ... s/length/len/ -- assignee: d...@python components: Documentation messages: 122974 nosy: d...@python, naoki priority: normal severity: normal status: o

[issue10594] Typo in PyList_New doc.

2010-11-30 Thread INADA Naoki
INADA Naoki added the comment: http://docs.python.org/c-api/list.html#PyList_GetItem > Return the object at position pos in the list pointed to by p s/p/list/ -- ___ Python tracker <http://bugs.python.org/issu

[issue10594] Typo in PyList_New doc.

2010-11-30 Thread INADA Naoki
INADA Naoki added the comment: http://docs.python.org/c-api/list.html#PyList_GetItem > Return the object at position pos in the list pointed to by p s/pos/index/ -- ___ Python tracker <http://bugs.python.org/issu

[issue10594] Typo in PyList_New doc.

2010-11-30 Thread INADA Naoki
INADA Naoki added the comment: OK, please. On Wed, Dec 1, 2010 at 12:46 PM, Eli Bendersky wrote: > > Eli Bendersky added the comment: > > Thanks for the report, > > Attaching a patch for Doc/c-api/list.rst in Python 3.2 > If this is OK, I can backport the patch to o

[issue10597] Py_SetPythonHome document shows same url twice.

2010-12-01 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/c-api/init.html#Py_SetPythonHome > The libraries are searched in home/lib/pythonversion and > home/lib/pythonversion. Is the second "{home}/lib/python{version}" wrong? -- assignee: d...@python components: Docume

[issue10607] Document of PyOS_(v)snprintf is wrong.

2010-12-02 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/c-api/conversion.html#PyOS_vsnprintf "the buffer size needed to avoid truncation exceeds size by more than 512 bytes, Python aborts with a Py_FatalError." I think ":cfunc:`vsprintf`'s output exeeds the buffer nee

[issue10607] Document of PyOS_(v)snprintf is wrong.

2010-12-02 Thread INADA Naoki
INADA Naoki added the comment: Sorry, I've misreaded the sentence. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.

[issue7869] traceback from logging is unusable.

2010-02-06 Thread INADA Naoki
New submission from INADA Naoki : When exception raised in logging, traceback is shown but it doesn't tell me which logging code cause the error. $ cat unusable_traceback.py import logging logging.warn('%s %s', 1) # not enough arguments. $ python unusable_traceback.py Traceba

[issue7869] traceback from logging is unusable.

2010-02-06 Thread INADA Naoki
INADA Naoki added the comment: This patch shows filename and lineno. I can specify my wrong logging code with this patch. -- keywords: +patch Added file: http://bugs.python.org/file16164/logging_show_file_and_line.patch ___ Python tracker <h

[issue8280] urllib2 passes fragment identifier to server

2010-04-01 Thread INADA Naoki
New submission from INADA Naoki : >>> urllib2.urlopen("http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/index.html#module-wavelet";) Traceback (most recent call last): File "", line 1, in File "C:\usr\Python2.6\lib\urllib2.py", line 126,

[issue8280] urllib2 passes fragment identifier to server

2010-04-01 Thread INADA Naoki
Changes by INADA Naoki : -- components: +Library (Lib) type: -> behavior versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/iss

[issue8686] "This isn't defined beyond that" phrase is not friendly to non-native English speakers.

2010-05-11 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/library/difflib.html#difflib.SequenceMatcher.quick_ratio > This isn’t defined beyond that it is an upper bound on ratio(), and is faster > to compute. "beyond" is a bit confusing because it also means "over"

[issue8707] Duplicated document in telnetlib.

2010-05-13 Thread INADA Naoki
New submission from INADA Naoki : http://docs.python.org/dev/library/telnetlib.html#telnetlib.Telnet The part "number can be passed to the constructor... " is duplicated. -- assignee: d...@python components: Documentation messages: 105667 nosy: d...@python, naoki priori

[issue39829] __len__ called twice in the list() constructor

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

[issue43574] Regression in overallocation for literal list initialization in v3.9+

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

[issue43574] Regression in overallocation for literal list initialization in v3.9+

2022-03-07 Thread Inada Naoki
Inada Naoki added the comment: Relating issue: https://twitter.com/nedbat/status/1489233208713437190 Current overallocation strategy is rough. We need to make it more smooth. -- versions: +Python 3.11 -Python 3.9 ___ Python tracker <ht

[issue39829] __len__ called twice in the list() constructor

2022-03-10 Thread Inada Naoki
Inada Naoki added the comment: > Changes compared here: > https://github.com/python/cpython/compare/main...thatbirdguythatuknownot:patch-17 Looks good to me. Would you create a pull request? -- ___ Python tracker <https://bugs.p

[issue47000] Make encoding="locale" uses locale encoding even in UTF-8 mode is enabled.

2022-03-12 Thread Inada Naoki
New submission from Inada Naoki : Currently, `encoding="locale"` is just shortcut of `encoding=locale.getpreferredencoding(False)`. `encoding="locale"` means that "locale encoding should be used here, even if Python default encoding is changed to UTF-8".

[issue39829] __len__ called twice in the list() constructor

2022-03-13 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2153daf0a02a598ed5df93f2f224c1ab2a2cca0d by Crowthebird in branch 'main': bpo-39829: Fix `__len__()` is called twice in list() constructor (GH-31816) https://github.com/python/cpython/commit/2153daf0a02a598ed5df93f2f224c1

[issue39829] __len__ called twice in the list() constructor

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

[issue39829] __len__ called twice in the list() constructor

2022-03-13 Thread Inada Naoki
Inada Naoki added the comment: Thanks. -- ___ Python tracker <https://bugs.python.org/issue39829> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47000] Make encoding="locale" uses locale encoding even in UTF-8 mode is enabled.

2022-03-13 Thread Inada Naoki
Inada Naoki added the comment: I created a related topic on discuss.python.org. https://discuss.python.org/t/jep-400-utf-8-by-default-and-future-of-python/14246 If we recommend `PYTHONUTF8` as opt-in "UTF-8 by default", `encoding="locale"` should locale encoding in UTF-

[issue47009] Streamline list.append for the common case

2022-03-14 Thread Inada Naoki
Inada Naoki added the comment: Hmm. Would you measure benefit from inlining and skipping incref/decref separately? If benefit of inlining is very small, making _PyList_AppendTakeRef() as regular internal API looks better to me. -- nosy: +methane

[issue35228] Index search in CHM help crashes viewer

2022-03-14 Thread Inada Naoki
Inada Naoki added the comment: I know chm is handy. But Microsoft abandoned it already. I think we should stop providing chm. -- ___ Python tracker <https://bugs.python.org/issue35

  1   2   3   4   5   6   7   8   9   10   >