[issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: When I removed myself from the nosy list I did mean to stop working on this bug, just that I am unlikely to be of any help. :-) -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue21

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Looks this was not tested or thought through with multiple loops and signals (admittedly, using signals is never fun, and even less so on Windows). Can you send a PR with a fix? -- nosy: +gvanrossum ___ Python

[issue42919] Blank in multiline “if expressions” will lead to EOF errors

2021-01-12 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +lys.nikolaou ___ Python tracker <https://bugs.python.org/issue42919> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +lys.nikolaou ___ Python tracker <https://bugs.python.org/issue42918> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: What does the bytecode for c in program 2 look like? Also, how do you find all these bugs? Are you developing a new fuzzier? -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue42

[issue42918] Nested multi-line expression will lead to "compile()" fails

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: It’s good work! Is it open source? -- ___ Python tracker <https://bugs.python.org/issue42918> ___ ___ Python-bugs-list mailin

[issue42926] Split compiler into code-gen, optimizer and assembler.

2021-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM. But I’m not the one who has to work with it. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue42

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: Is anyone still in favor of eliminating the __bool__ call from ‘if p: pass’? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-13 Thread Guido van Rossum
Guido van Rossum added the comment: > "The implementation is allowed to skip any boolean test of a value, when it > has *no* effect on the flow of the program and at least one test has already > been performed on that value." +1 -- ___

[issue42925] Error trace of else inside class

2021-01-13 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +Mark.Shannon ___ Python tracker <https://bugs.python.org/issue42925> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42927] Inline cache for slots

2021-01-13 Thread Guido van Rossum
New submission from Guido van Rossum : I've been thinking about Python performance improvements, and I played around with an inline cache enhancement that supports slots. The results on a very simple benchmark look promising (30% speedup) but I'm terrible with our benchmarking

[issue42927] Inline cache for slots

2021-01-13 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +23043 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/24216 ___ Python tracker <https://bugs.python.org/issu

[issue42928] adafruit_ads1x15.ads1115 not comaptible with globals()[pkg_trunc] = importlib.import_module(pkg_trunc)

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, this is not a help forum. Please try a user forum. Probably you have to find one with people using the Adafruit modules (and CircuitPython?). -- nosy: +gvanrossum resolution: -> third party stage: -> resolved status: open -&g

[issue42928] adafruit_ads1x15.ads1115 not comaptible with globals()[pkg_trunc] = importlib.import_module(pkg_trunc)

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: They did not imply it was a bug, just that they don't know enough about Python to be able help you. As I said, this tracker is not a help forum (you're taking valuable time away from core developers). Try this forum: https://discuss.python.org

[issue42920] How to add end_lineno in pyclbr?

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: Hopefully Batuhan (who changed this code ~2 months ago) or Cheryl (who reviewed your previous patch) can help you. You can just close your existing PR and create a new one, still linking to your original issue 38307. -- nosy: +BTaskaya

[issue42927] Inline cache for slots

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for all the positive feedback! What is the next step? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42877] TracebackException saves more data than it needs for format

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 4c94d74152a511d977fe26a4f3a32b7352ba9024 by Irit Katriel in branch 'master': bpo-42877: add the 'compact' param to TracebackException's __init__ (#24179) https://github.com/python/cpython/commit/4c94d74152a511d

[issue42877] TracebackException saves more data than it needs for format

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42932] How to handle import tripartite pacakge issue in unittest scripts for python expect mock.Mock

2021-01-14 Thread Guido van Rossum
Guido van Rossum added the comment: Please try a user forum. E.g. stackoverflow. -- nosy: +gvanrossum resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42934] use TracebackException's new compact param in unittest.TestResult

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

[issue42934] use TracebackException's new compact param in unittest.TestResult

2021-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ba876c44a8d06668e622fb580fdcde45c7a36d48 by Irit Katriel in branch 'master': bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221) https://github.com/python/cpython/commit/ba876c44a8d06668e622fb580fdcde

[issue42927] Inline cache for slots

2021-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: I created a benchmark for this, see https://github.com/python/pyperformance/pull/86. Next I'll add a blurb and then it's off to reviewers. -- ___ Python tracker <https://bugs.python.o

[issue42935] Pickle can't import builtins at exit

2021-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: I don’t know there is much we can do about this. I recommend using ‘with’ to close the shelf earlier. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue42

[issue42953] After the subclass of enum.Enum is imported in some diffenent ways, the same enumeration value is judged as False

2021-01-18 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue42953> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: It'll probably be quicker if you leave me out of the loop (feel free to quote me though). I am currently quite overwhelmed with PEP-sized discussions. I expect that the SC can rule on this quickly (just use their tracker to send them th

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: No pressure. If there's an API change needed you will have until 3.10 beta 1. Without API changes this can be fixed any time. -- ___ Python tracker <https://bugs.python.org/is

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not keen on prohibiting nonlocal variable reference in annotations, since I can imagine uses for this (e.g. in tests). I'm not too worried about keeping the cell alive "forever", since with Larry's PEP 649 their lifetime

