Guido van Rossum added the comment:
Sorry, CLA is signed, but I'd like Terry Reedy to have a peek.
--
nosy: +terry.reedy
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
It’s fine. We now need the PR author to sign the CLA.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
Agreed. Thanks, Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue44932>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
So there's code generated for an except clause with a variable that clears the
variable at the end, so that this works:
try:
...
except Exception as err:
...
print(err) # Should fail, since err was cleared when the except clause exited.
Maybe there's
Guido van Rossum added the comment:
Maximilian, I think your last analysis is spot on. The problem is specific to
type aliases and how at runtime they do not carry information about scope with
them. The current type alias syntax (both the original form and the form using
"x: Type
Guido van Rossum added the comment:
I think it's fine for get_type_hints() to give up in some cases. It's not fine
if it were to look in the wrong namespace (e.g. if the caller of
get_type_hints() were to happen to have an unrelated class named "Foo" in its
namespace, t
Guido van Rossum added the comment:
Is GH-27017 at all relevant here?
--
___
Python tracker
<https://bugs.python.org/issue44926>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
See also https://github.com/python/mypy/issues/3863
--
___
Python tracker
<https://bugs.python.org/issue44863>
___
___
Pytho
Guido van Rossum added the comment:
I've started a thread on python-dev.
https://mail.python.org/archives/list/python-...@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/#ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC
--
___
Python tracker
<ht
Guido van Rossum added the comment:
> >> I want to get rid of PyCode_NewWithPosArgs() and just have PyCode_New().
> That as added because of PEP 387 and unfortunately removing it is backwards
> incompatible.
Is changing the signature allowed? Because it *must* be chang
Guido van Rossum added the comment:
I propose we declare all APIs for code objects *unstable*, liable to change
each (feature) release.
I want to get rid of PyCode_NewWithPosArgs() and just have PyCode_New(). All
callers to either one must be changed anyways. (And we’re not done changing
Guido van Rossum added the comment:
(I originally reported this.)
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue44885>
___
___
Python-bug
Change by Guido van Rossum :
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Serhiy or Ken-Jin?
--
___
Python tracker
<https://bugs.python.org/issue44524>
___
___
Python-bugs-list mailing list
Unsub
Guido van Rossum added the comment:
Trust me, it's too late to fix this in 3.10.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue42
Guido van Rossum added the comment:
Have you investigated how that could be implemented and what the new API would
look like? Personally I don't really like signals (they're not portable and
code using them is super hard to get right) and I hesitate to add to their API.
OTOH maybe you'll
Guido van Rossum added the comment:
Given that the class used to demonstrate this behavior has a bug (__len__ is
inconsistent with __getitem__), I don't think it matters much -- if doing it
your way is (as I suspect) slower than the current implementation for other
(well-behaved) sequences
Guido van Rossum added the comment:
Yeah, but we shouldn't go out of our way to reject it. Especially since in 3.11
we'll likely have something equivalent to PEP 563 or PEP 649 (the SC is
thinking deep about this right now) and either of those means that usually it
won't be evaluated at all
Guido van Rossum added the comment:
Agreed. I think we should do it, Serhiy’s reasoning makes sense.
We should just update the PEP and add a note that this was changed during the
beta period.
--
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Maybe we should not fix this then? Copying seems unattractive, and the
reason we proxy in the first place is not absolute safety but to make sure
people don’t accidentally update the dict when they intend to update the
class (for the side effect of updating
Guido van Rossum added the comment:
Thanks for taking over here, Ł!
--
___
Python tracker
<https://bugs.python.org/issue44653>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
Another task seems to have appeared, Nick Coghlan would like the typedef to be
renamed to PyLocal_VarKind, and the getter/setter similarly.
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
OTOH, for 3.10 the clock is ticking. Let's go for it. (If it's deemed too slow,
we could eventually add an accelerator just for this.)
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
Hm, 20% isn't so bad, but one of the arguments for NewType was that it
"disappears" at runtime -- which the current version does, but the class-based
version doesn't quite.
Right now I don't have the cycles to think about this deeply. Maybe a
Guido van Rossum added the comment:
Jelle, can you post more details about your benchmark?
--
___
Python tracker
<https://bugs.python.org/issue44353>
___
___
Guido van Rossum added the comment:
I need someone else to own this, sorry.
--
___
Python tracker
<https://bugs.python.org/issue44653>
___
___
Python-bugs-list m
Guido van Rossum added the comment:
Do we have to solve it? Using `from __future__ import annotations` it should
work, at least when used as an annotation. Or is that too inconvenient or
inconsistent?
--
___
Python tracker
<ht
Guido van Rossum added the comment:
Sure.
--
___
Python tracker
<https://bugs.python.org/issue44668>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
I see this as part of a trend to improve runtime introspection of complex
type expressions. That seems to be going ahead regardless of whether we
like it or not, so let's do this.
--
___
Python tracker
<ht
Guido van Rossum added the comment:
New changeset a2721649598eb715304a1ac8678a409585f73b27 by Ken Jin in branch
'3.10':
bpo-44490: Improve typing module compatibility with types.Union (GH-27048)
(#27222)
https://github.com/python/cpython/commit/a2721649598eb715304a1ac8678a409585f73b27
Guido van Rossum added the comment:
This seems a low-priority issue to me. The code is invalid, but I don't think
it's very important to raise an exception (typing.Union is also inconsistent).
Static type checkers will flag all these as errors. (Or perhaps none of them?
It may depend
Guido van Rossum added the comment:
Many thanks from me too, Ivan. I have enjoyed working with you and will miss
you. Come back any time!
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
Let’s both, since this feels like a real bug fix to me.
--
___
Python tracker
<https://bugs.python.org/issue41249>
___
___
Guido van Rossum added the comment:
How far can/should we backport this?
--
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
New changeset 889036f7ef7290ef15b6c3373023f6a35387af0c by Germán Méndez Bravo
in branch 'main':
bpo-41249: Fix postponed annotations for TypedDict (GH-27017)
https://github.com/python/cpython/commit/889036f7ef7290ef15b6c3373023f6a35387af0c
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
___
Python tracker
<https://bugs.python
New submission from Guido van Rossum :
There is a list somewhere in bpo or GH that automatically adds Ivan to all bugs
or reviews involving typing. He is no longer active. Can we remove him from
those lists? And maybe add Ken Jin, who has built up a lot of expertise in
this area
Guido van Rossum added the comment:
New changeset bf89ff96e6ba21bb52b8597b5e51e8ffc57e6589 by Yurii Karabas in
branch 'main':
bpo-44490: Improve typing module compatibility with types.Union (GH-27048)
https://github.com/python/cpython/commit/bf89ff96e6ba21bb52b8597b5e51e8ffc57e6589
Guido van Rossum added the comment:
Sorry for the slow progress. I don’t think it is important for Any orUnion to
have these attributes, but the ones that match ABCs or concrete classes (e.g.
MutableSet, Counter) should probably have __name__, __qualname__, and
__module__, since
Guido van Rossum added the comment:
The more I think about this, the less I like it. AFAIK static checkers like
mypy don’t strip leading white space from forward references either. (If I’m
wrong, please show evidence.)
--
___
Python tracker
Guido van Rossum added the comment:
I think making NewType into a class isn't a good idea, it would be too slow.
But I like issue34963 (PR 9951).
So then let's do some variation on (3) -- unionable things would include all
types (of course), typevars, and things that have a special
Guido van Rossum added the comment:
Hm, you are right. Make it so, Mr. Spock! :-)
--
___
Python tracker
<https://bugs.python.org/issue44636>
___
___
Python-bug
Guido van Rossum added the comment:
I feel that keeping the singleton is more consistent. This normalization seems
to me an example of the typing module doing too much. Singleton tuples are
different from scalar values too.
--
___
Python tracker
Guido van Rossum added the comment:
Is it worth being picky about this? The internal data structures are safe. A
static checker will complain. What more do you need?
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
Way to go Irit!--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue26280>
___
___
Python-bugs-list mailin
Guido van Rossum added the comment:
You're right, it seems specific to built-in *classes* like those in datetime.
We get the same with inspect.signature(int), since int is also a built-in class.
I don't know who maintains inspect, but it's not me
Guido van Rossum added the comment:
The code for recognizing TypeVars must be wrong. Is it also wrong in e.g.
list[T]?
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
Doesn’t it do that with any built in function? Try Len or open, for example. I
think that’s a feature, at least not a bug specific to date time.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Converting None to type(None) is fine, as long as the str() /repr()
converts it back, e.g. repr(int | None) should print just that, not
NoneType.--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Ken Jin, should we treat type(None) as a subclass of int|None?
--
nosy: +kj
___
Python tracker
<https://bugs.python.org/issue44
Change by Guido van Rossum :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue43838>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Agreed with everything that Brandt said. These wording issues are subtle!
Note in particular that the original wording implies that {‘x’: 1, ‘x’: 1,
z: 1} would be a runtime error, but it clearly should be a compile time
error.--
--Guido (mobile
Guido van Rossum added the comment:
> At worst, this seems like only a minor nuisance. The ABC metaclass is
> limited in its powers and seems to reasonably cover the common use cases.
> I recommend leaving it as is. Guido, what do you think?
Agreed. The abstractness checks ar
Guido van Rossum added the comment:
Yes this is intentional. Use a static checker to find this type of bug.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue42878>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
New changeset c45fa1a5d9b419cf13ad4b5a7cb453956495b83e by Yurii Karabas in
branch 'main':
bpo-44490: Add __parameters__ and __getitem__ to types.Union (GH-26980)
https://github.com/python/cpython/commit/c45fa1a5d9b419cf13ad4b5a7cb453956495b83e
Change by Guido van Rossum :
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue38291>
___
___
Python-bugs-list mailing list
Unsubscrib
Guido van Rossum added the comment:
New changeset 8b849ea0f3482ad834e7989ff474dd5db2f295c8 by Sebastian Rittau in
branch 'main':
bpo-38291: Fix a spurious warning when using help(object) (#27039)
https://github.com/python/cpython/commit/8b849ea0f3482ad834e7989ff474dd5db2f295c8
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:
Thanks for the explanation. Let's reopen the issue for now.
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issu
Guido van Rossum added the comment:
Why not just change "typing.io" to "typing"?
--
___
Python tracker
<https://bugs.python.org/issue38291>
___
__
Guido van Rossum added the comment:
New changeset 17f94e28882e1e2b331ace93f42e8615383dee59 by andrei kulakov in
branch 'main':
bpo-43453: Update and re-add example to typing runtime_checkable (#27013)
https://github.com/python/cpython/commit/17f94e28882e1e2b331ace93f42e8615383dee59
Guido van Rossum added the comment:
Can that be fixed by changing test_pydoc?
--
___
Python tracker
<https://bugs.python.org/issue38291>
___
___
Python-bug
Guido van Rossum added the comment:
Very much so. Irit, do you want to give it a try? (Note there are helpful
instructions now in Python/adaptive.md.)
--
___
Python tracker
<https://bugs.python.org/issue26
Guido van Rossum added the comment:
Thanks, I tried this and it works beautifully!
--
___
Python tracker
<https://bugs.python.org/issue44479>
___
___
Python-bug
Guido van Rossum added the comment:
In 3.11 the code object will definitely change. We may well put the docstring
in a dedicated attribute.
--
nosy: +Guido.van.Rossum
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Thanks for the fix, Pablo!
Ken Jin, we learned something today!
--
nosy: +Guido.van.Rossum
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
Oh no! Was there a test for this that I ignored? Thanks for cleaning up
after me.--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue30
Guido van Rossum added the comment:
Merged and backported to 3.10, 3.9. Let's forget about 3.8 or earlier (Lukasz
removed the needs-backport-to-3.8 and -3.7 labels from GH-16341 on May 4).
I should note that landing this was not a great experience:
- There's a closed PR with the fix
Guido van Rossum added the comment:
New changeset 8aa45de6c6d84397b772bad7e032744010bbd456 by Miss Islington (bot)
in branch '3.9':
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (GH-26989)
https://github.com/python/cpython/commit/8aa45de6c6d84397b772bad7e032744010bbd456
Guido van Rossum added the comment:
New changeset 3ec3e0f83c34eda1ad89b731e68f4a22a5f39333 by Miss Islington (bot)
in branch '3.10':
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (#26987)
https://github.com/python/cpython/commit/3ec3e0f83c34eda1ad89b731e68f4a22a5f39333
Guido van Rossum added the comment:
(The original PR was too stale to merge, so I just merged the combined PR and
added a Co-Authored-By header.)
Now doing the backports.
--
resolution: -> fixed
___
Python tracker
<https://bugs.pyth
Guido van Rossum added the comment:
New changeset 85b920498b42c69185540ecc2f5c4907fd38d877 by finefoot in branch
'main':
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341)
https://github.com/python/cpython/commit/85b920498b42c69185540ecc2f5c4907fd38d877
Guido van Rossum added the comment:
I'm going to merge both PRs.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue30256>
___
___
Python-bug
Guido van Rossum added the comment:
+1--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue43908>
___
___
Python-bugs-list mailing list
Unsub
Guido van Rossum added the comment:
Hm, there is now also info on how to build in the end user documentation in
Doc/using/configure.rst. I am actually confused by the intention of documenting
information about *building* CPython in the same place where we document
*using* Python
New submission from Guido van Rossum :
The only docs for PGO seem to be in the toplevel README.rst. Sinec that is
what's shown to all visitors to the GitHub repo, perhaps this information is
not so useful there, and instead a section could be added to the devguide?
(Ditto for LTO.)
Note
Guido van Rossum added the comment:
So I guess to expand on Jelle's example, Alias[str] should return (int |
list[str]), right? That makes sense since that's how Union works.
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
I intended for someone to write some test programs and report back here what
mypy actually supports and what it doesn't.
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
It sounds reasonable to add the __name__ attribute. Since these objects
aren't really types, the default mechanism for constructing a type doesn't
give them this. Are there other attributes that are missing? We should
probably add those too
Guido van Rossum added the comment:
Okay, that suggests that the extra reference is being held by asyncio, right? I
suppose it's in the hands of the asyncio devs then.
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
I am wondering whether the issue is in asyncio.run, or in the basic async
generator implementation. If the latter, you should be able to demonstrate this
with a manual "driver" (trampoline?) instead of a
Guido van Rossum added the comment:
Can you repro this without asyncio?
--
nosy: +Guido.van.Rossum
___
Python tracker
<https://bugs.python.org/issue44
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 7569c0fe91dfcf562dee8c29798ecda74d738aa8 by will-ca in branch
'main':
bpo-44468: Never skip base classes in `typing.get_type_hints()`, even with
invalid `.__module__`. (GH-26862)
https://github.com/python/cpython/commit
Guido van Rossum added the comment:
That explanation is still valid, I just hadn’t thought of it that way.
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
New changeset 769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38 by Guido van Rossum in
branch 'main':
bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839)
https://github.com/python/cpython/commit/769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38
Guido van Rossum added the comment:
I think this may be worth bringing up on python-dev. The solution currently is
rather verbose. I like adding the with-protocol to generators.
--
nosy: +Guido.van.Rossum
___
Python tracker
<ht
Guido van Rossum added the comment:
New changeset 6af4e6b266cb19d646ad7e4051fc7974c3096d23 by Erik Welch in branch
'main':
bpo-43918: document signature and default argument of `anext` builtin (#25551)
https://github.com/python/cpython/commit/6af4e6b266cb19d646ad7e4051fc7974c3096d23
Guido van Rossum added the comment:
So this is a problem because the generator owns a resource that it will only
release once its .close() method is called, right? And we have no control over
when that happens -- we can't make it the responsibility of list() to close the
iterator passed
Guido van Rossum added the comment:
Let's first see whether the type (int | list[T]) is accepted by static checkers.
IMO introspecting unions should be done by looking at __args__, nothing more.
--
___
Python tracker
<https://bugs.python.
New submission from Guido van Rossum :
The new PCbuild\build.bat script is much better at regenerating necessary
files. However I just found out that there are some more files that need to be
regenerated occasionally:
- Programs/test_frozenmain.h
- Python/frozen_hello.h
Could you add rules
Change by Guido van Rossum :
--
components: Windows
nosy: gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows build doesn't regenerate some files
___
Python tracker
<ht
Guido van Rossum added the comment:
Note that this issue is now only a problem of you use `from __future__ import
annotations` -- we rolled the default behavior for 3.10 back to what it was in
3.9.
I am out of time to argue about why we chose this behavior, alas
Change by Guido van Rossum :
--
pull_requests: +25420
pull_request: https://github.com/python/cpython/pull/26839
___
Python tracker
<https://bugs.python.org/issue43
Guido van Rossum added the comment:
New changeset 355f5dd36a0f53175517f35798aa874564d1113a by Guido van Rossum in
branch 'main':
bpo-43693: Turn localspluskinds into an object (GH-26749)
https://github.com/python/cpython/commit/355f5dd36a0f53175517f35798aa874564d1113a
Guido van Rossum added the comment:
I agree with the OP, we can do better here. Ken, if you feel like it, a fix
should not be too complicated, right?
--
___
Python tracker
<https://bugs.python.org/issue44
Guido van Rossum added the comment:
(That pull request doesn't have anything to do with this issue, but while
testing it I did find a crash bug that I've bisected to this issue. See
https://github.com/python/cpython/pull/26749#issuecomment-864454848
Change by Guido van Rossum :
--
pull_requests: -25387
___
Python tracker
<https://bugs.python.org/issue44337>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Guido van Rossum :
--
nosy: +gvanrossum
nosy_count: 2.0 -> 3.0
pull_requests: +25387
pull_request: https://github.com/python/cpython/pull/26749
___
Python tracker
<https://bugs.python.org/issu
501 - 600 of 5393 matches
Mail list logo