[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 ___

[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 ___

[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:

[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

[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

[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.

[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

[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 Nikita Sobolev
Nikita Sobolev added the comment: Thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ 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

[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 ___

[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.

[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 ___

[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 ___

[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

[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 ___

[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

[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: 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

[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,

[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 /

[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:

[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 ___

[issue43536] 3.9.2 --without-pymalloc --with-pydebug --with-valgrind: test failed: test_posix

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: Without the test output, we cannot investigate the issue. I close it. -- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[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

[issue46558] Quadratic time internal base conversions

2022-01-27 Thread Tim Peters
New submission from Tim Peters : Our internal base conversion algorithms between power-of-2 and non-power-of-2 bases are quadratic time, and that's been annoying forever ;-) This applies to int<->str and int<->decimal.Decimal conversions. Sometimes the conversion is implicit, like when

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-35774 as a duplicate of this issue. -- ___ Python tracker ___ ___

[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",

[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:

[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

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

2022-01-27 Thread STINNER Victor
STINNER Victor added the comment: Quick update on this closed issue. I landed on this issue from Erlend's SC request: https://github.com/python/steering-council/issues/99 > Oh! I assumed this bug wasn't resolved, but it is -- in bpo-34784. Sorry, I > should have checked! Yes, there is the

[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(

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

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Please just don't go there. I beg you. It's not worth it. -- ___ Python tracker ___ ___

[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 --

[issue46528] Simplify the VM's stack manipulations

2022-01-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: IIRC, Carl got a lot of benefit out of reordering the opcodes in the main loop to put the most common ones at the top. I don't know if that is still relevant or whether computed gotos, when enabled, change that calculus. --

[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 20f53136679e260466a765de5befa3b9db396c9e by Miss Islington (bot) in branch '3.10': bpo-46542: test_json uses support.infinite_recursion() (GH-30972) https://github.com/python/cpython/commit/20f53136679e260466a765de5befa3b9db396c9e --

[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

[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

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

2022-01-27 Thread Eric V. Smith
Eric V. Smith added the comment: Could you give an example of the problem? -- nosy: +eric.smith ___ Python tracker ___ ___

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

2022-01-27 Thread Tim Peters
Tim Peters added the comment: New changeset f10dafc430279b4e6cf5b981ae3d1d76e8f431ad by Crowthebird in branch 'main': bpo-46407: Optimizing some modulo operations (GH-30653) https://github.com/python/cpython/commit/f10dafc430279b4e6cf5b981ae3d1d76e8f431ad --

[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

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

2022-01-27 Thread Michael P. Nitowski
New submission from Michael P. Nitowski : Systems that aggregate logs like Sentry will group all captured warnings under the same event which makes it difficult to assess common warnings -- components: Library (Lib) messages: 411947 nosy: mnito priority: normal severity: normal

[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 ___

[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

[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 --

[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: 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. --

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

2022-01-27 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30972 ___ 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

[issue31582] Add _pth breadcrumb to sys.path documentation

2022-01-27 Thread Steve Dower
Steve Dower added the comment: I think we need somewhere in the documentation to explain how the initial import path is calculated, in terms useful for an end user (rather than what's in getpath.py, which is for developers). Right now, I'm not sure there's a good place for it. There's a

[issue46528] Simplify the VM's stack manipulations

2022-01-27 Thread Brandt Bucher
Brandt Bucher added the comment: > I did an experiment to double the number of instructions. Were the extra instructions just NOPs, or were they actually doing any work? If they were NOPs, then presumably those numbers tell us more about the overhead of dispatch and cache pressure than

[issue46528] Simplify the VM's stack manipulations

2022-01-27 Thread Mark Shannon
Mark Shannon added the comment: Timings for individual instructions are a bit meaningless, as out-of-order execution and speculation on modern CPUs makes it hard to pin down the timing of anything. I did an experiment to double the number of instructions. It slowed things down by ~10%, so

[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 18ea973c21ee4a6adc26be41027881043fa498eb by Victor Stinner in branch 'main': bpo-40170: Remove PyHeapType_GET_MEMBERS() macro (GH-30942) https://github.com/python/cpython/commit/18ea973c21ee4a6adc26be41027881043fa498eb --

[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

[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 ___

[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 ___

[issue46528] Simplify the VM's stack manipulations

2022-01-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Very interesting. Do we have any current (or even cutting edge, i.e. 3.11) timings for individual instructions? Or a breakdown of how frequently different instructions are invoked? I remember Carl Shapiro presenting his findings here several years ago

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

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

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +sobolevn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44791] Substitution of ParamSpec in Concatenate

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

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

2022-01-27 Thread Barney Gale
New submission from Barney Gale : In Python 3.9 / issue39682 we made Path.__exit__() a no-op, and added a comment in the code mentioning that it should be deprecated in future. The future is here, so let's deprecate it. -- components: Library (Lib) messages: 411936 nosy: barneygale

[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 ___ ___

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

2022-01-27 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: The issue seems to be affecting also the PPC64LE Fedora Rawhide Clang 3.x and PPC64LE Fedora Stable Clang 3.x -- nosy: +cstratak ___ Python tracker

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

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: It seems acceptable to mypy. I'm not sure I like the agenda of "moving dataclasses to using typing.py introspection tools". -- ___ 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

[issue46528] Simplify the VM's stack manipulations

2022-01-27 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +29148 pull_request: https://github.com/python/cpython/pull/30970 ___ Python tracker ___

[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. >

[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 Keelung Yang
Change by Keelung Yang : -- components: +Library (Lib) type: -> enhancement versions: +Python 3.11 ___ 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

[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

[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

[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

[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 ___ ___

[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 ___

[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:

[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

[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
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

[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

[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

[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

[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

[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 --

[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 --

[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

[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

[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 ___

[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 --

[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 ___

[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

[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

  1   2   >