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
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
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
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
Change by Batuhan :
--
components: +Library (Lib)
nosy: +levkivskyi
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue39019>
___
___
Pytho
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
Change by Batuhan :
--
pull_requests: +17032
pull_request: https://github.com/python/cpython/pull/17560
___
Python tracker
<https://bugs.python.org/issue39
Change by Batuhan :
--
pull_requests: +17033
pull_request: https://github.com/python/cpython/pull/17561
___
Python tracker
<https://bugs.python.org/issue39
Change by Batuhan :
--
pull_requests: +17035
pull_request: https://github.com/python/cpython/pull/17563
___
Python tracker
<https://bugs.python.org/issue39
Change by Batuhan :
--
pull_requests: +17076
pull_request: https://github.com/python/cpython/pull/16620
___
Python tracker
<https://bugs.python.org/issue32
Change by Batuhan :
--
pull_requests: +17084
pull_request: https://github.com/python/cpython/pull/17612
___
Python tracker
<https://bugs.python.org/issue38
Change by Batuhan :
--
pull_requests: +17085
pull_request: https://github.com/python/cpython/pull/17613
___
Python tracker
<https://bugs.python.org/issue38
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ı:
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
Change by Batuhan :
--
pull_requests: +17129
pull_request: https://github.com/python/cpython/pull/17661
___
Python tracker
<https://bugs.python.org/issue38
Change by Batuhan :
--
pull_requests: +17128
pull_request: https://github.com/python/cpython/pull/17660
___
Python tracker
<https://bugs.python.org/issue38
Change by Batuhan :
--
pull_requests: +17130
pull_request: https://github.com/python/cpython/pull/17662
___
Python tracker
<https://bugs.python.org/issue32
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
Change by Batuhan :
--
nosy: +BTaskaya, pablogsal
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue23868>
___
___
Python-bugs-list mai
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
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
<
Batuhan added the comment:
I agree, can be closed
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue33772>
___
___
Python-bugs-list mailin
Change by Batuhan :
--
nosy: +BTaskaya, vstinner
___
Python tracker
<https://bugs.python.org/issue36051>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan :
--
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue36051>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
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.
--
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
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
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
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
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
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
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
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
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
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#
Change by Batuhan :
--
pull_requests: +17163
pull_request: https://github.com/python/cpython/pull/17719
___
Python tracker
<https://bugs.python.org/issue38
Change by Batuhan :
--
pull_requests: +17165
pull_request: https://github.com/python/cpython/pull/17719
___
Python tracker
<https://bugs.python.org/issue22
Change by Batuhan :
--
pull_requests: -17163
___
Python tracker
<https://bugs.python.org/issue38731>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan added the comment:
Is this related/resolved with issue 36048?
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue32438>
___
___
Pytho
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
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
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
Change by Batuhan :
--
versions: +Python 3.9 -Python 3.2, Python 3.3
___
Python tracker
<https://bugs.python.org/issue11105>
___
___
Python-bugs-list mailin
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
Batuhan added the comment:
@nicdumz are you still interested in this issue?
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue5851>
___
___
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
Change by Batuhan :
--
nosy: +BTaskaya
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue39158>
___
___
Python-bugs-list mailing list
Un
Change by Batuhan :
--
pull_requests: +17196
pull_request: https://github.com/python/cpython/pull/17760
___
Python tracker
<https://bugs.python.org/issue38
Change by Batuhan :
--
pull_requests: +17232
pull_request: https://github.com/python/cpython/pull/17797
___
Python tracker
<https://bugs.python.org/issue38
Batuhan added the comment:
I guess this resolved with PR 17738
--
___
Python tracker
<https://bugs.python.org/issue15273>
___
___
Python-bugs-list mailin
Change by Batuhan :
--
pull_requests: +17233
pull_request: https://github.com/python/cpython/pull/17798
___
Python tracker
<https://bugs.python.org/issue38
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
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
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
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
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
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
Change by Batuhan :
--
nosy: +lukasz.langa
___
Python tracker
<https://bugs.python.org/issue39220>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan :
--
nosy: +BTaskaya -lukasz.langa
___
Python tracker
<https://bugs.python.org/issue39220>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan added the comment:
This issue looks resolved.
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue23147>
___
___
Python-bugs-list mailin
Batuhan added the comment:
I guess this issue expired (due to python2).
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue22606>
___
___
Pytho
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
Batuhan added the comment:
Anything left on this issue, PR 14680 looks resolved this issue.
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue37
Change by Batuhan :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue36553>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Batuhan :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue12782>
___
___
Python-bugs-list mailing list
Unsubscribe:
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=[
-
Change by Batuhan :
--
pull_requests: +17302
pull_request: https://github.com/python/cpython/pull/17892
___
Python tracker
<https://bugs.python.org/issue38
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
Change by Batuhan :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue28002>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
__
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
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
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
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
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
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
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
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
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
Change by Batuhan :
--
components: +2to3 (2.x to 3.x conversion tool)
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue39290>
___
___
Pytho
Change by Batuhan :
--
nosy: +benjamin.peterson
___
Python tracker
<https://bugs.python.org/issue39290>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
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[
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
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(
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
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 ""
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
Change by Batuhan :
--
keywords: +patch
pull_requests: +13325
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36962>
___
___
Python-
101 - 200 of 891 matches
Mail list logo