Inada Naoki added the comment:
New changeset db6d9a50cee92c0ded7c5cb87331c5f0b1008698 by Inada Naoki in branch
'master':
bpo-41431: Optimize dict_merge for copy (GH-21674)
https://github.com/python/cpython/commit/db6d9a50cee92c0ded7c5cb87331c5f0b1008698
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue38605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
Do you know you can use separated build dir?
```
$ mkdir build
$ cd build
$ ../configure --with-pydebug
```
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue41
Change by Inada Naoki :
--
pull_requests: +20819
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21674
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
PyDict_Copy() is not used in eval loop or calling functions. So removing
clone_combined_dict() is a considerable option.
Another option is to use clone_combined_dict() in dict_merge, instead of adding
dict_copy2().
Pros: No performance regression. PyDict_Copy
Inada Naoki added the comment:
To reduce code size, I am considering to remove clone_combined_dict. I will
check how PyDict_Copy() is performance critical.
This is microbenchmark result of d.copy() and dict(d).
$ ./python -m pyperf timeit --compare-to ./python-master -s
'd=dict.fromkeys
Inada Naoki added the comment:
Microbenchmark for commit cf4f61ce50e07f7ccd3aef991647050c8da058f9.
# timeit -s 'd=dict.fromkeys(range(8))' -- 'dict(d)'
Mean +- std dev: [master] 311 ns +- 2 ns -> [patched] 144 ns +- 1 ns: 2.16x
faster (-54%)
# timeit -s 'd=dict.fromkeys(range(1
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20813
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21669
___
Python tracker
<https://bugs.python.org/issu
New submission from Inada Naoki :
Although there are dict.copy() and PyDict_Copy(), dict_merge can be used for
copying dict.
* d={}; d.update(orig)
* d=dict(orig)
* d=orig.copy() # orig has many dummy keys.
--
components: Interpreter Core
messages: 374550
nosy: inada.naoki
priority
Inada Naoki added the comment:
New changeset 855e68855eeb06f8f0319b3366d3a012c2ff2041 by pxinwr in branch
'master':
bpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447)
https://github.com/python/cpython/commit/855e68855eeb06f8f0319b3366d3a012c2ff2041
--
nosy
Inada Naoki added the comment:
New changeset 5798f787779006a94a55ec74a86da4627de90146 by wasiher in branch
'master':
bpo-41340: Removed fallback implementation for strdup (GH-21634)
https://github.com/python/cpython/commit/5798f787779006a94a55ec74a86da4627de90146
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
@fj92f3jj923f923 Would you update the PR to remove the strdup.c?
--
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
Thank you.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 680254a8dc64e3ada00f88a7c42d41eb02108353 by Henry Schreiner in
branch 'master':
bpo-41366: Fix clang warning for sign conversion (GH-21592)
https://github.com/python/cpython/commit/680254a8dc64e3ada00f88a7c42d41eb02108353
--
nosy
Change by Inada Naoki :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue10879>
___
se case that you can
share many keys.
In general, combined dict is little faster and much efficient.
--
Inada Naoki
--
https://mail.python.org/mailman/listinfo/python-list
Change by Inada Naoki :
--
pull_requests: +20706
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/21560
___
Python tracker
<https://bugs.python.org/issu
Change by Inada Naoki :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/i
Inada Naoki added the comment:
Can we just remove strdup.c? How about hypot.c?
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
This issue is not duplicate of #23882.
In the example, test1 and test1.test2 are namespace package. But they are
specified explicitly.
`./python.exe -m unittest discover test1.test2`
--
___
Python tracker
<ht
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 902356a7b0564e2c9659aaec56211de4d37109d0 by Inada Naoki in branch
'master':
bpo-41338: Fix DeprecationWarning in tests (GH-21542)
https://github.com/python/cpython/commit/902356a7b0564e2c9659aaec56211de4d37109d0
Inada Naoki added the comment:
In such case, both directories must be specified explicitly.
Test discovery doesn't know that a directory is namespace package or
namespace package. So it shouldn't assume it is namespace package unless
specified.
Note that PEP 420 searches namespace package
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20684
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21542
___
Python tracker
<https://bugs.python.org/issu
Change by Inada Naoki :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> unittest discovery doesn't detect namespace packages when given
no parameters
___
Python tracker
<https://bugs.python
Inada Naoki added the comment:
Searching into directory without __init__.py recursively is not only
inefficient, but also dangerous.
project/
- mylib/
- __init__.py
- foo.py
- tests/
- __init__.py
- test_foo.py
- tools/
- bin
Change by Inada Naoki :
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> unittest discovery doesn't detect namespace packages when given
no parameters
___
Python tracker
<https://
Inada Naoki added the comment:
I think people misunderstanding and misusing PEP 420, withouth knowing what is
namespace package for.
I had wrote an article to describe namespace package is not a regular package.
https://dev.to/methane/don-t-omit-init-py-3hga
Inada Naoki added the comment:
I had rejected this idea in #29642. This is a copy of my comments in the issue.
---
I'm afraid this change makes testloader searches unrelated directory contains
massive files (like node_modules).
I don't think loading all tests from whole namespace package
Change by Inada Naoki :
--
superseder: -> unittest discovery doesn't detect namespace packages when given
no parameters
___
Python tracker
<https://bugs.python.org/issu
On Sun, Jul 19, 2020 at 6:38 AM Marco Sulla
wrote:
>
> On Sat, 18 Jul 2020 at 10:02, Inada Naoki wrote:
>>
>> On Sat, Jul 18, 2020 at 7:05 AM Marco Sulla
>> wrote:
>> > For what I know, CPython uses PyDictObject for kwargs. Since dicts are
>> > muta
Inada Naoki added the comment:
But how many new Python web application use CJK codec instead of UTF-8?
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue41
hon uses PyDictObject for kwargs. Since dicts are
> mutable, it's a problem to cache them properly.
>
On caller side, Python doesn't use dict at all.
On callee side, dict is used for `**kwargs`. But changing it to frozendict is
backward incompatible change.
> On Fri, 17 Jul 2020 at 04:1
On Fri, Jul 17, 2020 at 2:16 AM Marco Sulla
wrote:
>
> On Thu, 16 Jul 2020 at 06:11, Inada Naoki wrote:
> > On Thu, Jul 16, 2020 at 2:32 AM Marco Sulla
> > wrote:
> > > Yes, but, instead of creating a view, you can create and cache the
> > > pointer of a &qu
On Thu, Jul 16, 2020 at 2:32 AM Marco Sulla
wrote:
>
> On Wed, 15 Jul 2020 at 08:07, Inada Naoki wrote:
> > I don't think so. The view objects are useful when we need a set-like
> > operation. (e.g. `assert d.keys() == {"spam", "egg"}`)
>
> Yes, but
t needed for an
> immutable one. frozendict could create lazily an object that contains
> all its keys and cache it.
I don't think so. The view objects are useful when we need a set-like
operation. (e.g. `assert d.keys() == {"spam", "egg"}`)
There is no difference between mutable and immutable dicts.
--
Inada Naoki
--
https://mail.python.org/mailman/listinfo/python-list
Change by Inada Naoki :
--
pull_requests: +20622
pull_request: https://github.com/python/cpython/pull/21479
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
(Off topic) There is a very common mistake in this code:
```
with oepn(filepath, 'r') as f:
data = json.load(f)
```
JSON file is encoded in UTF-8. But the default text encoding is locale encoding.
You should do this instead:
```
with oepn(filepath, 'rb
Inada Naoki added the comment:
Would you be more specific about why you need that feature on the Python-ideas
mailing list or "Ideas" category on discuss.python.org?
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.o
Inada Naoki added the comment:
New changeset 9ce8132e1f2339cfe116dfd4795574182c2245b4 by Inada Naoki in branch
'master':
bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)
https://github.com/python/cpython/commit/9ce8132e1f2339cfe116dfd4795574182c2245b4
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 16f451744b7f4653ca9db4b4bedbb6fc5c0de154 by Inada Naoki in branch
'3.9':
bpo-41211: Doc: Fix PyLong_FromUnicode (GH-21331)
https://github.com/python/cpython/commit/16f451744b7f4653ca9db4b4bedbb6fc5c0de154
Change by Inada Naoki :
--
pull_requests: +20481
pull_request: https://github.com/python/cpython/pull/21331
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
New changeset 9c8441712230660fedac818ed50e7cdd89e4c51d by Inada Naoki in branch
'master':
bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325)
https://github.com/python/cpython/commit/9c8441712230660fedac818ed50e7cdd89e4c51d
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20475
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21325
___
Python tracker
<https://bugs.python.org/issu
New submission from Inada Naoki :
```
.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base)
Convert a sequence of Unicode digits in the string *u* to a Python integer
value. The Unicode string is first encoded to a byte string using
:c:func
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20461
pull_request: https://github.com/python/cpython/pull/21309
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
As we discussed in ML, PyEval_ReleaseLock is still used and removing may be not
simple. Keep it as-is until Python 4.0.
--
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
Hmm. You are right. The warnings are shown by default.
On the other hand, some project uses custom `setup.py test` command. It hides
the DeprecationWarning.
https://github.com/warner/python-ed25519/blob/master/setup.py
https://github.com/warner/python-ed25519
Inada Naoki added the comment:
I found most of deprecated items in my first comment are aliving by difficult
reasons.
I grepped top 4000 packages and found some candidates to deprecate.
## turtle
* settiltangle is not used anywhere.
* tiltangle is also deprecated by docstring
Inada Naoki added the comment:
For the record, I noticed DeprecationWarning is not shown by unittest.runner by
default.
For example, https://travis-ci.org/github/necaris/python3-openid/jobs/703119609
So deprecated aliases should be not removed in 3.10
Inada Naoki added the comment:
I don't propose adding DeprecationWarning in 3.9 in this issue.
I don't propose removing functions that don't emit DeprecationWarning.
My first message is just a starting point. I don't propose to remove them all
Change by Inada Naoki :
--
title: [Python 3.10] Remove APIs deprecated since Python 3.3 -> [Python 3.10]
Remove APIs deprecated long enough
___
Python tracker
<https://bugs.python.org/issu
Change by Inada Naoki :
--
pull_requests: +20425
pull_request: https://github.com/python/cpython/pull/21276
___
Python tracker
<https://bugs.python.org/issue41
Change by Inada Naoki :
--
keywords: +easy
___
Python tracker
<https://bugs.python.org/issue41165>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
Unittest aliases are deprecated in #9424.
Can we remove them in Python 3.10?
--
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
Can we remove these aliases in Python 3.10?
(See also #41165)
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue9
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20423
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21273
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
FWI, I wrote my idea in python-ideas mailing list.
https://mail.python.org/archives/list/python-id...@python.org/message/VKBXY7KDI2OGESB7IPAMAIIHKR4TC7TQ/
--
___
Python tracker
<https://bugs.python.org/issue36
New submission from Inada Naoki :
PyArg_ParseTuple has 'U' format for getting Unicode as PyObject*.
But when user want accept "str or None", they are forced to use 'O&' and write
a custom converter. It is not convenient.
I am proposing to add 'U?' for "str or None&quo
Inada Naoki added the comment:
New changeset 038dd0f79dc89566b01ba66a5a018266b2917a19 by Inada Naoki in branch
'master':
bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933)
https://github.com/python/cpython/commit/038dd0f79dc89566b01ba66a5a018266b2917a19
Inada Naoki added the comment:
New changeset 2ea6a9928e4fa135888cc8f4733c28d93e642301 by Inada Naoki in branch
'3.9':
bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)
https://github.com/python/cpython/commit/2ea6a9928e4fa135888cc8f4733c28d93e642301
Inada Naoki added the comment:
PyModule_GetFilename, PyEval_AcquireLock, PyEval_ReleaseLock.
Are they part of stable ABI?
--
___
Python tracker
<https://bugs.python.org/issue41
New submission from Inada Naoki :
I don't think we need to remove them all at onece. But we can remove some of
them for code health.
c-api/module.rst
.. c:function:: const char* PyModule_GetFilename(PyObject *module)
.. deprecated:: 3.2
c-api/init.rst
.. c:function:: void
Change by Inada Naoki :
--
pull_requests: +20380
pull_request: https://github.com/python/cpython/pull/21227
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
New changeset b3332660adb02babb7e66e45310c66dc9a9a94da by Inada Naoki in branch
'master':
bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)
https://github.com/python/cpython/commit/b3332660adb02babb7e66e45310c66dc9a9a94da
Change by Inada Naoki :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> asyncio.Task.all_tasks() and asyncio.Task.current_task() must
be removed in 3.9
___
Python tracker
<https://bugs.python
New submission from Inada Naoki :
They are documented as "will be removed in version 3.9", but they are not
removed in 3.9 beta.
* Remove them in 3.10.
* Update ~3.9 documents to "will be removed in version 3.10"
--
components: asyncio
messages: 372557
nosy: a
Change by Inada Naoki :
--
pull_requests: +20363
pull_request: https://github.com/python/cpython/pull/21209
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
PyUnicode_AsUnicodeCopy is not used in top 4000 packages. Let's remove it too.
--
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
New changeset 02134dae448c7885c9c07adfc6970f878db33372 by Inada Naoki in branch
'3.9':
bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)
https://github.com/python/cpython/commit/02134dae448c7885c9c07adfc6970f878db33372
Change by Inada Naoki :
--
pull_requests: +20360
pull_request: https://github.com/python/cpython/pull/21205
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
New changeset e4f1fe6edb216e04da03ae80b462ca273f00255b by Inada Naoki in branch
'master':
bpo-41123: Remove PyLong_FromUnicode() (GH-21204)
https://github.com/python/cpython/commit/e4f1fe6edb216e04da03ae80b462ca273f00255b
Change by Inada Naoki :
--
pull_requests: +20359
pull_request: https://github.com/python/cpython/pull/21204
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
New changeset d9f2a13106254c53550583adca70aeb3979f2993 by Inada Naoki in branch
'master':
bpo-41123: Remove PyUnicode_GetMax() (GH-21192)
https://github.com/python/cpython/commit/d9f2a13106254c53550583adca70aeb3979f2993
Inada Naoki added the comment:
I confirmed PyUnicode_GetMax is not used in top4000 packages.
--
___
Python tracker
<https://bugs.python.org/issue41123>
___
___
Change by Inada Naoki :
--
pull_requests: +20346
pull_request: https://github.com/python/cpython/pull/21192
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
APIs have /* Py_DEPRECATED(3.3) */
* PyUnicode_EncodeDecimal
It is used in PyLong_FromUnicode. Deprecate in 3.10 and remove in 3.12
* PyUnicode_TransformDecimalToASCII
While PEP 393 deprecate this too, its document doesn't has ``deprecated``.
Deprecate
Change by Inada Naoki :
--
pull_requests: +20337
pull_request: https://github.com/python/cpython/pull/21181
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
> a) Can we replace 4.0 with 3.10 and remove them in 3.10?
> b) Or should we replace 4.0 with 3.11 and wait one more year?
I chose this because they are deprecated since 3.3, and Py_DEPRECATED is used
sin
Inada Naoki added the comment:
New changeset 20a79021753ab26a5989e6d3397160e52973870e by Inada Naoki in branch
'master':
bpo-41123: Remove Py_UNICODE_str* functions (GH-21164)
https://github.com/python/cpython/commit/20a79021753ab26a5989e6d3397160e52973870e
Inada Naoki added the comment:
+1 for UTF-8 always.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue41137>
___
___
Python-bugs-list mailin
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20322
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21164
___
Python tracker
<https://bugs.python.org/issu
New submission from Inada Naoki :
# APIs relating to wstr
Since some APIs did not have Py_DEPRECATE until 3.9 (see GH-20941), it can not
be removed in 3.10. I wrote PEP 623 for them.
This issue doesn't about them.
# Deprecated since Python 3.3, and not documented.
In Python 3.3 what's new
Inada Naoki added the comment:
I added deprecated directive in GH-21162.
--
___
Python tracker
<https://bugs.python.org/issue41099>
___
___
Python-bugs-list m
Inada Naoki added the comment:
I prefer `PyObject_CallFunction(PyExc_UnicodeTranslateError, ...)` because
UnicodeTranslateError is not so popular for third party libraries.
I don't think we should provide public stable API for convenient
Inada Naoki added the comment:
See #41099 for PyUnicodeTranslateError_Create.
--
___
Python tracker
<https://bugs.python.org/issue41098>
___
___
Python-bug
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20321
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21162
___
Python tracker
<https://bugs.python.org/issu
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 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed by Inada Naoki in branch
'master':
bpo-41103: Remove old buffer protocol support (#21117)
https://github.com/python/cpython/commit/6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +20280
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21117
___
Python tracker
<https://bugs.python.org/issu
New submission from Inada Naoki :
https://docs.python.org/3/c-api/objbuffer.html
Old buffer protocol has been deprecated since Python 3.0.
It was useful to make transition from Python 2 easy.
But it's time to remove.
--
components: C API
messages: 372251
nosy: inada.naoki
priority
New submission from Inada Naoki :
PyUnicodeTranslateError_Create marked as Py_DEPRECATED since it receives
Py_UNICODE* as an argument.
But it is not deprecated in the document.
On the other hand, we have alternative private API which accepts Unicode
object: _PyUnicodeTranslateError_Create
New submission from Inada Naoki :
PyUnicodeEncodeError_Create is using Py_UNICODE and is marked
Py_DEPRECATED(3.3).
But it is not deprecated in doc yet.
There are no alternative API. In CPython code base, UnicodeEncodeError is
created by `PyObject_CallFunction(PyExc_UnicodeEncodeError
Inada Naoki added the comment:
>
> Manuel Jacob added the comment:
>
> If the encoding supports it, since which Python version do
> Py_DecodeLocale() and os.fsencode() roundtrip?
>
Maybe, since Python 3.2. FWIW, fsencode is added by Victor in
https://bugs.py
Inada Naoki added the comment:
New changeset 610a60c601fb4380eee30e15be1cd4dcbdaeec4c by Inada Naoki in branch
'3.9':
bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878)
https://github.com/python/cpython/commit/610a60c601fb4380eee30e15be1cd4dcbdaeec4c
Change by Inada Naoki :
--
nosy: +inada.naoki
versions: +Python 3.10 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue41002>
___
___
Python-bug
Inada Naoki added the comment:
There is no strict guarantee.
I think ASCII, UTF-8, latin1 with surrogateescape guarantee roundtrip.
Other legacy encodings like cp932 may not roundtrip. But it is not a huge
problem because only Windows use them typically.
On Windows:
* wchar_t is used
601 - 700 of 3179 matches
Mail list logo