[issue36518] Avoid conflicts when pass arbitrary keyword arguments to Python function

2019-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: This will require a PEP discussion before it can move forward. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: One way would be to compile only their own source to bytecode using this flag. But I agree it doesn't look very viable in general. I'll talk to Cary offline. -- ___ Python tracker <https://bu

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: (I just found out that Cary is on vacation until 4/17.) -- ___ Python tracker <https://bugs.python.org/issue36466> ___ ___

[issue1583] Patch for signal.set_wakeup_fd

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

[issue36555] PEP484 @overload vs. str/bytes

2019-04-10 Thread Guido van Rossum
Guido van Rossum added the comment: > Mypy already takes first overload for ambiguous arguments. This is true, but it requires that the return types match (covariantly, IIUC) for the overlapping types. So you can have @overload def foo(x: int) -> int: ... @overload def foo(x:

[issue36601] signals can be caught by any thread

2019-04-12 Thread Guido van Rossum
Guido van Rossum added the comment: IIRC in SGI, getpid() would return the thread ID. They had a syscall that could create a new subprocess that would share or not share various resources (e.g. memory, signals, file descriptors) so by setting or clearing bits you could implement a continuum

[issue35581] Document @typing.type_check_only

2019-04-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 1e8295402bf5e81d327ed2b5eb88a6b6de449d63 by Guido van Rossum (Sebastian Rittau) in branch 'master': bpo-35581: Document @typing.type_check_only (GH-11312) https://github.com/python/cpython/commit/1e8295402bf5e81d327ed2b5eb88a6

[issue35581] Document @typing.type_check_only

2019-04-12 Thread Guido van Rossum
Guido van Rossum added the comment: Now waiting for the backport to 3.7. Once that's done I'll close this as fixed. -- ___ Python tracker <https://bugs.python.o

[issue35581] Document @typing.type_check_only

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

[issue35224] PEP 572: Assignment Expressions

2019-04-24 Thread Guido van Rossum
Guido van Rossum added the comment: I will add stub sections to the 3.8 whatsnew. -- ___ Python tracker <https://bugs.python.org/issue35224> ___ ___ Python-bug

[issue36540] PEP 570: Python Positional-Only Parameters

2019-04-24 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +12866 ___ Python tracker <https://bugs.python.org/issue36540> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35224] PEP 572: Assignment Expressions

2019-04-24 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +12865 ___ Python tracker <https://bugs.python.org/issue35224> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35224] PEP 572: Assignment Expressions

2019-04-24 Thread Guido van Rossum
Guido van Rossum added the comment: > Maybe we could update the What's New quickly now, and then get the longer > more complex docs done later? People have been asking if this feature is in > 3.8 because they don't see it mentioned. H

[issue36772] Let lru_cache be used as a decorator with no arguments

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

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Guido van Rossum
New submission from Guido van Rossum : This came up during today's final PyCon keynote -- IDLE was called out as one of the two editors *not* to use when live-coding on Adafruit's Circuit Playground Express (https://www.adafruit.com/product/). I *think* that the problem referred

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +13015 ___ Python tracker <https://bugs.python.org/issue36807> ___ ___ Python-bugs-list mailin

[issue36807] IDLE doesn't call os.fsync()

2019-05-05 Thread Guido van Rossum
Guido van Rossum added the comment: If/when you accept this we should also backport it as far as we can. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36807] IDLE doesn't call os.fsync()

2019-05-06 Thread Guido van Rossum
Guido van Rossum added the comment: That board implements a USB filesystem that you plug into a computer (via a cable). The control software on the board watches this USB filesystem, and when the "code.py" file changes it reloads that file and executes it with CircuitPython (Adafr

[issue36798] f-strings do not support top-level :=

2019-05-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ae2c32f32b61f3b141ba4b0b1ad71781d2f9a1a1 by Guido van Rossum (Logan Jones) in branch 'master': bpo-36798: Updating f-string docs for := use case (GH-13107) https://github.com/python/cpython/commit/ae2c32f32b61f3b141ba4b0b1ad717

[issue36798] f-strings do not support top-level :=

2019-05-06 Thread Guido van Rossum
Guido van Rossum added the comment: PEP and docs have been amended. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36810] Recursive type annotations do not work in documentation tests

2019-05-10 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think there's an actionable bug here. -- ___ Python tracker <https://bugs.python.org/issue36810> ___ ___

[issue36807] IDLE doesn't call os.fsync()

2019-05-12 Thread Guido van Rossum
Guido van Rossum added the comment: @Terry please see my comment on the PR. -- ___ Python tracker <https://bugs.python.org/issue36807> ___ ___ Python-bugs-list m

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +13191 ___ Python tracker <https://bugs.python.org/issue36807> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35814] Syntax quirk with variable annotations

2019-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: I think PEP 526 does not clarify the intention here. Perhaps we could add a specific example? It currently shows: t: Tuple[int, ...] = (1, 2, 3) We could just add this there: t: Tuple[int, ...] = 1, 2, 3

[issue35814] Syntax quirk with variable annotations

2019-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: (With a comment indicating that the second is only accepted in Python 3.8 and later.) -- ___ Python tracker <https://bugs.python.org/issue35

[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks all! -- ___ Python tracker <https://bugs.python.org/issue36807> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Guido van Rossum
New submission from Guido van Rossum : I sometimes like to use format specs like "%-10s" % foo, which left-aligns the string foo in a field of 10 spaces: >>> '%10s' % foo ' abc' >>> foo = 'abc' >>> '%-10s'

[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Aha! I thought I was missing something. :-) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: I won't object. It makes sense that the implementation of __annotations__ should be low-key. -- ___ Python tracker <https://bugs.python.org/is

[issue25910] How many "critical"-level open issues are there?

2018-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: Who is Basti5611 (Schmehl Bastian), why do they have permission to change issue titles, and why did they change this issue title? -- ___ Python tracker <https://bugs.python.org/issue25

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: There is very little code that depends on __annotations__ at all, and none of it is very subtle. All actual type checking is done by separate tools (mypy, pytype, PyCharm) that don't import the code and don't care about __annotations__. The __ann

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, I'm OK with this plan. Note that I've only read Nathaniel's original message and Yury's last message, and I've not reviewed the PR, but getting rid of that eyesore sounds good, and it seems you t

[issue17799] settrace docs are wrong about "c_call" events

2018-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: The reason not to pass C calls to the tracing function is that tracing exists to support pdb and other debuggers, and pdb only cares about tracing through Python code. So the docs should be updated. -- nosy: +gvanrossum

[issue17799] settrace docs are wrong about "c_call" events

2018-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Too bad, it's been like this since the feature was first created. It would most likely break other code that uses the tracing hooks, so you'd have to propose it as a new feature. -- ___ Python track

[issue32436] Implement PEP 567

2018-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: Hopefully sooner? -- ___ Python tracker <https://bugs.python.org/issue32436> ___ ___ Python-bugs-list mailing list Unsub

[issue32436] Implement PEP 567

2018-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: While you're waiting for code review maybe you can review some other PR? (Lukasz mentioned that Serhiy seems very busy.) -- ___ Python tracker <https://bugs.python.org/is

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Are we clear on the proposal now? It would be good to have this implemented in beta 1. Eric's long message looks good to me (though I have to admit the logic around __hash__ confuses me, but I've spent two long days at PyCascades, and I tr

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: No. I just mailed Yury with an explanation. -- ___ Python tracker <https://bugs.python.org/issue30491> ___ ___ Python-bug

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-24 Thread Guido van Rossum
Guido van Rossum added the comment: Raising for order=True if one of the ordering dunders exists sounds fine. I am confused by the corner case for hash. Your table: """ eq=?frozen=?__hash__ False False do not generate __hash__ False True

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: You guys both need to calm down. Stefan, what's your objection against this, assuming the crash is fixed? -- ___ Python tracker <https://bugs.python.org/is

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe it's better to roll this back and take a deep breath. The feature freeze should not be treated as an excuse to cram in things at the last minute. Before this week I had never heard of this proposal. And the sarcasm is a bad start of your stint

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: Can you also clarify that this *never* looks at whether the method is implemented in a superclass? And clarify what happens with the __hash__ = None that's automatically created when you define __eq__. Please also repeat the default value of the fl

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: OK. I hope both of you keep an eye on this and actively try to test and break it! -- ___ Python tracker <https://bugs.python.org/issue32

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: Guys. Please stop with the editorializing. "I cannot believe ..." (used essentially by both of you) is not constructive. -- ___ Python tracker <https://bugs.python.o

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: Stefan, I don't think a module author should retain veto over everything affecting their code forever. (We've had spectacular process failures with this in the past.) Please take a deep breath and patiently answer Yury's questions. If you two

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: Stefan this is unacceptable abuse. Please read the code of conduct. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: Apologies accepted. I did not imply that -- I was simply stating that Yury needed your help reproducing your result so he could do something about it. It seems you two are taking this offline so I trust that there will be no more barbs

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: If Nick says it's okay it is okay. I think it's okay too but my brain doesn't want to start up today -- I suggest not waiting for me. -- ___ Python tracker <https://bugs.pyt

[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Guido van Rossum
New submission from Guido van Rossum : Found in this thread: https://twitter.com/dabeaz/status/956264950430912512 Note that at the global level locals() indeed returns variables in order of definition. Ditto at class scope. Because those calls just return the actual dict. But in a function, a

[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Heh, that's old code! IIRC I wrote a lot of loops like that, it was a little C trick I had picked up that reduced the loop overhead (since comparing to 0 is quicker than comparing to a variable). And until 3.6 it didn't really matter. I very much

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Please don't discuss on closed issues. Open a new issue. -- ___ Python tracker <https://bugs.python.org/issue1692335> ___ ___

[issue26219] implement per-opcode cache in ceval

2018-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: It's up to the release manager, but personally it feels like you're pushing too hard. Since you've done that frequently in the past I think we should help you by declining your request. 3.8 is right around the corner (on a Python release time

[issue32690] Return function locals() in order of creation?

2018-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: I think consistency between the 3.6.x releases ought to win here. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Are there more specific descriptions of those bugs? Links to a tracker? (Even if it's the typing tracker.) -- ___ Python tracker <https://bugs.python.org/is

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Is this going to make it into beta 1 before tonight? If not should we abandon it or put it off till 3.8 or can it go into 3.7beta2? -- ___ Python tracker <https://bugs.python.org/issue32

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: ISTM that those ought to be separate issues since PEP 560 has been implemented fully here. Also I am getting cold feet about Union simplification (esp. this late in the release cycle). We should probably retreat on the typing tracker and discuss why we&#x

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Nit: I think the presentation of the 12-row table in msg310830 can be improved, e.g. by putting the legend for add* closer and/or giving add* a clearer name, and by splitting it into three 4-row tables. Currently the legend comes before all the other

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: I expect that Mark only checks his mail occasionally. Sometimes GitHub lets you edit a PR and then you can also resolve the conflict yourself. If that's not the case feel free to fork the PR and submit it you

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: Awesome! -- ___ Python tracker <https://bugs.python.org/issue32550> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: W00t! -- ___ Python tracker <https://bugs.python.org/issue32550> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25988] collections.abc.Indexable

2018-01-30 Thread Guido van Rossum
Guido van Rossum added the comment: > > But we should make some noise around this change in the 3.7 announcement. > > How about a paragraph in the Deprecation section of the "What's New in Python > 3.7"? document > > https://docs.python.org/dev/whatsnew/3.7.

[issue25988] collections.abc.Indexable

2018-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: Good idea, Victor, and thanks for the PR, Serhiy! -- ___ Python tracker <https://bugs.python.org/issue25988> ___ ___ Pytho

[issue32768] object.__new__ does not accept arguments if __bases__ is changed

2018-02-05 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I think the use case for assigning to __bases__ has not been shown. I believe we've seen other situations where the initial list of base classes is used in some computation that affects how the class works, so I doubt it has ever been sound. T

[issue32768] object.__new__ does not accept arguments if __bases__ is changed

2018-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: I fear that this is one of those cases that will longer in the tracker forever. We probably shouldn't have allowed assignment to __bases__, and the behavior is slightly surprising, but fixing it would be too complicated and there's not enough i

[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: I'm all for adding a bunch of terms related to type hints/annotations to the Glossary. -- ___ Python tracker <https://bugs.python.org/is

[issue31333] Implement ABCMeta in C

2018-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: > Isn't 800 lines of C code too high price for speeding up ABCs creation? I think it's well worth it. This has long felt as a sore point to me. On Sat, Feb 17, 2018 at 10:27 AM, Ivan Levkivskyi wrote: > > Ivan Levkivskyi added the c

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: Congratulations all on this milestone! And thanks reviewers for your thorough work. -- ___ Python tracker <https://bugs.python.org/issue31

[issue32873] Pickling of typing types

2018-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I think it would be nice it would be pickled by name so the pickles are compatible between Python versions. What would we do for List[int]? How are regular ABCs pickled? -- ___ Python tracker <ht

[issue32878] Document value of st_ino on Windows

2018-02-19 Thread Guido van Rossum
New submission from Guido van Rossum : We received a report from a well-meaning security researcher who was confused by the non-zero and arbitrary value of st_ino in stat() results on Windows (where in Python 2 this was always zero). The researcher was worried that this was due to an

[issue32873] Pickling of typing types

2018-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: I'm honestly not too concerned about what happens with List[int] (though doing a sensible thing here is not wrong :-), but I feel strongly that a pickle containing a reference to typing.List should be compatible between Python 3.6 an

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: It is important to convey the idea that if you are thinking of using this you are probably doing something fishy. An alternative could be `_hash`, which at least indicates it is not for general use, like `sys._getframe

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, I used imprecise language. What you propose is fine. On Feb 24, 2018 09:54, "Eric V. Smith" wrote: > > Eric V. Smith added the comment: > > Note that this class (from the test suite) will now raise an exception: > >

[issue12345] Add math.tau

2018-02-25 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue12345> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Guido van Rossum
Guido van Rossum added the comment: I don't know if I'm unique, but I find such a table with 4 Boolean keys hard to understand. I'd rather see it written up as a series of nested 'if' statements. -- ___ Python tracker

[issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False)

2018-02-25 Thread Guido van Rossum
Guido van Rossum added the comment: @steven.daprano the name was +1'ed by many people in the python-dev discussion as sending the right message. So I'm reluctant to change it. If you can cause a landslide of support for `_hash` there we can chang

[issue15767] add ModuleNotFoundError

2018-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: Read Eric's message before mine. -- ___ Python tracker <https://bugs.python.org/issue15767> ___ ___ Python-bugs-list m

[issue15767] add ModuleNotFoundError

2018-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: I don't like the way you're asking questions here. If you're interested just as a historian of the language, it will have to wait. If you're questioning the decision, please come out and say so. -- __

[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Guido van Rossum
Guido van Rossum added the comment: Actually numbers.Rational is a virtual base class for int, so it won't automagically appear there. Adding it to the math module is inferior because for non-rational types (e.g. alternative float implementations) the math module won't have the

[issue33073] Add as_integer_ratio() to int() objects

2018-03-13 Thread Guido van Rossum
Guido van Rossum added the comment: +1. On Tue, Mar 13, 2018, 16:26 Tim Peters wrote: > > Tim Peters added the comment: > > Thanks, Guido! I figured I was missing something :-) > > It looks like `numbers.Rational` _is_ a "for real" base class of > `fractio

[issue33075] typing.NamedTuple does not deduce Optional[] from using None as default field value

2018-03-14 Thread Guido van Rossum
Guido van Rossum added the comment: This bug report can be closed. -- ___ Python tracker <https://bugs.python.org/issue33075> ___ ___ Python-bugs-list mailin

[issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

2018-03-14 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Евгений Махмудов for the report! The crux is this: class A(NamedTuple): value: bool = True class B(A): value: bool = False B(True).value # Expected True, but is False B(True)[0] # True as expected If we add NamedTuple to B's bas

[issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

2018-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: I wonder if it's too late to conclude that NamedTuple in this context should have been a class decorator rather than a base class. With a class decorator it's more understandable that the effect doesn't automatically appl

[issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

2018-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: Apart from the fact that it's too late, if you had to do it over again, could it be done as a class decorator? Anyway, let's keep this issue open but reclassify it as a docs issue. -- ___ Python track

[issue33061] NoReturn missing from __all__ in typing.py

2018-03-16 Thread Guido van Rossum
Guido van Rossum added the comment: Yes please! Updating __all__ is too easy to forget. IIRC there are scripts that check for this but they are too strict. -- ___ Python tracker <https://bugs.python.org/issue33

[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Guido van Rossum
Guido van Rossum added the comment: Such a mechanism exists, and is called Protocols. See PEP 544 (https://www.python.org/dev/peps/pep-0544/). While the PEP is still in draft, it is supported by mypy. You need to import the 'Protocol' base class from typing_extensions (which is a P

[issue33018] Improve issubclass() error checking and message

2018-03-20 Thread Guido van Rossum
Guido van Rossum added the comment: While we're in feature freeze mode, we're not in release candidate mode yet. I presume the code that would be patched in 3.7 is no different from master? What's the concern? It doesn't seem anyo

[issue33018] Improve issubclass() error checking and message

2018-03-20 Thread Guido van Rossum
Guido van Rossum added the comment: Hmm... That is actually a not entirely imaginary risk, right? Can you come up with a test program that would fail that way? -- ___ Python tracker <https://bugs.python.org/issue33

[issue33018] Improve issubclass() error checking and message

2018-03-21 Thread Guido van Rossum
Guido van Rossum added the comment: OTOH if we don't do this now, it's not going to be any easier to make this change in 3.8. Maybe now's the time to experiment with it, and we can drop it in rc1 if it causes problems. @Ivan, your thoughts? Would you merge t

[issue32505] dataclasses: make field() with no annotation an error

2018-03-21 Thread Guido van Rossum
Guido van Rossum added the comment: Fine to close as wontfix. -- ___ Python tracker <https://bugs.python.org/issue32505> ___ ___ Python-bugs-list mailin

[issue33133] Don't return implicit optional types by get_type_hints

2018-03-24 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not sure we should change this ahead of a definitive decision. When you use mypy with the option that forbids it, your program will be invalid, and it doesn't really matter what we do at runtime; but that option is not the default yet, and wi

[issue1704621] interpreter crash when multiplying large lists

2018-03-26 Thread Guido van Rossum
Guido van Rossum added the comment: @imz Please file a new issue. -- ___ Python tracker <https://bugs.python.org/issue1704621> ___ ___ Python-bugs-list mailin

[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2018-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, what's wrong with zipimport? -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue30891> ___ ___

[issue33169] importlib.invalidate_caches() doesn't clear all caches

2018-03-28 Thread Guido van Rossum
New submission from Guido van Rossum : See https://github.com/python/mypy/pull/4811. To summarize, importlib.invalidate_caches() doesn't clear the negative cache in sys.path_importer_cache. Could be related to https://bugs.python.org/issue30891? -- messages: 314595 nosy: gvanr

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2018-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: It's not necessary for complex() and bytes() to call the special methods if the argument's type is exactly complex or bytes (respectively) -- these cases are already taken care of by the current code. But adding these special methods enables oth

[issue33169] importlib.invalidate_caches() doesn't clear all caches

2018-03-30 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM. On Fri, Mar 30, 2018, 06:41 Ned Deily wrote: > > Ned Deily added the comment: > > The current behavior is causing problems for at least some use cases so it > does seems to be closer to a bug than a feature. If there is agreeme

[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2018-04-02 Thread Guido van Rossum
Guido van Rossum added the comment: That's rather disturbing, and none of that is reflected in the zipimport docs. Is there at least a bpo issue about it? I may be the last person in the world to still recommend putting a zipfile on sys.path -- I used to believe it's faster than

[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2018-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: OK, this sounds much better: zipimport has problems and we should fix them, presumably by getting Thomas's fixes (sans Google-isms, which may require some effort). I don't believe Łukasz's recommendation "don't use it" is the

[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2018-04-04 Thread Guido van Rossum
Guido van Rossum added the comment: If there are overspecified tests we can debate them of course. On Wed, Apr 4, 2018, 11:55 Brett Cannon wrote: > > Brett Cannon added the comment: > > And mostly for completeness, I know Thomas has maligned the fact that > zipimport has

[issue33233] Suggest third-party cmd2 module as alternative to cmd

2018-04-06 Thread Guido van Rossum
Guido van Rossum added the comment: But cmd is used by pdb. Do you recommend we deprecate that too? (There are countless 3rd party alternatives, but I sure prefer to have it in the stdlib, so I can start debugging without first having to install a dependency.) -- nosy: +gvanrossum

[issue33233] Suggest third-party cmd2 module as alternative to cmd

2018-04-06 Thread Guido van Rossum
Guido van Rossum added the comment: I'm fine with linking to cmd2, we do that for some other modules too. (Though I think it's somewhat arbitrary. E.g. do we link to requests anywhere? Or to all the "better pdb" modules?) -- __

<    31   32   33   34   35   36   37   38   39   40   >