[issue45850] Port deep-freeze to Windows

2021-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 5be98e57b3c3b36d1a1176b49c73b8822c6380e7 by Guido van Rossum in branch 'main': bpo-45873: Get rid of bootstrap_python (#29717) https://github.com/python/cpython/commit/5be98e57b3c3b36d1a1176b49c73b8

[issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds

2021-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 5be98e57b3c3b36d1a1176b49c73b8822c6380e7 by Guido van Rossum in branch 'main': bpo-45873: Get rid of bootstrap_python (#29717) https://github.com/python/cpython/commit/5be98e57b3c3b36d1a1176b49c73b8

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: I assume there's something wrong with the OP's methodology for profiling. (Raymond, in your last example there's a -s argument but nothing to run -- does timeit just use "pass" in that case?) -- _

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds

2021-11-23 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45886] Fix Program/_freeze_module for cross compiling Python

2021-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: To the question "why does _freeze_module need to be a (C) binary" (IOW, why can't it be replaced by a Python script that is run with PYTHON_FOR_REGEN, which always runs on the build host), the reason is that it uses the bytecode compi

[issue45893] Azure Pipelines currently failing

2021-11-24 Thread Guido van Rossum
New submission from Guido van Rossum : E.g. https://dev.azure.com/Python/cpython/_build/results?buildId=92084&view=results -- assignee: steve.dower components: Build messages: 406945 nosy: gvanrossum, steve.dower priority: high severity: normal status: open title: Azure Pipel

[issue45893] Azure Pipelines currently failing

2021-11-24 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue45893> ___ ___ Python-bugs-list mailing list Unsub

[issue45893] Azure Pipelines currently failing

2021-11-24 Thread Guido van Rossum
Guido van Rossum added the comment: Christian thinks that a PR by Victor broke this (GH-29488 / bpo-39026) -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue45

[issue45886] Fix Program/_freeze_module for cross compiling Python

2021-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: Imthink I prefer the ‘make clean’ extension.-- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue45

[issue44353] PEP 604 NewType

2021-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 93c65df83cef71a4bc77d71afecdec8744c4f73a by Alex Waygood in branch 'main': bpo-44353: Correct docstring for `NewType` (#29785) https://github.com/python/cpython/commit/93c65df83cef71a4bc77d71afecdec

[issue45619] Mentioning structural pattern matching in the list of binding

2021-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset cd876c84932ecc2f7a6c41f3fc800a34d5b06b95 by Arthur Milchior in branch 'main': bpo-45619: documentation of execution model: clarify and update binding summary (#29232) https://github.com/python/cpyt

[issue45619] Mentioning structural pattern matching in the list of binding

2021-11-25 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45019] Freezing modules has manual steps but could be automated.

2021-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset b0b10e146b1cbf9c5dfa44af116a2eeb0f210e8b by Kumar Aditya in branch 'main': bpo-45019: Cleanup module freezing and deepfreeze (#29772) https://github.com/python/cpython/commit/b0b10e146b1cbf9c5dfa44af116a2e

[issue44359] test_ftplib.test_makeport() fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2021-11-26 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: -26699 ___ Python tracker <https://bugs.python.org/issue44359> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: AFAIK the reason command history works in cmd.py on Windows is that it's built into the terminal program. Or maybe into the operating system. Thus, the user can use line editing and history, but there is no API (in Python) to interact with these.

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, Eryk, I only read the part of the issue that landed in my inbox (fhe first message and everything after Terry added me to the nosy list). Sorry. You wrote: > The console/terminal team at Microsoft apparently don't want to do anything &g

[issue23819] test_asyncio fails when run under -O

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sure there's more to it, but I found at least this failure: ~/cpython$ ./python.exe -O -m test test_asyncio -m test_set_event_loop Raised RLIMIT_NOFILE: 256 -> 1024 0:00:00 load avg: 2.02 Run tests sequentially 0:00:00 load avg: 2.02 [1/1]

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, so that's all hypothetical. It looks like the status quo is not likely to change, so we should just document it. I wonder if keeely is interested in submitting a PR for the docs? -- ___ Python tr

[issue45924] Incorrect traceback when future's exception is raised multiple times

2021-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: There's a similar issue with concurrent.futures.Future, and really, anything that stores exceptions and later raises them can get in trouble if there's a way to get the exception raised multiple times. This is rarely noticed because usually the

[issue26552] Failing ensure_future still creates a Task

2021-11-29 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +easy ___ Python tracker <https://bugs.python.org/issue26552> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23819] test_asyncio fails when run under -O

2021-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: I'd be happy to mentor someone who wants to tackle this. -- keywords: +easy ___ Python tracker <https://bugs.python.org/is

[issue45653] Freeze the encodings module.

2021-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 02b5ac6091ada0c2df99c4e1eae37ddccbcd91f0 by Kumar Aditya in branch 'main': bpo-45653: fix test_embed on windows (GH-29814) https://github.com/python/cpython/commit/02b5ac6091ada0c2df99c4e1eae37ddccbcd91f0 -- nosy: +

[issue45953] Statically allocate interpreter states as much as possible.

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

[issue45934] python curses newterm implementation

2021-12-04 Thread Guido van Rossum
New submission from Guido van Rossum : Since this is an enhancement, it should only target 3.11.-- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue45

[issue45934] python curses newterm implementation

2021-12-04 Thread Guido van Rossum
Guido van Rossum added the comment: This does not apply to Windows (we don’t support curses there). -- components: +Library (Lib) -C API, Windows ___ Python tracker <https://bugs.python.org/issue45

[issue45934] python curses newterm implementation

2021-12-05 Thread Guido van Rossum
Guido van Rossum added the comment: Serhiy, this started with a post by Julius to the core-mentorship list. He wants to add newterm(), and found that an issue about that was just created by a different user (draganic1) -- apparently without a comment body, so it appears the first comment is

[issue45654] Freeze the runpy module.

2021-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 44b0e76f2a80c9a78242b7542b8b1218d244af07 by Kumar Aditya in branch 'main': bpo-45654: Freeze the runpy module and stuff it imports (GH-29903) https://github.com/python/cpython/commit/44b0e76f2a80c9a78242b7542b8b1218d244af07 -

[issue45654] Freeze the runpy module.

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

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2021-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: Claim, you need to tone down the rhetoric. Python is not C++ and user expectations are different. You are the one who is fighting windmills here. -- ___ Python tracker <https://bugs.python.org/issue36

[issue38756] Add generic versions of weakref types to typing module

2019-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: OK, can you give some example use cases? Can you provide a list of types that you want to see added? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38756] Add generic versions of weakref types to typing module

2019-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: Well, in typeshed, weakref.WeakSet and the others are generic, so you should be able to write from __future__ import annotations from weakref import WeakSet users: WeakSet[User] Or if you need to support Python versions < 3.7, you could wr

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: Regarding the IDLE mystery, *if* there's a difference between how it treats " # a" and "# a", this must be due to some part of the code that's invoked before _maybe_compile() is called, right? But that's immaterial

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: @ilevkivskyi Is this important enough to change get_type_hints()? Otherwise let’s close this issue. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38756] Add generic versions of weakref types to typing module

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: PEP 585 says Discussions-To: Typing-Sig So I'd start there. (But honestly I think what Ivan meant is that it would automatically work. Read the PEP carefully before posting if you disagree.) -- ___ P

[issue38761] weakref.WeakSet not instanceof collections.abc.Set

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: As I wrote between the lines in the PR, this would be a bug in the weakref module, not a bug in collections.abc. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: > But is the 'fix' in _maybe_compile at all applicable to the REPL? Or might a > parser change REPL fix make the code in _maybe_compile unneeded? I don't know. Most of the contortions in code.py codeop.py are meant to emulate

[issue38764] Deterministic globbing.

2019-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Let's not do this, for all the reasons brought up. -- nosy: +gvanrossum resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue38758] @dataclass defaults

2019-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: This should not have been an issue but a discussion on python-list or perhaps python-ideas. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue37083] Document TYPE_COMMENT in documentation reference for compound statements

2019-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly I don't think that the exact places where TYPE_COMMENT goes in the grammar should be documented as part of the language reference. For almost all of them we should be using type annotation syntax, and IMO for the remaining ones we should e

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-18 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that this is a bad default (and whoever wrote it, probably me, didn't know what this does for UDP). I think the right solution is to change the default, not to introduce a new method. Maybe we can deprecate the default somehow? There current

[issue27724] PEP3119 inconsintent with actual CPython impl

2019-11-19 Thread Guido van Rossum
Guido van Rossum added the comment: Presumably when the implementation was done the IS_ABSTRACT name sounded more logical than just ABSTRACT. Since the PEP doesn't *specify* the name of this flag[1] I see no reason to change anything. Closing. _ [1] The PEP mentions this flag ex

[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-11-19 Thread Guido van Rossum
Guido van Rossum added the comment: For sure the Python tokenizer/parser should reject octal escapes that produce values >= 256. Certainly in bytes strings. Probably also in text strings (nobody using Unicode thinks in octal). This is ancient behavior though (it's the same in 2.7) s

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-20 Thread Guido van Rossum
Guido van Rossum added the comment: (Don't wait for me, I am preoccupied with other things this week.) -- title: UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port -> UDP sockets created by create_datagram_endpoint()

[issue38870] Expose ast.unparse in the ast module

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: > @gvanrossum are you OK with adding type comments support? Current version > loses type comment information so if typed_ast parses this, they wont be the > same in AST representation. Good catch, definitel

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-22 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue24995> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: Do what you think is best. -- ___ Python tracker <https://bugs.python.org/issue24995> ___ ___ Python-bugs-list mailin

[issue17639] symlinking .py files creates unexpected sys.path

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: It is quite intentional that symlinks are followed for the purpose of computing sys. argv[0] and sys.path. -- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue17

[issue17639] symlinking .py files creates unexpected sys.path

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: You have a point — I was just responding to Nick’s last message without noticing how old it was. I’ll remove myself from the nosy list. On Fri, Nov 22, 2019 at 15:14 Kristján Valur Jónsson wrote: > > Kristján Valur Jónsson added the comment: >

[issue17639] symlinking .py files creates unexpected sys.path

2019-11-22 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue17639> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: The PEP does not specify collections.Generator at all, so this is not just a matter of interpreting the PEP. The presence of a __del__ method can cause subtle behavior changes to the GC, so I worry that adding __del__ to that class now is going to break

[issue38911] include __del__ in Generator ABC

2019-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: I wouldn't have use a Generator subclass for that. Let's not destabilize the Generator class. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Pyt

[issue38908] Troubles with @runtime_checkable protocols

2019-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: If the "little helper in abc" solves it, let's do that. The sys._getframe() hack has always been a bit smelly -- I assume we can get rid of that then? -- ___ Python tracker <https://bugs.pyt

[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2019-12-01 Thread Guido van Rossum
Guido van Rossum added the comment: I'm +1 on adding the deprecation and changing it to an error in the future. I think it's an anti-pattern that objects with complex behavior that includes some sequence behavior allow the fallback behavior for checking the empty sequence. I re

[issue38945] Remove newline characters from uu encoding methods

2019-12-02 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a62ad4730c9b575f140f24074656c0257c86a09a by Guido van Rossum (Matthew Rollings) in branch 'master': bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (#17418) https://github.com/python

[issue38945] Remove newline characters from uu encoding methods

2019-12-02 Thread Guido van Rossum
Guido van Rossum added the comment: (Now waiting for 2.7 backport by stealthcopter.) -- ___ Python tracker <https://bugs.python.org/issue38945> ___ ___ Pytho

[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2019-12-02 Thread Guido van Rossum
Guido van Rossum added the comment: I doubt effbot will respond. :-) I think the first order of business is to add the same FutureWarning to the C version of the code, and to reset the clock on the deprecation. In terms of the final stages, why wouldn't we want it to just always

[issue38945] Remove newline characters from uu encoding methods

2019-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a016d4e32cc9faa48105d00db275439c3dc93559 by Guido van Rossum (Matthew Rollings) in branch '2.7': [2.7] bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (GH-17418). (#17452) https://github.com

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-05 Thread Guido van Rossum
Guido van Rossum added the comment: In principle I think this is a good idea. If this was user code, we would inherit from typing.Generic. I understand you wanting to avoid the overhead of that. But will it work correctly at runtime with other typing constructors? I guess __annotations__

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-05 Thread Guido van Rossum
Guido van Rossum added the comment: Well, __class_getitem__ was added primarily to allow classes implemented in *C* to support "generics". This is helpful to support PEP 585. For classes written in Python I don't see the point. But I'll leave the

[issue38978] Implement __class_getitem__ for Future, Task, Queue

2019-12-05 Thread Guido van Rossum
Guido van Rossum added the comment: I'm actually missing context, so I will leave this up to you all. -- ___ Python tracker <https://bugs.python.org/is

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-12-08 Thread Guido van Rossum
Guido van Rossum added the comment: I'd like to backport this to 3.8.1 at least. Are people interested in getting it backported to earlier versions? -- ___ Python tracker <https://bugs.python.org/is

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-12-08 Thread Guido van Rossum
Guido van Rossum added the comment: So 3.8.1 got backported by Miss Islington. Do we want this in earlier releases? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: Ned agreed, it's merged into 3.7, so let's close. -- ___ Python tracker <https://bugs.python.org/issue38673> ___ ___

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-12-09 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: (And I'm giving up on 3.6 and 2.7 as these are close to their end of life.) -- ___ Python tracker <https://bugs.python.org/is

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue37228> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39031] Inconsistency with lineno and col_offset info when parsing elif

2019-12-13 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39046] collections.abc.Reversible should not be a subclass of Hashable

2019-12-14 Thread Guido van Rossum
Guido van Rossum added the comment: I don't know that this is easily solved. By design, issubclass(X, Hashable) checks whether X defines a __hash__ method (or at least has a class attribute __hash__ that isn't None). And because everything ultimately derives from object, which *do

[issue39069] Move ast.unparse() function to a different module

2019-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: Why is the import speed of ast important enough to uglify this code? Who is using ast.py that isn't also importing lots of other stuff? For example, black imports lots of other stuff (multiprocessing, asyncio, pathlib, typing, ..., even 3rd party

[issue39069] Move ast.unparse() function to a different module

2019-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: If anything, ast.literal_eval() should be moved. -- ___ Python tracker <https://bugs.python.org/issue39069> ___ ___ Pytho

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue38870> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-26 Thread Guido van Rossum
Guido van Rossum added the comment: 1. PEP 554 is about multiple interpreters. Which PEP did you mean? 2. The double negative in “Wouldn't it pay off to not rewrite dataclass features” is confusing. What did you mean? -- nosy: +gvanr

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-27 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks. Can you be specific about “modern libraries”? Please clarify your use cases. -- ___ Python tracker <https://bugs.python.org/issue39

[issue15723] Python breaks OS' append guarantee on file writes

2019-12-28 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue25087] Type variable substitution in type instances

2019-12-28 Thread Guido van Rossum
Guido van Rossum added the comment: Yup, see comment in https://github.com/python/typing/pull/308 regarding #156. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-28 Thread Guido van Rossum
Guido van Rossum added the comment: Have you tried dropping ABCMeta? Mypy checks @abstractmethod regardless. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: What Python version was used for the timings? If not 3.8, please do over in 3.8. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, you already said 3.6 and 3.8 give the same effect. But what if you add a minimal __new__() to Foo? -- ___ Python tracker <https://bugs.python.org/issue39

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, here's what I measure in Python 3.8.1. (I don't use IPython or notebooks so this looks a little different.) >>> timeit.timeit('Foo()', 'class Foo: pass') 0.3763025619934 >>> timeit.timeit(

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: This is probably an issue for the new Steering Council. -- ___ Python tracker <https://bugs.python.org/issue32615> ___ ___

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Guido van Rossum
Guido van Rossum added the comment: If that solves the perf issue I am fine with it. -- ___ Python tracker <https://bugs.python.org/issue39168> ___ ___ Pytho

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-31 Thread Guido van Rossum
Guido van Rossum added the comment: OK let’s do it. Clearly for *some* applications the overhead is significant. -- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue39

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-01 Thread Guido van Rossum
Guido van Rossum added the comment: Try adding a setter to the base class method. -- ___ Python tracker <https://bugs.python.org/issue39134> ___ ___ Python-bug

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: No doubt because your getter returns None. -- ___ Python tracker <https://bugs.python.org/issue39134> ___ ___ Python-bug

[issue39204] Automate adding Type Annotations to Documentation

2020-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: This was never blocked on Python 2 (at best we'd do this for the most recent Python 3 release anyway). I expect it will be quite complex to get the quality of the implementation high enough, but I suppose someone should start with a prototype. I&

[issue39204] Automate adding Type Annotations to Documentation

2020-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Actually I agree with the OP that we could get some mileage out of joining typeshed with the docs, regardless of whether there are annotations in the stdlib. -- ___ Python tracker <https://bugs.python.

[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-09 Thread Guido van Rossum
Guido van Rossum added the comment: OK, so I looked into this (sine we can't wait for Serhiy). The problem was probably introduced when Ivan added end lineno/column attributes to parse tree nodes. The offending copy_location() call copies the begin and end locations from the given

[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-09 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +17332 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17925 ___ Python tracker <https://bugs.python.org/issu

[issue39308] Literal[True] prints as Literal[1] in some cases

2020-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: No need to open the attachment -- a simpler repro is: >>> from typing import Literal >>> Literal[1] typing.Literal[1] >>> Literal[True] typing.Literal[1] >>> However, in a fresh session >>> from typing import

[issue32615] Inconsistent behavior if globals is a dict subclass

2020-01-16 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue32615> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39308] Literal[True] prints as Literal[1] in some cases

2020-01-16 Thread Guido van Rossum
Guido van Rossum added the comment: In the PR (https://github.com/python/cpython/pull/17974) we found that there's no great solution for this. This issue will probably linger for a while, but maybe we should just set an example and close it, since we're unlikely to take

[issue39308] Literal[True] prints as Literal[1] in some cases

2020-01-17 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: In the example, it should be `int`, right? Anyway, the bug tracker is not a good place to get questions answered. Since this is mostly about type checking, I recommend that you try this Gitter instance: https://gitter.im/python/typing

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-01-28 Thread Guido van Rossum
New submission from Guido van Rossum : See PEP 585, which is still under review and may change in response to this work. https://www.python.org/dev/peps/pep-0585/ -- components: Interpreter Core messages: 360885 nosy: gvanrossum priority: normal severity: normal status: open title

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-01-28 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +17620 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18239 ___ Python tracker <https://bugs.python.org/issu

[issue39493] typing.py has an incorrect definition of closed

2020-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 2e6569b6692298fcc9aae0df3eb3181adb2a5099 by Shantanu in branch 'master': bpo-39493: Fix definition of IO.closed in typing.py (#18265) https://github.com/python/cpython/commit/2e6569b6692298fcc9aae0df3eb3181adb2a5099 -

[issue39493] typing.py has an incorrect definition of closed

2020-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, Shantanu! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39493] typing.py has an incorrect definition of closed

2020-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 194c7aeb6f3d6c2b0015457d22b38253652f4f38 by Miss Islington (bot) in branch '3.7': [3.7] bpo-39493: Fix definition of IO.closed in typing.py (GH-18273) https://github.com/python/cpython/commit/194c7aeb6f3d6c2b0015457d22b382

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-04 Thread Guido van Rossum
New submission from Guido van Rossum : New changeset cf5b109dbb39bcff1bc5b5d22036866d11de971b by Jakub Stasiak in branch 'master': bpo-39491: Merge PEP 593 (typing.Annotated) support (#18260) https://github.com/python/cpython/commit/cf5b109dbb39bcff1bc5b5d2203686

<    19   20   21   22   23   24   25   26   27   28   >