Batuhan Taskaya added the comment:
For more context, see also bpo-39235.
--
___
Python tracker
<https://bugs.python.org/issue40779>
___
___
Python-bugs-list m
Batuhan Taskaya added the comment:
I'm starting it if anyone else already prepared a patch.
--
___
Python tracker
<https://bugs.python.org/issue38605>
___
___
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +19691
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20434
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
Removed message: https://bugs.python.org/msg370003
___
Python tracker
<https://bugs.python.org/issue38605>
___
___
Python-bug
Batuhan Taskaya added the comment:
I opened the PR 20434 as draft, but from what I understand, there is going to
be some breakage (on our test suite). I'll try to narrow it down (currently ~4
tests instead of ~20) but I dont want to prevent anyone else from working on
this, so feel fr
Batuhan Taskaya added the comment:
After trying to complete a patch, there are a few issues that immediately
showed itself (and this might lead to not to do this in 3.10, I dont know);
First one is double-forward-ref, which is usage of string-annotations when
there is postponed evaluatation
New submission from Batuhan Taskaya :
While I was working on making 'future annotations' default, I noticed that
dataclasses acts differently under the annotation feature. One example would be
the file [signature.py]:
[ without future import]
$ python t.py
X(a: int, b: int)
[ w
Batuhan Taskaya added the comment:
> It,sounds like you are trying to get the effect of putting 'from __future__
> import dataclasses' at the top of dataclasses'.py, right?
Yes, since compile will automatically inherit the flags of the current frame to
the compil
Batuhan Taskaya added the comment:
> Have you come up with a fix yet? (Preferably a fix that can be applied
> locally to dataclasses.py.)
I'm working on it, but no luck so far.
--
___
Python tracker
<https://bugs.python.
Batuhan Taskaya added the comment:
> Hmm. That's a regression, at least from 3.7, which is the only version I have
> ready access to:
That is the same behavior with the current master, the problem I am having is
related to using annotations feature on dataclasses itself rath
Batuhan Taskaya added the comment:
I have applied Guido's suggestion and it looks like it is working.
--
___
Python tracker
<https://bugs.python.org/is
Batuhan Taskaya added the comment:
(I applied it to my own branch, don't know if a seperate PR needed)
--
___
Python tracker
<https://bugs.python.org/is
Batuhan Taskaya added the comment:
>From now on, should typing.get_type_hints automatically resolve arguments too?
>An example would be this;
import typing
T = typing.TypeVar("T")
class Loop(typing.Generic[T]):
subloop: typing.Final["Loop[int]"]
print(
Batuhan Taskaya added the comment:
An example would be this
https://github.com/python/cpython/blob/24bddc1b3b58f6899b2d412e51b37f68536e4fe2/Lib/test/test_typing.py#L2744-L2745.
Either I can change tests in order to reflect now everything is a forward ref
by default
class Loop:
attr
Change by Batuhan Taskaya :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue40759>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Batuhan Taskaya :
random.shuffle deprecated with bpo-40465 but a what's news entry didn't exist
about it.
--
assignee: docs@python
components: Documentation
messages: 370397
nosy: BTaskaya, docs@python
priority: normal
severity: normal
status: open
ti
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +19785
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20541
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue40830>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue40830>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
@Kodiologist do you have a setup to try your cause before the commit
8a4cd700a7426341c2074a2b580306d2d60ec839?
--
___
Python tracker
<https://bugs.python.org/issue40
Change by Batuhan Taskaya :
--
components: +Interpreter Core
keywords: +3.9regression
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue40
Change by Batuhan Taskaya :
--
title: Add a what's new entry about deprecation of random.shuffle -> Add a
what's new entry about deprecation of random.shuffle's random= parameter
___
Python tracker
<https://bugs.
Change by Batuhan Taskaya :
--
Removed message: https://bugs.python.org/msg370397
___
Python tracker
<https://bugs.python.org/issue40829>
___
___
Python-bug
Change by Batuhan Taskaya :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Batuhan Taskaya :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Batuhan Taskaya added the comment:
> If you could prep a PR where the change is reverted - I would appreciate it.
> If no time, I'll get to it as soon as I can.
I see. I'll try to get a patch to deactivate it and add a comment (for future
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +19821
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20588
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue40403>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +19824
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/20594
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue40848>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Batuhan Taskaya :
import ast
t = ast.fix_missing_locations(ast.Expression(ast.Name("True", ast.Load(
compile(t, "", "eval")
compilation of this AST can crash the interpreter for 3.8+
test_constant_as_name (test.test_ast.AST_Tests) ...
Change by Batuhan Taskaya :
--
components: +Interpreter Core
nosy: +pablogsal, serhiy.storchaka
type: -> behavior
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +19869
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20649
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
cross-linking pytest issue: https://github.com/pytest-dev/pytest/issues/7322
--
___
Python tracker
<https://bugs.python.org/issue40
New submission from Batuhan Taskaya :
(.venv) (Python 3.10.0a0) [ 1:11ÖS ] [ isidentical@x200:~ ]
$ cat t.py
import x
a = 1
print(x)
(.venv) (Python 3.10.0a0) [ 1:11ÖS ] [ isidentical@x200:~ ]
$ python -m symtable t.py
True False
True False
True False
True False
True False
...
It
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +19956
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20757
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +benjamin.peterson, pablogsal
___
Python tracker
<https://bugs.python.org/issue40926>
___
___
Python-bugs-list mailin
Batuhan Taskaya added the comment:
@vstinner what are your thoughts on this? I can propose a patch that introduces
a build value to generate this conditionally depending on if the system has it
or not. But I am not sure about if our motivation behind this is going to be
supporting (very
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue40424>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +Mark.Shannon, pablogsal
___
Python tracker
<https://bugs.python.org/issue40974>
___
___
Python-bugs-list mailing list
Unsub
New submission from Batuhan Taskaya :
Previously (before ast.Constant became a base class for deprecated node
classes), Sum types were identifiable with this rule;
len(node_class.__subclasses__()) > 0
Now, this is also valid for the ast.Constant itself because of ast.Str, ast.Num
etc. ba
New submission from Batuhan Taskaya :
Python generator generates two trailing commas instead of one when both repeat0
(*) + optional ([]) qualifiers used. Example failing test (raises a
SyntaxError, since the generated parser can't be parseable / executable)
def test_opt_sequence
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +20170
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20995
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
pull_requests: +20224
pull_request: https://github.com/python/cpython/pull/21053
___
Python tracker
<https://bugs.python.org/issue38
New submission from Batuhan Taskaya :
These identifiers include;
- 'name' of FunctionDef/ClassDef/AsyncFunctionDef/ExceptHandler
- 'name' and 'asname' of import aliases within ImportFrom and Import nodes.
Any of these cases will crash the interpreter (abort) when
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +20238
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21069
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +pablogsal, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41088>
___
___
Python-bugs-list mailin
Batuhan Taskaya added the comment:
> Where they were identifable in such way? It is incorrect way, because user
> can create a subclass of every AST class.
You are right, I didn't consider that while I was opening the issue. Also from
3.9>= can be searched "|"
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41194>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
@arcivanov what kind of input do you pass to the compile function which leads
this crash?
--
___
Python tracker
<https://bugs.python.org/issue41
Batuhan Taskaya added the comment:
If you aren't able to share some reproducer snippets, would you try a bisect?
An interesting commit would be this ac46eb4ad66 to try and check if this crash
happens before and after it?
--
___
Python tr
Batuhan Taskaya added the comment:
A shorter reproducer;
>>> import sys
>>> sys.modules.clear()
Traceback (most recent call last):
File "", line 1, in
RuntimeError: lost builtins module
>>> import _ast
>>> import gc
>>> gc.collect()
Mo
Change by Batuhan Taskaya :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue41194>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
If I'm not wrong, this is the commit that introduced the regression.
commit ac46eb4ad6662cf6d771b20d8963658b2186c48c (HEAD -> bpo-x)
Author: Dino Viehland
Date: Wed Sep 11 10:16:34 2019 -0700
bpo-38113: Update the Python-ast.c generator t
Change by Batuhan Taskaya :
--
Removed message: https://bugs.python.org/msg372915
___
Python tracker
<https://bugs.python.org/issue41194>
___
___
Python-bug
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue37458>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41204>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
> With 3.9 on Windows, using Benjamin's example, I do not get the Windows
> equivalent of a seg fault. However, execution stops at compile with no
> exception, including SystemExit.
I can still reproduce on Linux,
$ python
Python 3.10.
Change by Batuhan Taskaya :
--
pull_requests: +20566
pull_request: https://github.com/python/cpython/pull/21417
___
Python tracker
<https://bugs.python.org/issue39
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41261>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue17490>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue38628>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
pull_requests: +20889
pull_request: https://github.com/python/cpython/pull/21745
___
Python tracker
<https://bugs.python.org/issue40
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue10399>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Batuhan Taskaya :
The attached script works perfectly fine under Python 3.8, but it crashes in
3.9/3.10.
$ ./py38/python typing_fail.py (3.8.5+)
{'a': , 'b': }
$ ./py39/python typing_fail.py (3.9.0rc1+)
[SNIP]
TypeError: 'NoneType' object is
Change by Batuhan Taskaya :
--
components: +Library (Lib)
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue41613>
___
___
Pytho
Batuhan Taskaya added the comment:
This looks like a problem with the __globals__ of the NamedTuple.__new__
--
___
Python tracker
<https://bugs.python.org/issue41
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41631>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41687>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue7>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Batuhan Taskaya :
$ cat t.py
from dataclasses import dataclass
@dataclass
class Foo:
bar: int
Foo()
$ python t.py
Traceback (most recent call last):
File "/home/isidentical/cpython/cpython/t.py", line 7, in
Foo()
TypeError: __create_fn__..__init__()
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21234
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22155
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41746>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
We already have a specialized type for int (actually an enumeration);
typedef struct {
Py_ssize_t size;
void *elements[1];
} asdl_seq;
typedef struct {
Py_ssize_t size;
int elements[1];
} asdl_int_seq;
Why not just include these in the
Batuhan Taskaya added the comment:
The problem with asdl_seq_int was that it was hard-coded since there was no
entity that transpods data between different traversers / node visitors. PR
20193 tries to implement a general-purpose metadata system to eliminate that
issue, and can be easily
Batuhan Taskaya added the comment:
> That's a possibility, but that would incur in a lot of new extra code, and
> some asdl_seq items in the parser contain non-standard types that only PEG
> uses, so is not possible to auto-generate them.
Well, since the extra code will be
Batuhan Taskaya added the comment:
> @Batuhan, do you want to look into this?
Sure, will check it out!
--
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
Okay, so IIRC if we stop forwarding __class__ (add it as an exception to
attr_exceptions) it would return us the original dir(), and also solve the
inconsistency of the example you gave;
> >>> list.__class__
>
> >>> list[int
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21318
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22262
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
keywords: +patch
nosy: +BTaskaya
nosy_count: 6.0 -> 7.0
pull_requests: +21434
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22394
___
Python tracker
<https://bugs.python.org/i
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41887>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
Looks like skipping the leading whitespace is an undocumented behavior for
eval() introduced back in 1992 (f08ab0ad158f88f05dd923b129d2397e1882be14). I
don't think that bringing it to the literal_eval is a good idea, at least after
this much of a tim
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21492
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22469
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21504
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22469
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
Commit 3ff51d425ecd98b7ba5a12ca9f77eda73fbf9f53 set the __builtins__ to None in
namedtuple's creation, but the problem is that it is causing harm when the
point came to the point of getting type hints on typing.NamedTuple.__new__ (we
had a test abo
Batuhan Taskaya added the comment:
@gvanrossum should I draft a patch to convert this
inspect.signature(callable, *, follow_wrapped=True) (and also things like
inspect.Signature.from_callable) into inspect.signature(callable, *,
follow_wrapped=True, globalns=None, localns=None) in order to
New submission from Batuhan Taskaya :
To resolve annotations in local namespaces (and possibly in different
contexts), inspect.signature can take globalns and localns parameters.
I'm not inclined to add these into the getfullargspec, but I'd appreciate any
comments about whether it
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21576
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22583
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
After scanning 1552 annotated assignments in over 25k python modules (from most
populer packages in PyPI) there are only 6 AnnAssign nodes where the
annotations are multiline. For 516389 annotated arguments, only 20 of them are
multiline annotations
Batuhan Taskaya added the comment:
s/For 516389 annotated arguments/For 516389 arguments/.
Example usages;
https://search.tree.science/?query=AnnAssign(annotation%20=%20expr(lineno%20=%20not%20~end_lineno))
https://search.tree.science/?query=arg(annotation=expr(lineno%20=%20not%20~end_lineno
Batuhan Taskaya added the comment:
It is not actually much of a difference;
$ cat t.py
def func(
arg: typing.Callable[
[int, str],
str # test
]
):
pass
import typing
print("Annotations: ", func.__annotations__)
print("get_type_hints: ", typing
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21594
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22611
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
pull_requests: +21595
pull_request: https://github.com/python/cpython/pull/22612
___
Python tracker
<https://bugs.python.org/issue41
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue41987>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
AFAIK the normal way of registering types (dispatcher.register()) also
requires that registered type be defined at the execution type. I guess, if we
are going to support such a thing, we might end up with supporting passing
strings into the .register() as
Change by Batuhan Taskaya :
--
pull_requests: +21607
pull_request: https://github.com/python/cpython/pull/22630
___
Python tracker
<https://bugs.python.org/issue38
Change by Batuhan Taskaya :
--
components: Interpreter Core
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Small cleanups to AST-related code
versions: Python 3.10
___
Python tracker
<https://bugs.python.org/issue42
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +21614
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22641
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
501 - 600 of 652 matches
Mail list logo