[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-18 Thread Guido van Rossum


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/issue44942>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-18 Thread Guido van Rossum

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/issue44942>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

Agreed. Thanks, Serhiy.

--

___
Python tracker 
<https://bugs.python.org/issue44932>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Guido van Rossum


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 a bug here, either in the runtime or in the way that the code is 
generated?

--
nosy: +gvanrossum

___
Python tracker 
<https://bugs.python.org/issue44895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-17 Thread Guido van Rossum


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: TypeAlias = ...") was designed for static analysis only.

I suppose we could fix cases like

A = List["Foo"]

but we can't fix for example

A: TypeAlias = "Foo"

since at runtime this just ends up creating a variable A whose value is the 
string "Foo", and if you import and use that in another module, all you have is 
the value "Foo".

I think we have to accept this as a limitation of type aliases when combined 
with runtime access to types (it's not just get_type_hints(), but any mechanism 
that introspects types at runtime).

I'm reluctant to fix the List["Foo"] case, if only because that case is being 
phased out in favor of list["Foo"] anyway, and because it depends on 
typing.List being special -- we can't do the same kind of fixup for 
user-defined classes (e.g. C["Foo"]).

--

___
Python tracker 
<https://bugs.python.org/issue44926>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Guido van Rossum


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, that should *not* be found if the type alias was defined in a 
different file).

--

___
Python tracker 
<https://bugs.python.org/issue44926>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

Is GH-27017 at all relevant here?

--

___
Python tracker 
<https://bugs.python.org/issue44926>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44863] Allow TypedDict to inherit from Generics

2021-08-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

See also https://github.com/python/mypy/issues/3863

--

___
Python tracker 
<https://bugs.python.org/issue44863>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Guido van Rossum


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 
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Guido van Rossum


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 changed (at the very 
least to accommodate the exceptiontable, but there are several others too -- 
your PEP 657 touched it last to add endlinetable and columntable).

I think this was a mistake in PEP 387 and we just need to retract that. Perhaps 
it could be left as a dummy that always returns an error?

> >> I propose we declare all APIs for code objects *unstable*, liable to 
> >> change each (feature) release.

> I agree that we should do this, but this needs at least a discussion in 
> python-dev because currently these APIs are protected by PEP 387 so changing 
> them is backwards incompatible

Yeah that's the crux. :-(

--

___
Python tracker 
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40222] "Zero cost" exception handling

2021-08-13 Thread Guido van Rossum

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 
this in 3.11 either.)

--

___
Python tracker 
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44885] Incorrect exception highlighting for fstring format

2021-08-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

(I originally reported this.)

--
nosy: +gvanrossum

___
Python tracker 
<https://bugs.python.org/issue44885>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-08-07 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44524] __name__ attribute in typing module

2021-08-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Serhiy or Ken-Jin?

--

___
Python tracker 
<https://bugs.python.org/issue44524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42815] new thread doesn't copy context of the parent thread

2021-07-31 Thread Guido van Rossum


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/issue42815>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-07-28 Thread Guido van Rossum


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 be able to find a champion for such a change among other core 
devs. I doubt that anyone is going to put any time in this based on a few 
messages from you though -- you must do the work.

--

___
Python tracker 
<https://bugs.python.org/issue42913>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-27 Thread Guido van Rossum


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, we should not change the implementation.

--

___
Python tracker 
<https://bugs.python.org/issue44741>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-07-27 Thread Guido van Rossum


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 anyway (you'd have to call get_type_hints() with PEP 
563, or use __annotations__ with the other).

--

___
Python tracker 
<https://bugs.python.org/issue44098>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44732] Rename types.Union to types.UnionType

2021-07-25 Thread Guido van Rossum

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.org/issue44732>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-22 Thread Guido van Rossum

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 slots when e.g. __add__ is
added/removed.--
--Guido (mobile)

--

___
Python tracker 
<https://bugs.python.org/issue43838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44653] Parameter substitution in the union type does not work with typing.Union

2021-07-22 Thread Guido van Rossum

Guido van Rossum  added the comment:

Thanks for taking over here, Ł!

--

