[issue46957] Logger with a custom class breaks on copy

2022-03-08 Thread Eric V. Smith


Eric V. Smith  added the comment:

In what way does it break? You haven't shown an error.

Why are you deepcopying the logger?

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46841] Inline bytecode caches

2022-03-08 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29886
pull_request: https://github.com/python/cpython/pull/31780

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2771] Test issue

2022-03-08 Thread admin


Change by admin :


--
github: None -> 1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40185] Refactor typing.NamedTuple

2022-03-08 Thread Julius Park


Change by Julius Park :


--
nosy: +juliusgeo
nosy_count: 5.0 -> 6.0
pull_requests: +29885
pull_request: https://github.com/python/cpython/pull/31779

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-08 Thread Julius Park


Change by Julius Park :


--
nosy: +juliusgeo
nosy_count: 14.0 -> 15.0
pull_requests: +29884
pull_request: https://github.com/python/cpython/pull/31779

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45138] [sqlite3] expand bound values in traced statements when possible

2022-03-08 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the contribution!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45138] [sqlite3] expand bound values in traced statements when possible

2022-03-08 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset d1777515f9f53b452a4231d68196a7c0e5deb879 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45138: Expand traced SQL statements in `sqlite3` trace callback (GH-28240)
https://github.com/python/cpython/commit/d1777515f9f53b452a4231d68196a7c0e5deb879


--
nosy: +Jelle Zijlstra

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46966] c_void_p array is a footgun on I32LP64 systems

2022-03-08 Thread JP Sugarbroad


New submission from JP Sugarbroad :

The following code will likely crash on I32LP64 systems:

dim = lib.get_array_size(opaque)
ptrs = (c_void_p * dim)()
lib.get_array_values(opaque, ptrs)
for ptr in ptrs:
print(lib.get_object_value(ptr))

What happens is that `ptr` is not a `c_void_p` -- it's just a bare number. And 
when it's passed to another function it goes in as a (32-bit) `c_int`, 
resulting in a truncation.

I'm not sure what can be done here (maybe a truncation warning?) but it's 
definitely a difficult bug to notice when reviewing code.

--
components: ctypes
messages: 414783
nosy: taralx
priority: normal
severity: normal
status: open
title: c_void_p array is a footgun on I32LP64 systems
type: behavior
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46965] Enable informing callee it's awaited via vector call flag

2022-03-08 Thread Dino Viehland


New submission from Dino Viehland :

The idea here is to add a new flag to the vectorcall nargs that indicates the 
call is being awaited: _Py_AWAITED_CALL_MARKER.  This flag will allow the 
callee to know that it's being eagerly evaluated.  When the call is eagerly 
evaluated the callee can potentially avoid various amounts of overhead.  For a 
coroutine the function can avoid creating the coroutine object and instead 
returns a singleton instance of a wait handle indicating eager execution has 
occurred:
https://github.com/facebookincubator/cinder/blob/cinder/3.8/Python/ceval.c#L6617

This gives a small win by reducing the overhead of allocating the co-routine 
object.

For something like gather much more significant wins can be achieved.  If all 
of the inputs have already been computed the creation of tasks and scheduling 
of them to the event loop can be elided.  An example implementation of this is 
available in Cinder: 
https://github.com/facebookincubator/cinder/blob/cinder/3.8/Modules/_asynciomodule.c#L7103

Again the gather implementation uses the singleton wait handle object to return 
the value indicating the computation completed synchronously.

We've used this elsewhere in Cinder as well - for example if we have an 
"AsyncLazyValue" which lazily performs a one-time computation of a value   and 
caches it.  Therefore the common case becomes that the value is already 
available, and the await can be performed without allocating any intermediate 
values.

