[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Charlie Zhao
Change by Charlie Zhao : -- pull_requests: +29913 pull_request: https://github.com/python/cpython/pull/31815 ___ Python tracker ___

[issue46980] ast.FunctionDef cannot find functions under if statement

2022-03-10 Thread Ruishi
Ruishi added the comment: I see. It's my misunderstanding. Thank you for your help! -- ___ Python tracker ___ ___ Python-bugs-list

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29912 pull_request: https://github.com/python/cpython/pull/31814 ___ Python tracker ___

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29911 pull_request: https://github.com/python/cpython/pull/31813 ___ Python tracker ___

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29910 pull_request: https://github.com/python/cpython/pull/31812 ___ Python tracker ___

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29909 pull_request: https://github.com/python/cpython/pull/31811 ___ Python tracker ___

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-10 Thread Larry Hastings
Larry Hastings added the comment: Nobody I've nosied on this issue recently has expressed any opinion on the matter. I'm gonna try one more person: Graham Dumpleton, the maintainer of "wrapt", Python's premier function-wrapping. Graham, care to express any opinions about this issue? Can

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2022-03-10 Thread Stanley
Change by Stanley : -- nosy: +slateny nosy_count: 13.0 -> 14.0 pull_requests: +29908 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31810 ___ Python tracker

[issue39829] __len__ called twice in the list() constructor

2022-03-10 Thread Inada Naoki
Inada Naoki added the comment: > Changes compared here: > https://github.com/python/cpython/compare/main...thatbirdguythatuknownot:patch-17 Looks good to me. Would you create a pull request? -- ___ Python tracker

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Charlie Zhao
Change by Charlie Zhao : -- pull_requests: +29907 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/31808 ___ Python tracker ___

[issue46980] ast.FunctionDef cannot find functions under if statement

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is the right place to file an issue. Your code is incorrect; it will find only top-level functions. Functions within an `if` statement will be nested inside an `ast.If` node. To find all functions in a file, you'll need to recurse into nested nodes.

[issue46980] ast.FunctionDef cannot find functions under if statement

2022-03-10 Thread Ruishi
Ruishi added the comment: I'm not sure whether I should file this issue here or on Github and I'm not an expert on this so I think I cannot contribute to this but only report to you. -- ___ Python tracker

[issue46980] ast.FunctionDef cannot find functions under if statement

2022-03-10 Thread Ruishi
New submission from Ruishi : When I use the Python ast package to get the functions of Python files, I find the functions defined in the body of `if` statement cannot be recognized. Here is my code: with open(py_file, 'r') as f: data = f.read() module = ast.parse(data) func_def =

[issue46971] python takes long time when return big data

2022-03-10 Thread Hu Di
Hu Di <476658...@qq.com> added the comment: I am currently processing large data, and the time spent by del is unacceptable. Is there any way to process del in parallel? -- ___ Python tracker

[issue46881] Statically allocate and initialize the latin1 characters.

2022-03-10 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra nosy_count: 5.0 -> 6.0 pull_requests: +29906 pull_request: https://github.com/python/cpython/pull/31805 ___ Python tracker

[issue46892] Async Call-Stack Reconstruction

2022-03-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: > We’d like to merge our implementation into CPython Could you provide a link first, please? -- ___ Python tracker ___

[issue46971] python takes long time when return big data

2022-03-10 Thread Hu Di
Hu Di <476658...@qq.com> added the comment: thanks for your explaining, by the way, why it costs lots of time when del a large array? -- ___ Python tracker ___

[issue46896] add support for watching writes to selected dictionaries

2022-03-10 Thread Carl Meyer
Carl Meyer added the comment: I've updated the PR to split `PyDict_EVENT_MODIFIED` into separate `PyDict_EVENT_ADDED`, `PyDict_EVENT_MODIFIED`, and `PyDict_EVENT_DELETED` event types. This allows callbacks only interested in e.g. added keys (case #2) to more easily and cheaply skip

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43224] Add support for PEP 646

2022-03-10 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29905 pull_request: https://github.com/python/cpython/pull/31804 ___ Python tracker ___

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 4199b7ffbbaa5fe52a4c85c8672ac6773a75ba8f by Jelle Zijlstra in branch '3.10': [3.10] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31796)

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

