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
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
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
Change by Guido van Rossum :
--
pull_requests: +23368
pull_request: https://github.com/python/cpython/pull/24588
___
Python tracker
<https://bugs.python.org/issue42
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
Change by Guido van Rossum :
--
nosy: +Mark.Shannon, gvanrossum
___
Python tracker
<https://bugs.python.org/issue43271>
___
___
Python-bugs-list mailin
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
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
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue43255>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Guido van Rossum added the comment:
I'll try to review it in the coming weeks.
--
___
Python tracker
<https://bugs.python.org/issue42840>
___
___
Pytho
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
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
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
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
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
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue43243>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset 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
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
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
Change by Guido van Rossum :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
-
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
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
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
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
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
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
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> commit review
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset 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
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
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
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
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
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue43007>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Guido van Rossum :
--
nosy: +kj
___
Python tracker
<https://bugs.python.org/issue43004>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue42990>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Guido van Rossum :
--
nosy: +brett.cannon, petr.viktorin, rhettinger, serhiy.storchaka, vstinner,
yselivanov
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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).
---
Change by Guido van Rossum :
--
nosy: +ned.deily, ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue42971>
___
___
Python-bugs-list mailin
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue42959>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue36143>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Change by Guido van Rossum :
--
nosy: +ethan.furman
___
Python tracker
<https://bugs.python.org/issue42953>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Please try a user forum. E.g. stackoverflow.
--
nosy: +gvanrossum
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Thanks!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Guido van Rossum added the comment:
Thanks for all the positive feedback! What is the next step?
--
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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
Change by Guido van Rossum :
--
nosy: +Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue42925>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
--
___
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
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
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
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
Change by Guido van Rossum :
--
nosy: +lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue42918>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Guido van Rossum :
--
nosy: +lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue42919>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Guido van Rossum :
--
nosy: +ethan.furman
___
Python tracker
<https://bugs.python.org/issue42915>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Guido van Rossum added the comment:
Whoops, I meant
export PYTHONPATH=.
--
___
Python tracker
<https://bugs.python.org/issue42906>
___
___
Python-bugs-list m
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
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
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
Change by Guido van Rossum :
--
nosy: +mark.dickinson, tim.peters
___
Python tracker
<https://bugs.python.org/issue42911>
___
___
Python-bugs-list mailin
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&
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
&
Guido van Rossum added the comment:
Fidget-Spinner, are you interested in taking this?
--
___
Python tracker
<https://bugs.python.org/issue42904>
___
___
Pytho
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
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
Guido van Rossum added the comment:
Thanks, that's great! And thanks, Nick!
--
___
Python tracker
<https://bugs.python.org/issue42775>
___
___
Python-bugs-l
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
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
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
801 - 900 of 5533 matches
Mail list logo