[issue42959] AttributeError: module 'signal' has no attribute 'SIGHUP'

2021-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: As the docs explain, SIGHUP is not available on Windows. This is as designed. -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue36143] Auto-generate Lib/keyword.py

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

[issue42959] AttributeError: module 'signal' has no attribute 'SIGHUP'

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

[issue42971] Some errnos for BSD/OSX are missing from errno module

2021-01-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +ned.deily, ronaldoussoren ___ Python tracker <https://bugs.python.org/issue42971> ___ ___ Python-bugs-list mailin

[issue42978] Improve error message when "self" is missing from the method definition

2021-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this makes sense. How do you know there's a missing 'self'? Surely it's just as likely that there is indeed an extra argument. Especially if A.foo is defined by a library (stdib or 3rd party). ---

[issue42983] sys.argv incorrectly parses command lines with args in environment variables.

2021-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: That looks like you need to learn more about the shell. It is not a Python bug. -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracke

[issue42984] Python 3.7 and qt Libraries

2021-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: I recommend asking on a user forum, perhaps https://discuss.python.org/c/users/ -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracke

[issue42978] Improve error message when "self" is missing from the method definition

2021-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: > I use the same heuristic as Pypy: the callable is a bound method, the first > name in the definition is not named "self" and it was called with n+1 > positional arguments. Okay, that makes sense, you could have said so in the bu

[issue42990] Improve the C code for calling Python code

2021-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +brett.cannon, petr.viktorin, rhettinger, serhiy.storchaka, vstinner, yselivanov ___ Python tracker <https://bugs.python.org/issue42

[issue42384] Inconsistent sys.path between python and pdb

2021-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Hey Andrey, this has been merged into 3.10, but the backports didn't work because the structure of the tests has changed (os_helper doesn't exist). Do you want to fix these? -- nosy: +gvanrossum

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

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

[issue43004] No type variables left in collections.abc.Callable

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

[issue43005] Package Relative Imports - double dot doc example not working

2021-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: This is not a bug in Python. Please ask a user forum for help understanding (for example, https://discuss.python.org/c/users/7). -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status: open -&g

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Note that this may be solved in a different way *if* PEP 649 is accepted. This was discussed extensively on python-dev last week. It would roll back the stringification of PEP 563 (unless `from __future__ import annotations` is used, which would be

[issue43007] set_wakeup_fd() only works in main thread

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

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2021-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 501d4a51e32c7bbba255598adc307660b5af891a by Andrey Bienkowski in branch 'master': bpo-42383: pdb: do not fail to restart the target if the current directory changed (#23412) https://github.com/python/cpyt

[issue42384] Inconsistent sys.path between python and pdb

2021-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset f2df7958fb82cd927e17152b3a1bd2823a76dd3e by Andrey Bienkowski in branch '3.9': [3.9] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24321) https://github.com/python/cpython/commit/f2df7958fb82cd927e17152b3a1bd2

[issue42384] Inconsistent sys.path between python and pdb

2021-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c10180ea1458aa0ffd7793cb75629ebffe8a257e by Andrey Bienkowski in branch '3.8': [3.8] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24320) https://github.com/python/cpython/commit/c10180ea1458aa0ffd7793cb75629e

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2021-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset f8cfe54e5a7082edcec74a34b3d7e6afab051afd by Andrey Bienkowski in branch '3.9': [3.9] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24322) https://github.com/python/cpyt

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2021-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d863deeff27f00ac33e9f169d23ca56d69af3f86 by Andrey Bienkowski in branch '3.8': [3.8] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24323) https://github.com/python/cpyt

[issue42383] Pdb does not correclty restart the target if it changes the current directory

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

[issue42384] Inconsistent sys.path between python and pdb

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

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

2021-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Do you still need my opinion? I can't say that I have one ATM. -- ___ Python tracker <https://bugs.python.org/is

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: I had a simpler idea for an inline cache for LOAD_METHOD than GH-23503. The essential part goes like this (sorry for the hybrid C/Python): if : if type == lm->type and type->tp_version_tag == lm->tp_version_tag: meth = lm->meth

[issue42927] Inline cache for slots

