Inada Naoki added the comment:
This is implemented in #26219.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
I'm not sure the usage should be covered by "Abstract" syntax tree.
Isn't it a "Concrete" syntax tree?
--
nosy: +inada.naoki
___
Python tracker
<h
Inada Naoki added the comment:
Would you benchmark the performance?
How about calling Py_INCREF and Py_DECREF in PyObject_RichCompare or
do_richcompare?
It is safer than checking all caller of the PyObject_RichCompare and
PyObject_RichCompareBool.
And it would be faster when
Inada Naoki added the comment:
If we can not add INCREF and DECREF in the PyObject_RichCompare, we can add v
== w check in the caller side.
--
___
Python tracker
<https://bugs.python.org/issue38
Change by Inada Naoki :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue33777>
___
___
Inada Naoki added the comment:
$ ./python -m pyperf timeit -s 'a = ["a"]*100; b = ["a"]*100;' -- 'a == b'
master : Mean +- std dev: 276 ns +- 1 ns
patched: Mean +- std dev: 572 ns +- 3 ns
This makes list comparison 2x slower.
--
__
Change by Inada Naoki :
--
pull_requests: +17202
pull_request: https://github.com/python/cpython/pull/17766
___
Python tracker
<https://bugs.python.org/issue38
Inada Naoki added the comment:
>> This makes list comparison 2x slower.
>
> This is affected by PR 17734? or PyObject_RichCompare patched?
Caused by PR 17734.
> Would you like to revert PR 17734? Calling Py_INCREF and Py_DECREF in
> PyObject_RichCompare or do_richcompare
Inada Naoki added the comment:
New changeset dfef986f12dd92bd6434117bba0db3cbb4e65243 by Inada Naoki in branch
'master':
bpo-38588: Optimize list comparison. (GH-17766)
https://github.com/python/cpython/commit/dfef986f12dd92bd6434117bba0db3
Inada Naoki added the comment:
> 2. If the thread tries to change the size of the bytearrays during the join
> (ba1 += b'123'), it'll die with a BufferError that wasn't previously possible
Makes sense. We shouldn't drop GIL while hav
Change by Inada Naoki :
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
> In the single-threaded case, the benchmark seems to show that for 64K+,
> performance is improved by dropping the GIL (which I'm guessing must be
> statistical noise, since there shouldn't be anything contending for it),
> which is m
Inada Naoki added the comment:
> (slowdowns because releasing/acquiring the GIL is not free, particularly when
> contended)
Yes, it's relatively high. We shouldn't release the GIL only for ~0.5ms.
That's why 1MB~ seems nice threshold.
> If the threshold is too l
Inada Naoki added the comment:
> ProcessPoolExecutor does not properly spin down and spin up new processes.
It is because Process "Pool" is for reusing processes.
If you don't want to reuse process, you can use the Process.
https://docs.python.org/3/library/multiprocessin
Change by Inada Naoki :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39196>
___
___
Inada Naoki added the comment:
If we support more types by default, user can not customize serialization of
the type using `default` option.
That's why we don't accept "any iterable" but only list and tuple.
--
nosy: +inada.naoki
__
Inada Naoki added the comment:
I can not get what you say. If "unicodedata.normalize() produces the correct
sequence", isn't it just a your terminal behavior?
If you think it is Python's issue, could you be more specific and write a
simple sample code?
-
Inada Naoki added the comment:
There is a document about it in Doc/library/site.rst already.
I'm not sure this should be documented in the tutorial.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/is
Change by Inada Naoki :
--
pull_requests: +17278
pull_request: https://github.com/python/cpython/pull/17858
___
Python tracker
<https://bugs.python.org/issue38
Inada Naoki added the comment:
> There is a specific question this change attempts to answer: "Where is the
> module I imported located in the file system?"
So `print(the_module.__file__)` is better answer. (or `pip list -v` if the
module is third party package installed vi
Inada Naoki added the comment:
> I've tried writing some Python code to reproduce this bug, but I'm unable to
> -- I should be missing something. Is there a simple snippet showing the
> issue?
Note that this is a bug from long ago. Why this bug had lived long is it
Change by Inada Naoki :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37537>
___
Inada Naoki added the comment:
New changeset ca94677a6216e2d41b04574986ce49d31a0b329c by Inada Naoki in branch
'master':
bpo-38623: Doc: Add section for site module CLI. (GH-17858)
https://github.com/python/cpython/commit/ca94677a6216e2d41b04574986ce49
Inada Naoki added the comment:
It is tempting that putting some paragraphs to the tutorial when you think
"this should be documented!" but there is no good place in the library
reference.
HOWTOs is the document for advanced topics. But it doesn't cover wide area
yet. Th
Inada Naoki added the comment:
> The tutorial currently mentions its special role only briefly [7], saying:
>
>> * The installation-dependent default.
>
> We should explain that part. I'll give it a shot replacing my earlier
> proposal.
I don't think so.
Inada Naoki added the comment:
Does the name "locale.localize" have some origin?
I feel the name doesn't represent well about it is for formatting numeric based
on LC_NUMERIC.
--
nosy: +inada.naoki
___
Python tracker
<https
New submission from Inada Naoki :
I think the UTF-8 mode is very useful for Windows users.
Let's add section for the UTF-8 mode in the using/windows.
--
assignee: docs@python
components: Documentation
messages: 359722
nosy: docs@python, inada.naoki
priority: normal
severity: n
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +17342
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17935
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
Uh, my understanding "But ProcessPoolExecutor starts worker processes on demand
from old." was wrong.
I think this should be fixed like ThreadPoolExecutor.
--
___
Python tracker
<https://bugs.python.o
Change by Inada Naoki :
--
superseder: -> Allow mappings as globals (was: Fix dictionary subclass ...)
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
This is duplicate of #1402289, which was rejected.
I agree with Victor. Python should be free to optimize namespace access.
Namespace access is an implementation detail and user should not assume such
"consistency" here. It is like this:
x = 10
Inada Naoki added the comment:
> Ironically, to let people prototype better, more efficient ways to deal with
> namespace access, it should be possible to override an object used as a
> namespace.
You can benchmark your prototype namespace object by regular Python code:
Inada Naoki added the comment:
New changeset e96d954527aa376457451e32a9d75ae3ea9ab4bd by Inada Naoki in branch
'master':
bpo-38536: locale: Remove trailing space in formatted currency (GH-16864)
https://github.com/python/cpython/commit/e96d954527aa376457451e32a9d75a
Inada Naoki added the comment:
I'm not sure this fix should be backported.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.pyth
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +17468
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18075
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
New changeset 5492bfcefec67b016e8239c0e9135bc2f03e3058 by Inada Naoki in branch
'master':
bpo-39377: json: Remove the encoding option. (GH-18075)
https://github.com/python/cpython/commit/5492bfcefec67b016e8239c0e9135b
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
pull_requests: +17469
pull_request: https://github.com/python/cpython/pull/18076
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
If this broke some real-world software and the pain is high enough, we can
revert the change and add one more deprecation period, like all other removals.
--
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
> PEP420 makes __init__.py files optional
This is almost wrong. PEP 420 added a new way for "namespace pacakge."
PEP 420 doesn't make empty __init__.py file in regular package.
(See https://dev.to/methane/don-t-omit-init-py-3
Inada Naoki added the comment:
I think it is just a noise for the tutorial readers.
I created a post about misunderstanding of PEP 420.
https://dev.to/methane/don-t-omit-init-py-3hga
How about adding note in top of the PEP 420 instead?
.. note::
Namespace packages are not regular
Change by Inada Naoki :
--
assignee: -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
resolution: rejected ->
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.8, Python 3.9 -Python 3.5
Inada Naoki added the comment:
I am totally agree with Wolfgang:
> they make it impossible to know whether a directory found on the filesystem
> is *intended* as a Python package or not.
I think we shouldn't treat normal directory as namespace package until some
portion in the d
Inada Naoki added the comment:
Try `locale` command. What is shown?
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue39397>
___
___
Pytho
Inada Naoki added the comment:
> doing env I get this (no LC_ALL )
[snip]
> LC_CTYPE=en_US
This is wrong setting. Find where this environment variable is set and remove
it.
--
___
Python tracker
<https://bugs.python.org/i
Inada Naoki added the comment:
New changeset 5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402 by Inada Naoki in branch
'master':
bpo-39377: json: Update doc about the encoding option. (GH-18076)
https://github.com/python/cpython/commit/5bbac8cbdf140ebce446ea4e7db2b2
Change by Inada Naoki :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39377>
___
___
Python-bugs-list
Change by Inada Naoki :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39397>
___
___
Inada Naoki added the comment:
Can we have some deprecation period?
def __init__(self, ..., encoding=None):
...
if encoding is not None:
self.encoding = encoding
else:
warnings.warn("The default encoding of the FTP class will be changed
from 'latin1'
Inada Naoki added the comment:
I'm not FTP user so I don't have strong opinion.
If it is too late to change already, change it in 3.9 might be OK.
> However, shouldn't it be a FutureWarning, so it will be reported by default
> at initialisation?
If it is warning for en
Inada Naoki added the comment:
New changeset 148610d88a2785751ed435a4e60f07a9f1bc50a6 by Inada Naoki in branch
'master':
bpo-39287: Doc: Add UTF-8 mode section in using/windows. (GH-17935)
https://github.com/python/cpython/commit/148610d88a2785751ed435a4e60f07
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
nosy: -inada.naoki
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 2cca8efe46935c39c445f585bce54954fad2485b by Inada Naoki (Rémi
Lapeyre) in branch 'master':
bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412)
https://github.com/python/cpython/commit/2cca8efe46935c39c445f585bce549
Inada Naoki added the comment:
New changeset d07d9f4c43bc85a77021bcc7d77643f8ebb605cf by Bruce Merry in branch
'master':
bpo-36051: Drop GIL during large bytes.join() (GH-17757)
https://github.com/python/cpython/commit/d07d9f4c43bc85a77021bcc7d77643
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
pull_requests: +17698
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/18325
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
New changeset 869c0c99b94ff9527acc1ca060164ab3d1bdcc53 by Inada Naoki in branch
'master':
bpo-36051: Fix compiler warning. (GH-18325)
https://github.com/python/cpython/commit/869c0c99b94ff9527acc1ca060164a
Change by Inada Naoki :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36051>
___
___
Pyth
Change by Inada Naoki :
--
pull_requests: +17700
pull_request: https://github.com/python/cpython/pull/18327
___
Python tracker
<https://bugs.python.org/issue17
Change by Inada Naoki :
--
pull_requests: +17701
pull_request: https://github.com/python/cpython/pull/18327
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
I am still not sure about we should add new API only for avoiding cache.
* PyUnicode_AsUTF8String : When we need bytes or want to avoid cache.
* PyUnicode_AsUTF8AndSize : When we need C string, and cache is acceptable.
With PR-18327, PyUnicode_AsUTF8AndSize
Inada Naoki added the comment:
Attached patch is the benchmark function I used in previous post.
--
Added file: https://bugs.python.org/file48879/bench-asutf8.patch
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
https://github.com/python/cpython/blob/95905ce0f41fd42eb1ef60ddb83f057401c3d52f/Include/cpython/objimpl.h#L89
_Py_AS_GC and all APIs to get PyGC_Head from PyObject* are not only unstable,
but also private.
I thought PyGC_Head must not be used directly from
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 02a4d57263a9846de35b0db12763ff9e7326f62c by Inada Naoki in branch
'master':
bpo-39087: Optimize PyUnicode_AsUTF8AndSize() (GH-18327)
https://github.com/python/cpython/commit/02a4d57263a9846de35b0db12763ff
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue39775>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +18044
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18684
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
Would you review the PR 18684?
--
___
Python tracker
<https://bugs.python.org/issue39775>
___
___
Python-bugs-list mailin
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue34396>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
New changeset 211055176157545ce98e6c02b09d624719e6dd30 by Inada Naoki in branch
'master':
bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684)
https://github.com/python/cpython/commit/211055176157545ce98e6c02b09d62
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Inada Naoki :
str.splitlines() has `keepends` option.
Like that, `IOBase.readline([trimend=False])` and
`IOBase.readlines([trimends=False])` would be useful.
--
components: IO
messages: 363430
nosy: inada.naoki
priority: normal
severity: normal
status: open
title
Inada Naoki added the comment:
> It would be better to name it keepends and set it True by default.
.readline() returns only one line. Should we use plural form for consistency?
> It is also not good for file-like classes which do not inherit IOBase, but
> implement a part of met
Inada Naoki added the comment:
Would you create a pull request?
--
___
Python tracker
<https://bugs.python.org/issue39957>
___
___
Python-bugs-list mailin
Inada Naoki added the comment:
New changeset c7ad974d341d3edb6b9d2a2dcae4d3d4794ada6b by Inada Naoki in branch
'master':
bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659)
https://github.com/python/cpython/commit/c7ad974d341d3edb6b9d2a2dcae4d3
Change by Inada Naoki :
--
pull_requests: +18332
pull_request: https://github.com/python/cpython/pull/18984
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
I'm sorry about merging PR 18327, but I can not find enough usage example of
the _PyUnicode_GetUTF8Buffer.
PyUnicode_AsUTF8AndSize is optimized, and utf8_cache is not so bad in most
case. So _PyUnicode_GetUTF8Buffer seems not worth enough.
I will reve
Change by Inada Naoki :
--
pull_requests: +18333
pull_request: https://github.com/python/cpython/pull/18985
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
New changeset 3a8c56295d6272ad2177d2de8af4c3f824f3ef92 by Inada Naoki in branch
'master':
Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer()" (GH-18985)
https://github.com/python/cpython/commit/3a8c56295d6272ad2177
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
static_buffers is not a static variable. It is auto local variable.
So I think other thread don't hijack it.
--
___
Python tracker
<https://bugs.python.org/is
Inada Naoki added the comment:
>
>
>
> perhaps add an if to check if the backing object is really mutable ?
> (Py_buffer.readonly)
>
>
Py_buffer.readonly doesn't mean immutable. You can create read only buffer
from bytearray too.
Current logic uses PyBytes_CheckExa
Change by Inada Naoki :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39974>
___
___
Python-bugs-list
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 611836a69a7a98bb106b4d315ed76a1e17266f4f by Jens Reidel in branch
'master':
bpo-39957: Change Signature.parameters to OrderedDict (GH-18988)
https://github.com/python/cpython/commit/611836a69a7a98bb106b4d315ed76a
Inada Naoki added the comment:
New changeset 62d21c9d900664b2ca30c2d7edd80b6628abdf62 by Andy Lester in branch
'master':
bpo-39943: Properly const the pointers in dictkeys_get_index (GH-19170)
https://github.com/python/cpython/commit/62d21c9d900664b2ca30c2d7edd80b6628abdf62
-
Change by Inada Naoki :
--
keywords: +patch
nosy: +inada.naoki
nosy_count: 1.0 -> 2.0
pull_requests: +1
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19540
___
Python tracker
<https://bugs.python.org/i
Inada Naoki added the comment:
New changeset 485e715cb1ff92bc9882cd51ec32589f9cb30503 by Inada Naoki in branch
'master':
bpo-40287: Fix SpooledTemporaryFile.seek() return value (GH-19540)
https://github.com/python/cpython/commit/485e715cb1ff92bc9882cd51ec3258
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
pull_requests: +18979
pull_request: https://github.com/python/cpython/pull/19653
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
I closed GH-12497 (Py_UNICODE -> Py_UCS4).
I created GH-19653 (Py_UNICODE -> wchar_t) instead.
--
___
Python tracker
<https://bugs.python.org/i
Inada Naoki added the comment:
While array('u') doesn't use deprecated API with GH-19653, I still don't like
'u' because:
* I don't have any reason to use platform dependant wchar_t. [1]
* It is not consistent with PEP-3118.
[1]: https://mail.python.
Inada Naoki added the comment:
Fixed via GH-18663.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
I still think it's too detailed.
Reading C and Python code is much better way to understand such implementation
detail.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Inada Naoki added the comment:
I close this issue as rejected.
If you have opinion about this issue, please post to python-dev mailing list
or discuss.python.org.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
_
Inada Naoki added the comment:
I don't think they are conflict.
"now required to have a valid name."
"were allowed to have name set to None [snip] This is no longer permitted."
"None" is not "valid name".
--
resolution: -> not
Inada Naoki added the comment:
I think this is not a bug, but a limitation of Python 3.7, and improvement in
3.8.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue40
Inada Naoki added the comment:
There are many "escape"; JSON, HTML, SQL, Python string literal, ESC-key,
escape sequence in the terminal, etc...
Is there a consistent meaning of "escape" in the context of Python?
--
nosy: +inada.naoki
__
Inada Naoki added the comment:
I don't think this is a real issue we should solve:
* Travis-CI, at least, does test against "merge commit", not HEAD of PR branch.
* As you said already, master branch grow after PR is created anyway.
* We run CI and buildbots against master bra
501 - 600 of 3039 matches
Mail list logo