___
Python tracker 
<https://bugs.python.org/issue44653>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-07-21 Thread Guido van Rossum


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.org/issue43693>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44353] PEP 604 NewType

2021-07-20 Thread Guido van Rossum


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/issue44353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44353] PEP 604 NewType

2021-07-19 Thread Guido van Rossum


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 few weeks 
after I'm back from vacation (~August 8) I will have more time.

--

___
Python tracker 
<https://bugs.python.org/issue44353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44353] PEP 604 NewType

2021-07-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

Jelle, can you post more details about your benchmark?

--

___
Python tracker 
<https://bugs.python.org/issue44353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44653] Parameter substitution in the union type does not work with typing.Union

2021-07-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

I need someone else to own this, sorry.

--

___
Python tracker 
<https://bugs.python.org/issue44653>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44353] PEP 604 NewType

2021-07-19 Thread Guido van Rossum


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 
<https://bugs.python.org/issue44353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44668] More differences in instance and subclass checks between typing.Union and types.Union

2021-07-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sure.

--

___
Python tracker 
<https://bugs.python.org/issue44668>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44524] __name__ attribute in typing module

2021-07-19 Thread Guido van Rossum


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 
<https://bugs.python.org/issue44524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-19 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44668] More differences in instance and subclass checks between typing.Union and types.Union

2021-07-18 Thread Guido van Rossum


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 on the meaning of T in the current scope.)

--

___
Python tracker 
<https://bugs.python.org/issue44668>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44659] Remove Ivan from list of typing experts

2021-07-17 Thread Guido van Rossum


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/issue44659>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-07-16 Thread Guido van Rossum

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>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-07-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

How far can/should we backport this?

--
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue41249>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-07-16 Thread Guido van Rossum

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


--

___
Python tracker 
<https://bugs.python.org/issue41249>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-16 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44659] Remove Ivan from list of,typing experts

2021-07-16 Thread Guido van Rossum


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.

--
messages: 397688
nosy: gvanrossum, kj, levkivskyi, lukasz.langa
priority: normal
severity: normal
status: open
title: Remove Ivan from list of,typing experts

___
Python tracker 
<https://bugs.python.org/issue44659>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-16 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44524] __name__ attribute in typing module

2021-07-16 Thread Guido van Rossum

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 the originals have those. I think __module__ should be set to 
‘typing’, and __qualname__ to ‘typing.WhatEver’.

--

___
Python tracker 
<https://bugs.python.org/issue44524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-07-16 Thread Guido van Rossum

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 
<https://bugs.python.org/issue43893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44642] Union of a type and the typing module function

2021-07-16 Thread Guido van Rossum


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 attribute. We could 
then set that special attribute on the function returned by NewType (like PR 
9951 already does for __name__ and __qualname__).

What to call it? Maybe "__unionable__"?

--

___
Python tracker 
<https://bugs.python.org/issue44642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44636] It is possible to create a 1-type union type

2021-07-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hm, you are right. Make it so, Mr. Spock! :-)

--

___
Python tracker 
<https://bugs.python.org/issue44636>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44636] It is possible to create a 1-type union type

2021-07-15 Thread Guido van Rossum


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 
<https://bugs.python.org/issue44636>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44642] Union of a type and the typing module function

2021-07-15 Thread Guido van Rossum


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/issue44642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

Way to go Irit!--
--Guido (mobile)

--

___
Python tracker 
<https://bugs.python.org/issue26280>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44618] inspect.signature does not work for datetime classes

2021-07-14 Thread Guido van Rossum


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. :-(

--

___
Python tracker 
<https://bugs.python.org/issue44618>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44632] Union with TypeVar does not work as intended

2021-07-14 Thread Guido van Rossum


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/issue44632>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44618] inspect.signature does not work for datetime classes

2021-07-14 Thread Guido van Rossum

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.org/issue44618>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44606] Discrepancy between isinstance() and issubclass() for union types

2021-07-13 Thread Guido van Rossum


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.org/issue44606>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44606] Discrepancy between isinstance() and issubclass() for union types

2021-07-12 Thread Guido van Rossum


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/issue44606>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-10 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 
<https://bugs.python.org/issue43838>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44589] Pattern Matching - duplicate keys in mapping patterns