2022-03-10 Thread Bernie Hackett
Change by Bernie Hackett : -- nosy: +behackett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 4052dd2296da2ff304b1fa787b100befffa1c9ca by Alex Waygood in branch 'main': bpo-46198: Fix `test_asyncio.test_sslproto` (GH-31801) https://github.com/python/cpython/commit/4052dd2296da2ff304b1fa787b100befffa1c9ca --

[issue46744] installers on ARM64 suggest wrong folders

2022-03-10 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +29904 pull_request: https://github.com/python/cpython/pull/31803 ___ Python tracker ___

[issue46978] Doc strings for built-in, in-place operators are misleading

2022-03-10 Thread Nicko van Someren
Change by Nicko van Someren : -- keywords: +patch pull_requests: +29903 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31802 ___ Python tracker

[issue46979] Spam

2022-03-10 Thread Dennis Sweeney
Change by Dennis Sweeney : -- components: -Build resolution: -> not a bug stage: -> resolved status: open -> closed title: Master piece -> Spam type: security -> ___ Python tracker

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset f7f7838b41d45efa129a61f104136f8e12f3488a by Jelle Zijlstra in branch '3.9': [3.9] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31797) https://github.com/python/cpython/commit/f7f7838b41d45efa129a61f104136f8e12f3488a

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood nosy_count: 3.0 -> 4.0 pull_requests: +29902 pull_request: https://github.com/python/cpython/pull/31801 ___ Python tracker ___

[issue46979] Master piece

2022-03-10 Thread Bankole Jesutofunmi
New submission from Bankole Jesutofunmi : Protection -- components: Build, Demos and Tools messages: 414878 nosy: Banky_1104, teoliphant priority: normal severity: normal status: open title: Master piece type: security versions: Python 3.10 ___

[issue46896] add support for watching writes to selected dictionaries

2022-03-10 Thread Carl Meyer
Carl Meyer added the comment: Thanks for outlining the use cases. They make sense. The current PR provides a flexible generic API that fully supports all three of those use cases (use cases 2 and 3 are strict subsets of use case 1.) Since the callback is called before the dict is modified,

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-03-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46978] Doc strings for built-in, in-place operators are misleading

2022-03-10 Thread Nicko van Someren
New submission from Nicko van Someren : Objects/typeobject.c uses slots to implement various operators and the IBSLOT macro is used to define slot entries for in-place binary operators. This macro creates a __doc__ string for the operators of the form "Return selfvalue." This doc string is

[issue43224] Add support for PEP 646

2022-03-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46969] `pip install wrapt` fails on ast.py in Python 3.11.0a6

2022-03-10 Thread Dutcho
Dutcho added the comment: yesterday's `wrapt *1.13.3*` still doesn't work, but today's `wrapt *1.14.0*` works as expected So this wasn't about Python 3.11 but about the wrapt version, which used the deprecated `formatargspec` from module `inspect` -- resolution: -> works for me

[issue43224] Add support for PEP 646

2022-03-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 8.0 -> 9.0 pull_requests: +29901 pull_request: https://github.com/python/cpython/pull/31800 ___ Python tracker

[issue46976] Update macOS installer builds to use ncurses 6.3

2022-03-10 Thread Ned Deily
Ned Deily added the comment: Assigning to myself as this will require some installer build testing. -- assignee: -> ned.deily ___ Python tracker ___

[issue46975] clang: error: linker command failed with exit code 1 (use -v to see invocation) on m1 mac

2022-03-10 Thread Ned Deily
Ned Deily added the comment: Without more details, this is only a guess but the messages seem to indicate that your build is detecting an installed version of the GNU gettext library, which is optional for Python builds and is not provided by default on macOS, and most likely that version

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: The crypt_r() interceptor issue was reported in January 2021 to libasan: https://github.com/google/sanitizers/issues/1365 > I enabled the test on ASAN on test_crypt and I confirm that I get a crash on > calling a NULL function. Note: I built Python with GCC

[issue46977] tempfile.TemporaryDirectory fails removing dir in some edge cases related to symlinks

2022-03-10 Thread Alexandre Feblot
Change by Alexandre Feblot : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46977] tempfile.TemporaryDirectory fails removing dir in some edge cases related to symlinks

