[issue40779] incorrect end column for single argument generator function call AST

2020-05-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: For more context, see also bpo-39235. -- ___ Python tracker <https://bugs.python.org/issue40779> ___ ___ Python-bugs-list m

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I'm starting it if anyone else already prepared a patch. -- ___ Python tracker <https://bugs.python.org/issue38605> ___ ___

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-26 Thread Batuhan Taskaya
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-26 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- Removed message: https://bugs.python.org/msg370003 ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bug

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-26 Thread Batuhan Taskaya
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-26 Thread Batuhan Taskaya
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

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
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

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
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

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
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.

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
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

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
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

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Batuhan Taskaya
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-28 Thread Batuhan Taskaya
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(

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-28 Thread Batuhan Taskaya
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

[issue40759] Deprecate the symbol module

2020-05-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue40759> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40829] Add a what's new entry about deprecation of random.shuffle

2020-05-30 Thread Batuhan Taskaya
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

[issue40829] Add a what's new entry about deprecation of random.shuffle

2020-05-30 Thread Batuhan Taskaya
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

[issue40830] Certain uses of dictionary unpacking raise TypeError

2020-05-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue40830> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40830] Certain uses of dictionary unpacking raise TypeError

2020-05-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +Mark.Shannon ___ Python tracker <https://bugs.python.org/issue40830> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40830] Certain uses of dictionary unpacking raise TypeError

2020-05-30 Thread Batuhan Taskaya
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

[issue40830] Certain uses of dictionary unpacking raise TypeError

2020-05-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- components: +Interpreter Core keywords: +3.9regression versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue40

[issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter

2020-05-30 Thread Batuhan Taskaya
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.

[issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter

2020-05-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- Removed message: https://bugs.python.org/msg370397 ___ Python tracker <https://bugs.python.org/issue40829> ___ ___ Python-bug

[issue40829] Add a what's new entry about deprecation of random.shuffle's random= parameter

2020-05-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40759] Deprecate the symbol module

2020-05-31 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread Batuhan Taskaya
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

[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread Batuhan Taskaya
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

[issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval

2020-06-02 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue40403> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11105] Compiling evil ast crashes interpreter

2020-06-02 Thread Batuhan Taskaya
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

[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue40848> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40870] Custom AST can crash Python (debug build)

2020-06-05 Thread Batuhan Taskaya
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) ...

[issue40870] Custom AST can crash Python (debug build)

2020-06-05 Thread Batuhan Taskaya
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

[issue40870] Custom AST can crash Python (debug build)

2020-06-05 Thread Batuhan Taskaya
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

[issue40870] Custom AST can crash Python (debug build)

2020-06-05 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: cross-linking pytest issue: https://github.com/pytest-dev/pytest/issues/7322 -- ___ Python tracker <https://bugs.python.org/issue40

[issue40926] command line interface of symtable module is broken

2020-06-09 Thread Batuhan Taskaya
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

[issue40926] command line interface of symtable module is broken

2020-06-09 Thread Batuhan Taskaya
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

[issue40926] command line interface of symtable module is broken

2020-06-09 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +benjamin.peterson, pablogsal ___ Python tracker <https://bugs.python.org/issue40926> ___ ___ Python-bugs-list mailin

[issue40680] thread_cputime isn't supported by AIX5

2020-06-10 Thread Batuhan Taskaya
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

[issue40424] AIX: makexp_aix, parallel build (failures) and ld WARNINGS

2020-06-11 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue40424> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40974] possible optimization: SHRINK_STACK(n)

2020-06-14 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +Mark.Shannon, pablogsal ___ Python tracker <https://bugs.python.org/issue40974> ___ ___ Python-bugs-list mailing list Unsub

[issue41022] AST sum types is unidentifiable after ast.Constant became a base class

2020-06-18 Thread Batuhan Taskaya
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

[issue41044] Pegen: double trailing comma on optional+sequence rules at python generator

2020-06-19 Thread Batuhan Taskaya
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

[issue41044] Pegen: double trailing comma on optional+sequence rules at python generator

2020-06-19 Thread Batuhan Taskaya
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

[issue38870] Expose ast.unparse in the ast module

2020-06-22 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +20224 pull_request: https://github.com/python/cpython/pull/21053 ___ Python tracker <https://bugs.python.org/issue38

[issue41088] Extend the AST Validator to validate all identifiers

2020-06-23 Thread Batuhan Taskaya
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