2021-07-09 Thread Guido van Rossum

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)

--

___
Python tracker 
<https://bugs.python.org/issue44589>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-07-08 Thread Guido van Rossum


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 are limited and not intended to prevent all 
ways of creating abstract instances -- just to catch typical mistakes early. (I 
vaguely recall another bug report about a weakness in this check that I 
resolved in the same way.)

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35815>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44578] dict/list with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Guido van Rossum


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.org/issue44578>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-07-07 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 
<https://bugs.python.org/issue42878>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-06 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-06 Thread Guido van Rossum


Change by Guido van Rossum :


--
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue38291>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-06 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue38291>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43453] docs: runtime_checkable example refers to changed behavior in 3.10

2021-07-05 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Guido van Rossum


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/issue38291>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Why not just change "typing.io" to "typing"?

--

___
Python tracker 
<https://bugs.python.org/issue38291>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43453] docs: runtime_checkable example refers to changed behavior in 3.10

2021-07-05 Thread Guido van Rossum


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


--
nosy: +gvanrossum

___
Python tracker 
<https://bugs.python.org/issue43453>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-07-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Can that be fixed by changing test_pydoc?

--

___
Python tracker 
<https://bugs.python.org/issue38291>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Guido van Rossum


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/issue26280>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44479] Windows build doesn't regenerate some files

2021-07-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks, I tried this and it works beautifully!

--

___
Python tracker 
<https://bugs.python.org/issue44479>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36521] Consider removing docstrings from co_consts in code objects

2021-07-04 Thread Guido van Rossum


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.org/issue36521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44553] types.Union should support GC

2021-07-03 Thread Guido van Rossum


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/issue44553>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-02 Thread Guido van Rossum


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/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-01 Thread Guido van Rossum


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 and another PR with a confusing title that 
has the fix plus a test.

- The discussion on the issue and on the PRs was confusing. There was mention 
of a segfault reported on StackOverflow (but later it seemed to be a false 
alarm about a different fix), and in this issue Martijn Pieters brings up the 
question of whether AutoProxy is even needed, which is quite irrelevant to the 
bugfix.

- It's unclear from reading the code in the PR how the test relates to the fix.

- Therefore I tried to verify that the test actually failed if I undid the fix. 
But I found that it's rather unclear how to run the multiprocessing tests (and 
just those). And once I figured it out, they take a *long* time to run (there's 
a bug about that too somewhere).

- I tried to revive the original PR (to give credit to its author) but found 
that it can't be reopened because of the master->main branch rename.

- The open PR had some failing required tests so I couldn't land it without 
closing and reopening. More waiting. Eventually the tests passed and I could 
merge. On to the backports.

- One of the backport PRs randomly didn't seem to get some test statuses, so I 
tried to restart them by closing and reopening the PR -- only to find that miss 
islington deleted the branch as soon as I closed the PR, so I couldn't reopen 
it either. So I had to delete and re-add the "needs-backport-to-3.9" label to 
the main PR, and wait.

- Oh, and somehow there's a codecov test that always fails (in one of the 
original PRs, Antoine says to ignore it), so the backports didn't get 
auto-merged, so I had to wait for the other tests to pass and manually merge.

The one positive experience was Martijn Pieters' long explanation on 
StackOverflow of what went wrong and why this was the correct fix. (Maybe he 
elaborated a bit much on the monkeypatch. :-) This treatise gave me the 
confidence that the fix was correct (enough) and should be merged.

Parting shot: IMO we should not have accepted multiprocessing into the stdlib. 
It is a very useful module, but very complex, and would have been better off as 
a third-party module, with a more focused crew of maintainers and a quicker 
release cycle. (Almost everyone who uses multiprocessing needs to install other 
packages anyway.)

--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 
3.8

___
Python tracker 
<https://bugs.python.org/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-01 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-01 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-01 Thread Guido van Rossum


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.python.org/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-01 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-07-01 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm going to merge both PRs.

--
nosy: +gvanrossum

___
Python tracker 
<https://bugs.python.org/issue30256>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-01 Thread Guido van Rossum


Guido van Rossum  added the comment:

