[issue38994] Implement __class_getitem__ for PathLike

2019-12-07 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +16976 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17498 ___ Python tracker <https://bugs.python.org/issu

[issue33880] namedtuple should use NFKD to find duplicate members

2019-12-08 Thread Batuhan
Batuhan added the comment: Hey @rhettinger, what is the status of this issue? Is there a consensus about fixing it or can this issue be closed? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue33

[issue20443] __code__. co_filename should always be an absolute path

2019-12-09 Thread Batuhan
Batuhan added the comment: I am not sure that if co_filename can break backwards compability or not (because until CodeType.replace; it was usual to break code object construction, people who are using code objects may take this too) but yes PR 17534 was necessary. My initial patch (PR

[issue39019] Missing class getitems in standard library classes

2019-12-10 Thread Batuhan
New submission from Batuhan : After working on issue 38994 and issue 38978, I decided to write a simple AST analyzer to find class getitem syntax usage in typeshed. It discovered a few classes (I am not sure if there are more). As @brett.cannon suggested in PR 17498 I'll prepare indiv

[issue39019] Missing class getitems in standard library classes

2019-12-10 Thread Batuhan
Change by Batuhan : -- components: +Library (Lib) nosy: +levkivskyi versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue39019> ___ ___ Pytho

[issue39019] Missing class getitems in standard library classes

2019-12-10 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17030 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17558 ___ Python tracker <https://bugs.python.org/issu

[issue39019] Missing class getitems in standard library classes

2019-12-10 Thread Batuhan
Change by Batuhan : -- pull_requests: +17032 pull_request: https://github.com/python/cpython/pull/17560 ___ Python tracker <https://bugs.python.org/issue39

[issue39019] Missing class getitems in standard library classes

2019-12-10 Thread Batuhan
Change by Batuhan : -- pull_requests: +17033 pull_request: https://github.com/python/cpython/pull/17561 ___ Python tracker <https://bugs.python.org/issue39

[issue39019] Missing class getitems in standard library classes

2019-12-10 Thread Batuhan
Change by Batuhan : -- pull_requests: +17035 pull_request: https://github.com/python/cpython/pull/17563 ___ Python tracker <https://bugs.python.org/issue39

[issue32888] Improve exception message in ast.literal_eval

2019-12-14 Thread Batuhan
Change by Batuhan : -- pull_requests: +17076 pull_request: https://github.com/python/cpython/pull/16620 ___ Python tracker <https://bugs.python.org/issue32

[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan
Change by Batuhan : -- pull_requests: +17084 pull_request: https://github.com/python/cpython/pull/17612 ___ Python tracker <https://bugs.python.org/issue38

[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan
Change by Batuhan : -- pull_requests: +17085 pull_request: https://github.com/python/cpython/pull/17613 ___ Python tracker <https://bugs.python.org/issue38

[issue39069] Move ast.unparse() function to a different module

2019-12-16 Thread Batuhan
Batuhan added the comment: $ ./python -m pyperf timeit "import ast" Before: Mean +- std dev: 326 ns +- 13 ns After: Mean +- std dev: 330 ns +- 19 ns (applied my first patch with both contextlib and IntEnum) Pablo Galindo Salgado , 16 Ara 2019 Pzt, 21:27 tarihinde şunu yazdı:

[issue39069] Move ast.unparse() function to a different module

2019-12-16 Thread Batuhan
Batuhan added the comment: Thanks for having consensus on this. I'll refactor PR 17612 and open anothor one for reverting PR 17376 On Tue, Dec 17, 2019, 12:31 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > Pablo: > > Victor, are you OK if we cl

[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-12-19 Thread Batuhan
Change by Batuhan : -- pull_requests: +17129 pull_request: https://github.com/python/cpython/pull/17661 ___ Python tracker <https://bugs.python.org/issue38

[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-12-19 Thread Batuhan
Change by Batuhan : -- pull_requests: +17128 pull_request: https://github.com/python/cpython/pull/17660 ___ Python tracker <https://bugs.python.org/issue38

[issue32888] Improve exception message in ast.literal_eval

2019-12-19 Thread Batuhan
Change by Batuhan : -- pull_requests: +17130 pull_request: https://github.com/python/cpython/pull/17662 ___ Python tracker <https://bugs.python.org/issue32

[issue18930] os.spawnXX functions terminates process if second argument is empty list

2019-12-20 Thread Batuhan
Batuhan added the comment: @SSchukat can you reproduce this issue in python 3? -- components: +Windows -Interpreter Core nosy: +BTaskaya, paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior ___ Python tracker <https://bugs.pyth

[issue23868] Uninitialized objects are tracked by the garbage collector

2019-12-20 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, pablogsal type: -> behavior ___ Python tracker <https://bugs.python.org/issue23868> ___ ___ Python-bugs-list mai

[issue26845] Misleading variable name in exception handling

2019-12-20 Thread Batuhan
Batuhan added the comment: I am not sure if calls like this constitutes a problem. By the way most of the things changed in Python/ceval.c including removal of END_FINALLY (issue 33387) but calls to _PyErr_Restore is still there with that same arguments. -- nosy: +BTaskaya, vstinner

[issue26767] Inconsistant error messages for failed attribute modification

2019-12-20 Thread Batuhan
Batuhan added the comment: > I think it would be nice to unify error messages and make them more specific. How can they can be more specific when they are unified? -- nosy: +BTaskaya versions: +Python 3.9 -Python 3.6 ___ Python tracker <

[issue33772] Fix few dead code paths

2019-12-20 Thread Batuhan
Batuhan added the comment: I agree, can be closed -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue33772> ___ ___ Python-bugs-list mailin

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-20 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, vstinner ___ Python tracker <https://bugs.python.org/issue36051> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-20 Thread Batuhan
Change by Batuhan : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue36051> ___ ___ Python-bugs-list mailing list Unsub

[issue13047] imp.find_module("") and imp.find_module(".")

2019-12-20 Thread Batuhan
Batuhan added the comment: `imp` is now deprecated and IMHO no reason to make this change after this deprecation. -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue13

[issue24945] Expose Py_TPFLAGS_ values from Python

2019-12-20 Thread Batuhan
Batuhan added the comment: IMHO inspect would be a better place to put these constants (like CO_ flags). -- nosy: +BTaskaya versions: +Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue24

[issue30905] Embedding should have public API for interactive mode

2019-12-21 Thread Batuhan
Batuhan added the comment: > (1) BUT: The value of 'a' is not printed Isn't this the expected behavior for file input? You need to call print() in order to get 'a' printed. > (2) This is OK! We run one statement at a time As it should be for "single in

[issue36000] __debug__ is a keyword but not a keyword

2019-12-21 Thread Batuhan
Batuhan added the comment: import builtins builtins.__dict__['__debug__'] = 'Surprise!' builtins.__dict__['None'] = 'Surprise!' print(__debug__) print(None) $ ./python ../t.py True None I guess this is related to Python/ast_opt.c transf

[issue32599] Add dtrace hook for PyCFunction_Call

2019-12-21 Thread Batuhan
Batuhan added the comment: If there are no objections, I can work on a patch. -- nosy: +BTaskaya, christian.heimes, vstinner ___ Python tracker <https://bugs.python.org/issue32

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2019-12-21 Thread Batuhan
Batuhan added the comment: I am not sure about computing absolute path every time when `__file__` called. I guess it is a static thing, that get setted on the import time and never changes. What you are proposing is to compute it dynamically which IMHO isn't the best way. --

[issue29732] Heap out of bounds read in tok_nextc()

2019-12-21 Thread Batuhan
Batuhan added the comment: (.venv) [ 10:04ÖS ] [ isidentical@x200:~/Downloads ] $ python -V Python 3.9.0a1+ (.venv) [ 10:04ÖS ] [ isidentical@x200:~/Downloads ] $ python python_hoobr_tok_nextc.py File "/home/isidentical/Downloads/python_hoobr_tok_nextc.py", line 5 ^ S

[issue36788] Add clamp() function to builtins

2019-12-21 Thread Batuhan
Batuhan added the comment: Should this issue stay? Maybe port this discussion over python-ideas and after the resolution open it again? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue36

[issue39132] Adding funcitonality to determine if a constant string node is triple quoted

2019-12-24 Thread Batuhan
New submission from Batuhan : I was working on a preceding system for AST unparser and @pablogsal said there is an issue with docstrings (they printed in the same line even it was like 1000 chars long). So determining something is a triple quoted or not is simple with preceding system but I

[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2019-12-25 Thread Batuhan
Batuhan added the comment: Looks like there is nothing left after PR 1712 if I am not missing something, can this issue be closed? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue30

[issue30364] Outdated function attribute to disable address sanitizer

2019-12-25 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17702 ___ Python tracker <https://bugs.python.org/issu

[issue39132] Adding funcitonality to determine if a constant string node is triple quoted

2019-12-26 Thread Batuhan
Batuhan added the comment: @inada.naoki I thought that would be a nice to have feature in certain cases AST used but as @serhiy.storchaka said there is an issue with implicit string concatenation which makes this impossible to expose. Thank you both. -- stage: -> resolved sta

[issue38131] compile(mode='eval') uninformative error message

2019-12-27 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17160 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17715 ___ Python tracker <https://bugs.python.org/issu

[issue38131] compile(mode='eval') uninformative error message

2019-12-27 Thread Batuhan
Batuhan added the comment: with PR 17715 >>> import ast >>> expr_without_lineno_but_ok = >>> ast.Expression(body=ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), >>> op=ast.Add())) >>> expr_with_lineno_but_with_wrong_body = >>> a

[issue38131] compile(mode='eval') uninformative error message

2019-12-27 Thread Batuhan
Change by Batuhan : -- components: +Interpreter Core -Library (Lib) nosy: +BTaskaya versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue38

[issue35143] `from __future__ import annotations` has no effect inside `ast.parse`

2019-12-27 Thread Batuhan
Batuhan added the comment: > Having a real "ast.unparse" would be better however. It seems that the > building blocks are all there, just not in that form. Now we have that :) https://docs.python.org/3.9/whatsnew/3.9.html#

[issue38731] bad input crashes py_compile library

2019-12-27 Thread Batuhan
Change by Batuhan : -- pull_requests: +17163 pull_request: https://github.com/python/cpython/pull/17719 ___ Python tracker <https://bugs.python.org/issue38

[issue22640] Add silent mode for py_compile

2019-12-27 Thread Batuhan
Change by Batuhan : -- pull_requests: +17165 pull_request: https://github.com/python/cpython/pull/17719 ___ Python tracker <https://bugs.python.org/issue22

[issue38731] bad input crashes py_compile library

2019-12-27 Thread Batuhan
Change by Batuhan : -- pull_requests: -17163 ___ Python tracker <https://bugs.python.org/issue38731> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32438] PyLong_ API cleanup

2019-12-28 Thread Batuhan
Batuhan added the comment: Is this related/resolved with issue 36048? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue32438> ___ ___ Pytho

[issue37446] Undefined behavior in Python/hamt.c

2019-12-28 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17171 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17727 ___ Python tracker <https://bugs.python.org/issu

[issue37446] Undefined behavior in Python/hamt.c

2019-12-28 Thread Batuhan
Batuhan added the comment: > I don't get that output on 3.8.0a4+ I guess it is related with you didn't added -fsanitize=undefined option. -- nosy: +BTaskaya ___ Python tracker <https://bugs.pytho

[issue11105] Compiling evil ast crashes interpreter

2019-12-28 Thread Batuhan
Batuhan added the comment: We can probably implement something like this to prevent this happening diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index daac0966f5..f9da52da7f 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -559,6 +559,11 @@ class Obj2ModVisitor(PickleVisitor

[issue11105] Compiling evil ast crashes interpreter

2019-12-28 Thread Batuhan
Change by Batuhan : -- versions: +Python 3.9 -Python 3.2, Python 3.3 ___ Python tracker <https://bugs.python.org/issue11105> ___ ___ Python-bugs-list mailin

[issue25087] Type variable substitution in type instances

2019-12-28 Thread Batuhan
Batuhan added the comment: It looks like the issue in typing tracker closed, can we also close this? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue25

[issue5851] Add a stream parameter to gc.set_debug

2019-12-29 Thread Batuhan
Batuhan added the comment: @nicdumz are you still interested in this issue? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue5851> ___ ___

[issue24174] Python crash on exit

2019-12-29 Thread Batuhan
Batuhan added the comment: The link you gave is broken, can you give a simple code to reproduce the issue? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue24

[issue39158] ast.literal_eval() doesn't support empty sets

2019-12-29 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya type: -> enhancement ___ Python tracker <https://bugs.python.org/issue39158> ___ ___ Python-bugs-list mailing list Un

[issue38870] Expose ast.unparse in the ast module

2019-12-30 Thread Batuhan
Change by Batuhan : -- pull_requests: +17196 pull_request: https://github.com/python/cpython/pull/17760 ___ Python tracker <https://bugs.python.org/issue38

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Batuhan
Change by Batuhan : -- pull_requests: +17232 pull_request: https://github.com/python/cpython/pull/17797 ___ Python tracker <https://bugs.python.org/issue38

[issue15273] Remove unnecessarily random behavior from test_unparse.py

2020-01-02 Thread Batuhan
Batuhan added the comment: I guess this resolved with PR 17738 -- ___ Python tracker <https://bugs.python.org/issue15273> ___ ___ Python-bugs-list mailin

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Batuhan
Change by Batuhan : -- pull_requests: +17233 pull_request: https://github.com/python/cpython/pull/17798 ___ Python tracker <https://bugs.python.org/issue38

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
New submission from Batuhan : >>> def g(): "abcde"[2:4] ... >>> g.__code__.co_consts (None, 'abcde', 2, 4) to >>> def g(): "abcde"[2:4] ... >>> g.__code__.co_consts (None, 'cd') (I have a patch) -- c

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17265 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17838 ___ Python tracker <https://bugs.python.org/issu

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: We already have a folding operation for Index access ("abcde"[2]) and there was a todo (left by @methane I guess) about supporting other slicings. I think this would look inconsistent if one is support and not the

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: > Then I'd suggest removing the optimization for "abcde"[2], too. I've never > seen this in real code, and I can't come up with a scenario where it would be > performance critical. Remember, one of the goals for CPython is

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: I've scanned stdlib, django and flask and no usage so far. There is one in the test (which basically verifies behavior of slice) and one in the argument clinic which passes the newline for a multiline string. cpython/Tools/clinic/clinic.py:1185 cpython/Lib

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Batuhan
Batuhan added the comment: It looks like we have some usage for normal indexing (not this PR, the original optimization); cpython/cpython/Lib/base64.py:382 cpython/cpython/Lib/base64.py:382 cpython/cpython/Lib/base64.py:393 cpython/cpython/Lib/base64.py:397 cpython/cpython/Lib/pickle.py:306

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Batuhan
Change by Batuhan : -- nosy: +lukasz.langa ___ Python tracker <https://bugs.python.org/issue39220> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-01-05 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya -lukasz.langa ___ Python tracker <https://bugs.python.org/issue39220> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23147] Possible error in _header_value_parser.py

2020-01-06 Thread Batuhan
Batuhan added the comment: This issue looks resolved. -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue23147> ___ ___ Python-bugs-list mailin

[issue22606] Inconsistency between Python 2 and PyPy regarding future imports

2020-01-06 Thread Batuhan
Batuhan added the comment: I guess this issue expired (due to python2). -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue22606> ___ ___ Pytho

[issue29154] 5 failures in test_doctest: ModuleNotFoundError: No module named 'IPython'

2020-01-06 Thread Batuhan
Batuhan added the comment: @Gerrit.Holl do you able to reproduce this with a clean python installation, as @eric.snow suggested there is a chance that some kind of pth hack that tried to inject ipython etc. -- nosy: +BTaskaya ___ Python tracker

[issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks()

2020-01-06 Thread Batuhan
Batuhan added the comment: Anything left on this issue, PR 14680 looks resolved this issue. -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue37

[issue36553] inspect.is_decorator_call(frame)

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

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

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

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Batuhan
Batuhan added the comment: ExtSlice nodes without second value doesn't roundtrip properly source: x[1:2,] Expr( value=Subscript( value=Name(id='x', ctx=Load()), -slice=ExtSlice( -dims=[ -

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Batuhan
Change by Batuhan : -- pull_requests: +17302 pull_request: https://github.com/python/cpython/pull/17892 ___ Python tracker <https://bugs.python.org/issue38

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Batuhan
Batuhan added the comment: We might need to tweak the documentation @pablogsal, > Unparse an ast.AST object and generate a string with code that would produce > an equivalent ast.AST object if parsed back with ast.parse(). If I interpret `equivalent` correctly, this explanation is

[issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py

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

[issue28002] ast.unparse can't roundtrip some f-strings

2020-01-08 Thread Batuhan
Change by Batuhan : -- components: +Library (Lib) -Demos and Tools title: Some f-strings do not round trip through Tools/parser/test_unparse.py -> ast.unparse can't roundtrip some f-strings versions: +Python 3.9 -Python 3.7, Python 3.8 __

[issue39290] lib2to3.fixes.fix_import: support imports_as_name in traverse_imports

2020-01-10 Thread Batuhan
New submission from Batuhan : I've been working on custom lib2to3 fixers and I use some of the already definied utilites inside the fixers. But traverse_imports can't traverse from import names, which is pretty simple and straight forward to implement. -- messages: 3

[issue39290] lib2to3.fixes.fix_import: support imports_as_name in traverse_imports

2020-01-10 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17944 ___ Python tracker <https://bugs.python.org/issu

[issue39292] syslog constants behind rfc

2020-01-10 Thread Batuhan
Batuhan added the comment: @vinay.sajip PR 17945 looks resolved this, can this issue be closed? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue39

[issue19557] ast - docs for every node type are missing

2020-01-10 Thread Batuhan
Batuhan added the comment: @pablogsal is working on documenting nodes (not every node type that exists, the ones that aren't deprecated) in PR 17812 -- nosy: +BTaskaya, pablogsal ___ Python tracker <https://bugs.python.org/is

[issue21498] configparser accepts keys beginning with comment_chars when writing

2020-01-11 Thread Batuhan
Batuhan added the comment: Any update on this? Discussion over Python-Dev looks like finished without a consensus/resolution. -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue21

[issue23139] syntax diagram after EBNF description?

2020-01-11 Thread Batuhan
Batuhan added the comment: I am not sure but I suspect it would look to complex to a reader if all grammar visualized. -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue23

[issue39311] difflib pathlike support for {unified, context}_diff() {from, to}file

2020-01-12 Thread Batuhan
New submission from Batuhan : >>> tuple(difflib.context_diff(["abc"], ["bcd"], fromfile=Path("example.py"))) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/difflib.py", line 1254, in context

[issue39313] lib2to3 RefactoringTool python_grammar_no_print_and_exec_statement

2020-01-12 Thread Batuhan
New submission from Batuhan : issue 23896 introduced a grammar without print and exec statements (they both are functions now) but both the lib2to3 cli script and RefactoringTool lacks of that functionality (which is pretty useful for outside users of lib2to3 like formatters

[issue39313] lib2to3 RefactoringTool python_grammar_no_print_and_exec_statement

2020-01-12 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17375 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17967 ___ Python tracker <https://bugs.python.org/issu

[issue39290] lib2to3.fixes.fix_import: support imports_as_name in traverse_imports

2020-01-12 Thread Batuhan
Change by Batuhan : -- components: +2to3 (2.x to 3.x conversion tool) versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue39290> ___ ___ Pytho

[issue39290] lib2to3.fixes.fix_import: support imports_as_name in traverse_imports

2020-01-12 Thread Batuhan
Change by Batuhan : -- nosy: +benjamin.peterson ___ Python tracker <https://bugs.python.org/issue39290> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39313] lib2to3 provide a way to use exec as a function in RefactoringTool

2020-01-12 Thread Batuhan
Batuhan added the comment: After discussing with @pablogsal, instead of offering 2 options that one overlaps another we added -e option to 2to3.main and exec_function option (alongside print_funtion) to RefactoringTool. -- nosy: +pablogsal title: lib2to3 RefactoringTool

[issue39411] pyclbr rewrite on AST

2020-01-21 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17491 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18103 ___ Python tracker <https://bugs.python.org/issu

[issue39411] pyclbr rewrite using AST

2020-01-22 Thread Batuhan
Batuhan added the comment: Thanks for the suggestions Terry, I didn't want to change any behavior or make any feature addition (except is_async as stated in issue description) in this PR. > The change is needed 2 other places. Could be part of this PR or another one. I have a fr

[issue39463] ast.Constant, bytes, and ast.unparse

2020-01-27 Thread Batuhan
Batuhan added the comment: Origin of this thread: https://github.com/simonpercivall/astunparse/pull/44 -- nosy: +BTaskaya, pablogsal ___ Python tracker <https://bugs.python.org/issue39

[issue39463] ast.Constant, bytes, and ast.unparse

2020-01-27 Thread Batuhan
Batuhan added the comment: > Maybe we need to clarify to the docs of 'unparse' that the AST object needs > to be valid. As I stated earlier, constant tuple like things are valid but don't fit on description. Maybe we should only offically allow things that can be genera

[issue39474] col_offset for parenthesized expressions looks weird on attribute access

2020-01-28 Thread Batuhan
New submission from Batuhan : Python 3.9.0a2+ (heads/master:65ecc390c1, Jan 26 2020, 15:39:11) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> source = "(2

[issue39474] col_offset for parenthesized expressions looks weird

2020-01-28 Thread Batuhan
Change by Batuhan : -- title: col_offset for parenthesized expressions looks weird on attribute access -> col_offset for parenthesized expressions looks weird type: -> behavior ___ Python tracker <https://bugs.python.org/i

[issue39520] AST Unparser can't unparse ext slices correctly

2020-02-01 Thread Batuhan
New submission from Batuhan : (this issue has already a PR for ast.unparse) >>> from __future__ import annotations >>> import ast >>> x: Tuple[1:2,] = 3 >>> __annotations__["x"] 'Tuple[1:2]' >>> ast.dump(ast.parse("Tuple[

[issue39520] AST Unparser can't unparse ext slices correctly

2020-02-01 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +17681 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18304 ___ Python tracker <https://bugs.python.org/issu

[issue39522] AST Unparser with unicode kinded constants

2020-02-01 Thread Batuhan
New submission from Batuhan : >>> from __future__ import annotations >>> import ast >>> x: u"a" = 3 >>> __annotations__["x"] "'a'" >>> ast.dump(ast.parse(__annotations__["x"])) == ast.dump(ast.parse(

[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-18 Thread Batuhan
Batuhan added the comment: What about adding visit_Constant to NodeVisitor for at least one relase period and call visit_Str, visit_Num etc? -- nosy: +BTaskaya ___ Python tracker <https://bugs.python.org/issue36

[issue36962] Cant sort ModuleInfo instances

2019-05-18 Thread Batuhan
New submission from Batuhan : I can't sort the result of iter_modules; >>> import random, pkgutil >>> modules = list(pkgutil.iter_modules(None)) >>> random.shuffle(modules) >>> sorted(modules) Traceback (most recent call last): File ""

[issue36962] Cant sort ModuleInfo instances

2019-05-18 Thread Batuhan
Batuhan added the comment: I think dataclasses can be used to do it with order, frozen true parameters. Also a __getitem__ is required for doesnt break anything. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36962] Cant sort ModuleInfo instances

2019-05-18 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +13325 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36962> ___ ___ Python-

<    1   2   3   4   5   6   7   8   9   >