Guido van Rossum added the comment:
So that's the last line of the new helper function (in fact the end of the
file). Maybe args can still be empty at this point?
--
assignee: -> pablogsal
priority: normal -> release blocker
___
Pyt
Guido van Rossum added the comment:
I do have a repro of the crash (with clang 11 no less). But it could be
anywhere in sysconfig.py or anything it imports...
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
Hm, it's not in sysconfig.py, it's in the next step:
./python.exe -E ./setup.py build
--
___
Python tracker
<https://bugs.python.o
Guido van Rossum added the comment:
Looking at it in lldb, 'last' seems to be bogus.
kind = 6961392
...
lineno = -33686019
col_offset = -33686019
end_lineno = 0
end_col_offset = 0
Here I'm stuck.
--
___
Python
Guido van Rossum added the comment:
Adding 3.9 since the offending commit was backported there.
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
Smaller repro:
./python.exe -m configparser
Bisection shows that this is the call that causes the crash (line 1301):
return _impl(self._name, option, raw=raw, vars=vars,
fallback=fallback, **kwargs)
But just that line doesn
Guido van Rossum added the comment:
New changeset e223d06a8b2067c68e9f97c4628c2b0f056dcae6 by Todd in branch
'master':
bpo-39883: Use BSD0 license for code in docs (GH-17635)
https://github.com/python/cpython/commit/e223d06a8b2067c68e9f97c4628c2b
Guido van Rossum added the comment:
New changeset a5d0232b0d2cbcbdeb0d89ea3d8826241a53a7c7 by Miss Islington (bot)
in branch '3.9':
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22073)
https://github.com/python/cpython/commit/a5d0232b0d2cbcbdeb0d89ea3d8826
Guido van Rossum added the comment:
Todd, you have a PR for the pydotorg repo as well, right? Can you link it here?
--
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue39
Guido van Rossum added the comment:
New changeset 9fef7c54a0adfade5ec94259d97f22e05fe9e3e3 by Miss Islington (bot)
in branch '3.8':
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22074)
https://github.com/python/cpython/commit/9fef7c54a0adfade5ec94259d97f22
Guido van Rossum added the comment:
Thanks for the report Brad, and thanks for the quick fix Pablo!
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
FWIW the bug was a classic type error -- in a decent language the asdl_seq
type would have been generic and this would have been caught without an
ASAN builder...
--
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Hm, I don't believe that will work -- each node type (e.g. `expr_ty`,
`mod_ty`) has its own enum for `kind` (e.g. `_expr_kind`, `_mod_kind`) and
some don't have a `kind` field at all (e.g. `keyword_ty`). So you'd have to
add an extra field to
Guido van Rossum added the comment:
@ezio.melotti: What is this waiting for at this point? There was some good
energy here but progress seems halted, waiting for some kind of decision.
--
___
Python tracker
<https://bugs.python.org/issue41
Change by Guido van Rossum :
--
stage: resolved ->
___
Python tracker
<https://bugs.python.org/issue41697>
___
___
Python-bugs-list mailing list
Unsubscrib
Guido van Rossum added the comment:
Really closing.
--
nosy: +gvanrossum
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Guido van Rossum added the comment:
I know it's moot now, but still -- what benefit do we get from using a
"standard" like ASDL? All our tooling for it is custom for Python only.
--
___
Python tracker
<https://bugs.pyt
Guido van Rossum added the comment:
I guess some of my gripes about ASDL have to do with our tooling. For example I
find it annoying that the 'kind' enums overlap, so if I have a void* that I
know points to an AST node I can't look at the kind to tell what it is.
Anyway, re
Guido van Rossum added the comment:
What it prints is irrelevant to static checking.
Currently the typeshed stub for the code already exports RegexFlag, so that the
following passes mypy but fails at runtime:
```
from re import *
def foo(flag: RegexFlag):
return match("[a-z]+&q
Guido van Rossum added the comment:
This looks fully resolved. Thanks again Todd!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
I actually have no idea where dir() gets its information. IIRC the
implementation was a collaboration with Batuhan -- @Batuhan, do you want to
look into this? Presumably some metadata needs to be added to
genericaliasobject.c.
--
nosy
Guido van Rossum added the comment:
The forwarding of `__class__`, and the resulting difference between
`type(list[int])` and `list[int].__class__` are intentional.
I think overriding `__dir__` along the lines suggested by Allan (but in C of
course) would be the best solution
Change by Guido van Rossum :
--
assignee: docs@python ->
stage: -> needs patch
___
Python tracker
<https://bugs.python.org/issue41780>
___
___
Pyth
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:
New changeset 0705ec8a149e27023b0420ae0366d16255f6c9f7 by Patrick Reader in
branch 'master':
bpo-41792: Add is_typeddict function to typing.py (GH-22254)
https://github.com/python/cpython/commit/0705ec8a149e27023b0420ae0366d16255f6c9f7
-
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:
Thomas, can you explain the problem in English? Those elaborate test programs
don’t do it for me, sorry.
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
Okay, I got it. Now my next question. What do you mean by "I've eliminated
runpy" and various other remarks along those lines? Have you actually
identified the root cause of the problem? What's your suggested fix (wit
Guido van Rossum added the comment:
Closing for lack of activity.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue40697>
___
___
Python-bug
Guido van Rossum added the comment:
Closing for lack of activity.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue37604>
___
___
Python-bug
Guido van Rossum added the comment:
Closing for lack of activity.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue37350>
___
___
Python-bug
Guido van Rossum added the comment:
Closing for lack of activity.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue36586>
___
___
Python-bug
Change by Guido van Rossum :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36586>
___
___
Python-bugs-list
Change by Guido van Rossum :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37350>
___
___
Python-bugs-list
Change by Guido van Rossum :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37604>
___
___
Python-bugs-list
Guido van Rossum added the comment:
Okay, so according to eryksun the fix requires C code. @graingert, are you
interested in developing such a fix? Or @eryksun do you have an idea on how to
fix it?
--
___
Python tracker
<https://bugs.python.
Guido van Rossum added the comment:
Thanks, I think this is the fix:
diff --git a/Modules/main.c b/Modules/main.c
index 4a76f4461b..3d1bbee3a0 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -288,6 +288,10 @@ pymain_run_module(const wchar_t *modname, int set_argv0)
return
Change by Guido van Rossum :
--
stage: patch review -> needs patch
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue41602>
___
___
Py
Guido van Rossum added the comment:
Why did you remove 3.10?
--
___
Python tracker
<https://bugs.python.org/issue41602>
___
___
Python-bugs-list mailin
Change by Guido van Rossum :
--
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue35293>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Let’s do this.
--
___
Python tracker
<https://bugs.python.org/issue41810>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
> Would not be better to make MyPy supporting type(Ellipsis)? It would work
> also on Python versions older than 3.10.
That would be quite complicated. There is no place in annotations where a
function call is currently supported, so I'd prefe
Guido van Rossum added the comment:
I’m okay with adding those (even though NoneType might not work in mypy, given
the special-casing for None, per PEP 484).
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
> In any case, I'm ok with adding `NoneType` and `NotImplementedType` to the PR.
Please do.
--
___
Python tracker
<https://bugs.python.org
Guido van Rossum added the comment:
Bas can you do some research to answer Eric's question? In theory it should be
possible to use git bisect to find it. I see it in 2.7 but not in 3.4. That's a
fairly large interval, alas.
--
___
Pyth
Guido van Rossum added the comment:
Thanks! Most of the deleted types *are* builtins (e.g. object, int). I assume
the reasoning was just that if you wanted the type you could just write
type(Ellipsis), type(None) etc.
But that's too dynamic for static checkers, so we want *some* stable
Change by Guido van Rossum :
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset a68a2ad19c891faa891904b3da537911cc77df21 by Thomas Grainger in
branch 'master':
bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module
(#21956)
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:
New changeset 0d0e9fe2ffc1683758a1985ef6dedeef5ecafdbc by Bas van Beek in
branch 'master':
bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` &
`.NotImplementedType` (GH-22336)
https://github.com/python/
Guido van Rossum added the comment:
I propose not to fix this, since it is pointless (a lambda is always truthy).
We can call it out in What's New in 3.9 -- as a very small footnote. :-)
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Okay, let's close this.
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Guido van Rossum added the comment:
This cannot be helped (unless we were to add an ugly sys._getframe() call to
get_type_hints(), which I don't want to do). The solution is to pass
`localns=locals()`, e.g.
get_type_hints(foo, None, locals())
or
get_type_hints(foo, localns=l
Guido van Rossum added the comment:
I've only seen it in test cases too -- that's one of the very few
situations where it makes sense to define a class inside a function.
(Creating a class is an expensive operation, so any function that expects
to be called more than once is better
Guido van Rossum added the comment:
We moved the check from the parser to the bytecode compiler. I don't think this
should be a problem. Kudos for noticing though! :-)
```
>>> compile("__debug__ = 1", "", "exec")
Traceback (most recent call las
Guido van Rossum added the comment:
Hm, I'm not sure. ast.literal_eval() does accept trailing whitespace, and
embedded whitespace.
```
>>> ast.literal_eval("- ( 1\n)\n")
-1
>>>
```
So I think it should start accepting leading whitespace too (but on
Guido van Rossum added the comment:
I agree that it's better to just close this issue, the patch is 7 years old.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
Hm, I don't think PR 22469 is relevant to this issue?
--
___
Python tracker
<https://bugs.python.org/issue17490>
___
___
Guido van Rossum added the comment:
I'm going to ignore this issue until you two have reached agreement. I
recommend using some example code.
--
___
Python tracker
<https://bugs.python.org/is
Guido van Rossum added the comment:
I still like to have a helper that recalculates the abstractness status of a
class after adding some new methods (or deleting some).
I would prefer the isinstance(cls, ABCMeta) check to be inside that helper, so
that you could call it unconditionally
Guido van Rossum added the comment:
[Terry]
> But why should not parsing remove indents for 'eval' mode?
I dunno, but it's been doing this since 1992, so I think it would be fragile to
change. The best thing therefore is to make ast.literal_eval(
Guido van Rossum added the comment:
Why would that require more code? That’s already how it worked. Maybe you
misunderstand what I tried to say?
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
Ah, okay. I wasn't familiar with @total_ordering so I assumed differently.
Sorry for the continued misunderstanding.
Perhaps we should just leave it alone completely then, since ISTM that any
change to its implementation may cause subtle bu
Guido van Rossum added the comment:
Sure go right ahead.
--
___
Python tracker
<https://bugs.python.org/issue41923>
___
___
Python-bugs-list mailing list
Unsub
Guido van Rossum added the comment:
I don't think I remember what's so special about abstract_get_bases() to
disable the recursion check. Maybe this macro is always just a
micro-optimization? Then again it's hard to be sure, the behavior may depend on
the platform.
Pulling
Guido van Rossum added the comment:
Hm, you're effectively proposing to compute (or update) __abstractmethods__
lazily. There are a number of subtleties with that, e.g. __abstractmethods__ is
currently a frozenset, and a base class's __abstractmethods__ is used when
com
Guido van Rossum added the comment:
New changeset e799aa8b92c195735f379940acd9925961ad04ec by Batuhan Taskaya in
branch 'master':
bpo-41887: omit leading spaces/tabs on ast.literal_eval (#22469)
https://github.com/python/cpython/commit/e799aa8b92c195735f379940acd992
Guido van Rossum added the comment:
Closing. Let’s not backport.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
Yes, we could override ABCMeta.__setattr__ to do that. Though it seems this
class is considered performance sensitive (else why have Modules/_abc.c) we
would probably have to write it in C.--
--Guido (mobile
Guido van Rossum added the comment:
Possibly at some point in the future we can switch to using typing.Protocol,
which requires neither registration nor explicit subclassing (it's like
Hashable). This makes it easy for user code to define custom protocols as
needed. So if you need some
Guido van Rossum added the comment:
New changeset 8e1dd55e63d18d40e78d941fc9233d2c77bcd3de by Fidget-Spinner in
branch 'master':
bpo-41428: Documentation for PEP 604 (gh-22517)
https://github.com/python/cpython/commit/8e1dd55e63d18d40e78d941fc9233d2c77bcd3de
--
nosy: +
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 :
--
assignee: gvanrossum -> rhettinger
nosy: -gvanrossum
___
Python tracker
<https://bugs.python.org/issue26680>
___
___
Python-
Guido van Rossum added the comment:
Thanks all!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
New changeset bef7d299eb911086ea5a7ccf7a9da337e38a8491 by Ben Avrahami in
branch 'master':
bpo-41905: Add abc.update_abstractmethods() (GH-22485)
https://github.com/python/cpython/commit/bef7d299eb911086ea5a7ccf7a9da3
Guido van Rossum added the comment:
New changeset 044a1048ca93d466965afc027b91a5a9eb9ce23c by Batuhan Taskaya in
branch 'master':
bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)
https://github.com/python/cpython/commit/044a1048ca93d466965a
Guido van Rossum added the comment:
I'm marking this fixed, but there are some subtle edge cases. That's what alpha
releases are for.
@BTaskaya, adding those arguments to various inspect functions sounds like a
nice thing to do. You could either open a new issue or just refe
Guido van Rossum added the comment:
What's the issue exactly with multi-line annotations? Is it that they can't be
parsed by eval()? Could that be fixed by replacing comments and newlines with
spaces? (Either in the parser or in get_type_hints() -- actually
ForwardRef._evaluat
Guido van Rossum added the comment:
Hm, this buffer thing is not what I had expected. I think it's a show-stopper
-- if we don't reproduce spaces exactly.
Maybe we should just buffer the entire input always?
A way to handle multi-line annotations would be to surround them with
p
Guido van Rossum added the comment:
I know the final result is the same (i.e. the AST is identical and the
string differs only in the use of whitespace). I just wonder why bother
changing this unless we reproduce the spaces in the string exactly
Guido van Rossum added the comment:
Okay, but doesn't *any* way of handling multi-line annotations spoil the
wins? We cannot declare those illegal. (Though we can switch to a different
way of representing those.)
--
___
Python tracker
&
Guido van Rossum added the comment:
> the string generated for multi line annotations [...] won't have spaces
> between characters.
Okay, though aren't there cases where spaces are necessary? E.g. between names
or between a name or keyword and a string or number.
Assumin
Guido van Rossum added the comment:
New changeset 4f3c25043d651a13c41cffcee703f7d5cb677cc7 by Mikhail Golubev in
branch 'master':
bpo-41923: PEP 613: Add TypeAlias to typing module (#22532)
https://github.com/python/cpython/commit/4f3c25043d651a13c41cffcee703f7
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:
Too bad. :-(
--
___
Python tracker
<https://bugs.python.org/issue41967>
___
___
Python-bugs-list mailing list
Unsubscribe:
Guido van Rossum added the comment:
Yup. Thanks for catching this!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Guido van Rossum added the comment:
This behavior (only relevant with `from __future__ import annotations`) has
been around since @singledispatchmethod was introduced in 3.8, so I agree we
should treat it as a feature request.
In the meantime, maybe a workaround is to move the register call
Guido van Rossum added the comment:
Yes, let’s document __args__ and __origin__.
--
___
Python tracker
<https://bugs.python.org/issue40814>
___
___
Python-bug
Guido van Rossum added the comment:
New changeset 0ae216b11644b23511c6287a52e7d28aeb9f by Batuhan Taskaya in
branch 'master':
bpo-38605: bump the magic number for 'annotations' future (#22630)
https://github.com/python/cpython/commit/0ae216b11644b235
Guido van Rossum added the comment:
You can easily define that yourself if you need it, though honestly the utility
seems marginal.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bug
Guido van Rossum added the comment:
Have you observed actual users getting confused by this? (E.g. StackOverflow or
mailing list posts.) I would assume that if you try to *do* anything with the
resulting object it's going to cause a traceback, and from there it's pretty
straight
Guido van Rossum added the comment:
New changeset 1c217652b690c184b43d8e2b6529a60a14e64328 by Saiyang Gou in branch
'3.9':
[3.9] bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py
(GH-22619) (#22624)
https://github.com/python/cpyt
Guido van Rossum added the comment:
That sentence has been a lie for a long time (from the start?).
Any type can define __getitem__ and get this behavior, though in this case it
is done through __class_getitem__ (PEP NNN).
--
___
Python tracker
Guido van Rossum added the comment:
Can you submit a PR to fix this? It looks like you already have a good
understanding of the root cause of the problem, so it should be easy to fix.
(Be sure to add a unit test.)
It can be backported to earlier Python versions that have typing.TypedDict
Guido van Rossum added the comment:
Whoops, sorry, didn't see that you already have a PR. I'll review it next week
during the core sprint.
--
___
Python tracker
<https://bugs.python.o
Guido van Rossum added the comment:
This may be irrelevant at this point, but trying to understand the original
reproducer, I wanted to add my 1c worth.
It seems Dennis' reproducer.py is roughly this:
(I'm renaming BIG//3 to K to simplify the math.)
aBaBBB
Guido van Rossum added the comment:
Right, so IIUC the *quadratic* portion of Dennis’ original reproducer, aBaBBB
with pattern BBB, except with more cowbell :-) acts the same.
--
___
Python tracker
<https://bugs.python.org/issue41
Guido van Rossum added the comment:
I'd say close it, the deprecation can be a separate issue (usually is) and I
don't think we need to backport such a minor docs issue to 3.8. The PR is old
enough that it made 3.9+3.10 I think (did you check?).
--
nosy: +
Guido van Rossum added the comment:
Whoops, never mind me. Irit can you friend me on Discourse?
--
___
Python tracker
<https://bugs.python.org/issue37
Guido van Rossum added the comment:
New changeset 7cdf30fff39ea97f403b5472096349998d190e30 by kj in branch 'master':
bpo-42010: [docs] Clarify subscription of types (GH-22822)
https://github.com/python/cpython/commit/7cdf30fff39ea97f403b5472096349
3001 - 3100 of 5563 matches
Mail list logo