+1--
--Guido (mobile)

--

___
Python tracker 
<https://bugs.python.org/issue43908>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44537] Document PGO in devguide

2021-06-29 Thread Guido van Rossum


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 (and sometimes CPython), esp. given that we have a devguide. 
Maybe one of the docs owners can clarify where they thing PGO should be 
documented, and why?

--

___
Python tracker 
<https://bugs.python.org/issue44537>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44537] Document PGO in devguide

2021-06-29 Thread Guido van Rossum


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 that for Windows this info is in PCbuild/readme.txt. It's perhaps okay to 
keep it there, and just mention in the devguide that the Windows info in there.

FWIW, maybe we should get rid of the tradition that the toplevel README.rst 
file's heading gives the version? That tradition dates from the times when 
source distributions were done as tarballs... It would save one more place to 
update (there's another mention of the version later in README.rst which still 
points to 3.10).

--
assignee: docs@python
components: Documentation
messages: 396764
nosy: docs@python, gvanrossum
priority: normal
severity: normal
status: open
title: Document PGO in devguide
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue44537>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Guido van Rossum


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/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Guido van Rossum


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/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44524] __name__ attribute in typing module

2021-06-29 Thread Guido van Rossum


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.

--

___
Python tracker 
<https://bugs.python.org/issue44524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44518] Finalization of non-exhausted asynchronous generators is deferred

2021-06-28 Thread Guido van Rossum


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/issue44518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44518] Finalization of non-exhausted asynchronous generators is deferred

2021-06-28 Thread Guido van Rossum


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 asyncio.run.

--

___
Python tracker 
<https://bugs.python.org/issue44518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44518] Finalization of non-exhausted asynchronous generators is deferred

2021-06-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Can you repro this without asyncio?

--
nosy: +Guido.van.Rossum

___
Python tracker 
<https://bugs.python.org/issue44518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-26 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-26 Thread Guido van Rossum


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/7569c0fe91dfcf562dee8c29798ecda74d738aa8


--

___
Python tracker 
<https://bugs.python.org/issue44468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-26 Thread Guido van Rossum

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/issue44482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-06-23 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue43693>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Guido van Rossum


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 
<https://bugs.python.org/issue44482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43918] anext builtin docstring has no signature text or info about default argument

2021-06-22 Thread Guido van Rossum


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


--
nosy: +gvanrossum

___
Python tracker 
<https://bugs.python.org/issue43918>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-22 Thread Guido van Rossum


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 into it. It is indeed a painful thing. I wonder if we should 
put a warning somewhere in the docs and tutorials for generators?

The PR looks good.

--

___
Python tracker 
<https://bugs.python.org/issue44482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-22 Thread Guido van Rossum


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.org/issue44490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44479] Windows build doesn't regenerate some files

2021-06-21 Thread Guido van Rossum


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 for these?

--

___
Python tracker 
<https://bugs.python.org/issue44479>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44479] Windows build doesn't regenerate some files

2021-06-21 Thread Guido van Rossum


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 
<https://bugs.python.org/issue44479>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-06-21 Thread Guido van Rossum


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.

--

___
Python tracker 
<https://bugs.python.org/issue41249>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-06-21 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +25420
pull_request: https://github.com/python/cpython/pull/26839

___
Python tracker 
<https://bugs.python.org/issue43693>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-06-21 Thread Guido van Rossum


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


--

___
Python tracker 
<https://bugs.python.org/issue43693>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44468] Shouldn't `typing.get_type_hints()` default `globalns` to `{}` instead of skipping base classes?

2021-06-21 Thread Guido van Rossum


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/issue44468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44337] Port LOAD_ATTR to adaptive interpreter

2021-06-19 Thread Guido van Rossum


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.)

--

___
Python tracker 
<https://bugs.python.org/issue44337>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44337] Port LOAD_ATTR to adaptive interpreter

2021-06-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests:  -25387

___
Python tracker 
<https://bugs.python.org/issue44337>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44337] Port LOAD_ATTR to adaptive interpreter

2021-06-19 Thread Guido van Rossum


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/issue44337>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



<    1   2   3   4   5   6   7   8   9   10   >