2022-03-10 Thread Alexandre Feblot
New submission from Alexandre Feblot : ```python #!/usr/bin/env python3 import os import tempfile def createUnremovableDir(workdir): print(workdir) os.mkdir(f'{workdir}/mydir') os.symlink('/bin/bash', f'{workdir}/mydir/mylink') # Symlink to a root owned file

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: I enabled the test on ASAN on test_crypt and I confirm that I get a crash on calling a NULL function. The Python crypt.crypt() function calls the C function crypt_r() which is intercepted by libasan, but the libasan implementation calls a NULL function. I

[issue46976] Update macOS installer builds to use ncurses 6.3

2022-03-10 Thread Ned Deily
New submission from Ned Deily : The python.org macOS installers include a private copy of the ncurses library; it has not been updated from 5.9 in a long time. The current upstream version is 6.3 and includes bug and security fixes; we should update to it. -- components: macOS

[issue46973] Provide make target to regenerate autoconf files with container

2022-03-10 Thread Christian Heimes
Christian Heimes added the comment: New changeset 434ffb7f1f86e6b0cdfad3ede59993934d86e464 by Christian Heimes in branch 'main': bpo-46973: Add regen-configure make target (GH-31792) https://github.com/python/cpython/commit/434ffb7f1f86e6b0cdfad3ede59993934d86e464 --

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: Current status of tests skipped on ASAN, MSAN and UBSAN. Only ASAN (1): * _test_multiprocessing.py:76:if support.check_sanitizer(address=True): ASAN and MSAN (10): * test___all__.py:14:if support.check_sanitizer(address=True, memory=True): *

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: > Remove code handling missing NAN and infinity: float("nan"), float("inf"), > math.nan and math.inf are always available. The code to support missing NaN was already removed by: New changeset 1b2611eb0283055835e5df632a7a735db8c894b8 by Victor Stinner in

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-03-10 Thread Alex Waygood
Change by Alex Waygood : -- stage: patch review -> backport needed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Alex Waygood
Change by Alex Waygood : -- stage: patch review -> backport needed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: > bpo-46917: math.nan is now always available (GH-31793) Technically, it was already the case in practice: see bpo-46656 for the rationale and the history of Py_NAN. -- ___ Python tracker

[issue46656] Remove the Py_NO_NAN macro: require NAN to build Python 3.11

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: > bpo-46656: Remove Py_NO_NAN macro (GH-31160) Change documented by: New changeset 7854012077009b9f364f198a8ae38b546ec58313 by Victor Stinner in branch 'main': bpo-46917: math.nan is now always available (GH-31793)

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7854012077009b9f364f198a8ae38b546ec58313 by Victor Stinner in branch 'main': bpo-46917: math.nan is now always available (GH-31793) https://github.com/python/cpython/commit/7854012077009b9f364f198a8ae38b546ec58313 --

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46906 "Add PyFloat_(Pack|Unpack)(2|4|8) to the public C API": the implementation supports non-IEEE 754 formats. Once the public C API is added, support for non-IEEE 754 formats should be removed. --

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: (assigning to myself to remind myself to see the backports through) -- assignee: docs@python -> Jelle Zijlstra ___ Python tracker ___

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 8a207e0321db75f3342692905e342f1d5e1add54 by Charlie Zhao in branch 'main': bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs (GH-31349) https://github.com/python/cpython/commit/8a207e0321db75f3342692905e342f1d5e1add54

[issue46975] clang: error: linker command failed with exit code 1 (use -v to see invocation) on m1 mac

2022-03-10 Thread Battant
New submission from Battant : Hello, Here is my configuration mac os 12.2.1 mac m1 pro 2021 step to reproduce 1. on mac m1, clone cpython repository main branch run ./confugure make Actual result : gcc -fno-semantic-interposition -fprofile-instr-generate -Wl,-stack_size,100

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29900 pull_request: https://github.com/python/cpython/pull/31797 ___ Python tracker ___

[issue46771] Add some form of cancel scopes

2022-03-10 Thread Alex Grönholm
Alex Grönholm added the comment: Yeah, I'm still interested. I'll create a new BPO when I have something. -- ___ Python tracker ___

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29899 pull_request: https://github.com/python/cpython/pull/31796 ___ Python tracker ___

[issue46771] Add some form of cancel scopes

2022-03-10 Thread Guido van Rossum
Guido van Rossum added the comment: Good think I forgot to close the issue. ;-) -- ___ Python tracker ___ ___ Python-bugs-list

[issue46771] Add some form of cancel scopes

2022-03-10 Thread Andrew Svetlov
Andrew Svetlov added the comment: The implementation has landed, docs are still required. -- ___ Python tracker ___ ___

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 6c83c8e6b56b57a8a794e7b6c07837be4ce3bb97 by Nikita Sobolev in branch 'main': bpo-46198: rename duplicate tests and remove unused code (GH-30297) https://github.com/python/cpython/commit/6c83c8e6b56b57a8a794e7b6c07837be4ce3bb97 --

[issue46771] Add some form of cancel scopes

2022-03-10 Thread Guido van Rossum
Guido van Rossum added the comment: I'm closing this, the asyncio.timeout() context manager has been merged. Thanks Andrew! @agronholm you said you were interested in tweaking the cancellation behavior some more. If you're still interested, let's discuss that in a separate bpo (please

[issue46771] Add some form of cancel scopes

2022-03-10 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset f537b2a4fb86445ee3bd6ca7f10bc9d3a9f37da5 by Andrew Svetlov in branch 'main': bpo-46771: Implement asyncio context managers for handling timeouts (GH-31394) https://github.com/python/cpython/commit/f537b2a4fb86445ee3bd6ca7f10bc9d3a9f37da5

[issue35677] Do not automount in stat() by default

2022-03-10 Thread Pádraig Brady
Pádraig Brady added the comment: I think this change is not needed as fstatat() implies AT_NO_AUTOMOUNT since Linux 4.11 The fstatat(2) man page is confusing, and I've attempted to clarify with the patch attached to: https://lists.gnu.org/archive/html/coreutils/2022-03/msg00014.html

[issue45767] Fix types for dev_t processing in posix module

2022-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 31794 supports NODEV and checks for integer overflows. -- ___ Python tracker ___ ___

[issue45767] Fix types for dev_t processing in posix module

2022-03-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29898 pull_request: https://github.com/python/cpython/pull/31794 ___ Python tracker ___

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 32bf3597922ac3f613989582afa2bff43bea8a2f by Matt Bogosian in branch 'main': bpo-46581: Propagate private vars via _GenericAlias.copy_with (GH-31061) https://github.com/python/cpython/commit/32bf3597922ac3f613989582afa2bff43bea8a2f

[issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: This is expected behavior. A set has no defined order. If you convert a set to a list, and you want some specific order, you'll need to sort it yourself. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed

[issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

2022-03-10 Thread PiTeR
New submission from PiTeR : set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not to find this bug, sometimes you need to display the result several times example code: def tupla(): import random ilosc = random.randint(0,49) n=0

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29897 pull_request: https://github.com/python/cpython/pull/31793 ___ Python tracker ___

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9b51fd5d137b662c940f072297b30815f37f105b by Victor Stinner in branch 'main': bpo-46917: Require IEEE 754 to build Python (GH-31790) https://github.com/python/cpython/commit/9b51fd5d137b662c940f072297b30815f37f105b --

[issue46973] Provide make target to regenerate autoconf files with container

2022-03-10 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +29896 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31792 ___ Python tracker

[issue46973] Provide make target to regenerate autoconf files with container

2022-03-10 Thread Christian Heimes
New submission from Christian Heimes : CPython stores auto-generated autoconf files (configure, aclocal.m4, pyconfig.h.in) in git. The files must be regenerated with very specific versions of autotools 2.69 + runtimestate patch, autoarchive, and pkg-config's m4 macros. I provide a container

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

2022-03-10 Thread Christian Heimes
Christian Heimes added the comment: New changeset de554d6e02228b840eb6bffaf7d406c0ef368d5f by Christian Heimes in branch 'main': bpo-40280: Skip more tests/features that don't apply to Emscripten (GH-31791) https://github.com/python/cpython/commit/de554d6e02228b840eb6bffaf7d406c0ef368d5f

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

2022-03-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Eric. The existing documentation looks pretty clear to me. Any exception can be raised explicitly, no need to repeat this. And unittest.TestCase methods do not raise AssertionError. They raise TestCase.failureException, which by default is

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: > I would argue that "The reference documentation for X states that it gets > raised under condition Y" generally should be understood as "this is a > guarantee that also includes the guarantee that it is not raised under other > conditions in correctly

[issue46971] python takes long time when return big data

2022-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: This is expected. Your timing measures the time for garbage collection of the large arrays in addition to the time for the result to be returned. In the line `result = myfunc()`, the name `result` gets rebound to the value of `myfunc()`. That means that

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Thomas Fischbacher
Thomas Fischbacher added the comment: The documentation of exceptions in the reference is one of the places that makes the life of users substantially harder than it ought to be, since the documentation appears to not have been written with the intent to give guarantees that users can

[issue39829] __len__ called twice in the list() constructor

2022-03-10 Thread Jeremiah Pascual
Jeremiah Pascual added the comment: Matt's idea leads to some speedups when implemented correctly (pardon me but I have no idea how to use pyperf): list({}): Mean +- std dev: [orig] 109 ns +- 1 ns -> [modif] 103 ns +- 1 ns: 1.06x faster list({1: 2}): Mean +- std dev: [orig] 125 ns +- 1 ns

[issue46896] add support for watching writes to selected dictionaries

2022-03-10 Thread Mark Shannon
Mark Shannon added the comment: There are three kinds of changes that we might want to watch (that I can think of right now): 1. Any change. Rather coarse and potentially expensive. Used by Cinder. 2. A new key being added (or a change to the keys version as a proxy). Useful for detect

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Eric V. Smith
Eric V. Smith added the comment: The documentation doesn't say that assert statements are the only place AssertionError is raised, so I don't think it's incorrect. > From this, one can infer the guarantee "the -O flag will suppress > AssertionError exceptions from being raised". I don't

[issue46972] Documentation: Reference says AssertionError is raised by `assert`, but not all AssertionErrors are.

2022-03-10 Thread Thomas Fischbacher
New submission from Thomas Fischbacher : The Python reference says: (1) https://docs.python.org/3/library/exceptions.html#concrete-exceptions exception AssertionError Raised when an assert statement fails. (2) https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement

[issue46971] python takes long time when return big data

2022-03-10 Thread Hu Di
New submission from Hu Di <476658...@qq.com>: it takes a long time when python return big data. generally, when a function return something, it only take less than 1e-5 second, but when the result is big, like np.random.rand(2048,3,224,224), the time cost will increase to 0.1-0.2 second

[issue46971] python takes long time when return big data

2022-03-10 Thread Hu Di
Change by Hu Di <476658...@qq.com>: -- components: Interpreter Core nosy: HumberMe priority: normal severity: normal status: open title: python takes long time when return big data type: performance versions: Python 3.8 ___ Python tracker

[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2022-03-10 Thread Sorin Sbarnea
Sorin Sbarnea added the comment: Maybe I should mention that my networking is configured only with values received from the DHCP server, which includes 2 DNS servers, one ipv4 an done ipv6, both of them being the local router and *1* search domain, which is a real domain (not local).

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

2022-03-10 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29895 pull_request: https://github.com/python/cpython/pull/31791 ___ Python tracker ___

[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2022-03-10 Thread Sorin Sbarnea
Sorin Sbarnea added the comment: I am able to reproduce this bug with Python 3.10 on MacOS 12.2 too, and I happen to have some extra insights about what happens, see https://github.com/tox-dev/tox/issues/2375 Basically the culprit is a reverse-dns query (PTR) that takes 30s to return,

[issue45033] Calls to PyErr_PrintEx in destructors cause calling async functions to incorrectly return None

2022-03-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2022-03-10 Thread Christian Heimes
Christian Heimes added the comment: PS: You have to use the "269" tag to get the correct container image. The "latest" image was outdated and I removed it. docker run -v (pwd):/src quay.io/tiran/cpython_autoconf:269 -- ___ Python tracker

[issue45319] Possible regression in __annotations__ descr for heap type subclasses

2022-03-10 Thread Larry Hastings
Larry Hastings added the comment: I only did my experiments with the _wrappers.c Christian gave me. If that's not the shipping version of wrapt, and wrapt doesn't exhibit this behavior in 3.10, then that's good. I agree you can wait to address this behavior until it affects code you

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31790 ___ Python tracker ___

[issue45319] Possible regression in __annotations__ descr for heap type subclasses

2022-03-10 Thread Graham Dumpleton
Graham Dumpleton added the comment: Let me try and summarise what I do understand about this. The existing wrapt code as written and its tests, work fine for Python 2.7 and 3.6-3.11. No special case handling is done in tests related to checking annotations that I can remember. The only

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

2022-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about mix-ins or abstract base classes? class VecMixin: def length(self): return math.hypot(*self) class Vec2D(NamedTuple, VecMixin): x: float y: float class Vec3D(NamedTuple, VecMixin): x: float y: float z: float