[issue42857] Fails to construct paths lead to "python is likely shutting down"

2021-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: You are doing something very evil during finalization here. There’s nothing that can be done reasonably. -- nosy: +gvanrossum resolution: -> wont fix stage: -> resolved status: open -> closed ___ Pytho

[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: I would assume it’s some interaction between threads and fork. Have you asked the authors of sound device about this? -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue42

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

2021-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: Oh, you’re right about walrus. And I don’t actually understand async generator expressions. This suggests that we definitely need a PEP. :-) -- ___ Python tracker <https://bugs.python.org/issue42

[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: No, let's leave 3.7 alone -- it's in security-fixes-only mode. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: Quickest way to get that done is to send in a PR that updates whatsnew. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue42

[issue42886] math.log and math.log10 domain error on very large Fractions

2021-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: I guess another approach might be to change the math module so that all its functions support franctions (and decimal, and other esoteric number types). But that would require having __log__ and many others as methods on the numeric types. Personally I

[issue42881] Should typing.get_type_hints change None annotations?

2021-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: I agree this is a bit unfortunate, but I also think it's a bit late to change now. However *if* we're going to change it we should do it now (in 3.10) or never. Given that we never *write* type(None) in annotations, it's unfortunate to

[issue42878] urllib.request.HTTPPasswordMgr.is_suburi does not care about order

2021-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: Cheryl, do you have time to review this? -- nosy: +cheryl.sabella, gvanrossum ___ Python tracker <https://bugs.python.org/issue42

[issue42886] math.log and math.log10 domain error on very large Fractions

2021-01-10 Thread Guido van Rossum
Guido van Rossum added the comment: The problem with that formulation of the feature request is that it would require the math.log function to recognize rationals, or at least the Fraction type. Since the numeric tower and the fractions module are implemented in pure Python that would be

[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: This is not a bug -- it is how it's supposed to work (for better or for worse). Please see a use forum to help you understand what's going on here. -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status

[issue42894] Debugging native Python modules on Windows with Visual Studio Toolchain

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Steve, is there a better way? -- components: +Windows -C API nosy: +gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue42

[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this is a bug, unless you can show an example where the bytecode compiler or the interpreter actually crashes. Basically you can change AST nodes in lots of ways that don't correspond to valid programs, and as long as you can'

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: I hesitate to add anything because you are exposing so much confusion. May I suggest that you ask about this on a user group first before proposing a new feature? One place that makes sense given that this is a type system feature would be this Gitter

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset fb35fa49d192368e94ffec09c092260ed0fea2e1 by Tomáš Hrnčiar in branch 'master': bpo-42870: Document change in argparse help output. (GH-24190) https://github.com/python/cpython/commit/fb35fa49d192368e94ffec09c09226

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

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

[issue42775] __init_subclass__ should be called in __init__

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, that's great! And thanks, Nick! -- ___ Python tracker <https://bugs.python.org/issue42775> ___ ___ Python-bugs-l

[issue42900] Ternary operator precedence relative to bitwise or

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: You may be surprised, but it's not a bug -- '|' binds tighter than 'if'/'else'. If you need more help, please contact a user forum. -- nosy: +gvanrossum resolution: -> not a bug stag

[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, if your argument is just that you can make invalid identifiers this way, I still don't see why that's a big deal. You can do `x.__dict__["1"] = 1` and now you've given x an attribute that's not a valid identifier. You co

[issue42904] get_type_hints does not provide localns for classes

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Fidget-Spinner, are you interested in taking this? -- ___ Python tracker <https://bugs.python.org/issue42904> ___ ___ Pytho

[issue42904] get_type_hints does not provide localns for classes

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: It's apparently a bug in all versions that support `from __future__ import annotations` (and only when that is used). Though perhaps we should only fix in in 3.10. -- ___ Python tracker &

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

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Can we translate 'if x: pass' into 'pass'? No, because calling its __bool__ method may have a side effect (as we saw at the start of this thread). Can we eliminate a lone 'x'? Only if it's a local variable and we&

[issue42911] Addition chains for pow saves 10 % time!

2021-01-12 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +mark.dickinson, tim.peters ___ Python tracker <https://bugs.python.org/issue42911> ___ ___ Python-bugs-list mailin

[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, there's supposed to be a checker. -- nosy: +lys.nikolaou, serhiy.storchaka ___ 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-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I hadn't realized the issue of bool(a) being evaluated once or twice. The most important side effect that bool(a) can have is raising (as e.g. numpy arrays do), not producing random results. Another important side effect might be loading some

[issue42906] python3 -m doctest test.py tests the stdlib "time" module instead

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, this is not a bug. The builtin time module takes precedence in this case because the current directory is not put at the front of the module search path (sys.path). As a workaround you could exportPYTHONPATH=. -- nosy: +gvanrossum

[issue42906] python3 -m doctest test.py tests the stdlib "time" module instead

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Whoops, I meant export PYTHONPATH=. -- ___ Python tracker <https://bugs.python.org/issue42906> ___ ___ Python-bugs-list m

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 6dfd1734f5b230bb8fbd2a9df806c1333b6652a8 by Irit Katriel in branch 'master': bpo-42848: remove recursion from TracebackException (GH-24158) https://github.com/python/cpython/commit/6dfd1734f5b230bb8fbd2a9df806c1

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Will be fixed in 3.10. I prefer not to backport the solution (Irit, do you agree?) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bug

[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

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

[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

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