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 namespa
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.p
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
<htt
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 namespa
Change by Inada Naoki :
--
superseder: -> unittest discovery doesn't detect namespace packages when given
no parameters
___
Python tracker
<https://bugs.python.org
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
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(fil
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/9ce8132e1f2339cfe116dfd4795574
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/16f451744b7f4653ca9db4b4bedbb6
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/9c8441712230660fedac818ed50e7c
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, but not in
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 propos
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?'
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/038dd0f79dc89566b01ba66a5a0182
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/2ea6a9928e4fa135888cc8f4733c28
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::
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/b3332660adb02babb7e66e45310c66
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/is
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/02134dae448c7885c9c07adfc6970f
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/e4f1fe6edb216e04da03ae80b462ca
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/d9f2a13106254c53550583adca70ae
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``.
Depr
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/20a79021753ab26a5989e6d3397160
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&
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 conve
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/6f8a6ee59cb7f99f68df8ee9c3e8c8
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
pri
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.python.or
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/610a60c601fb4380eee30e15be1cd4
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 in
Change by Inada Naoki :
--
pull_requests: +20122
pull_request: https://github.com/python/cpython/pull/20941
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
New changeset 8e34e92caa73259620dd242b92d26edd0949b4ba by Inada Naoki in branch
'master':
bpo-36346: Make unicodeobject.h C89 compatible (GH-20934)
https://github.com/python/cpython/commit/8e34e92caa73259620dd242b92d26e
Change by Inada Naoki :
--
pull_requests: +20113
pull_request: https://github.com/python/cpython/pull/20934
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
Oh, why I can not use C99?
```
/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:
In function ‘Py_UNICODE_FILL’:
/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:56:5:
error: ‘for
Change by Inada Naoki :
--
pull_requests: +20112
pull_request: https://github.com/python/cpython/pull/20933
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
New changeset 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d by Inada Naoki in branch
'master':
bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878)
https://github.com/python/cpython/commit/2c4928d37edc5e4aeec3c0b79fa346
Change by Inada Naoki :
--
pull_requests: +20106
pull_request: https://github.com/python/cpython/pull/20927
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
New changeset de4304dad8e035dbbb57d653e685312eead816df by Zackery Spytz in
branch 'master':
bpo-19569: Add a macro to suppress deprecation warnings (GH-9004)
https://github.com/python/cpython/commit/de4304dad8e035dbbb57d653e685312eead816df
-
Change by Inada Naoki :
--
pull_requests: +20066
pull_request: https://github.com/python/cpython/pull/20879
___
Python tracker
<https://bugs.python.org/issue36
Change by Inada Naoki :
--
pull_requests: +20065
pull_request: https://github.com/python/cpython/pull/20878
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
New changeset 2145c8c9724287a310bc77a2760d4f1c0ca9eb0c by native-api in branch
'master':
bpo-33944: site: Add site-packages tracing in verbose mode (GH-12110)
https://github.com/python/cpython/commit/2145c8c9724287a310bc77a2760d4f1c0ca9eb0c
-
Inada Naoki added the comment:
I feel ABC is too much for just single dunder method.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue35
Change by Inada Naoki :
--
nosy: -inada.naoki
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 07d81128124f2b574808e33267c38b104b42ae2a by Dennis Sweeney in
branch 'master':
bpo-40889: Optimize dict.items() ^ dict.items() (GH-20718)
https://github.com/python/cpython/commit/07d81128124f2b574808e33267c38b104b42ae2a
-
Inada Naoki added the comment:
+1.
--
___
Python tracker
<https://bugs.python.org/issue40890>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Inada Naoki :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34023>
___
___
Inada Naoki added the comment:
> Would the best way to address this be adding new KeysProxy, ValuesProxy, and
> ItemsProxy types?
I feel it is too much. Until real high need is demonstrated, I don't want to
introduce such complexity.
--
nosy: +
Inada Naoki added the comment:
Thanks.
--
nosy: +inada.naoki
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset 47a23fc63fa5df2da8dbc542e78e521d4a7f10c9 by Hai Shi in branch
'master':
bpo-40898: Remove redundant if statements in tp_traverse (GH-20692)
https://github.com/python/cpython/commit/47a23fc63fa5df2da8dbc542e78e52
Inada Naoki added the comment:
I think it's time to abandon chm file. It is too old. MS doesn't maintain it
anymore.
Let's promote ePub and PDF instead.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.pyt
Inada Naoki added the comment:
I use it often when I investigate memory usage.
It provides some useful information even in release Python build. For example:
* Which size class is most allocated?
* How many block are allocated?
* Which size class have most free blocks? (e.g. Inner
Inada Naoki added the comment:
Would you close this issue?
--
___
Python tracker
<https://bugs.python.org/issue40328>
___
___
Python-bugs-list mailing list
Unsub
Inada Naoki added the comment:
New changeset d5d9a718662e67e2b1ac7874dda9df2d8d71d415 by Inada Naoki in branch
'master':
bpo-36346: array: Don't use deprecated APIs (GH-19653)
https://github.com/python/cpython/commit/d5d9a718662e67e2b1ac7874d
Change by Inada Naoki :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue40575>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
On Sat, May 9, 2020 at 6:08 PM Filipe Laíns wrote:
>
> > * Travis-CI, at least, does test against "merge commit", not HEAD of PR
> > branch.
>
> Where? https://github.com/python/cpython/blob/master/.travis.yml
https://docs.t
Inada Naoki added the comment:
> See also
> https://mail.python.org/archives/list/python-committ...@python.org/thread/WEU5CQKIA4LIHWHT53YA7HHNUY5H2FUT/.
> This was a problem with other CI GitHub actions when a change had to be
> merged to master with which all PRs need to
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
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
__
601 - 700 of 3039 matches
Mail list logo