--
assignee: dino.viehland
messages: 414782
nosy: Mark.Shannon, carljm, dino.viehland, gvanrossum, itamaro
priority: normal
severity: normal
stage: needs patch
status: open
title: Enable informing callee it's awaited via vector call flag
type: performance
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2022-03-08 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2022-03-08 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset f3ea249569bbce8417c55d421521bb672c202552 by Irit Katriel in 
branch '3.9':
bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped 
from chained exceptions (GH-23688) (GH-31776)
https://github.com/python/cpython/commit/f3ea249569bbce8417c55d421521bb672c202552


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-03-08 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 95ba723c54ab52487bc9f986b651536cfae15b29 by Christian Heimes in 
branch 'main':
bpo-40280: Skip dysfunctional pipe tests on Emscripten (GH-31770)
https://github.com/python/cpython/commit/95ba723c54ab52487bc9f986b651536cfae15b29


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 26fa25a9a73f0e31bf0f0d94103fa4de38c0a3cc by Miss Islington (bot) 
in branch '3.10':
bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped 
from chained exceptions (GH-23688)
https://github.com/python/cpython/commit/26fa25a9a73f0e31bf0f0d94103fa4de38c0a3cc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2022-03-08 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +29883
pull_request: https://github.com/python/cpython/pull/31776

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2022-03-08 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 88b7d86a73da9388aa65c96401c2984c8c16f8db by Irit Katriel in 
branch 'main':
bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped 
from chained exceptions (GH-23688)
https://github.com/python/cpython/commit/88b7d86a73da9388aa65c96401c2984c8c16f8db


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2022-03-08 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +29882
pull_request: https://github.com/python/cpython/pull/31775

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 8de434b332ed92ba2db90de6ed0969aee23735c2 by Miss Islington (bot) 
in branch '3.10':
bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)
https://github.com/python/cpython/commit/8de434b332ed92ba2db90de6ed0969aee23735c2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 20e88f78a39ff56235c1d42ba4b947f5fa8e67b7 by Miss Islington (bot) 
in branch '3.9':
bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)
https://github.com/python/cpython/commit/20e88f78a39ff56235c1d42ba4b947f5fa8e67b7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29881
pull_request: https://github.com/python/cpython/pull/31774

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29880
pull_request: https://github.com/python/cpython/pull/31773

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset da80d6b2f3beff519cb1457d5e055168c89f7224 by Stefan Zabka in 
branch 'main':
bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)
https://github.com/python/cpython/commit/da80d6b2f3beff519cb1457d5e055168c89f7224


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14911] generator.throw() documentation inaccurate

2022-03-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

This still hasn't been fixed. I suspect that a new patch should be produced and 
uploaded as a PR. It looks pretty simple.

--
keywords: +easy
nosy: +gvanrossum
versions: +Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46291] [doc] First argument to raise can also be BaseException

2022-03-08 Thread Irit Katriel


Irit Katriel  added the comment:

@gtitze - are you still planning to work on this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46964] The global config should not be stored on each interpreter

2022-03-08 Thread Eric Snow


Change by Eric Snow :


--
keywords: +patch
pull_requests: +29879
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/31771

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46964] The global config should not be stored on each interpreter

2022-03-08 Thread Eric Snow


New submission from Eric Snow :

tl;dr let's move PyInterpreterState.config to _PyRuntimeState.config.

Historically the runtime has been initialized using Py_Initialize().  PEP 587 
added Py_InitializeFromConfig(), which takes a PyConfig and allows all sorts of 
customization of the runtime.  This is valuable for embedders (and benefits 
core development too).

During runtime initialization the given config is copied and stored internally 
on the main interpreter.  Once initialization completes, the config is no 
longer modified.  The config values are then used in a variety of places during 
execution.  If a new interpreter is created then the config from the current 
(or main) interpreter are copied into it.

Note the following:

* the config is never modified
* there is no public API for getting the config or changing it
* there is no API for creating an interpreter with a different config
* the fact that the config is stored on the interpreter is an internal detail 
and not documented (nor discussed in PEP 587)

Consequently, PyConfig really is the global runtime config.  Yet we are storing 
a copy of it on each interpreter.  Doing so unnecessarily adds extra complexity 
(and, when multiple interpreters are used, extra CPU usage and extra memory 
usage).

So I propose that we move the config to _PyRuntimeState.  The change isn't big 
nor all that complex.  Note that actually there is one field that can differ 
between interpreters: PyConfig._isolated_interpreter (set in 
_Py_NewInterpreter()).  We can move that one field to a new per-interpreter 
config struct.

--
assignee: eric.snow
components: C API, Interpreter Core
messages: 414772
nosy: eric.snow, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: The global config should not be stored on each interpreter
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-03-08 Thread Christian Heimes


Christian Heimes  added the comment:

I have fixed a signal-related issue in GH-31768 / bpo-23325

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29251] [doc] Class __dict__ is only a mapping proxy

