[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/issue44

[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/issue44

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

[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

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

[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, t

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

[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> ___ ___ Pytho

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

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

[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

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

[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.or

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

[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/issue42

[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

[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

[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

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

[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

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

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

[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/issue44

[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

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

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

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

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

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

[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

[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

[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/issue44

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

[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/issue41

[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

[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

[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

[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

[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

[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

[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

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

[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

[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/issue44

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

[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

[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/issue44

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

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

[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/issue44

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

[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

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

[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.or

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

[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

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

[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

[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.or

[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/issu

[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> ___ __

[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

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

[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/issue26

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

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

[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/issue44

[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/issue30

[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

[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

[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

[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.pyth

[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

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

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

[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

[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

[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/issue44

[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/issue44

[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

[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/issue44

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

[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/issue44

[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.or

[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

[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/issue44

[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

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

[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

[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

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

[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

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

[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

[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/issue43

[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

[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/issue44

[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

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

[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/issu

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