[issue41088] Extend the AST Validator to validate all identifiers

2020-06-23 Thread Batuhan Taskaya
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

[issue41088] Extend the AST Validator to validate all identifiers

2020-06-23 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +pablogsal, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41088> ___ ___ Python-bugs-list mailin

[issue41022] AST sum types is unidentifiable after ast.Constant became a base class

2020-06-26 Thread Batuhan Taskaya
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 "|"

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
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

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
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

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
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

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue41194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya
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

[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-03 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- Removed message: https://bugs.python.org/msg372915 ___ Python tracker <https://bugs.python.org/issue41194> ___ ___ Python-bug

[issue37458] ast: Different FormattedValue expressions have same col_offset information

2020-07-04 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue37458> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41204] Use of unitialized variable `fields` along error path in code generated from asdl_c.py

2020-07-04 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41204> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11105] Compiling evil ast crashes interpreter

2020-07-06 Thread Batuhan Taskaya
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.

[issue39981] Default values for AST Nodes

2020-07-09 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +20566 pull_request: https://github.com/python/cpython/pull/21417 ___ Python tracker <https://bugs.python.org/issue39

[issue41261] 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval

2020-07-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41261> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17490] Improve ast.literal_eval test suite coverage

2020-07-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue17490> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38628] Issue with ctypes in AIX

2020-07-24 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue38628> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40726] ast.Call end_lineno is defined and returns None

2020-08-05 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +20889 pull_request: https://github.com/python/cpython/pull/21745 ___ Python tracker <https://bugs.python.org/issue40

[issue10399] AST Optimization: inlining of function calls

2020-08-20 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Batuhan Taskaya
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

[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- components: +Library (Lib) versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue41613> ___ ___ Pytho

[issue41613] get_type_hints regression for 3.9 and 3.10

2020-08-22 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: This looks like a problem with the __globals__ of the NamedTuple.__new__ -- ___ Python tracker <https://bugs.python.org/issue41

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41631> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41687] sendfile implementation is not compatible with Solaris

2020-09-01 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41687> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2020-09-07 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue7> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Batuhan Taskaya
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__()

[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Batuhan Taskaya
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

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41746> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
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

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
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

[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya
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

[issue41780] Generic Alias attributes nor in dir()

2020-09-14 Thread Batuhan Taskaya
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

[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Batuhan Taskaya
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

[issue41780] Generic Alias attributes nor in dir()

2020-09-15 Thread Batuhan Taskaya
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

[issue41848] PEG parser doesn't allow lambda in for_if_clause

2020-09-23 Thread Batuhan Taskaya
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

[issue41887] ast.literal_eval does not accept strings with leading whitespaces

2020-09-30 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41887> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41887] ast.literal_eval does not accept strings with leading whitespaces

2020-09-30 Thread Batuhan Taskaya
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

[issue41887] ast.literal_eval does not accept strings with leading whitespaces

2020-09-30 Thread Batuhan Taskaya
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

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Batuhan Taskaya
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

[issue41613] get_type_hints regression for 3.9 and 3.10

2020-10-01 Thread Batuhan Taskaya
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-06 Thread Batuhan Taskaya
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

[issue41960] Add globalns and localns to the inspect.signature and inspect.Signature.from_callable

2020-10-06 Thread Batuhan Taskaya
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

[issue41960] Add globalns and localns to the inspect.signature and inspect.Signature.from_callable

2020-10-06 Thread Batuhan Taskaya
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

[issue41967] Handle annotations in the parser to avoid the need for roundtrip

2020-10-07 Thread Batuhan Taskaya
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

[issue41967] Handle annotations in the parser to avoid the need for roundtrip

2020-10-07 Thread Batuhan Taskaya
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

[issue41967] Handle annotations in the parser to avoid the need for roundtrip

2020-10-07 Thread Batuhan Taskaya
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

[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41979> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Batuhan Taskaya
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

[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +21595 pull_request: https://github.com/python/cpython/pull/22612 ___ Python tracker <https://bugs.python.org/issue41

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue41987> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-09 Thread Batuhan Taskaya
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

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +21607 pull_request: https://github.com/python/cpython/pull/22630 ___ Python tracker <https://bugs.python.org/issue38

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread Batuhan Taskaya
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

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread Batuhan Taskaya
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

[issue42000] Small cleanups to AST-related code

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

<    1   2   3   4   5   6   7   >