2022-03-08 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you Stanley, I agree that this is no longer needed.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46963] Deep Lazy Imports - Interpreter-level deferred module loading

2022-03-08 Thread Germán Méndez Bravo

New submission from Germán Méndez Bravo :

As the size of a Python project increases, the number of modules and the 
complexity of its dependencies increases too, producing two problems in large 
codebases: increased risk of import cycles and slow start times due to the 
number of modules that tend to need getting loaded.

We propose implementing a robust and transparent lazy loader in CPython, based 
on an existing implementation we have in Cinder that proved to be extremely 
valuable to thousands of developers across Meta, and battle-tested in Instagram 
Server in production 
(https://docs.google.com/document/d/1l8I-FDE1xrIShm9eSNJqsGmY_VanMDX5-aK_gujhYBI/edit#heading=h.pu7ja6wu0ib).

Our internal implementation is based on introducing deferred objects and 
converting top-level imported names to these deferred objects that are 
evaluated on first use. Enabling this across multiple types of workloads in 
Meta consistently shown improvements in startup times (up to 70%) and memory 
footprint (up to 40%), while virtually eliminating occurrences of import cycles.

Converting imported names to deferred objects is a semantic change, and the 
benefits are usually meaningful only at very large scale, so we propose not 
changing the default behavior, and making it possible for users to opt-in to 
this lazy loading mechanism via -x flags or environment variables.

This change would require related documentation changes that would cover the 
gotchas and edge cases, such as: some packages rely and import-time 
side-effects for correct operation; nested modules can’t be accessed unless 
imported explicitly; deferred loading may also defer exceptions from import 
time and first-access time which could be confusing.

The import-time side effects gotcha can be mitigated using eager-import lists 
and directives, though it could be desirable to use this as a forcing function 
to discourage package maintainers from relying on these side-effects.

--
components: Interpreter Core
messages: 414770
nosy: Kronuz, carljm, dino.viehland, itamaro
priority: normal
severity: normal
status: open
title: Deep Lazy Imports - Interpreter-level deferred module loading
type: enhancement
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-03-08 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29878
pull_request: https://github.com/python/cpython/pull/31770

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46962] Fix docstrings that do not honor --without-doc-strings

2022-03-08 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
keywords: +patch
pull_requests: +29877
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31769

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46962] Fix docstrings that do not honor --without-doc-strings

2022-03-08 Thread Oleg Iarygin


New submission from Oleg Iarygin :

To support `--without-doc-strings`, all docstrings must be wrapped into 
`PyDoc_STRVAR` or `PyDoc_STR` (PEP 7). However, there are 18 occurrences in 
code and 10 in C API documentation that do not follow this rule. The 
documentation is important too because it should not teach people the wrong 
things.

To find the occurrences I searched for `(?:^\s*.tp_doc = "|" \/\* tp_doc 
\*\/$)` and`^(?:static\s+)?const\s+char\s+[^=]+=\s*"`.

--
assignee: docs@python
components: Documentation, Extension Modules, Interpreter Core
messages: 414768
nosy: arhadthedev, docs@python
priority: normal
severity: normal
status: open
title: Fix docstrings that do not honor --without-doc-strings
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 95b001fe6766f491f4356f8bcf23d6895bab2342 by Miss Islington (bot) 
in branch '3.10':
bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)
https://github.com/python/cpython/commit/95b001fe6766f491f4356f8bcf23d6895bab2342


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Brandt Bucher

Brandt Bucher  added the comment:

Related, except this seems to be happening in long_pow. I’ll take a look at it 
today.

--
assignee:  -> brandtbucher

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset c8a47e76a391c8818bf10a282cdcd3bb5c23ebf6 by Christian Heimes in 
branch 'main':
bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)
https://github.com/python/cpython/commit/c8a47e76a391c8818bf10a282cdcd3bb5c23ebf6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +29876
pull_request: https://github.com/python/cpython/pull/31768

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Alex Waygood


Alex Waygood  added the comment:

I think this might be a duplicate of Issue46361?

--
nosy: +AlexWaygood

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46841] Inline bytecode caches

2022-03-08 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 5498a61c7c25db6f9e76032aa9c5153d79e09889 by Brandt Bucher in 
branch 'main':
bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)
https://github.com/python/cpython/commit/5498a61c7c25db6f9e76032aa9c5153d79e09889


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Steven D'Aprano


