[issue43817] Add typing.get_annotations()

2021-04-16 Thread Guido van Rossum
Guido van Rossum added the comment: Putting it in inspect makes sense then. -- ___ Python tracker <https://bugs.python.org/issue43817> ___ ___ Python-bugs-list m

[issue43817] Add typing.get_annotations()

2021-04-16 Thread Guido van Rossum
Guido van Rossum added the comment: Also, for crosslinking, see issue43463. -- ___ Python tracker <https://bugs.python.org/issue43817> ___ ___ Python-bugs-list m

[issue43463] typing.get_type_hints with TYPE_CHECKING imports / getting hints for single argument

2021-04-16 Thread Guido van Rossum
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

[issue40222] "Zero cost" exception handling

2021-04-15 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue40222> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41515] typing.get_type_hints generates KeyError

2021-04-12 Thread Guido van Rossum
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> ___ __

[issue41515] typing.get_type_hints generates KeyError

2021-04-12 Thread Guido van Rossum
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

[issue43817] Add typing.get_annotations()

2021-04-12 Thread Guido van Rossum
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

[issue43817] Add typing.get_annotations()

2021-04-12 Thread Guido van Rossum
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

[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-12 Thread Guido van Rossum
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 &

[issue42904] get_type_hints does not provide localns for classes

2021-04-12 Thread Guido van Rossum
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

[issue42904] get_type_hints does not provide localns for classes

2021-04-12 Thread Guido van Rossum
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

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2021-04-12 Thread Guido van Rossum
Guido van Rossum added the comment: Dominic, thanks so much for the backport! -- ___ Python tracker <https://bugs.python.org/issue42059> ___ ___ Python-bug

[issue43772] Minor repr error in typing.TypeVar.__ror__()

2021-04-10 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43772] Minor repr error in typing.TypeVar.__ror__()

2021-04-10 Thread Guido van Rossum
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

[issue43783] Make ParamSpec.args/kwargs more useful objects

2021-04-10 Thread Guido van Rossum
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

[issue43783] Make ParamSpec.args/kwargs more useful objects

2021-04-10 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2021-04-10 Thread Guido van Rossum
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

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM -- ___ Python tracker <https://bugs.python.org/issue43764> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Guido van Rossum
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. -- ___

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Guido van Rossum
Guido van Rossum added the comment: Are there other cases where suppressing one thing affects others? -- ___ Python tracker <https://bugs.python.org/issue43

