[issue41431] Optimize dict_merge for copy

2020-08-03 Thread Inada Naoki
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-08-01 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41445] Adding configure temporary files to gitignore

2020-07-31 Thread Inada Naoki
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

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
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

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
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

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
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

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
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

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
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

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
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

[issue31904] Python should support VxWorks RTOS

2020-07-27 Thread Inada Naoki
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

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-26 Thread Inada Naoki
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

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

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

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-25 Thread Inada Naoki
Inada Naoki added the comment: @fj92f3jj923f923 Would you update the PR to remove the strdup.c? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread Inada Naoki
Inada Naoki added the comment: Thank you. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41366] sign-conversion warning in 3.9 beta

2020-07-23 Thread Inada Naoki
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

[issue10879] cgi memory usage

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue10879> ___

Re: frozendict: an experiment

2020-07-20 Thread Inada Naoki
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

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

2020-07-20 Thread Inada Naoki
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

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

2020-07-20 Thread Inada Naoki
Change by Inada Naoki : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/i

[issue41340] Not very good strcpy implementation in cpython/Python/strdup.c

2020-07-20 Thread Inada Naoki
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

[issue36777] unittest discover throws TypeError on namespace packages

2020-07-19 Thread Inada Naoki
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

[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

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

[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

2020-07-19 Thread Inada Naoki
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

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

2020-07-19 Thread Inada Naoki
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

[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

2020-07-19 Thread Inada Naoki
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

[issue36723] Unittest Discovery for namespace subpackages dot notation fails

2020-07-18 Thread Inada Naoki
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

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

2020-07-18 Thread Inada Naoki
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

[issue35617] unittest discover does not work with implicit namespaces

2020-07-18 Thread Inada Naoki
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://

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

2020-07-18 Thread Inada Naoki
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

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

2020-07-18 Thread Inada Naoki
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

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2020-07-18 Thread Inada Naoki
Change by Inada Naoki : -- superseder: -> unittest discovery doesn't detect namespace packages when given no parameters ___ Python tracker <https://bugs.python.org/issu

Re: frozendict: an experiment

2020-07-18 Thread Inada Naoki
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

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Inada Naoki
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

Re: frozendict: an experiment

2020-07-18 Thread Inada Naoki
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

Re: frozendict: an experiment

2020-07-16 Thread Inada Naoki
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

Re: frozendict: an experiment

2020-07-15 Thread Inada Naoki
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

Re: frozendict: an experiment

2020-07-15 Thread Inada Naoki
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

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-14 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20622 pull_request: https://github.com/python/cpython/pull/21479 ___ Python tracker <https://bugs.python.org/issue36

[issue41284] High Level API for json file parsing

2020-07-13 Thread Inada Naoki
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

[issue41285] memoryview does not support subclassing

2020-07-13 Thread Inada Naoki
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

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

2020-07-05 Thread Inada Naoki
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

[issue41211] PyLong_FromUnicodeObject document is wrong

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

[issue41211] PyLong_FromUnicodeObject document is wrong

2020-07-04 Thread Inada Naoki
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

[issue41211] PyLong_FromUnicodeObject document is wrong

2020-07-04 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20481 pull_request: https://github.com/python/cpython/pull/21331 ___ Python tracker <https://bugs.python.org/issue41

[issue41211] PyLong_FromUnicodeObject document is wrong

2020-07-04 Thread Inada Naoki
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

[issue41211] PyLong_FromUnicodeObject document is wrong

2020-07-04 Thread Inada Naoki
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

[issue41211] PyLong_FromUnicodeObject document is wrong

2020-07-04 Thread Inada Naoki
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

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

2020-07-03 Thread Inada Naoki
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

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

2020-07-03 Thread Inada Naoki
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

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

2020-07-02 Thread Inada Naoki
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

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

2020-07-02 Thread Inada Naoki
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

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

2020-07-02 Thread Inada Naoki
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

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

2020-07-02 Thread Inada Naoki
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

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

2020-07-02 Thread Inada Naoki
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

[issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3

2020-07-02 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20425 pull_request: https://github.com/python/cpython/pull/21276 ___ Python tracker <https://bugs.python.org/issue41

[issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3

2020-07-02 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +easy ___ Python tracker <https://bugs.python.org/issue41165> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3

2020-07-02 Thread Inada Naoki
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

[issue9424] Deprecate assertEquals, assertNotEquals, assert_, assertAlmostEquals, assertNotAlmostEquals

2020-07-02 Thread Inada Naoki
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

[issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3

2020-07-01 Thread Inada Naoki
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

[issue36839] Support the buffer protocol in code objects

2020-07-01 Thread Inada Naoki
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

[issue41167] Add new formats to PyArg_ParseTuple for "str or None"

2020-06-30 Thread Inada Naoki
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

[issue36346] Prepare for removing the legacy Unicode C API

2020-06-30 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-30 Thread Inada Naoki
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

[issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3

2020-06-29 Thread Inada Naoki
Inada Naoki added the comment: PyModule_GetFilename, PyEval_AcquireLock, PyEval_ReleaseLock. Are they part of stable ABI? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41165] [Python 3.10] Remove APIs deprecated since Python 3.3

2020-06-29 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-29 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20380 pull_request: https://github.com/python/cpython/pull/21227 ___ Python tracker <https://bugs.python.org/issue41

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-29 Thread Inada Naoki
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

[issue41156] Remove Task.all_tasks and Task.current_task

2020-06-29 Thread Inada Naoki
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

[issue41156] Remove Task.all_tasks and Task.current_task

2020-06-29 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-29 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20363 pull_request: https://github.com/python/cpython/pull/21209 ___ Python tracker <https://bugs.python.org/issue41

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-29 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-28 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-28 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20360 pull_request: https://github.com/python/cpython/pull/21205 ___ Python tracker <https://bugs.python.org/issue41

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-28 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-28 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20359 pull_request: https://github.com/python/cpython/pull/21204 ___ Python tracker <https://bugs.python.org/issue41

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-28 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-28 Thread Inada Naoki
Inada Naoki added the comment: I confirmed PyUnicode_GetMax is not used in top4000 packages. -- ___ Python tracker <https://bugs.python.org/issue41123> ___ ___

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20346 pull_request: https://github.com/python/cpython/pull/21192 ___ Python tracker <https://bugs.python.org/issue41

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-27 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20337 pull_request: https://github.com/python/cpython/pull/21181 ___ Python tracker <https://bugs.python.org/issue41

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-27 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-27 Thread Inada Naoki
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

[issue41137] pdb uses the locale encoding for .pdbrc

2020-06-27 Thread Inada Naoki
Inada Naoki added the comment: +1 for UTF-8 always. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/issue41137> ___ ___ Python-bugs-list mailin

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-25 Thread Inada Naoki
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

[issue41123] Remove Py_UNICODE APIs except PEP 623

2020-06-25 Thread Inada Naoki
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

[issue41099] Deprecating PyUnicodeTranslateError_Create

2020-06-25 Thread Inada Naoki
Inada Naoki added the comment: I added deprecated directive in GH-21162. -- ___ Python tracker <https://bugs.python.org/issue41099> ___ ___ Python-bugs-list m

[issue41099] Deprecating PyUnicodeTranslateError_Create

2020-06-25 Thread Inada Naoki
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

[issue41098] Deprecating PyUnicodeEncodeError_Create

2020-06-25 Thread Inada Naoki
Inada Naoki added the comment: See #41099 for PyUnicodeTranslateError_Create. -- ___ Python tracker <https://bugs.python.org/issue41098> ___ ___ Python-bug

[issue41098] Deprecating PyUnicodeEncodeError_Create

2020-06-25 Thread Inada Naoki
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

[issue41103] Removing old buffer support

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

[issue41103] Removing old buffer support

2020-06-25 Thread Inada Naoki
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

[issue41002] HTTPResponse.read with amt is slow

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

[issue41103] Removing old buffer support

2020-06-24 Thread Inada Naoki
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

[issue41103] Removing old buffer support

2020-06-24 Thread Inada Naoki
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

[issue41099] Deprecating PyUnicodeTranslateError_Create

2020-06-24 Thread Inada Naoki
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

[issue41098] Deprecating PyUnicodeEncodeError_Create

2020-06-24 Thread Inada Naoki
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

[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-18 Thread Inada Naoki
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

[issue36346] Prepare for removing the legacy Unicode C API

2020-06-18 Thread Inada Naoki
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

[issue41002] HTTPResponse.read with amt is slow

2020-06-17 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki versions: +Python 3.10 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue41002> ___ ___ Python-bug

[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-17 Thread Inada Naoki
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

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