New submission from Steven D'Aprano :

I'm reluctant to call this a bug, as small int interning/caching is an 
implementation detail and there are no hard guarantees made.

But on the other hand, it seems that the intention is that small ints such as 
0, 1 and 2 should be cached. Here are some examples where they are not. 
Intentional or a bug?

>>> x = 1
>>> y = pow(2, 31, 2**31-1)
>>> y == x
True
>>> y is x
False


>>> x = 2
>>> y = pow(2, 31, 2**31-2)
>>> y == x
True
>>> y is x
False


It also affects values which are presumably constant-folded at compile time:

>>> x = 1
>>> y = 2**31 % (2**31 - 1)
>>> z = 2**31 % (2**31 - 1)
>>> x == y == z
True
>>> x is y
False
>>> y is z
False
>>> x is z
False



But if you run the code in exec, the value is interned:

>>> code = """
... x = 1
... y = 2**31 % (2**31-1)
... """
>>> dis(code)
  2   0 LOAD_CONST   0 (1)
  2 STORE_NAME   0 (x)

  3   4 LOAD_CONST   0 (1)
  6 STORE_NAME   1 (y)
  8 LOAD_CONST   1 (None)
 10 RETURN_VALUE
>>> exec(code)
>>> x is y
True



Also affects zero:

>>> x = 0
>>> y = 2**29 % (2**29)
>>> x is y
True
>>> y = 2**30 % (2**30)
>>> x is y
False


First noted here:

https://discuss.python.org/t/cached-integer-id-on-high-calculations/14128/1


>>> sys.version
'3.10.0 (default, Oct 28 2021, 20:43:43) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]'

--
components: Interpreter Core
messages: 414762
nosy: steven.daprano
priority: normal
severity: normal
status: open
title: Caching/interning of small ints sometimes fails
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46960] Docs: Link from settrace to frame

2022-03-08 Thread Thomas Guettler


New submission from Thomas Guettler :

https://docs.python.org/3.10/library/sys.html#sys.settrace

> Trace functions should have three arguments: frame, event, and arg. frame is 
> the current stack frame.

It would be super cool, if "current stack frame" could be a hyperlink to the 
docs about "frame".

--
messages: 414761
nosy: guettli
priority: normal
severity: normal
status: open
title: Docs: Link from settrace to frame

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 653ca6c62b0c3272310f7fa5ce9c6939e3c41d91 by Erlend Egeberg 
Aasland in branch '3.9':
[3.9] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) 
(GH-31754)
https://github.com/python/cpython/commit/653ca6c62b0c3272310f7fa5ce9c6939e3c41d91


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset f3d3b2d5c5599272660f4bbd5103aa8abc7c48c4 by Erlend Egeberg 
Aasland in branch '3.10':
[3.10] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) 
(GH-31753)
https://github.com/python/cpython/commit/f3d3b2d5c5599272660f4bbd5103aa8abc7c48c4


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17505] [doc] email.header.Header.__unicode__ does not decode header

2022-03-08 Thread Vidhya


Vidhya  added the comment:

The PR for the email parser doc update is: 
https://github.com/python/cpython/pull/31765

Can someone review it pls.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17505] [doc] email.header.Header.__unicode__ does not decode header

2022-03-08 Thread Vidhya


Change by Vidhya :


--
keywords: +patch
pull_requests: +29874
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31765

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46959] ctypes.util.find_library can delete /dev/null

2022-03-08 Thread Barry Davis


New submission from Barry Davis :

This bug exists again: https://bugs.python.org/issue1521375

In ctypes/util we defend against gcc removing /dev/null by using a temp file, 
but similar code for ld still uses /dev/null, resulting in it removing 
/dev/null if it has permission, i.e. if running as root.

Reproduction steps in the original bug still work I think.

I found this when running pyinstaller.
I slimmed the test case down to:
 import ctypes.util
 libname = ctypes.util.find_library("ApplicationServices")


Here's my patch (indentation is wrong to just show the actual change needed):

--- Python-3.10.2/Lib/ctypes/util.py2022-03-08 14:34:52.188808751 +
+++ Python-3.10.2/Lib/ctypes/util.py2022-03-08 14:40:23.604615242 +
@@ -305,9 +305,11 @@
 if libpath:
 for d in libpath.split(':'):
 cmd.extend(['-L', d])
