Change by Batuhan Taskaya :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue43417>
___
___
Pyth
New submission from Batuhan Taskaya :
Previously:
>>> import ast
>>> ast.unparse(ast.parse("lambda: 'hey!'"))
"lambda : 'hey!'"
Expected:
>>> import ast
>>> ast.unparse(ast.parse("lambda: 'hey!'&qu
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +24653
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26000
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
I've implemented a new revision that works without making slices hashable.
Updating PR 23496
--
___
Python tracker
<https://bugs.python.org/is
Change by Batuhan Taskaya :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue44081>
___
___
Pyth
New submission from Batuhan Taskaya :
This issue is for tracking possible places where we could generate better code
on ast.unparse (better as in more closely to what people are actually writing
than our naive implementation).
Examples;
>>> import ast
>>> ast.unparse(
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +24790
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26156
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue44187>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Batuhan Taskaya :
Since strings are immutable types, we could fold some operation on top of them.
Serhiy has done some work on issue 28307 regarding folding `str % args`
combination, which I think we can extend even further. One simple example that
I daily encounter is
Batuhan Taskaya added the comment:
> May I ask, is this going forward? I installed 3.11-dev, it's not there
> (though __future__ claims it should be). I understand if it isn't done yet,
> just want to know if there's risk it will be postponed again (or even give
Batuhan Taskaya added the comment:
> We should check on a real-world benchmark instead of a micro benchmark.
It is a pretty-targeted optimization, so I don't expect it to speed up the
macro benchmarks. Though that shouldn't be a blocker for small, targeted
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue44207>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
> 1. It can be a str subclass with an overridden __format__. In this case the
> result will be different.
Thanks! Though this should be possible to do, so not a blocker for suggestion
(if I am not missing something)
> 2. If it is a str subclass w
Change by Batuhan Taskaya :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue44273>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
I think this is a duplicate of issue 44273.
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue44
Change by Batuhan Taskaya :
--
components: +Interpreter Core -None
priority: low -> normal
title: Compiling evil ast crashes interpreter -> Compiling recursive Python
ASTs crash the interpreter
versions: +Python 3.11, Python 3.9
___
Python t
Change by Batuhan Taskaya :
--
pull_requests: +25116
pull_request: https://github.com/python/cpython/pull/26522
___
Python tracker
<https://bugs.python.org/issue11
New submission from Batuhan Taskaya :
import foo
def func():
return foo.bar()
The snippet above will generate the following code;
2 0 LOAD_GLOBAL 0 (foo)
2 LOAD_METHOD 1 (bar)
4 CALL_METHOD 0
6
Batuhan Taskaya added the comment:
@mark.shannon what do you think about doing this both for `import ` and
`from import `. It will definitely simplify the
implementation (no need to extra visitors or flags, just using the default
DEF_IMPORT one
https://github.com/isidentical/cpython
Batuhan Taskaya added the comment:
> Batuhan, can you take a look?
Yes.
--
___
Python tracker
<https://bugs.python.org/issue11105>
___
___
Python-bugs-lis
Change by Batuhan Taskaya :
--
nosy: +lukasz.langa
priority: normal -> release blocker
resolution: fixed ->
stage: resolved ->
status: closed -> open
___
Python tracker
<https://bugs.python
Batuhan Taskaya added the comment:
> The stack size for a window build is currently set to 2MB, which is usually
> lesser than *nix 8MB. So I think an easy solution is to increase the stack
> size for windows builds.
> I'm guessing release builds aren't affect
Change by Batuhan Taskaya :
--
pull_requests: +25137
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26550
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
pull_requests: +25141
pull_request: https://github.com/python/cpython/pull/26554
___
Python tracker
<https://bugs.python.org/issue11
Batuhan Taskaya added the comment:
After playing with it for a couple hours and without much success of creating a
test environment (only using buildbots), I decided not to introduce hard
limits. Even though they make the original tests to pass, they don't solve the
problem overall and
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
nosy_count: 10.0 -> 11.0
pull_requests: +25148
pull_request: https://github.com/python/cpython/pull/26550
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
New changeset e58d762c1fb4ad5e021d016c80c2bc4513632d2f by Batuhan Taskaya in
branch 'main':
bpo-11105: reduce the recursion limit for tests (GH-26550)
https://github.com/python/cpython/commit/e58d762c1fb4ad5e021d016c80c2bc
Change by Batuhan Taskaya :
--
pull_requests: +25187
pull_request: https://github.com/python/cpython/pull/26604
___
Python tracker
<https://bugs.python.org/issue11
Change by Batuhan Taskaya :
--
pull_requests: +25188
pull_request: https://github.com/python/cpython/pull/26605
___
Python tracker
<https://bugs.python.org/issue11
Change by Batuhan Taskaya :
--
pull_requests: +25190
pull_request: https://github.com/python/cpython/pull/26607
___
Python tracker
<https://bugs.python.org/issue11
Batuhan Taskaya added the comment:
New changeset 8004c4570b1d1277ea8754e22b5eb60e63f5026c by Batuhan Taskaya in
branch 'main':
bpo-11105: document the new test.support.infinite_recursion context manager
(GH-26604)
https://github.com/python/cpyt
Batuhan Taskaya added the comment:
New changeset bd6f0d3eadfe5623657db6aeb69b94d21f86f4a0 by Batuhan Taskaya in
branch '3.10':
[3.10] bpo-11105: reduce the recursion limit for tests. (GH-26607)
https://github.com/python/cpython/commit/bd6f0d3eadfe5623657db6aeb69b94
Batuhan Taskaya added the comment:
New changeset 87f502231c6d5b04a4d8aa23fba24fcf5303aebb by Batuhan Taskaya in
branch '3.9':
[3.9] bpo-11105: reduce the recursion limit for tests. (GH-26605)
https://github.com/python/cpython/commit/87f502231c6d5b04a4d8aa23fba24f
Batuhan Taskaya added the comment:
The issue has been solved, all buildbots should now pass. Will continue to
monitor the situation. Thanks for the report @kj!
--
priority: release blocker ->
resolution: -> fixed
status: open ->
Change by Batuhan Taskaya :
--
stage: patch review -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.org/issue11105>
___
___
Batuhan Taskaya added the comment:
Mark would you mind sharing your opinions on this:
https://bugs.python.org/issue44313 (should we still keep generating
LOAD_METHOD/CALL_METHOD for potential objects imported through `from x import
y`, or they also generate LOAD_ATTR/CALL_FUNCTION
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +25263
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26677
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
>From what I can share by my experience, this error happens soo much. So I'd
>love to see it.
For a more consistent message with others, maybe it could be something like
this;
SyntaxError: invalid syntax. Maybe you meant to use a different ty
Batuhan Taskaya added the comment:
New changeset 35ad425866d591c33d7f2be2b9da8bce2bff9523 by Batuhan Taskaya in
branch 'main':
bpo-40528: Implement a metadata system for ASDL Generator (GH-20193)
https://github.com/python/cpython/commit/35ad425866d591c33d7f2be2b9da8b
Change by Batuhan Taskaya :
--
pull_requests: +25435
pull_request: https://github.com/python/cpython/pull/26858
___
Python tracker
<https://bugs.python.org/issue40
New submission from Batuhan Taskaya :
It is a common scenario to make calls with only constant arguments (e.g to
datetime.datetime/os.path.join/re.match.group/nox.session.run etc) and the
bytecode that we currently generate looks like this;
f(1,2,3,4,5,6)
1 0 LOAD_NAME
Batuhan Taskaya added the comment:
> I already experimented with this in issue33325. It does not worth an effort.
Yea, that is what the results for the CFG optimization shows to me (1.13x at
best, ~1.03x in real cases).
> For optimizing calls with constant arguments, it look
Batuhan Taskaya added the comment:
Here is my branch for the reference (I didn't worked on about it much, so still
lacks some error handling etc);
https://github.com/isidentical/cpython/blob/b556d1172b08c65b88093f7ff1dadc985ce72f62/Python/ast_opt.c#L634
Batuhan Taskaya added the comment:
New changeset 6c76df2b86d742cc294beae7f9b6bafabb946ad5 by Batuhan Taskaya in
branch 'main':
bpo-40528: move asdl identifier collection to the new metadata system (GH-26858)
https://github.com/python/cpython/commit/6c76df2b86d742cc294beae7f9b6ba
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +25477
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26901
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
I've tested this with pyperformance, and no significant (1.02 faster on some,
1.01x slower on others, nothing significant) change on those so this is a
targeted optimization.
--
___
Python tracker
&
Batuhan Taskaya added the comment:
There are multiple issues with doing 'static' loop invariant code motion in
python, but the most obvious one is how would you detect if anything in the
body is related to the loop or not? The trivial way that the compiled languages
do this optim
Change by Batuhan Taskaya :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Batuhan Taskaya :
--
pull_requests: +25491
pull_request: https://github.com/python/cpython/pull/26918
___
Python tracker
<https://bugs.python.org/issue40
Batuhan Taskaya added the comment:
New changeset 107a2c59c91b3911bdd6dfdb83271c588c506a5a by Batuhan Taskaya in
branch 'main':
bpo-40528: fix is_simple(sum)s behavior for attributes (GH-26918)
https://github.com/python/cpython/commit/107a2c59c91b3911bdd6dfdb83271c
Batuhan Taskaya added the comment:
These were all the cleanups on my checklist, so can close the issue now. I'll
probably create other issues if something additional comes up
--
resolution: -> fixed
stage: patch review -> resolved
status: ope
Change by Batuhan Taskaya :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Batuhan Taskaya :
--
pull_requests: +25545
pull_request: https://github.com/python/cpython/pull/26983
___
Python tracker
<https://bugs.python.org/issue44
Batuhan Taskaya added the comment:
New changeset 0d7f61ddb074659d8c18c8f5ac86a6a18e41f9e5 by Batuhan Taskaya in
branch 'main':
bpo-44313: bump up magic (#26983)
https://github.com/python/cpython/commit/0d7f61ddb074659d8c18c8f5ac86a6
Change by Batuhan Taskaya :
--
pull_requests: +25557
pull_request: https://github.com/python/cpython/pull/26997
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
> I am still not sure that it is worth to add 50 lines of the C code to
> optimize 0.7% of calls.
As I stated, the reason that this is 'relatively' lower is that there are just
too many calls, so it just allocates a rather small part
Batuhan Taskaya added the comment:
> BTW, why do you not fold 2-argument calls?
Seems like it is making stuff worse.
> I suspect that in most of other examples the function execution time is too
> large to make the optimization meaningful.
This is (to some extent) a constant fol
Change by Batuhan Taskaya :
--
pull_requests: +25571
pull_request: https://github.com/python/cpython/pull/27011
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25574
pull_request: https://github.com/python/cpython/pull/27015
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25597
pull_request: https://github.com/python/cpython/pull/27037
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25624
pull_request: https://github.com/python/cpython/pull/27074
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25664
pull_request: https://github.com/python/cpython/pull/27117
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25669
pull_request: https://github.com/python/cpython/pull/27126
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
New changeset 9af34c935185eca497617a216d141c72ffaeae9c by Batuhan Taskaya in
branch 'main':
bpo-20201: variadic arguments support for AC (GH-18609)
https://github.com/python/cpython/commit/9af34c935185eca497617a216d141c72ffaeae9c
-
Change by Batuhan Taskaya :
--
Removed message: https://bugs.python.org/msg397638
___
Python tracker
<https://bugs.python.org/issue20201>
___
___
Python-bug
Batuhan Taskaya added the comment:
New changeset f88e138a1aa3b9a9e013963e4fd7d5cce6a0b85c by Ken Jin in branch
'main':
bpo-20291: Fix MSVC warnings in getargs.c (GH-27211)
https://github.com/python/cpython/commit/f88e138a1aa3b9a9e013963e4fd7d5
Change by Batuhan Taskaya :
--
pull_requests: +25758
pull_request: https://github.com/python/cpython/pull/27217
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
New changeset a045991f60b51636a784623dda7ad84b5b2c6b73 by Batuhan Taskaya in
branch 'main':
bpo-42355: symtable.get_namespace() now checks whether there are multiple or
any namespaces found (GH-23278)
https://github.com/python/cpyt
Change by Batuhan Taskaya :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Batuhan Taskaya :
--
type: security -> behavior
___
Python tracker
<https://bugs.python.org/issue42355>
___
___
Python-bugs-list mailing list
Un
Change by Batuhan Taskaya :
--
pull_requests: +25858
pull_request: https://github.com/python/cpython/pull/27313
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25879
pull_request: https://github.com/python/cpython/pull/27336
___
Python tracker
<https://bugs.python.org/issue43
Change by Batuhan Taskaya :
--
pull_requests: +25880
pull_request: https://github.com/python/cpython/pull/27337
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
New changeset ef8b8535cb3cd705392af9b927d6ff336d98427d by Batuhan Taskaya in
branch 'main':
bpo-43950: check against the raw string, not the pyobject (GH-27337)
https://github.com/python/cpython/commit/ef8b8535cb3cd705392af9b927d6ff
Batuhan Taskaya added the comment:
New changeset 4f5980a4f57dab68b9137304f58bd08891d43d5a by Batuhan Taskaya in
branch 'main':
bpo-43950: support long lines in traceback.py (GH-27336)
https://github.com/python/cpython/commit/4f5980a4f57dab68b9137304f58bd0
Change by Batuhan Taskaya :
--
pull_requests: +25882
pull_request: https://github.com/python/cpython/pull/27339
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
There is a subtle difference between traceback.py and Python/traceback.c which
makes the latter (C version) output the line without trimming the trailing
whitespace. The Python version simply uses `.strip()` which strips both the
left (starting) and right
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue44825>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
@samuelmarks can you share the full reproducer / AST and what you expect it to
be unparsed? (you can use gist or other pasting services if it is too big)
--
___
Python tracker
<https://bugs.python.org/issue44
Batuhan Taskaya added the comment:
> Which for some reason has made the `annotation` a `str` rather than `Name`.
> So I think it's my bug then?
Yes, from what I can see it is a bug in your code.
> body=[AnnAssign(annotation='int',
The 'annotation
Batuhan Taskaya added the comment:
See: https://github.com/python/cpython/pull/17776
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue44
Batuhan Taskaya added the comment:
AFAIK this is already resolved on the main (https://bugs.python.org/issue42725)
--
___
Python tracker
<https://bugs.python.org/issue42
Batuhan Taskaya added the comment:
I don't think this is really an issue considering some other functionalities
that consumes AST code (e.g `compile`) will expect it to be annotated with
location metadata. This is why the `ast` module already comes bundled with a
utility function c
Change by Batuhan Taskaya :
--
keywords: +patch
pull_requests: +26245
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27770
___
Python tracker
<https://bugs.python.org/issu
Change by Batuhan Taskaya :
--
pull_requests: +26581
pull_request: https://github.com/python/cpython/pull/28142
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
New changeset 85ea2d6165dec0cffa6302eb6dc40406eae1edf5 by Batuhan Taskaya in
branch 'main':
bpo-43950: support positions for dis.Instructions created through dis.Bytecode
(GH-28142)
https://github.com/python/cpyt
Change by Batuhan Taskaya :
--
pull_requests: +26588
pull_request: https://github.com/python/cpython/pull/28150
___
Python tracker
<https://bugs.python.org/issue43
Batuhan Taskaya added the comment:
Does find_imports/find_store_names have to be public? I think the relocation is
fine, but making them public without any use case from outside can be avoided
at least for now.
--
nosy: +BTaskaya
___
Python
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue45408>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
I've found 81 occurrences of this pattern among 52 projects on a dataset of top
PyPI packages (~3.5K). So I'd say +1 on including this.
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.o
Batuhan Taskaya added the comment:
> Result of `255581293 > 12938373 and 113314 < 2`:
Is there a similar pattern that happens a lot on the client code? The AST
optimizer currently only optimizes common cases.
--
nosy: +BTaskaya, pablogsal, serhiy.
Batuhan Taskaya added the comment:
We just rejected the same issue 2 days ago. If you feel very strong about this;
instead of creating new ticket in the same place, you might want to try
python-dev instead.
Re: the todo comment, feel free to send a patch that removes it. I don't
Batuhan Taskaya added the comment:
See: https://bugs.python.org/issue42282
and the reason for not backporting this:
https://bugs.python.org/issue42282#msg380506
--
components: +Interpreter Core -Parser
nosy: +BTaskaya
resolution: -> duplicate
stage: -> resolved
status
Batuhan Taskaya added the comment:
After PR 17302 is accepted, I'll work on refactorings including a precedence
algorithm to find when to parentheses.
--
nosy: +Batuhan Taskaya
___
Python tracker
<https://bugs.python.org/is
New submission from Batuhan Taskaya :
pyclbr currently uses token streams to analyze but it can be alot simpler with
usage of AST. There are already many flaws, including some comments about
limitations of this token stream processing.
I have a draft about this. Initial PR wont change any
Change by Batuhan Taskaya :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue39411>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Batuhan Taskaya :
--
nosy: +BTaskaya
___
Python tracker
<https://bugs.python.org/issue39576>
___
___
Python-bugs-list mailing list
Unsubscribe:
Batuhan Taskaya added the comment:
> Are you going to work on a patch then, Batuhan?
Serhiy already submitted a PR, which looks great.
--
___
Python tracker
<https://bugs.python.org/issu
Batuhan Taskaya added the comment:
> Isn't children annotated as List in typeshed?
Yes, lib2to3.pytree.Base.children is annotated as a list of (Node or Leafs)
https://github.com/python/typeshed/blob/ea0a9c2bd6f6a69c3e49b47870e0109d98316fc6/stdlib/2and3/lib2to3/pytree.pyi#L23
---
Batuhan Taskaya added the comment:
> 1) We should document possible exceptions that need to be caught. So far,
> I've found TypeError, MemoryError, SyntaxError, ValueError.
Maybe we should wrap all of these into something like LiteralEvalError to
easily catch all of them, Liter
301 - 400 of 891 matches
Mail list logo