Guido van Rossum added the comment:
Putting it in inspect makes sense then.
--
___
Python tracker
<https://bugs.python.org/issue43817>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
Also, for crosslinking, see issue43463.
--
___
Python tracker
<https://bugs.python.org/issue43817>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
Hey Larry, it would seem that PEP 649 as currently specified would make it
impossible to access annotations via the inspect module in cases where
x.__annotations__ raises (because one of the annotations references an
undefined variable).
I really think
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Thanks -- odd this didn't fail in CI. We'll get it fixed.
--
___
Python tracker
<https://bugs.python.org/issue41515>
___
__
Guido van Rossum added the comment:
New changeset a9cf69df2e031d6157f01289f66ca9cf723ceb5c by Karthikeyan
Singaravelan in branch 'master':
bpo-41515: Fix KeyError raised in get_type_hints (GH-25352)
https://github.com/python/cpython/commit/a9cf69df2e031d6157f01289f66ca9
Guido van Rossum added the comment:
I'd say just submit the PR. Shouldn't be problematic. (Have you decided
what to do if the eval() fails?)
--
___
Python tracker
<https://bugs.python.o
Guido van Rossum added the comment:
It's fair that get_type_hints() does too much. But what does your proposed
function do besides this?
{k: eval(v) for k, b in x.__annotations__.items()}
?
--
___
Python tracker
<https://bugs.py
Guido van Rossum added the comment:
Batuhan, can you summarize the argument from the thread? What do you think
yourself? Myself, I'm not sure either way, but it seems okay to remove the
remnant bytecode.
--
___
Python tracker
&
Guido van Rossum added the comment:
Hi Ken Jin, you can close this issue now with your new permissions, right?
--
___
Python tracker
<https://bugs.python.org/issue42
Guido van Rossum added the comment:
New changeset 852150ddfe68bc2696fc880175aeb855a0c16ae6 by Ken Jin in branch
'master':
bpo-42904: Fix get_type_hints for class local namespaces (GH-24201)
https://github.com/python/cpython/commit/852150ddfe68bc2696fc880175aeb8
Guido van Rossum added the comment:
Dominic, thanks so much for the backport!
--
___
Python tracker
<https://bugs.python.org/issue42059>
___
___
Python-bug
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset 9045919bfa820379a66ea67219f79ef6d9ecab49 by Jelle Zijlstra in
branch 'master':
bpo-43772: Fix TypeVar.__ror__ (GH-25339)
https://github.com/python/cpython/commit/9045919bfa820379a66ea67219f79e
Guido van Rossum added the comment:
New changeset 522433601a5c64603dab3d733f41a5db39d237eb by Jelle Zijlstra in
branch 'master':
bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298)
https://github.com/python/cpython/commit/522433601a5c64603dab3d733f41a5
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset ac05f82ad4983e3d3653ae7494c1ff62c4a265fc by DevilXD in branch
'master':
bpo-41974: Remove part of the note regarding complex.__float__ (GH-25197)
https://github.com/python/cpython/commit/ac05f82ad4983e3d3653ae7494c1ff
Guido van Rossum added the comment:
LGTM
--
___
Python tracker
<https://bugs.python.org/issue43764>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
There may be other reasons why `__init__` is not desired, and there's no
absolute requirement that `__match_args__` must match the constructor --
only a convention. I'd say don't tie them together.
--
___
Guido van Rossum added the comment:
Are there other cases where suppressing one thing affects others?
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
Hm, reading the thread it's not 100% clear to me what you are proposing to do
in your patch, since different people seem to have proposed different things.
I think I'd be okay if `foo[bar]: baz` and `foo.bar: baz` (etc.) didn't
generate
Guido van Rossum added the comment:
I don't think we need control at the field level here. Omitting one field
is just going to cause confusion.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
So, should we reopen this ad add the flag to suppress __match_args__ generation
after all?
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
Do you need anything from me here?
--
___
Python tracker
<https://bugs.python.org/issue43761>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
Just Don't Do This.
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Guido van Rossum added the comment:
Yes.--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue43772>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
Thanks! Dup of bpo-43244.
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
I assume the OP wants to have a class that doesn't allow positional patterns.
The right way to spell that is indeed to add
__match_args__ = ()
to the class, there's no need to add another flag to @dataclass.
--
resolution: -> r
New submission from Guido van Rossum :
When building from scratch on Windows I get this warning:
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winbase.h(103):
warning C4005: 'Yield': macro redefinition
[C:\Users\gvanrossum\cpython\PCbuild\pythoncore.vcxproj]
I kno
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue43739>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Go for it! I assume that this will be pretty simple, right? TypeGuard[X] should
show up in __annotations__ as exactly that. It can be implemented in pure
Python.
--
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Yeah, I've received many warnings about benchmark hacking already, and we
won't fall to that.
For static statistics, it's easy enough to either download a thousand of
the most popular projects from GitHub or PyPI and just try to compile al
Guido van Rossum added the comment:
Oh, nice improvement suggestion for the docs! Do you feel comfortable
submitting a small PR for that?
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
Yeah, I do not think anyone cares. :-)
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
> Interesting. What code did you use to collect statistics?
For static statistics I wrote my own script:
https://github.com/python/cpython/pull/25090/files#diff-994d3592c951c78cbe71084d562590d1507ddfed767e2ec040f5e2610845a11c.
I can add that to To
Guido van Rossum added the comment:
So dynamically, I see about 0.5% of all opcodes are ADD_INT, so higher than
statically (which was 0.1%) but still small enough that I'm abandoning work on
ADD_INT.
I've got a branch where I'm adding POP_JUMP_IF_NONE and POP_JUMP_IF_N
Guido van Rossum added the comment:
To me it looks simpler though. The locals and cells are already stored in a
single array, f_localsplus (which also contains the evaluation stack). There
are various complications in ceval.c to translate cell indexes to indexes in
this array (ein
Guido van Rossum added the comment:
Indeed, Bartosz. Do you think you can help by submitting a PR for the docs?
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
New changeset 2b5913b4ee5852a28ca1509478f5582beb3aff7b by Ken Jin in branch
'master':
bpo-41370: Add note about ForwardRefs and PEP585 generic types in docs (#25183)
https://github.com/python/cpython/commit/2b5913b4ee5852a28ca1509478f558
Guido van Rossum added the comment:
Statically, in the stdlib, about 1 in a 1000 opcodes is an ADD_INT candidate.
I'll have to do some more work to come up with a dynamic count.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Microbench results for ADD_INT:
https://github.com/python/cpython/pull/25090#issuecomment-810441738
I have a few others like this lined up -- Mark recommended submitting them one
at a time to make review easier.
My philosophy here (which I learned from
Guido van Rossum added the comment:
New changeset ad442a674ca443feec43a88a2d3671784712e550 by Irit Katriel in
branch 'master':
bpo-24160: Fix breakpoints persistence across multiple pdb sessions (GH-21989)
https://github.com/python/cpython/commit/ad442a674ca443feec43a88a2d3671
Guido van Rossum added the comment:
Jiaxin: "Resolution: works for me" is meant for the triager to indicate that
there is no bug, or at least that the repro given in the bug report doesn't
trigger the bug in the triager's environment. It does *not* mean that a patch
wor
Guido van Rossum added the comment:
Do you need my help here?
--
___
Python tracker
<https://bugs.python.org/issue26053>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
New changeset 652bfdee9495dca241d48278742fe035b7a82bdb by Irit Katriel in
branch 'master':
bpo-26053: Fix args echoed by pdb run command (#22033)
https://github.com/python/cpython/commit/652bfdee9495dca241d48278742fe035b7a82bdb
-
Change by Guido van Rossum :
--
keywords: +patch
pull_requests: +23868
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25090
___
Python tracker
<https://bugs.python.org/issu
New submission from Guido van Rossum :
I'm lining up some PRs (inspired by some of Mark Shannon's ideas) that add new
opcodes which are straightforward combinations of existing opcodes. For
example, ADD_INT is equivalent to LOAD_CONST + BINARY_ADD, for certain small
(commo
Guido van Rossum added the comment:
@Jiaxin Please test steve's PR.
--
___
Python tracker
<https://bugs.python.org/issue43567>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
Anthony, can you help us out here? Is there a problem with regen.vcsproj,
either by depending on VS 2019 (which we don't officially support yet) or by
missing the changes in the names of some generated files?
--
nosy: +anthonyp
Change by Guido van Rossum :
--
nosy: +pablogsal, vstinner
___
Python tracker
<https://bugs.python.org/issue43567>
___
___
Python-bugs-list mailing list
Unsub
Guido van Rossum added the comment:
So is there a bug in regen.vcxproj, or in
https://devguide.python.org/setup/#windows-compiling ? The latter says VS 2017.
@pjx206: please stop clearing out the nosy list. You've done that twice now. If
you do it again, I'll close
Guido van Rossum added the comment:
FWIW, could this issue recently merged by Victor be related?
bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
@Steve, Anthony: I am now in a state where I have *no* changes anywhere,
build.bat completes without errors, but build.bat --regen produces this error
(after first doing a regular build):
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise
Guido van Rossum added the comment:
Can you past the full output from your command?
Also, try making a dummy change (e.g. add a blank line) to each of the input
files -- this will trigger the rebuild.
PS. Please don't remove nosy folks unless they request so.
--
Guido van Rossum added the comment:
Workaround:
For opcode.py changes, I can probably use the following strategy:
- build.bat
- Add new opcode to opcode.py
- build.bat --regen
- build.bat
- Make changes to compile.c and ceval.c to implement new opcode
- build.bat
For the parser perhaps you
Guido van Rossum added the comment:
I've found build.bat --regen unreliable myself. I went over it with Steve and
one issue that came up is that it uses the python.exe that is built to run the
code generation scripts; OTOH on Linux/Mac these scripts are run using a
suitable pre-exi
Guido van Rossum added the comment:
Steve: let's talk about this in person today.
--
___
Python tracker
<https://bugs.python.org/issue43567>
___
___
Pytho
Guido van Rossum added the comment:
I think it's strange code -- the mixin wants to be a metaclass but also an ABC
(which is not a meta class). Unless there's a serious use case I'm inclinded to
reply "don't care".
--
Guido van Rossum added the comment:
FWIW I have an idea that would allow code using e.g. &PyList_Type to continue
to work, and even ABI compatible (though only in the main interpreter).
// In some header file
PyAPI_FUNC(PyHeapTypeObject *) PyList_GetType();
#define PyList_
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset f0a6fde8827d5d4f7a1c741ab1a8b206b66ffd57 by Joshua Bronson in
branch 'master':
bpo-31861: Add aiter and anext to builtins (#23847)
https://github.com/python/cpython/commit/f0a6fde8827d5d4f7a1c741ab1a8b206b66ffd57
-
Guido van Rossum added the comment:
We should definitely document the column offset being 1-based, if it hasn't
been already. But be careful, there are some APIs that are 0-based and others
that are 1-based, for column offsets.
I was quite surprised at some point to find out that we
Guido van Rossum added the comment:
This looks like a sensible idea to me. The safeguards to ensure that customized
'super' still works seem reasonable to me. I have to admit that I sometimes
refrain from using super() where I should because of the expense, so this would
be welc
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue43563>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
To be honest, I just don’t have time to deal,with this, so I’m hoping some
other core dev has an opinion. But I can’t help you find one either. Sorry,
but that’s the reality of open source development. --
--Guido (mobile
Guido van Rossum added the comment:
Yes, discussion on a close issue is still read, unless people explicitly
unsubscribe (which they rarely do unless the chatter is spam).
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
Yeah, the runtime isinstance() checking is not required to give the right
answer. Also, I believe one of the rules is "if you inherit from a protocol you
are deemed to implement it". For methods, abstract methods can (but needn't) be
u
Guido van Rossum added the comment:
Yeah, feel free to close this issue.
--
___
Python tracker
<https://bugs.python.org/issue42128>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
I can never remember what "Py_LIMITED_API" stands for. If it's not defined,
does that mean we have the *unlimited* API? Is that a superset or a subset of
the limited API?
Regarding 1a *and* 1b, I think it would help to list the s
Guido van Rossum added the comment:
Please open a separate issue for that.
--
___
Python tracker
<https://bugs.python.org/issue43463>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
Yes, if we keep the top of the stack and the current frame in separate
variables.--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue42
Guido van Rossum added the comment:
I don't see what putting the limit back in this PR would give, but I do
question that we need more block nesting, and this PR causes a lot of code
churn (including a new API to create frames). It would be more convincing if
you could actually point
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue27929>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset bd2fa3c416ffe6107b500a2180fa1764645c0a61 by CAM Gerlach in branch
'master':
bpo-29982: Add "ignore_cleanup_errors" param to tempfile.TemporaryDirectory()
(GH-24793)
https://github.com/p
Guido van Rossum added the comment:
Serhiy, that’s brilliant! Let’s do it.
--
nosy: +Guido.van.Rossum
___
Python tracker
<https://bugs.python.org/issue30
Guido van Rossum added the comment:
This does point out that the ast structure is a liability, and we won't be
able to easily change it, since mypy and IIRC many linters use the ast
module. So I think that maybe we need to think more carefully about what
the *proper* ast structure is, r
Guido van Rossum added the comment:
If we add a new flag to ignore errors it's difficult to write code that
works in 3.9 as well. And given the use case I have doubts that "Errors
should never pass silently" is really the right Zen line to focus on. I'd
rather go for &q
Guido van Rossum added the comment:
Maybe return the original string?
--
___
Python tracker
<https://bugs.python.org/issue43463>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
SGTM
--
___
Python tracker
<https://bugs.python.org/issue29982>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Maybe we need to add an API (e.g. a flag to compile()) so that we can ask the
actual parser the question we're interested in, rather than having to use hacks
and heuristics?
--
___
Python tracker
&
Guido van Rossum added the comment:
Thanks for all your research and the PR!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset 131d5516409791b170b09a6ef8ed8463c9b09015 by db3l in branch
'master':
bpo-43271: Re-enable ceval.c optimizations for Windows debug builds (GH-24739)
https://github.com/python/cpython/commit/131d5516409791b170b09a6ef8ed84
Guido van Rossum added the comment:
Thanks! That's new info, at least, it wasn't clear to me from Victor's
original comment that this was for a debug build (even though as you say it
can be deduced from context).
Do you feel like submitting a PR along the li
Guido van Rossum added the comment:
New changeset a22bca6b1e2f3dc11a58f3e5ef5c22e26b8a2d80 by Daniel F Moisset in
branch 'master':
bpo-42128: Add documentation for pattern matching (PEP 634) (#24664)
https://github.com/python/cpython/commit/a22bca6b1e2f3dc11a58f3e5ef5c22
Guido van Rossum added the comment:
Thanks David!
So the crash only happens in debug mode?
PEP 651 promises to take reduce the C stack usage in the future. Therefore, I
would be okay with rolling this back for the time being.
If we do roll it back, maybe add a comment to ceval.c explaining
Guido van Rossum added the comment:
New changeset 1e3c68246ee738b5ec5450b1eb39af2fca300cb9 by Paul Bryan in branch
'master':
bpo-43345: Enhance TypedDict documentation. (#24668)
https://github.com/python/cpython/commit/1e3c68246ee738b5ec5450b1eb39af
Guido van Rossum added the comment:
If Tim approves we might get it into alpha 6 which goes out Monday.
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
I'd like Emily to have a look at that.
--
nosy: +emilyemorehouse
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
New changeset b798ab06937f8bb24b444a49dd42e11fff15e654 by Irit Katriel in
branch 'master':
bpo-43146: fix None-handling in single-arg traceback.print_exception(None)
(GH-24629)
https://github.com/python/cpyt
Guido van Rossum added the comment:
So the remaining question is what to do for print_exception(None)? Honestly
the current (new) behavior of printing `NoneType: None` seems fine.
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
So the PR just merged fixes that, right? Color me confused.
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
Are you going to create a separate PR or a new issue for the other thing? (And
what exactly *is* the other thing? Please summarize.)
--
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
New changeset 26f18b8540b49d592af66361f8df1a03953d1768 by Irit Katriel in
branch 'master':
bpo-43146: fix regression in traceback.print_exception(None) (GH-24463)
https://github.com/python/cpython/commit/26f18b8540b49d592af66361f8df1a
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue43278>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Carol, the most urgent thing we have going is to come up with text for
what's new. I posted a PR that adds my standard "quick" tutorial (
https://github.com/python/cpython/pull/24588) which is also found in
Appendix A of PEP 636 (the tuto
Guido van Rossum added the comment:
But seriously, nothing good can come from social media. It's what drove me to
retire in 2018. Just ignore it please.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Okay, I see. Clearly we should have kept the "DWIM" option, aka "If it starts
with a capital letter, it's a value pattern." :-)
--
___
Python tracker
<https:
Guido van Rossum added the comment:
Let's continue this at https://github.com/python/cpython/pull/24588
--
___
Python tracker
<https://bugs.python.org/is
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue42974>
___
___
Python-bugs-list mailing list
Unsubscribe:
701 - 800 of 5533 matches
Mail list logo