-cmd.extend(['-o', os.devnull, '-l%s' % name])
-result = None
+temp = tempfile.NamedTemporaryFile()
 try:
+  cmd.extend(['-o', temp.name, '-l%s' % name])
+  result = None
+  try:
 p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
  stderr=subprocess.PIPE,
  universal_newlines=True)
@@ -320,8 +322,15 @@
 if not _is_elf(file):
 continue
 return os.fsdecode(file)
-except Exception:
+  except Exception:
 pass  # result will be None
+finally:
+try:
+temp.close()
+except FileNotFoundError:
+# Raised if the file was already removed, which is the 
normal
+# behaviour if linking fails
+pass
 return result

 def find_library(name):

--
components: Library (Lib)
messages: 414756
nosy: barry.c.davis
priority: normal
severity: normal
status: open
title: ctypes.util.find_library can delete /dev/null
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46926] runpy.run_path didn't set __package__ to None as describe in doc

2022-03-08 Thread Charlie Yan


Change by Charlie Yan :


--
components: +Library (Lib)
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46958] json dump/dumps prints each array element on a new line (bad for readability)

2022-03-08 Thread Daniel


Change by Daniel :


--
keywords: +patch
pull_requests: +29873
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31762

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46953] use FASTCALL for __import__ builtin

2022-03-08 Thread Mark Shannon


Mark Shannon  added the comment:

Serhiy, what is the advantage of __import__ being slower?

Not counting the argument clinic generated code, the PR doesn't add any code 
and improves the docstring.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-08 Thread Steven Silvester


Steven Silvester  added the comment:

I agree we're stuck with the typing stub workaround for our use case.  We can 
re-submit a "fix forward" PR.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46958] json dump/dumps prints each array element on a new line (bad for readability)

2022-03-08 Thread Daniel


Change by Daniel :


--
components: Library (Lib)
nosy: Entirity
priority: normal
severity: normal
status: open
title: json dump/dumps prints each array element on a new line (bad for 
readability)
type: enhancement
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36098] asyncio: ssl client-server with "slow" read

2022-03-08 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for checking

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2022-03-08 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-08 Thread Steve Dower


Change by Steve Dower :


--
assignee:  -> steve.dower
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-08 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-08 Thread Steve Dower


Steve Dower  added the comment:

> Is there anything on our end we can do to prevent this kind of issue in the 
> future?

Probably not, I think it's just a lesson learned about the capabilities of the 
MSI format and its integration with Windows (well, we could hurry up moving 
everyone to the Windows Store, which doesn't have this issue, but that seems 
unlikely ;) )

Similar issues have been reported to the Windows Installer team (e.g. 
CVE-2021-41379, CVE-2021-26415) that could have been fixed by disabling the 
unelevated repair function, but weren't. So I think it just has to become a 
known thing for people building MSIs that a "repair" can be run by non-elevated 
users, and install-time variables may not be preserved for the repair. (In our 
case, that means actually searching for the existing install rather than 
trusting the variable our bundle normally provides to the MSI.)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46953] use FASTCALL for __import__ builtin

2022-03-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The recommended way is to use importlib.import_module().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46957] Logger with a custom class breaks on copy

2022-03-08 Thread Govinda Totla


New submission from Govinda Totla :

The logging module allows you set a custom Logger class as the default logger. 
However, this breaks when we try to copy the logger which was created before 
setting the logger class

```
import copy
import logging

# Some module we don't control
oldLogger = logging.getLogger("abc")

# Some module where we want to change over to custom logging
class MyLogger(logging.Logger):
pass

# Override the manager, root, etc., so everything uses our class
logging.setLoggerClass(MyLogger)
logging.root = root = MyLogger("", logging.WARNING)
logging.Logger.manager = logging.Manager(root)

newLogger = logging.getLogger("def")

# Later on this happens, which internally calls __reduce__
copy.deepcopy(oldLogger)
```

--
components: Library (Lib)
messages: 414750
nosy: govinda18
priority: normal
severity: normal
status: open
title: Logger with a custom class breaks on copy
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Agree. There were too many changes in this code, and making SIG_DFL and SIG_IGN 
functions exposes some issues with sharing objects between interpreters. It is 
easier to keep them integers for now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread Stefan Zabka