2021-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 5c5a938573ce665f00e362c7766912d9b3f3b44e by Guido van Rossum in branch 'master': bpo-42927: Inline cache for attributes defined with '__slots__' (#24216) https://github.com/python/cpython/commit/5c5a938573ce665f00e3

[issue42927] Inline cache for slots

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

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! The loop overhead is presumably dramatic in that example. I think I measured a somewhat bigger speedup using timeit, which IIRC subtracts the cost of an empty loop. But you're right that 5% on a micro-benchmark is not very exciting. I wond

[issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures

2021-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: If you just need help, I recommend https://discuss.python.org/c/users/7 If you still have an issue with ^C, open a new issue. -- ___ Python tracker <https://bugs.python.org/issue26

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: I still favor (3) -- I don't want to renege on the promise we made when we allowed overloading comparisons to return something other than a bool. -- ___ Python tracker <https://bugs.python.org/is

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-02-02 Thread Guido van Rossum
Guido van Rossum added the comment: I don't care about the flipflop at all. I only care about the third possible outcome, an exception. I thought the compromise semantics you proposed earlier sounded nice. As Serhiy already explained, 'b or True' vs. 'Tru

[issue43166] Unused letters in Windows-specific pragma optimize

2021-02-08 Thread Guido van Rossum
New submission from Guido van Rossum : A coworker happened to look at our use of #pragma optimize() for Windows (VS 2017) and noticed: unless there’s something I’m missing, the ‘a’ and ‘w’ portions of the string being passed to the optimize pragma are not doing anything; I’m pretty sure

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-08 Thread Guido van Rossum
Guido van Rossum added the comment: The PEP has been accepted. I propose that we use separate PRs for docs (and incremental improvements to the code) but tie them all together using the same issue number (this will require adding "skip news" to

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-08 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset da21f7b6e1fd5bd3e78931a06c5eb694f6335233 by Ken Jin in branch 'master': bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) https://github.com/python/cpython/commit/da21f7b6e1fd5bd3e78931a06c5eb694f6335233 -

[issue42377] allow typing.cast with TYPE_CHECKING

2021-02-08 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 917eca700aa341f8544ace43b75d41b477e98b72 by Ken Jin in branch '3.9': bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) (#24493) https://github.com/python/cpython/commit/917eca700aa341f8544ace43b75d41

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c8a48c6d0417cc8f256a40142962825febdc2e20 by Ken Jin in branch '3.8': [3.8] bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) (#24494) https://github.com/python/cpython/commit/c8a48c6d0417cc8f256a4014296282

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 822f7c266f886677047338e8b167ba39a6abd91e by Ken Jin in branch '3.8': [3.8] bpo-41824: Fix indentation issue in ForwardRef docs (#24495) https://github.com/python/cpython/commit/822f7c266f886677047338e8b167ba

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

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

[issue43243] Strict ABC classes

2021-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: This discussion is not appropriate for the bug tracker. Try finding a user forum to discuss the pros and cons and history of the current functionality. It is clear that you have plenty of ways to discover the problem already. -- resolution

[issue43243] Strict ABC classes

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

[issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor

2021-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: I doubt that solution is correct, given that we already established that the problem is *not* specific to Generic. -- ___ Python tracker <https://bugs.python.org/issue40

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: +1 on exposing f,__builtins__. Of course, the thing I'd really want is a way to state that all references to builtins are meant to have the exact semantics of those builtins, so the compiler can translate e.g. len(x) into a new opcode that just

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: Well maybe I'll be picking up those ideas again... Thanks for documenting so much of what you did then! -- ___ Python tracker <https://bugs.python.org/is

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: > FWIW the globals opcode cache handles all of this now. There's no point in > specifically optimizing the builtins lookup since we optimize all global > lookups for a code object that's hot enough. So you think that even a dedicated

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: Victor > the new globals has no "__builtins__" key. This change is backward > incompatible on purpose. If someone really wants to run a function in a > different builtins namespace, globals['__builtins__'] must be set explici

[issue42840] `type` takes **kwargs for __init_subclass__

2021-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: I'll try to review it in the coming weeks. -- ___ Python tracker <https://bugs.python.org/issue42840> ___ ___ Pytho

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Sure looks like a compiler bug! Can you investigate whether this occurs in earlier Python versions? Maybe bisect if it doesn’t? -- ___ Python tracker <https://bugs.python.org/issue43

[issue43255] Ceil division with /// operator

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

[issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Please revert this and use a separate build flag (e.g. DISABLE_INLINE_CACHES) for the refleaks run. (Or perhaps provide an -X flag to disable it without the need to recompile.) I am developing new inline cache ideas and of course I need to run in debug

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, that's clearer. I'm still worried about the change in semantics where globals["__builtins__"] is assigned a different dict after the function object has been created (similar to https://bugs.python.org/file49816/func_builtins2

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

2021-02-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +Mark.Shannon, gvanrossum ___ Python tracker <https://bugs.python.org/issue43271> ___ ___ Python-bugs-list mailin

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I don't know who's really in charge of the docs. I suppose the PEP authors are, collectively, but that runs the risk that we're all expecting the person to our left in the circle to do it. Would people be okay if I added the tutorial from Ap

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +23368 pull_request: https://github.com/python/cpython/pull/24588 ___ Python tracker <https://bugs.python.org/issue42

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: > It's not a huge deal, but I vote that we either drop or rework the > "http_error" examples. I think it gives people a very wrong first impression > that makes the rest of the behavior quite surprising. > > Can it be cha

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the clarifications, Victor! So I now understand: the *identity* of the builtins dict used by a function's code is captured when the function object is created. And I understand why: it's so that in the fast path for the LOAD_GLOBAL

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Oops, I realized it's not really a compiler bug. When the compiler sees class C: str: str = "abc" if effectively rearranges that to class C: str = "abc" __annotations__["str"] = str (where __annotations__ i

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

[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

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

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

[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

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

[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

[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

[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

[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

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

<    23   24   25   26   27   28   29   30   31   32   >