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
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
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
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
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
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
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
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
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
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
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
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
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
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
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()
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
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue24995>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Do what you think is best.
--
___
Python tracker
<https://bugs.python.org/issue24995>
___
___
Python-bugs-list mailin
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
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:
>
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue17639>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Guido van Rossum added the comment:
(Now waiting for 2.7 backport by stealthcopter.)
--
___
Python tracker
<https://bugs.python.org/issue38945>
___
___
Pytho
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
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
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__
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
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
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
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
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>
___
___
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
(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
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue37228>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
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
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
Guido van Rossum added the comment:
If anything, ast.literal_eval() should be moved.
--
___
Python tracker
<https://bugs.python.org/issue39069>
___
___
Pytho
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue38870>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by Guido van Rossum :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Guido van Rossum added the comment:
Have you tried dropping ABCMeta? Mypy checks @abstractmethod regardless.
--
___
Python tracker
<https://bugs.python.org/issue39
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
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
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(
Guido van Rossum added the comment:
This is probably an issue for the new Steering Council.
--
___
Python tracker
<https://bugs.python.org/issue32615>
___
___
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
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
Guido van Rossum added the comment:
Try adding a setter to the base class method.
--
___
Python tracker
<https://bugs.python.org/issue39134>
___
___
Python-bug
Guido van Rossum added the comment:
No doubt because your getter returns None.
--
___
Python tracker
<https://bugs.python.org/issue39134>
___
___
Python-bug
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&
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.
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
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
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
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue32615>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Guido van Rossum :
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
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
-
Guido van Rossum added the comment:
Thanks, Shantanu!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Guido van Rossum added the comment:
Note that this is somewhat urgent for oefen, since we strive to match the
produced AST exactly.
--
--Guido (mobile)
--
___
Python tracker
<https://bugs.python.org/issue39
Guido van Rossum added the comment:
This is indeed a duplicate of issue35212 (the second message there also shows a
problem with implicit f-string concatenation). There's not much information in
issue34364 (just a merged PR, and a mention of a PR of yours from 2 years ago
that appar
Guido van Rossum added the comment:
Wow. Do you still have a branch with that non-working patch? Maybe there are
some ideas that can be salvaged.
I'm wondering if maybe we're better leaving f-strings alone? The current code
is quite voluminous, but it looks as if by the t
Guido van Rossum added the comment:
New changeset 38ac805fa30870e2d093e52a900e3b34 by Jakub Stasiak in
branch 'master':
bpo-39491: Mention Annotated in get_origin() docstring (GH-18379)
https://github.com/python/cpython/commit/38ac805fa30870e2d093e52a90
Guido van Rossum added the comment:
New changeset d2e1098641f98594702ef29049c3c4a3f394786f by Lysandros Nikolaou in
branch 'master':
bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405)
https://github.com/python/cpyt
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
I'm sprinting with Roger. Based on Petr's comment I am closing this issue -- if
we should not draw attention to this function let's not document it.
@svetlov if you still think it should be documented, can you suggest where the
document
Guido van Rossum added the comment:
Fixed by Carl-y in PR 18435, PR 18440, PR 18439. (Sorry, those commits were
attributed to issue3950 by mistake.)
--
nosy: +gvanrossum
resolution: -> fixed
stage: -> resolved
status: open -> closed
_
Guido van Rossum added the comment:
Sorry, those PRs were for issue39501.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue3950>
___
___
Guido van Rossum added the comment:
Given the two recent -1 responses let's close this.
--
nosy: +gvanrossum
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
This is also a 3.8 issue. We discovered this with pegen, and would love to see
it fixed.
--
nosy: +gvanrossum
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue39
Guido van Rossum added the comment:
Thanks!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset 10e87e5ef4c1b4fb8415d9ddc362e2591f2f0b6c by Vlad Emelianov in
branch 'master':
bpo-39627: Fix TypedDict totality check for inherited keys (#18503)
https://github.com/python/cpython/commit/10e87e5ef4c1b4fb8415d9ddc362e2
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
That seems to be a correct observation. @blueyed, do you want to submit a PR to
gt rid of the redundant check?
--
___
Python tracker
<https://bugs.python.org/issue39
Guido van Rossum added the comment:
I'll leave it to Brian and/or Antoine to review this. Good luck!
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Yes please.
I have one exception. I f we manage to get the new parser (pegen) in, we have
to remove the old parser module.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue39
Change by Guido van Rossum :
--
keywords: +easy
___
Python tracker
<https://bugs.python.org/issue39572>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
There's no __total__ argument, but there is a __total__ attribute. There are
also (new in 3.9) __required_keys__ and __total_keys__ attributes.
Are you interested in submitting a PR with the needed doc ch
Guido van Rossum added the comment:
New changeset ab6423fe2de0ed5f8a0dc86a9c7070229326b0f0 by ananthan-123 in
branch 'master':
bpo-39572: Document ’total’ flag of TypedDict (GH-18554)
https://github.com/python/cpython/commit/ab6423fe2de0ed5f8a0dc86a9c7070
Guido van Rossum added the comment:
Separately, would you also be interested in writing docs for the `__total__`
class attribute of TypedDict subclasses (3.8 and 3.9) and for the
`__required_keys__` and `__total_keys__` attributes (only in 3.9)? (Sorry,
there's no document you can
Guido van Rossum added the comment:
Go for it. Use the same bug number.
On Wed, Feb 19, 2020 at 02:30 Ananthakrishnan
wrote:
>
> Ananthakrishnan added the comment:
>
> yes,I'm interested in writing docs for the `__required_keys__` and
> `__tota
Guido van Rossum added the comment:
I agree with Raymond here. This is a job for a static type checker like mypy.
Closing.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bug
Guido van Rossum added the comment:
New changeset fbe2e0bb8a7ee75d0f9d57682436dac7d69e202e by ananthan-123 in
branch 'master':
bpo-17422: Language reference should specify restrictions on class namespace
(#18559)
https://github.com/python/cpyt
Change by Guido van Rossum :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
It sounds like either an old implementation restriction or an old misguided
attempt at keeping the IDLE console clean. I’m with Tal, let’s fix it and make
it more like regular Python. Thanks John for taking the time to report this so
clearly
Guido van Rossum added the comment:
Once PEP 585 is implemented these should be rolled back and replaced with that,
right?
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue39
2301 - 2400 of 5533 matches
Mail list logo