Change by Stefan Zabka :


--
keywords: +patch
pull_requests: +29872
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31760

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-03-08 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 5081e78efde901556398615eb477c63c836686e5 by Christian Heimes in 
branch 'main':
bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)
https://github.com/python/cpython/commit/5081e78efde901556398615eb477c63c836686e5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46956] TextIOWrapper.seek silently wraps around on very large offsets

2022-03-08 Thread Zsolt Cserna


Change by Zsolt Cserna :


--
nosy: +csernazs

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread Christian Heimes


Christian Heimes  added the comment:

My PR 31759 removes the assumption of small int singletons and replaces C 
comparison with PyObject_RichCompareBool() Py_EQ calls.

I still prefer Serhiy's solution, but it may cause backwards incompatible 
breakage. My fix can be backported to 3.9 and 3.10 without breakage. It 
resolves my failing tests on Emscripten, too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29871
pull_request: https://github.com/python/cpython/pull/31759

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40059] Provide a toml module in the standard library

2022-03-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

The PR is merged and buildbots are green. Thank you to everyone who helped!


Now would be a good time to bikeshed wording in the documentation.

>From the PR:
> Would it be good to mention in the docs why load() takes only binary files? 
> The encoding requirement probably isn't obvious for first-time users.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46956] TextIOWrapper.seek silently wraps around on very large offsets

2022-03-08 Thread László Vaskó

New submission from László Vaskó :

`f.seek()` method may silently wrap around at offsets greater than
`1 << 64` (on AMD64) but return the original seek offset:

$ strace -e lseek python3
[...] bunch of strace output
>>> f = open("/tmp/whatever", "w")
[...] bunh of strace output
>>> f.seek((1 << 64) + 1234)
lseek(3, 1234, SEEK_SET)= 1234
18446744073709552850
>>> _ == (1 << 64) + 1234
True

When the MSB is set to `1` (e.g. it represents a negative `long`
number) it will indeed overflow and raise on error:

>>> f.seek((1<<64) - 1)
lseek(3, -1, SEEK_SET)  = -1 EINVAL (Invalid argument)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 22] Invalid argument

This causes a confusing behavior that using erroneously big seek
offsets may or may not return an error depending on the MSB value. The
expected behavior would be that both the above calls fail in
accordance with the Zen of Python:

> Errors should never pass silently.
> Unless explicitly silenced.


The issue is only present for text mode files, binary files raise an
error, as expected:

ValueError: cannot fit 'int' into an offset-sized integer

After some digging I found that the issue comes from `TextIOWrapper`,
particularly from `textiowrapper_parse_cookie(cookie_type *cookie,
PyObject *cookieObj)` calling `PyNumber_Long` silently truncating the
incoming size to 64 bits. The issue can be reproduced on Python 2.7
when using `io.open` in text mode.

--
components: IO
messages: 414745
nosy: vlaci
priority: normal
severity: normal
status: open
title: TextIOWrapper.seek silently wraps around on very large offsets
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46953] use FASTCALL for __import__ builtin

2022-03-08 Thread Kumar Aditya


Kumar Aditya  added the comment:

Occurrence of __import__ calls in stdlib:

grep __import__ Lib/*/*.py | wc -l

28

It is common to import directly via __import__ outside the stdlib too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44439] stdlib wrongly uses len() for bytes-like object

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 0663ca17f5535178c083c6734fa52e40bd2db2de by Miss Islington (bot) 
in branch '3.9':
bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)
https://github.com/python/cpython/commit/0663ca17f5535178c083c6734fa52e40bd2db2de


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44439] stdlib wrongly uses len() for bytes-like object

2022-03-08 Thread miss-islington


miss-islington  added the comment:


New changeset 21c5b3f73fb11fb0d3239971f72e8f0574a07245 by Miss Islington (bot) 
in branch '3.10':
bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)
https://github.com/python/cpython/commit/21c5b3f73fb11fb0d3239971f72e8f0574a07245


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46955] The documentation mentions asyncio.Server. It does not exist.

2022-03-08 Thread Stefan Zabka


New submission from Stefan Zabka :

The asyncio documentation claims that there is a class 
[asyncio.Server](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.Server).

However when looking in the sources I can only find 
[asyncio.base_events.Server](https://github.com/python/cpython/blob/be095f6c32188bba02079d086ac8639ea37cec3c/Lib/asyncio/base_events.py#L274-L384)
 which does not get exposed via `__all__` and can not be imported as 
asyncio.Server.
I had to name the type as I wanted to use this class as a type annotation for 
mypy.

--
components: asyncio
messages: 414741
nosy: asvetlov, vringar, yselivanov
priority: normal
severity: normal
status: open
title: The documentation mentions asyncio.Server. It does not exist.
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-03-08 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29870
pull_request: https://github.com/python/cpython/pull/31757

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46953] use FASTCALL for __import__ builtin

2022-03-08 Thread Kumar Aditya


Kumar Aditya  added the comment:

The PR uses argument clinic and not hand written parsing code, which in turn is 
faster.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46954] Awaiting multiple times on same task increases memory usage unboundedly

2022-03-08 Thread David M.


New submission from David M. :

Awaiting multiple times on a single task that failed with an exception results 
in an unbounded increase in memory usage. Enough repeated "await"s of the task 
can result in an OOM.

The same pattern on a task that didn't raise an exception behaves as expected.

The attached short script ends up using more than 1GB of memory in less than a 
minute.

--
components: asyncio
files: multi_await_exception.py
messages: 414739
nosy: asvetlov, davidmanzanares, yselivanov
priority: normal
severity: normal
status: open
title: Awaiting multiple times on same task increases memory usage unboundedly
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50664/multi_await_exception.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46784] Duplicated symbols when linking embedded Python with libexpat

2022-03-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ccbc31ecf3a08ef626be9bbb099f0ce801142fc8 by Miss Islington (bot) 
in branch '3.8':
bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397) 
(GH-31419)
https://github.com/python/cpython/commit/ccbc31ecf3a08ef626be9bbb099f0ce801142fc8


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44439] stdlib wrongly uses len() for bytes-like object

2022-03-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29868
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/31755

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44439] stdlib wrongly uses len() for bytes-like object

2022-03-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29869
pull_request: https://github.com/python/cpython/pull/31756

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44439] stdlib wrongly uses len() for bytes-like object

2022-03-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 36dd7396fcd26d8bf9919d536d05d7000becbe5b by Ma Lin in branch 
'main':
bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)
https://github.com/python/cpython/commit/36dd7396fcd26d8bf9919d536d05d7000becbe5b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46947] unicodedata.name gives ValueError for control characters

2022-03-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is a duplicate of issue18234.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Unicodedata module should provide access to codepoint aliases

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46953] use FASTCALL for __import__ builtin

2022-03-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

__import__() usually is not called directly, and in common case (when it is not 
overridden) the overhead of the call is avoided completely in the import 
statement.

And in non-trivial case, it would only save 80 microseconds if you import 1000 
modules. I don't think there are many programs which import more than 1000 
modules.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6649519e67841b1aa12672f1d9b5cb24494f6196 by Steve Dower in branch 
'3.8':
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 
and CVE-2019-12900 (GH-31732) (GH-31734)
https://github.com/python/cpython/commit/6649519e67841b1aa12672f1d9b5cb24494f6196


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset cff1b78c1dfb2a62b1e16fabc5f43bc3634d9de7 by Steve Dower in branch 
'3.8':
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses 
the install path during repair (GH-31729)
https://github.com/python/cpython/commit/cff1b78c1dfb2a62b1e16fabc5f43bc3634d9de7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c3ec5bc1b7a14b04621920f111aee01c31f6f1c1 by Miss Islington (bot) 
in branch '3.8':
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736) (GH-31740)
https://github.com/python/cpython/commit/c3ec5bc1b7a14b04621920f111aee01c31f6f1c1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-03-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +29867
pull_request: https://github.com/python/cpython/pull/31754

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-03-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +29866
pull_request: https://github.com/python/cpython/pull/31753

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40059] Provide a toml module in the standard library

2022-03-08 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 591f6754b56cb7f6c31fce8c22528bdf0a99556c by Taneli Hukkinen in 
branch 'main':
bpo-40059: Add tomllib (PEP-680) (GH-31498)
https://github.com/python/cpython/commit/591f6754b56cb7f6c31fce8c22528bdf0a99556c


--
nosy: +petr.viktorin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com