[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-10 Thread Guido van Rossum
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

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Guido van Rossum
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

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Guido van Rossum
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

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-10 Thread Guido van Rossum
Guido van Rossum added the comment: Do you need anything from me here? -- ___ Python tracker <https://bugs.python.org/issue43761> ___ ___ Python-bugs-list mailin

[issue43746] Weird typing annotation closure behavior

2021-04-09 Thread Guido van Rossum
Guido van Rossum added the comment: Just Don't Do This. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue43772] Minor repr error in typing.TypeVar.__ror__()

2021-04-08 Thread Guido van Rossum
Guido van Rossum added the comment: Yes.-- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue43772> ___ ___ Python-bugs-list mailin

[issue43767] Compiler arning about 'Yield' macro redefinition on Windows

2021-04-07 Thread Guido van Rossum
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

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-07 Thread Guido van Rossum
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

[issue43767] Compiler arning about 'Yield' macro redefinition on Windows

2021-04-07 Thread Guido van Rossum
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

[issue43739] Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.

2021-04-07 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue43739> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-07 Thread Guido van Rossum
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.

[issue43684] Add combined opcodes

2021-04-06 Thread Guido van Rossum
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

[issue43755] lambda expression no longer valid at comp_if in Python 3.9

2021-04-06 Thread Guido van Rossum
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

[issue43748] Inconsistent grammar in new error message (introduced in 3.10.0a7)

2021-04-06 Thread Guido van Rossum
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

[issue43684] Add combined opcodes

2021-04-06 Thread Guido van Rossum
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

[issue43684] Add combined opcodes

2021-04-05 Thread Guido van Rossum
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

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-04-05 Thread Guido van Rossum
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

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2021-04-04 Thread Guido van Rossum
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

[issue41370] PEP 585 and ForwardRef

2021-04-04 Thread Guido van Rossum
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

[issue43684] Add combined opcodes

2021-04-02 Thread Guido van Rossum
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

[issue43684] Add combined opcodes

2021-04-02 Thread Guido van Rossum
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

[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2021-04-02 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-04-01 Thread Guido van Rossum
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

[issue26053] regression in pdb output between 2.7 and 3.5

2021-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: Do you need my help here? -- ___ Python tracker <https://bugs.python.org/issue26053> ___ ___ Python-bugs-list mailin

[issue26053] regression in pdb output between 2.7 and 3.5

2021-04-01 Thread Guido van Rossum
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 -

[issue43684] Add combined opcodes

2021-03-31 Thread Guido van Rossum
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

[issue43684] Add combined opcodes

2021-03-31 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: @Jiaxin Please test steve's PR. -- ___ Python tracker <https://bugs.python.org/issue43567> ___ ___ Python-bugs-list m

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-30 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +pablogsal, vstinner ___ Python tracker <https://bugs.python.org/issue43567> ___ ___ Python-bugs-list mailing list Unsub

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-30 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-30 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-30 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-30 Thread Guido van Rossum
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. --

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-29 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-29 Thread Guido van Rossum
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

[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-29 Thread Guido van Rossum
Guido van Rossum added the comment: Steve: let's talk about this in person today. -- ___ Python tracker <https://bugs.python.org/issue43567> ___ ___ Pytho

[issue43594] Subclass of both `ABC` and `ABCMeta` breaks on `__subclasscheck__`

2021-03-26 Thread Guido van Rossum
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". --

[issue40601] [C API] Hide static types from the limited C API

2021-03-24 Thread Guido van Rossum
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_

[issue31861] add aiter() and anext() functions

2021-03-23 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue31861] add aiter() and anext() functions

2021-03-23 Thread Guido van Rossum
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 -

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-22 Thread Guido van Rossum
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

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-22 Thread Guido van Rossum
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

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-22 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue43563> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-18 Thread Guido van Rossum
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

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-17 Thread Guido van Rossum
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

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-16 Thread Guido van Rossum
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

[issue42128] Structural Pattern Matching (PEP 634)

2021-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, feel free to close this issue. -- ___ Python tracker <https://bugs.python.org/issue42128> ___ ___ Python-bugs-list m

[issue43503] [subinterpreters] PyObject statics exposed in the limited API break isolation.

2021-03-15 Thread Guido van Rossum
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

[issue43463] typing.get_type_hints with TYPE_CHECKING imports / getting hints for single argument

2021-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: Please open a separate issue for that. -- ___ Python tracker <https://bugs.python.org/issue43463> ___ ___ Python-bugs-list m

[issue42917] Block stack size for frame objects should be dynamically sizable

2021-03-15 Thread Guido van Rossum
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

[issue42917] Block stack size for frame objects should be dynamically sizable

2021-03-14 Thread Guido van Rossum
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

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2021-03-14 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue27929> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29982] tempfile.TemporaryDirectory fails to delete itself

2021-03-14 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue29982] tempfile.TemporaryDirectory fails to delete itself

2021-03-14 Thread Guido van Rossum
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

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2021-03-13 Thread Guido van Rossum
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

[issue42128] Structural Pattern Matching (PEP 634)

2021-03-12 Thread Guido van Rossum
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

[issue43463] typing.get_type_hints with TYPE_CHECKING imports / getting hints for single argument

2021-03-12 Thread Guido van Rossum
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

[issue43463] typing.get_type_hints with TYPE_CHECKING imports / getting hints for single argument

2021-03-10 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe return the original string? -- ___ Python tracker <https://bugs.python.org/issue43463> ___ ___ Python-bugs-list mailin

[issue29982] tempfile.TemporaryDirectory fails to delete itself

2021-03-07 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM -- ___ Python tracker <https://bugs.python.org/issue29982> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Guido van Rossum
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 &

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-03-03 Thread Guido van Rossum
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

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-03-03 Thread Guido van Rossum
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

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-02-28 Thread Guido van Rossum
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

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-28 Thread Guido van Rossum
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

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-02-28 Thread Guido van Rossum
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

[issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation

2021-02-27 Thread Guido van Rossum
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

[issue41972] bytes.find consistently hangs in a particular scenario

2021-02-27 Thread Guido van Rossum
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

[issue43281] Walrus comprehension rebind checking behavior

2021-02-26 Thread Guido van Rossum
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

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
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

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
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

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: So the PR just merged fixes that, right? Color me confused. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
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

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-23 Thread Guido van Rossum
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

[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-21 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue43278> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
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

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
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

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
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:

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
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

[issue42974] tokenize reports incorrect end col offset and line string when input ends without explicit newline

2021-02-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue42974> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    3   4   5   6   7   8   9   10   11   12   >