[issue46378] Experiment with LLVM BOLT binary optimizer

2022-01-27 Thread Dong-hee Na
Dong-hee Na added the comment: Only 1% gain, so we decided not to adopt it yet. see: https://github.com/faster-cpython/ideas/issues/224#issuecomment-1022371595 -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-01-27 Thread Henry Schreiner
Henry Schreiner added the comment: It would be great to get this looked at before things start getting too locked in for 3.11! -- ___ Python tracker ___

[issue46390] Multiple test failures on Alpine 3.15 / musl-1.2.2-r7

2022-01-27 Thread Zachary Ware
Zachary Ware added the comment: BTW, we do have an Alpine buildbot worker in the unstable set, running only on the `main` branch: https://buildbot.python.org/all/#/workers/19 -- nosy: +zach.ware ___ Python tracker

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: > And I found 135 more static types with this command Of these 135 static types, most are cleared since bpo-46417 was implemented: * 103 types are cleared by _PyTypes_FiniTypes() * 15 types are cleared by _PyIO_Fini() * the remaining 17 types are not cleared

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-01-27 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +3.11regression nosy: +gregory.p.smith priority: normal -> high ___ Python tracker ___

[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +29146 pull_request: https://github.com/python/cpython/pull/30968 ___ Python tracker ___

[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-27 Thread miss-islington
miss-islington added the comment: New changeset ace0aa2a2793ba4a2b03e56c4ec375c5470edee8 by Gregory P. Smith in branch 'main': bpo-42982: update pbkdf2 example & add another link (GH-30966) https://github.com/python/cpython/commit/ace0aa2a2793ba4a2b03e56c4ec375c5470edee8 --

[issue46548] macOS installers cannot be signed on Monterey

2022-01-27 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: I To be clear: I am okay with this patch, just not with making dataclasses import typing. -- --Guido (mobile) -- ___ Python tracker ___

[issue46560] ParamSpec: Typo in doc string

2022-01-27 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for noticing! Would you like to submit a PR to fix it? -- nosy: +Jelle Zijlstra ___ Python tracker ___

[issue25948] Invalid MIME encoding generated by email.mime (line too long)

2022-01-27 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 3.0 -> 4.0 pull_requests: +29159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30980 ___ Python tracker

[issue46559] base64 documentation is out-dated; altchars has to have the exact length of 2.

2022-01-27 Thread hello world
New submission from hello world : According to the documentation of base64 (https://docs.python.org/3/library/base64.html), > Optional altchars must be a bytes-like object of at least length 2 > (additional characters are ignored) which specifies an alternative alphabet > for the + and /

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-27 Thread Kumar Aditya
Kumar Aditya added the comment: Christian's solution seems better to me so I'll close my PR. Christian would you like to create a PR for it ? -- ___ Python tracker ___

[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-01-27 Thread Dennis Sweeney
Dennis Sweeney added the comment: Why? Callee-borrowing-from-caller is the established norm across the C API. You mention use-after-free, but can you elaborate on how that can happen in practice? https://docs.python.org/3/extending/extending.html?highlight=borrowed#ownership-rules says:

[issue42238] Deprecate suspicious.py?

2022-01-27 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +29160 pull_request: https://github.com/python/cpython/pull/30981 ___ Python tracker ___

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: I used the following shell command to search remaining static types: --- grep -E 'static PyTypeObject [a-zA-Z_0-9]+ *(;|= *{|) *$' $(find -name "*.c") --- I found 86 static types in 17 files: * PC/_msi.c: * msidb_Type * msiview_Type * record_Type *

[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-27 Thread Mark Shannon
Mark Shannon added the comment: New changeset 26b0482393a313e3bda364a35e7417e9db52c1c4 by Christian Heimes in branch 'main': bpo-46476: Simplify and fix _PyStaticCode_Dealloc (GH-30965) https://github.com/python/cpython/commit/26b0482393a313e3bda364a35e7417e9db52c1c4 --

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: > * zodbpickle-2.2.0: src/zodbpickle/_pickle_33.c Technically, zodbpickle works on Python 3.11 and is not impacted by the Py_SIZE() change. _pickle_33.c redefines the Py_SIZE() macro to continue using as an l-value:

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Eric V. Smith
Eric V. Smith added the comment: The dataclasses tests were in fact just added for completeness. I'd be okay with changing dataclasses to reject leading spaces. -- ___ Python tracker

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
New submission from Gregory Beauregard : ``` class C: a: "ClassVar" get_type_hints(C, globals()) # TypeError: Plain typing.ClassVar is not valid as type argument ``` A stringified lone ClassVar raises at runtime, but this pattern is tested for in dataclasses unit tests and used in the

[issue46558] Quadratic time internal base conversions

2022-01-27 Thread Dennis Sweeney
Dennis Sweeney added the comment: Is this similar to https://bugs.python.org/issue3451 ? -- nosy: +Dennis Sweeney ___ Python tracker ___

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Keelung Yang
Keelung Yang added the comment: @barneygale, This is for simplifying code and improve readability, since `Readability counts` in The Zen of Python. Users needn't two lines code to append a file. And there is a minimal modifying to reach it. If inexperienced users are falling into the hole,

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-27 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch pull_requests: +29155 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30976 ___ Python tracker ___

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c27a33132be101e246ae2584f1826477357138d6 by Nikita Sobolev in branch 'main': bpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (#30913) https://github.com/python/cpython/commit/c27a33132be101e246ae2584f1826477357138d6

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-27 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46558] Quadratic time internal base conversions

2022-01-27 Thread Tim Peters
Tim Peters added the comment: Dennis, partly, although that was more aimed at speeding division, while the approach here doesn't use division at all. However, thinking about it, the implementation I attached doesn't actually for many cases (it doesn't build as much of the power tree in

[issue46560] ParamSpec: Typo in doc string

2022-01-27 Thread Evan
New submission from Evan : Apologies if this is pedantic; in the typing.py file the ParamSpec's doc string says: "They are only valid when used in ``Concatenate``, or s the first argument to ``Callable``" I believe it should be: "They are only valid when used in ``Concatenate``, or

[issue46558] Quadratic time internal base conversions

2022-01-27 Thread Tim Peters
Tim Peters added the comment: Changed the code so that inner() only references one of the O(log log n) powers of 2 we actually precomputed (it could get lost before if `lo` was non-zero but within `n` had at least one leading zero bit - now we _pass_ the conceptual width instead of

[issue46454] '0 -> /dev/null' is lost

2022-01-27 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg411287 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46454] '0 -> /dev/null' is lost

2022-01-27 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg411776 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-01-27 Thread Maxwell Bernstein
New submission from Maxwell Bernstein : Currently the descriptor (self) argument to __get__ is passed borrowed, since _PyType_LookupId returns a borrowed reference (see _PyObject_LookupSpecial and lookup_maybe_method in Objects/typeobject.c). This should instead own the reference.

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-27 Thread Kumar Aditya
Kumar Aditya added the comment: I created a PR https://github.com/python/cpython/pull/30976 which adjusts _Py_RefTotal and refcnt of immortal codeobjects to account for Py_INCREF/Py_DECREF on codeobjects. With that patch refcnt is 8 and increases by 8 with each initialization of Python.

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +29157 pull_request: https://github.com/python/cpython/pull/30978 ___ Python tracker ___

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +29156 pull_request: https://github.com/python/cpython/pull/30977 ___ Python tracker

[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-01-27 Thread Maxwell Bernstein
Change by Maxwell Bernstein : -- keywords: +patch pull_requests: +29158 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30979 ___ Python tracker

[issue45735] Promise the long-time truth that `args=list` works

2022-01-27 Thread Charlie Zhao
Change by Charlie Zhao : -- pull_requests: +29161 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30982 ___ Python tracker ___

[issue46551] Provide number of workers option for fast PGO build time

2022-01-27 Thread Dong-hee Na
Dong-hee Na added the comment: > You only test libregrtest.main and libregrtest.runtest_mp modules which > > don't execute code. Does it mean that running tests is useless to train > the > PGO? Sorry, I didn't check all affects except performance regression, and there was already related

[issue29844] Windows Python installers not installing DLL to System32/SysWOW64

2022-01-27 Thread Zachary Ware
Zachary Ware added the comment: New changeset a8912a0f8d9eba6d502c37d51f9933e976db by Miss Islington (bot) in branch '3.10': bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141) https://github.com/python/cpython/commit/a8912a0f8d9eba6d502c37d51f9933e976db

[issue29844] Windows Python installers not installing DLL to System32/SysWOW64

2022-01-27 Thread Zachary Ware
Zachary Ware added the comment: New changeset 7c8d1f0238842fb8da099e797eea5973b66638a9 by Miss Islington (bot) in branch '3.9': bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141) https://github.com/python/cpython/commit/7c8d1f0238842fb8da099e797eea5973b66638a9

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-01-27 Thread Mark Shannon
Mark Shannon added the comment: Yes, we should expose the tuple of variable names, both in Python and in the C-API. Would something like `PyCodeObject_GetVariableName()` and `PyCodeObject_GetVariableKind()` work? In the meantime, since you were reading `co_varnames` directly, why not read

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry again, all; I failed to read everything that was going on here. The test *wasn't* failing with the hypot-based version of Vec2D.__abs__ that's in the main branch; only with the "**0.5"-based version that was still in the older branches. Please ignore

[issue45476] [C API] PEP 674: Disallow using macros (Py_TYPE and Py_SIZE) as l-value

2022-01-27 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] PEP 674: Disallow using macros as l-value -> [C API] PEP 674: Disallow using macros (Py_TYPE and Py_SIZE) as l-value ___ Python tracker

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 27518 fixes a substitution of a ParamSpec variable with a Concatenate nad a list of types. It is not specified explicitly in PEP 612, but it does not contradict it. PR 30969 makes an ellipsis be valid as the last argument of Concatenate to fix a

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: Low priority, but it may also be worth updating the implementation of `Vec2D.__abs__`. It currently looks like this: def __abs__(self): return (self[0]**2 + self[1]**2)**0.5 But would be more robust if it used hypot: def __abs__(self):

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +AlexWaygood, gvanrossum, kj, sobolevn ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I vote we don't change this. PEP 484 says: > The string literal should contain a valid Python expression (i.e., > compile(lit, '', 'eval') should be a valid code object) and it should > evaluate without errors once the module has been fully loaded. But

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6c6a153dee132116611f2d5df0689a5a605f62b6 by Victor Stinner in branch 'main': bpo-46417: signal: move siginfo_type to the module state (GH-30964) https://github.com/python/cpython/commit/6c6a153dee132116611f2d5df0689a5a605f62b6 --

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29147 pull_request: https://github.com/python/cpython/pull/30969 ___ Python tracker ___

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Keelung Yang
Change by Keelung Yang : -- components: +Library (Lib) type: -> enhancement versions: +Python 3.11 ___ Python tracker ___ ___

[issue29844] Windows Python installers not installing DLL to System32/SysWOW64

2022-01-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +29141 pull_request: https://github.com/python/cpython/pull/30962 ___ Python tracker

[issue29844] Windows Python installers not installing DLL to System32/SysWOW64

2022-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +29142 pull_request: https://github.com/python/cpython/pull/30963 ___ Python tracker ___

[issue46186] replace `io.IncrementalNewlineDecoder` with non incremental newline decoders

2022-01-27 Thread Guo Ci Teo
Guo Ci Teo added the comment: The old code has an incorrect usage of `io.IncrementalNewlineDecoder`. Since the `decode` method is called only once, is it the final call and needs the `final=True` argument as documented in

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Eric V. Smith
Eric V. Smith added the comment: dataclasses is no doubt too lenient. But it's just trying to accept valid strings that look like ClassVar. Way back when this was initially implemented, we decided that calling get_type_hints would be too expensive for every dataclass, and would also

[issue46539] typing: forward references don't understand special type forms

2022-01-27 Thread miss-islington
miss-islington added the comment: New changeset bfcb41420a326ec353740d8180ffbf402746fa33 by Miss Islington (bot) in branch '3.10': bpo-46539: Pass status of special typeforms to forward references (GH-30926) https://github.com/python/cpython/commit/bfcb41420a326ec353740d8180ffbf402746fa33

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: And I found 135 more static types with this command: --- grep -E '^PyTypeObject [a-zA-Z_0-9]+ *(;|= *{|) *$' $(find -name "*.c") --- Types: Objects/cellobject.c: PyCell_Type Objects/sliceobject.c: PyEllipsis_Type Objects/sliceobject.c: PySlice_Type

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29143 pull_request: https://github.com/python/cpython/pull/30964 ___ Python tracker ___

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-27 Thread Mark Dickinson
Mark Dickinson added the comment: Apologies; looks like I'm out of date on this. It's already using hypot, which makes it more than a little worrying that it doesn't get the right answer for `Vec2D(6, 8)`. -- ___ Python tracker

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-01-27 Thread Eric Snow
Eric Snow added the comment: New changeset 247480a21cb165efdacc346a2d589dfc27e18283 by Eric Snow in branch 'main': bpo-46541: Generate the global objects initializer. (gh-30941) https://github.com/python/cpython/commit/247480a21cb165efdacc346a2d589dfc27e18283 --

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0575551f69ba9c999835bfb176a543d468083c03 by Victor Stinner in branch 'main': bpo-40170: Move _Py_GetAllocatedBlocks() to pycore_pymem.h (GH-30943) https://github.com/python/cpython/commit/0575551f69ba9c999835bfb176a543d468083c03 --

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: I close the issue. I cleared most static types at exit. Following work can be done in bpo-40077 or other issues. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Gregory Beauregard added the comment: I'm drafting an implementation for the purpose of investigating performance right now; I will share when ready. -- ___ Python tracker

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Keelung Yang
New submission from Keelung Yang : Three reasons to improve issue 35095: Implement pathlib.Path.append_bytes and pathlib.Path.append_text 1. If I want to append text to log at each startup(before calling basicConfig), there is no simple way to do this. 2. Adding append keyword is better

[issue29844] Windows Python installers not installing DLL to System32/SysWOW64

2022-01-27 Thread Zachary Ware
Zachary Ware added the comment: With the readme updated (and backports in progress), I'm closing the issue. -- nosy: -miss-islington resolution: -> fixed stage: patch review -> needs patch status: open -> closed versions: +Python 3.11 -Python 3.8

[issue46539] typing: forward references don't understand special type forms

2022-01-27 Thread miss-islington
miss-islington added the comment: New changeset 37577033baadf5f4a30d0998bae7d26f11a694e2 by Miss Islington (bot) in branch '3.9': bpo-46539: Pass status of special typeforms to forward references (GH-30926) https://github.com/python/cpython/commit/37577033baadf5f4a30d0998bae7d26f11a694e2

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Gregory Beauregard
New submission from Gregory Beauregard : ``` class C: a: " ClassVar[int]" = 3 get_type_hints(C, globals()) # SyntaxError: Forward reference must be an expression -- got ' ClassVar[int]' ``` I discovered while investigating the viability of moving dataclasses.py to using typing.py's

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Gregory Beauregard added the comment: I think this is needed for moving dataclasses to using typing.py introspection tools to be viable. -- ___ Python tracker ___

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Change by Gregory Beauregard : -- nosy: +GBeauregard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: We should not accept leading spaces.-- --Guido (mobile) -- ___ Python tracker ___ ___

[issue10943] abitype: Need better support to port C extension modules to the stable C API

2022-01-27 Thread Zachary Ware
Zachary Ware added the comment: Tools/scripts/abitype.py hasn't seen much maintenance in 11 years, but it also seems not to have seen much use. Patches would be accepted, but priority is low enough that I'm going to go ahead and close the issue. -- nosy: +zach.ware resolution: ->

[issue46166] Get "self" args or non-null co_varnames from frame object with C-API

2022-01-27 Thread Eric Snow
Eric Snow added the comment: In addition to what Mark said, note that co_varnames get's populated lazily by the Python-level getter for code.co_varnames. So could you call the Python function before entering the hot path? Regardless, a dedicated C-API for this like Mark suggested would be

[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-27 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +29145 pull_request: https://github.com/python/cpython/pull/30966 ___ Python tracker ___

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Change by Gregory Beauregard : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Change by Gregory Beauregard : -- nosy: +AlexWaygood, sobolevn -GBeauregard ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7057] tkinter doc: more 3.x updates

2022-01-27 Thread Zachary Ware
Zachary Ware added the comment: Trusting Mark's diagnosis, I'm closing the issue. -- nosy: +zach.ware resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-27 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes nosy_count: 6.0 -> 7.0 pull_requests: +29144 pull_request: https://github.com/python/cpython/pull/30965 ___ Python tracker

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Before you start supporting things that contradict PEP 612 this should be discussed on typing-sig (or in the python/typing tracker). Honestly I'd feel more comfortable if there was agreement on typing-sig with your previous PRs in this issue as well; "it

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39682] pathlib.Path objects can be used as context managers

2022-01-27 Thread Barney Gale
Change by Barney Gale : -- pull_requests: +29150 pull_request: https://github.com/python/cpython/pull/30971 ___ Python tracker ___

[issue46556] pathlib.Path.__enter__() should emit DeprecationWarning

2022-01-27 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +29149 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30971 ___ Python tracker ___

[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-01-27 Thread Gregory Beauregard
Gregory Beauregard added the comment: Hi Eric, to follow up on https://bugs.python.org/msg411943 I'm currently a bit negative on moving to get_type_hints, even though I got it working for the test suite. I think your worries with nesting are well placed, particularly with namespaces and

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset e7a6285f1be18992191599792524d3aa6aedfa55 by Victor Stinner in branch 'main': bpo-46542: test_json uses support.infinite_recursion() (GH-30972) https://github.com/python/cpython/commit/e7a6285f1be18992191599792524d3aa6aedfa55 --

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +29152 pull_request: https://github.com/python/cpython/pull/30973 ___ Python tracker

[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-01-27 Thread Eric V. Smith
Eric V. Smith added the comment: I was hoping to wait until the PEP 649 / PEP 563 thing was decided. But I realize that no matter how that turns out, there will be a need to deal with string annotations. So I think I'm okay with the regex changes. Personally, I think we should remove

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-27 Thread miss-islington
miss-islington added the comment: New changeset 8cd82461f9bb17381bf9d09989daea316c609cd5 by Miss Islington (bot) in branch '3.9': bpo-46542: test_json uses support.infinite_recursion() (GH-30972) https://github.com/python/cpython/commit/8cd82461f9bb17381bf9d09989daea316c609cd5 --

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Gregory Beauregard added the comment: I think I miscommunicated my intent with sentence placement. I already posted the thoughts I referred to; they're just my concluding opinion on the technical merit of using get_type_hints in dataclasses to solve the Annotated problem:

[issue46528] Simplify the VM's stack manipulations

2022-01-27 Thread Brandt Bucher
Brandt Bucher added the comment: In a typical run of the pyperformance benchmark suite, rotations account for a bit over 1% of all instructions executed. I don't have timings for individual instructions, unfortunately. -- ___ Python tracker

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Gregory Beauregard
Gregory Beauregard added the comment: It's acceptable to mypy, and pyright added support a few months ago when I made an issue and Eric Traut discovered this pattern in the wild too. Some of the other type checkers (pyre) still error I believe. My feeling is that since this has apparently

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: I managed to reproduce the test_json crash on the "Fedora Stable ppc64le" buildbot using clang. Commands: --- ./configure --with-pydebug CC=clang make -j10 ./python -m test -v test_json --- I wrote GH-30972 to fix it. --

[issue46557] Logging captured warnings with a format string unnecessarily groups warnings together

2022-01-27 Thread Michael P. Nitowski
Change by Michael P. Nitowski : -- keywords: +patch pull_requests: +29154 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30975 ___ Python tracker

[issue46557] Logging captured warnings with a format string unnecessarily groups warnings together

2022-01-27 Thread Michael P. Nitowski
Michael P. Nitowski added the comment: Of course, here's an example script to reproduce: ``` import logging import warnings import sentry_sdk from sentry_sdk.integrations.logging import LoggingIntegration logging.captureWarnings(True) sentry_logging = LoggingIntegration(

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-23769 "valgrind reports leaks for test_zipimport" as duplicate of this issue. At exit, Python doesn't clear the static types of the _collections, itertools and _struct extensions: * itertools.accumulate * itertools.combinations *

[issue23769] valgrind reports leaks for test_zipimport

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: > valgrind reports leaks for test_zipimport It's not strictly a memory leak: running the same code multiple time doesn't leak memory. It's just that Python allocates memory once and never releases it (doesn't releast it at exit). --- leak4.py: Updated and

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Alex Waygood
Alex Waygood added the comment: I agree with Jelle and Guido -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46555] Unicode-mangled names refer inconsistently to constants

2022-01-27 Thread Kodiologist
New submission from Kodiologist : I'm not sure if this is a bug, but it certainly surprised me. Most reserved words, when Unicode-mangled, as in "핕핖핗", act like ordinary identifiers (see e.g. bpo-46520). `True`, `False`, and `None` are weird in that Unicode-mangled versions of them refer to

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-27 Thread Barney Gale
Barney Gale added the comment: >From https://stackoverflow.com/a/68969892 > I think a major reason why pathlib.Path objects don't (and, indeed, > shouldn't) have a append_text method is because it creates a hole for > inexperienced users to fall into, which is a huge sin in API design. >

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +29153 pull_request: https://github.com/python/cpython/pull/30974 ___ Python tracker ___

[issue46407] optimizing `1 << n` or `2 ** n` and modulo-only operations

2022-01-27 Thread Tim Peters
Tim Peters added the comment: I only merged the split-off PR that added new remainder-only functions. Still thinking about the `1 << n` and `2**n` one. -- assignee: -> tim.peters resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: Raymond: > Is the subinterpreters work still on hold pending a PEP? While sub-interpreters is one motivation to convert static types to heap types, it's not the only one. IMO it's better to use the "embedded Python" use case to justify these changes, since

[issue35774] ASAN, memory leak

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: > 1. Run python > 2. Ctrl + D It seems like this scenario has recently been fixed in bpo-1635741: $ ./python -I -X showrefcount Python 3.11.0a4+ (heads/main:18ea973c21, Jan 28 2022, 01:38:10) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)] on linux Type "help",

  1   2   >