Inada Naoki added the comment:
New changeset 9dfefbe3e2dc548ad306870b56cc0cb475aa20a2 by Inada Naoki in branch
'master':
bpo-43651: Fix EncodingWarning in `pydoc`. (GH-25644)
https://github.com/python/cpython/commit/9dfefbe3e2dc548ad306870b56cc0c
Change by Inada Naoki :
--
pull_requests: +24338
pull_request: https://github.com/python/cpython/pull/25645
___
Python tracker
<https://bugs.python.org/issue43
Inada Naoki added the comment:
New changeset cfe523b49280cdc8c239c807121ad3f33552f638 by Inada Naoki in branch
'master':
bpo-43651: PEP 597: Fix `socket.makefile()` (GH-25645)
https://github.com/python/cpython/commit/cfe523b49280cdc8c239c807121ad3
Change by Inada Naoki :
--
pull_requests: +24339
pull_request: https://github.com/python/cpython/pull/25648
___
Python tracker
<https://bugs.python.org/issue43
Change by Inada Naoki :
--
pull_requests: +24341
pull_request: https://github.com/python/cpython/pull/25650
___
Python tracker
<https://bugs.python.org/issue43
Inada Naoki added the comment:
New changeset caae717c2903fff4704b59714bc0c65d60108321 by Inada Naoki in branch
'master':
bpo-43651: Fix EncodingWarning in zipfile (GH-25650)
https://github.com/python/cpython/commit/caae717c2903fff4704b59714bc0c6
Inada Naoki added the comment:
New changeset 878bc8b6c2051cf344c594636fa957ce6c9d2188 by Inada Naoki in branch
'master':
bpo-43651: Fix EncodingWarning in fileinput and its test (GH-25648)
https://github.com/python/cpython/commit/878bc8b6c2051cf344c594636fa957
Change by Inada Naoki :
--
pull_requests: +24345
pull_request: https://github.com/python/cpython/pull/25654
___
Python tracker
<https://bugs.python.org/issue43
Change by Inada Naoki :
--
pull_requests: +24346
pull_request: https://github.com/python/cpython/pull/25655
___
Python tracker
<https://bugs.python.org/issue43
Inada Naoki added the comment:
namespace package support is broken since Python 3.7.
See https://bugs.python.org/issue23882#msg387549
We can not use namespace package even if top level directory is specified.
--
___
Python tracker
<ht
Inada Naoki added the comment:
New changeset 5c84bb506aaca01f5f750116d8f7a41d41f8124d by Inada Naoki in branch
'master':
bpo-37751: Update `codecs.register()` doc. (GH-25643)
https://github.com/python/cpython/commit/5c84bb506aaca01f5f750116d8f7a4
Inada Naoki added the comment:
New changeset cf9d65c5af7905d9e9945a297dbbf15d3bcace15 by Miss Islington (bot)
in branch '3.9':
bpo-37751: Update `codecs.register()` doc. (GH-25643)
https://github.com/python/cpython/commit/cf9d65c5af7905d9e9945a297dbbf1
Inada Naoki added the comment:
I propose to remove the namespace package support entirely.
* No user (since it has been broken from Python 3.7)
* Hard to maintain (we haven't noted it)
* Hard to explain (need to specify the top directory. don't search recursively.
See
Inada Naoki added the comment:
New changeset 8557edbfa8f74514de82feea4c62f5963e4e0aa7 by Hristo Venev in
branch 'master':
bpo-24275: Don't downgrade unicode-only dicts to mixed on lookups (GH-25186)
https://github.com/python/cpython/commit/8557edbfa8f74514de82feea4
Change by Inada Naoki :
--
resolution: remind -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
New changeset fa51c0c448aca9fe5d4e8bc02e71de528931778b by Inada Naoki in branch
'master':
bpo-43651: Fix EncodingWarning in tests. (GH-25655)
https://github.com/python/cpython/commit/fa51c0c448aca9fe5d4e8bc02e71de
Inada Naoki added the comment:
New changeset a69256527f93d2aa32e76658deab829e324d97b6 by Inada Naoki in branch
'master':
bpo-43651: Fix EncodingWarning in `os.fdopen()` and test_os (GH-25654)
https://github.com/python/cpython/commit/a69256527f93d2aa32e76658deab82
Inada Naoki added the comment:
New changeset e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f by Inada Naoki in branch
'master':
bpo-41139: Deprecate `cgi.log()` (GH-25625)
https://github.com/python/cpython/commit/e52ab42cedd2a5ef4c3c1a47d0cf96
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: +24405
pull_request: https://github.com/python/cpython/pull/25715
___
Python tracker
<https://bugs.python.org/issue43
Inada Naoki added the comment:
New changeset 53dd6c99b39d90935c00bc1558582e494641248e by Inada Naoki in branch
'master':
bpo-43651: Fix test_logging (GH-25715)
https://github.com/python/cpython/commit/53dd6c99b39d90935c00bc1558582e
Inada Naoki added the comment:
+1 to Eryk.
> Hence my newbie questions are:
1) What problem are you trying to solve by this "unlinking trick"?
Same to TempoaryFile in Unix.
2) Do we need to have a separate issue raised for this problem?
I don't think so. We didn't u
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +24472
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25781
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
New changeset fd0bc7e7f4f2c7de98a1ebc7ad1ef65b8f8f7ad6 by Inada Naoki in branch
'master':
bpo-43733: netrc try to use UTF-8 before using locale encoding. (GH-25781)
https://github.com/python/cpython/commit/fd0bc7e7f4f2c7de98a1ebc7ad1ef6
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Inada Naoki :
Ref: https://www.python.org/dev/peps/pep-0624/
--
components: C API
messages: 392862
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 624: Remove Py_UNICODE APIs
versions: Python 3.11
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +24556
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25881
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
There is a still warning, not error.
https://github.com/python/cpython/blob/985ac016373403e8ad41f8d563c4355ffa8d49ff/Python/getargs.c#L2535-L2542
--
resolution: fixed ->
status: closed -> open
___
Python t
Inada Naoki added the comment:
>Why PR 20784 has been merged? Was not the plan to emit a deprecation warning
>first?
We had been emitted DeprecationWarning since Python 3.8. See GH-12473.
GH-20784 changed the DeprecationWarning to Syste
Change by Inada Naoki :
--
pull_requests: +24605
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/25937
___
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
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
For the record, I noticed PyUnicode_InternImmortal() is a stable ABI.
We may need to keep the function to avoid dynamic link errors.
But we can still change its implementation to just raise an exception
New submission from Inada Naoki :
These APIs are deprecated since Python 3.3. They are not documented too.
```
#ifdef MS_WINDOWS
Py_DEPRECATED(3.3)
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
PyObject *, const Py_UNICODE *);
/* XXX redeclare to use WSTRING
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +24661
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26011
___
Python tracker
<https://bugs.python.org/issu
Change by Inada Naoki :
--
pull_requests: +24739
pull_request: https://github.com/python/cpython/pull/26098
___
Python tracker
<https://bugs.python.org/issue44
Inada Naoki added the comment:
It seems they are stable ABI.
https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L604
https://github.com/python/cpython/blob/56b8ea65d28bd865e2363e10e9f1c2ca3433ffc2/Misc/stable_abi.txt#L614
We may need to keep
Change by Inada Naoki :
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue44214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
> I'm struggling with how to adapt the code to provide a uniform interface on
> Python 3.6+.
It's easy. Just passing `mode="rb"`.
```
FileInput(filelist, mode="rb", openhook=fileinput.hook_compressed)
```
This is be
Inada Naoki added the comment:
For class dict, there is a method cache.
For instance dict, there is a LOAD_ATTR optimization.
https://github.com/python/cpython/blob/b11a951f16f0603d98de24fee5c023df83ea552c/Python/ceval.c#L3458
So I want to see the performance gain of the optimization using
Inada Naoki added the comment:
> I did consider and confirm that mode="rb" does also provide a uniform
> solution, but it also regresses the behavior of uncompressed inputs, making
> them bytes where they were text.
Of course, I suggested to use "rb" when yo
Inada Naoki added the comment:
> What about normal sets?
pyc files don't contain a regular set. So it is out of scope of this issue.
--
nosy: +methane
___
Python tracker
<https://bugs.python.org
Inada Naoki added the comment:
> If that's the case, then the argument Raymond provided against preserving
> order does not seem that relevant, as we would only need to preserve the
> order in the creation operation.
Note that PYC files are marshalled from code objects inclu
New submission from Inada Naoki :
_lru_list_elem is internal data strucuture. It is intended to be used only in
_lru_cache_wrapper.
Until Python 3.9, it is not exposed. But it is exposed by dd3912 accidentally.
--
components: Extension Modules
keywords: 3.10regression
messages: 394626
Inada Naoki added the comment:
Ref: GH-23405.
--
___
Python tracker
<https://bugs.python.org/issue44256>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +25010
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26416
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
New changeset 28be3191a9db2769ed05e55c6bcbccdd029656dd by Inada Naoki in branch
'main':
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)
https://github.com/python/cpython/commit/28be3191a9db2769ed05e55c6bcbcc
Inada Naoki added the comment:
New changeset 35be1f3602c8c66199d8c0a2f2805115864235fb by Miss Islington (bot)
in branch '3.10':
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)
https://github.com/python/cpython/commit/35be1f3602c8c66199d8c0a2f28051
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
Can we close this issue?
--
___
Python tracker
<https://bugs.python.org/issue44206>
___
___
Python-bugs-list mailing list
Unsub
Inada Naoki added the comment:
Do you use PowerShell?
Please run this command and paste the output.
```
PS> $OutputEncoding
PS> [System.Console]::OutputEncoding
```
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/i
Inada Naoki added the comment:
> In Windows, pydoc uses the old "more.com" pager with a temporary file that's
> encoded with the default encoding, which is the process active codepage (i.e.
> "ansi" or "mbcs"), unless UTF-8 mode is enabled. The
Inada Naoki added the comment:
I confirmed this fixes the mojibake:
```
PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8")
PS > [System.Console]::OutputEncoding = $OutputEncoding
PS > [System.Console]::InputEncodin
Inada Naoki added the comment:
>> PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8")
> FYI, $OutputEncoding in PowerShell has nothing to do with the python.exe and
> more.com processes, nor the console session to which they're atta
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
Please write a link to the original issue next time.
https://github.com/mesonbuild/meson/issues/8916
--
___
Python tracker
<https://bugs.python.org/issue44
Inada Naoki added the comment:
Another upstream issue: https://github.com/mesonbuild/meson/issues/8263
--
___
Python tracker
<https://bugs.python.org/issue44
Inada Naoki added the comment:
Because this is SSL issue. HTTPS is not the only user of SSL.
So we should try to fix SSL issue before reverting GH-12698.
--
___
Python tracker
<https://bugs.python.org/issue42
Inada Naoki added the comment:
I see. But Python 3.8 is now security fix mode.
Let's revert the optimization in the 3.9 branch.
--
___
Python tracker
<https://bugs.python.org/is
Inada Naoki added the comment:
Can https://bugs.python.org/issue32623 be a fix (or mitigation) of this issue?
--
___
Python tracker
<https://bugs.python.org/issue44
Inada Naoki added the comment:
iterating whole over the dict is O(n) where n is the historical max size of the
dict.
On the other hand, there are no guarantee about `next(iter(d))` is O(1). The
guarantee is O(n) at worst case. And your example is the worst case. So this is
not a bug.
As
Inada Naoki added the comment:
New changeset 58248d94379b202ccce3e45b1d1830ca47683273 by Srinivas Reddy
Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) in branch 'main':
bpo-41137: Use utf-8 encoding while reading .pdbrc files (GH-21263)
https://github.com/python/cpyt
Change by Inada Naoki :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
And https://dev.to/methane/don-t-omit-init-py-3hga too.
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue44
Inada Naoki added the comment:
There is a macro benchmark we regularly used.
https://pyperformance.readthedocs.io/
You can try micro benchmark for most common use cases with pyperf like this:
```
$ pyperf timeit -s "def f(**kwargs): pass" -- "f(a=1,b=2,c=3)"
Mean +- std
Change by Inada Naoki :
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue38278>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +25938
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27405
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
Note that it was reverted only in 3.9 branch.
--
___
Python tracker
<https://bugs.python.org/issue36050>
___
___
Python-bug
Inada Naoki added the comment:
Is this issue duplicate of https://bugs.python.org/issue32615 and
https://bugs.python.org/issue1402289 ?
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue44
Inada Naoki added the comment:
Oh, I didn't notice that APIs deprecated in Python 3.0 are included in stable
ABIs defined at Python 3.2!
--
___
Python tracker
<https://bugs.python.org/is
Change by Inada Naoki :
--
pull_requests: +25967
pull_request: https://github.com/python/cpython/pull/27437
___
Python tracker
<https://bugs.python.org/issue41
Change by Inada Naoki :
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue44609>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Inada Naoki :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue25702>
___
___
Pyth
Change by Inada Naoki :
--
resolution: fixed ->
stage: resolved ->
status: closed -> open
versions: +Python 3.11
___
Python tracker
<https://bugs.python.or
Inada Naoki added the comment:
Should I resurrect only function implementation and symbol?
Or may I resurrect definitions in header files too?
--
___
Python tracker
<https://bugs.python.org/issue41
Inada Naoki added the comment:
I'd like to remove docstring from code object at all.
func.__doc__ can be set by MAKE_FUNCTION or STORE_ATTR.
Pros are:
* Code objects can be bit smaller than adding co_doc.
* Many code objects don't have docstrings. (e.g. lambdas, somprehensions
Inada Naoki added the comment:
> You'd just be moving the problem though -- the docstring would have be
> included in the co_consts array of the surrounding code object instead of the
> function object.
As far as I know, surrounding code objects (e.g. global, class body) wi
Inada Naoki added the comment:
> This would actually make it harder to strip docstrings e.g. during
> unmarshalling, since you don't know which constants refer to docstrings.
We can not strip class docstring anyway.
One idea to strip docstring during startup: Add new opcode only
Change by Inada Naoki :
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe:
Inada Naoki added the comment:
> Why all the hating on docstrings? What have docstrings done wrong?
Oh, I don't hate docstrings. I just want to move it from code object to
function object.
Remove docstring during unmarshal is your idea, not mine.
My main motivation is reducing c
Inada Naoki added the comment:
> If docstring is not in co_consts, all co_consts are empty tuple. The empty
> tuple is nearly zero-cost because its a singleton.
My wrong. Two setters will have `(None,)` tuple. But such tuple can be merged
at compile time for now. And "commo
Inada Naoki added the comment:
> I think that would require a change in the signature of PyFunction_New.
I don't think so. For example, func_annotation don't require changing
PyFunction_New().
```
case TARGET(MAKE_FUNCTION): {
PyObject *
Inada Naoki added the comment:
I grepped top 5000 downloaded packages and I can not find any real use of
PyFunction_New(WithQualName).
So I don't know what is current workflow of PyFunction_New.
My current wip implementation adds new API (e.g. PyFunction_NewWithDoc()).
Old API keep
New submission from Inada Naoki :
Python 3.10 compiler adds None to co_consts even when None is not used at all.
```
$ cat x1.py
def foo():
"docstring"
return 42
import dis
dis.dis(foo)
print(foo.__code__.co_consts)
$ python3.9 x1.py
3 0 LOAD_CONST
Inada Naoki added the comment:
This is WIP pull request. https://github.com/methane/cpython/pull/35
Some tests are failing because of bpo-36521.
--
___
Python tracker
<https://bugs.python.org/issue36
Inada Naoki added the comment:
I think LOAD_CONST None + RETURN_VALUE is added here. And it removed by
optimize_cfg().
https://github.com/python/cpython/blob/793f55bde9b0299100c12ddb0e6949c6eb4d85e5/Python/compile.c#L7795-L7797
I don't know how easy to remove this unnecessary None
Inada Naoki added the comment:
I don't want all frozen header files to be committed in git repository.
Can't we just build them during build process?
--
___
Python tracker
<https://bugs.python.o
Inada Naoki added the comment:
I found anther example for unused constants.
The `readall()` function.
https://github.com/python/cpython/blob/863154c9292e70c5a8a1a3f22ef4ee42e2304281/Lib/_pyio.py#L663-L675
Python 3.9.5:
co_consts = ('Read until EOF, using multiple read() call.', No
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +26551
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28109
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
@Pablo This issue seems an optimization rather than bugfix.
But since Python 3.10 produces more unused constants than 3.9, this is a
regression.
GH-28109 removes not all unused constants, but only trailing unused constants.
I think it is enough to fix the
Change by Inada Naoki :
Added file: https://bugs.python.org/file50252/dump_unused_consts.py
___
Python tracker
<https://bugs.python.org/issue45056>
___
___
Python-bug
Change by Inada Naoki :
Added file: https://bugs.python.org/file50253/unused_39.txt
___
Python tracker
<https://bugs.python.org/issue45056>
___
___
Python-bugs-list m
Change by Inada Naoki :
Added file: https://bugs.python.org/file50254/unused_310rc1.txt
___
Python tracker
<https://bugs.python.org/issue45056>
___
___
Python-bugs-list m
Change by Inada Naoki :
Added file: https://bugs.python.org/file50255/unused_trimmed.txt
___
Python tracker
<https://bugs.python.org/issue45056>
___
___
Python-bug
Inada Naoki added the comment:
I'm +0 to this.
Since this alias is not a big maintenance burden, I think we can use
deprecation period longer than minimum 2 releases.
In sdist files of the top5000 pypi packages, I found 18 packages using it
including false positive (e.g. mypi just ha
Change by Inada Naoki :
--
keywords: +patch
pull_requests: +26577
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28138
___
Python tracker
<https://bugs.python.org/issu
Inada Naoki added the comment:
> I am still not convinced that it's a good idea to put the docstring in the
> surrounding code object. I'd like to be able to see it when I introspect a
> code object, not just when introspecting a function object (I may be
> analyzi
Inada Naoki added the comment:
It is fixed in Python 3.9.
* https://github.com/python/cpython/pull/14008
* https://bugs.python.org/issue37111
Python 3.8 is "security" status for now. Non-security issues won't be fixed.
Please migrate to Python 3.9.
--
nosy: +met
Inada Naoki added the comment:
I think pydantic approach is the best practice.
See https://pydantic-docs.helpmanual.io/usage/postponed_annotations/
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue39
Inada Naoki added the comment:
FYI, This issue is duplicate of https://bugs.python.org/issue34093, and I had
made two pull requests to solve the issue.
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue45
301 - 400 of 3039 matches
Mail list logo