Pablo Galindo Salgado added the comment:
I have created PR13959 in case we decide to go with the PyCode_NewEx path.
--
keywords: -patch
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
nosy: +scoder
___
Python tracker
<https://bugs.python.org/issue37221>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +13836
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13969
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
> You already broke backwards compatibility once in beta1
There is one other thing to consider, that is projects with pinned dependencies
will have to upgrade to the last Cython and update their generated sources if
we don't do the renaming.
Pablo Galindo Salgado added the comment:
I updated the PR and Victor reviewed it. Nick, could you review it as well?
--
___
Python tracker
<https://bugs.python.org/issue37
Pablo Galindo Salgado added the comment:
Adding Petr, that was involved with the "tp_print" to "tp_vectorcall" renaming.
--
nosy: +petr.viktorin
___
Python tracker
<https://bug
New submission from Pablo Galindo Salgado :
Please, can you add some text with an explanation ?
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue37
Pablo Galindo Salgado added the comment:
Yep, will make a PR soon.
--
___
Python tracker
<https://bugs.python.org/issue37268>
___
___
Python-bugs-list mailin
Pablo Galindo Salgado added the comment:
New changeset 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 by Pablo Galindo in
branch 'master':
bpo-37213: Handle negative line deltas correctly in the peephole optimizer
(GH-13969)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
Should we backport this to 3.7 as well?
--
___
Python tracker
<https://bugs.python.org/issue37213>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
> Not unless someone can show how this is a major problem in 3.7
I would say is not a major problem in 3.7
I will close the issue then. Thanks everyone who participated!
--
resolution: -> fixed
stage: patch review -> resolved
sta
New submission from Pablo Galindo Salgado :
The peephole optimizer currently does not optimize the result of its own
optimization when its possible. For example, consider the following code:
if a:
if b:
if (c or d):
foo()
else:
bar
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +13927
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14068
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue37271>
___
___
Python-bugs-list mailing list
Unsub
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +13929
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14071
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue37269>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pablo Galindo Salgado added the comment:
New changeset 05f831865545b08c9a21cfb7773af58b76ec64cb by Pablo Galindo in
branch 'master':
bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)
https://github.com/python/cpython/commit/05f831865545b08c9a21cfb7773af5
Change by Pablo Galindo Salgado :
--
pull_requests: +13931
pull_request: https://github.com/python/cpython/pull/14073
___
Python tracker
<https://bugs.python.org/issue37
Pablo Galindo Salgado added the comment:
Thanks, Marius for the report!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
New changeset 5292179afc6fd0dc533add054d4790773c9766d0 by Pablo Galindo in
branch '3.7':
[3.7] bpo-37269: Correctly optimise conditionals with constant booleans
(GH-14071) (GH-14073)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
Thanks for the report. I will investigate, but given that the fix just
optimizes bytecode as it was done in 3.7, and this is a picke failure, it seems
that is likely that some data may need to be regenerated in Cython?
Stephan probably can confirm
Pablo Galindo Salgado added the comment:
I reverted 3498c642f4e83f3d8e2214654c0fa8e0d51cebe5 and tried to build cython
and numpy an it fails for me still:
> git log
commit 17e024a1a999f96fee52e99bd4587da383647993 (HEAD -> master)
Author: Pablo Galindo
Date: Sat Jun 15 10:16:52 2019
Change by Pablo Galindo Salgado :
--
title: regression in cython due to peephole optomization -> regression in
Cython when pickling objects
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
Did you open a bug in the Cython tracker?
--
___
Python tracker
<https://bugs.python.org/issue37289>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
I tried to compile numpy with python3.8 alpha 4 and Cython master and still
fails:
~/github/numpy master ✔
❯ ~/github/cpython/python.exe --version
Python 3.8.0a4
~/github/numpy master ✔
❯ ~/github/cpython/python.exe -m pip freeze
/Users/pgalindo3
Pablo Galindo Salgado added the comment:
I have compiled CPython master, install the current Cython on pypi (not Cython
master) and tried to compile numpy and it succeeds. This seems that is
something on Cython master.
~/github/numpy master ✔
~/github/cpython/python.exe --version
Python
Change by Pablo Galindo Salgado :
--
Removed message: https://bugs.python.org/msg345668
___
Python tracker
<https://bugs.python.org/issue37289>
___
___
Python-bug
Change by Pablo Galindo Salgado :
--
Removed message: https://bugs.python.org/msg345665
___
Python tracker
<https://bugs.python.org/issue37289>
___
___
Python-bug
Change by Pablo Galindo Salgado :
--
Removed message: https://bugs.python.org/msg345663
___
Python tracker
<https://bugs.python.org/issue37289>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
[I have deleted some comments claiming that I was not able to reproduce the
issue because I managed to reproduce the issue correctly at the end]
--
___
Python tracker
<https://bugs.python.org/issue37
Pablo Galindo Salgado added the comment:
I managed to find the original cause, although I don't understand exactly why
it happens. The error is caused by the 'if False' handling of
https://github.com/python/cpython/pull/13332. There is some failure in that
logic, so for
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +13954
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14099
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
I was not able to find it in Cython but PR14099 fixes it so I prefer to revert
the optimization for now and then try to add it back once we understand what's
failing exactly.
--
___
Python tracker
&
Change by Pablo Galindo Salgado :
--
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue37289>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
New changeset 7a68f8c28bb78d957555a5001dac4df6345434a0 by Pablo Galindo in
branch 'master':
bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099)
https://github.com/python/cpython/commit/7a68f8c28bb78d957555
Pablo Galindo Salgado added the comment:
Serhiy, this is the code that was incorrectly optimized:
3 0 LOAD_GLOBAL 0 (g)
2 LOAD_ATTR1 (__code__)
4 POP_JUMP_IF_FALSE8
6 JUMP_FORWARD 4 (to 12
Pablo Galindo Salgado added the comment:
Just to be clear, before PR14099, the code was wrongly optimized to:
3 0 LOAD_GLOBAL 0 (g)
2 LOAD_ATTR1 (__code__)
4 POP_JUMP_IF_FALSE8
6 JUMP_FORWARD
Pablo Galindo Salgado added the comment:
New changeset 284daeade210d3aac049f4278a1fb76d19e6d78a by Pablo Galindo (Miss
Islington (bot)) in branch '3.8':
bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099)
(GH-14112)
https://github.com/p
Pablo Galindo Salgado added the comment:
New changeset 81fecf7b7a6e766a213c6e670219c1da52461589 by Pablo Galindo (Miss
Islington (bot)) in branch '3.7':
bpo-37289: Remove 'if False' handling in the peephole optimizer (GH-14099)
(GH-14111)
https://github.com/p
Pablo Galindo Salgado added the comment:
Sure, will do.
How you think we should handle this particular optimization? Do you see a more
resilient way of doing this on the peephole optimizer?
--
___
Python tracker
<https://bugs.python.
Pablo Galindo Salgado added the comment:
Would it make sense to put this on the compiler? When we run compile_if we
could check if there is one constant in the test and of the constant is true we
skip the block.
--
___
Python tracker
<ht
Pablo Galindo Salgado added the comment:
We can add a #define for a maximum numbers of iterations. The pyperformance
test suite shows speed ups of 2-3% without PGO/LTO. I will ran more concise
experiments including PGO but even with a max cap of iterations (10 in my
experiments) we get nice
Pablo Galindo Salgado added the comment:
Probably is not that easy, but a naive thought respecting loops:
As the peephole optimizer only produces code that is the same length or smaller
and it works by feeling noops and deleting them, the only loop would be code
that is of the same length
Pablo Galindo Salgado added the comment:
>So, we sometimes get faster wordcode but that time it takes to get there is
>longer.
Is worth noting that the (very small) overhead to obtain the wordcode happens
once but the benefits of the resulting opcode will be felt every time you
exec
Change by Pablo Galindo Salgado :
--
pull_requests: +13974
pull_request: https://github.com/python/cpython/pull/14127
___
Python tracker
<https://bugs.python.org/issue37
Pablo Galindo Salgado added the comment:
What do you mean with re-raise? The issue is not closed. If you have some
proposal to overcome the limitations, the best approach is to comment here in
the issue.
--
___
Python tracker
<ht
Pablo Galindo Salgado added the comment:
New changeset 1e61504b8b941494f3ac03e0449ddbbba8960175 by Pablo Galindo in
branch 'master':
bpo-37289: Add a test for if with ifexpr in the peephole optimiser to detect
regressions (GH-14127)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
All the stable 3.x Windows buildbots are failing since
(https://github.com/python/cpython/pull/14139) was merged:
https://buildbot.python.org/all/#/builders/3/builds/3026
https://buildbot.python.org/all/#/builders/40/builds/2621
https
Pablo Galindo Salgado added the comment:
Another failure:
https://buildbot.python.org/all/#/builders/103/builds/2688/steps/6/logs/stdio
==
FAIL: test_list_cases (test.test_regrtest.ArgsTestCase
Change by Pablo Galindo Salgado :
--
pull_requests: +14136
pull_request: https://github.com/python/cpython/pull/14313
___
Python tracker
<https://bugs.python.org/issue35
Pablo Galindo Salgado added the comment:
I have created PR14313 and triggered a custom build from that PR in the
buildbots to confirm our hypothesis.
--
___
Python tracker
<https://bugs.python.org/issue35
Pablo Galindo Salgado added the comment:
Although it can be related, note that the buildbots do indeed delete pyc files.
Check for example
https://buildbot.python.org/all/#/builders/40/builds/2621/steps/2/logs/stdio :
...
Deleting .pyc/.pyo files ...
Deleting test leftovers ...
Using
&q
Pablo Galindo Salgado added the comment:
New changeset 663131a6e2c6c8b83e9f982d8c6ca38fc7c238b4 by Pablo Galindo in
branch 'master':
bpo-35224: Bump the pyc magic number after the change in MAP_ADD (GH-14313)
https://github.com/python/cpython/commit/663131a6e2c6c8b83e9f982d8c6ca3
Pablo Galindo Salgado added the comment:
All buildbots for 3.8 and master are green again :)
--
___
Python tracker
<https://bugs.python.org/issue35224>
___
___
Change by Pablo Galindo Salgado :
--
pull_requests: +14143
pull_request: https://github.com/python/cpython/pull/14319
___
Python tracker
<https://bugs.python.org/issue35
Change by Pablo Galindo Salgado :
--
pull_requests: +14144
pull_request: https://github.com/python/cpython/pull/14320
___
Python tracker
<https://bugs.python.org/issue35
Pablo Galindo Salgado added the comment:
New changeset b3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe by Pablo Galindo in
branch 'master':
bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification
(GH-14320)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
The issue strikes back:
https://buildbot.python.org/all/#/builders/103/builds/2698
--
resolution: fixed ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/i
New submission from Pablo Galindo Salgado :
The test for the queue module are not testing correctly both the C and the
Python implementation of the queue. A consequence is that some errors are being
overseed (like the fact that an AttributeError is used instead of an
ImportError to catch
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +14175
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14351
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
New changeset b51b7137faa22e12c570c70fe0462c662ccd935e by Pablo Galindo in
branch 'master':
bpo-35224: Add What's new entry for evaluation order in dict comprehensions
(GH-14319)
https://github.com/python
Pablo Galindo Salgado added the comment:
New changeset 3f5b9088b0ed08e1442cca37df78f609d5cd8c3c by Pablo Galindo in
branch 'master':
bpo-37394: Fix pure Python implementation of the queue module (GH-14351)
https://github.com/python/cpython/commit/3f5b9088b0ed08e1442cca37df78f6
Change by Pablo Galindo Salgado :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
All the pending work items are added to a call queue that the processes consume
(_add_call_item_to_queue) and the status is set before adding it to said queue
(by calling set_running_or_notify_cancel()). Notice that the fact that
future.running
Change by Pablo Galindo Salgado :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Pablo Galindo Salgado :
--
resolution: fixed ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue37163>
___
___
Pyth
Pablo Galindo Salgado added the comment:
I concur with Andrew
--
___
Python tracker
<https://bugs.python.org/issue37276>
___
___
Python-bugs-list mailin
Change by Pablo Galindo Salgado :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
New changeset d52a83a3d471ff3c7e9ebfa1731765e5334f7c24 by Pablo Galindo
(Zackery Spytz) in branch 'master':
bpo-37419: Fix possible segfaults when passing large sequences to
os.posix_spawn() (GH-14409)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
Hi,
Would you like to do a PR updating it?
--
___
Python tracker
<https://bugs.python.org/issue37456>
___
___
Pytho
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +14420
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14605
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
Ned, I have prepared PR14605 for the 3.7 branch to revert
85ed1712e428f93408f56fc684816f9a85b0ebc0. As this is somehow changing behavior
in the 3.7 series, I think is the best course of action for 3.7.
For 3.8 the proposed way to do this is not using
Pablo Galindo Salgado added the comment:
Ned, I have prepared PR14605 for the 3.7 branch to revert
85ed1712e428f93408f56fc684816f9a85b0ebc0. As this is somehow changing behavior
in the 3.7 series, I think is the best course of action for 3.7.
For 3.8 the proposed way to do this is now using
Change by Pablo Galindo Salgado :
--
Removed message: https://bugs.python.org/msg347367
___
Python tracker
<https://bugs.python.org/issue37500>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
>Before this change, code could have had an unreported SyntaxError, but it was
>code that was being discarded by the optimizer anyway
if __debug__ can a valid form of if 0 and therefore any syntax error will not
be reported until that branch b
Pablo Galindo Salgado added the comment:
> To add to the confusion, the treatment of "if __debug__:" and "if not
> __debug__:" is now asymmetric:
After the code in PR 14116 this becomes:
5 0 LOAD_GLOBAL 0 (print)
2 LOAD_CON
Pablo Galindo Salgado added the comment:
> No tests or jumps at all. That made the optim...
I understand that, but we would need a way of reporting syntax errors in blocks
even if they will not be executed. Although I agree with your analysis,
correctness should be prioritized o
Pablo Galindo Salgado added the comment:
CPython being the reference implementation of Python, people could interpret
that this optimization is part of the language and its behavior should be
mirror in every other implementation. That's why under my understanding,
correctness should a
Pablo Galindo Salgado added the comment:
I have opened a thread in Python dev:
https://mail.python.org/archives/list/python-...@python.org/thread/RHP4LTM4MSTAPJHGMQGGHERYI4PZR23R/
--
___
Python tracker
<https://bugs.python.org/issue37
Pablo Galindo Salgado added the comment:
> CPython has acted the current way for about 15 years (since 2.4 was
> released), and this is the first time anyone has raised an objection.
Although I tend to agree with your words, I have to insist that correctness in
the reference implemen
Pablo Galindo Salgado added the comment:
> In either case, I don't think it should have been applied as is in b2
Just to clarify: this was added before beta2.
--
___
Python tracker
<https://bugs.python.org
Pablo Galindo Salgado added the comment:
> I see optimizing away 'if __debug__: ...' clauses, when __debug__ is False
> (and 0) as currently documented language behavior, not a 'deep implementation
> detail'.
https://docs.python.org/3/reference/simple_stmts.html#
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +14426
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14612
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
Tim, you made very good points in you email to Python-dev. I am convinced that
the better thing to do at this pointis to revert this until we can think this a
bit more :)
I have made a PR to revert the change, could you review it, please
Pablo Galindo Salgado added the comment:
> It's the expected result of fixing a bug _by_ eliminating the optimization
> entirely.
Using jumps is not removing the optimization entirely, is just a weaker and
more incomplete way of doing the same. The optimization introduced the
Pablo Galindo Salgado added the comment:
I think I have found a simple way to make everyone happy: we can add a new
field to the compiler that tells it to not emit bytecode. In this way we can
detect errors by walking the blocks but no bytecode will be emitted.
I have updated PR 14612 to
Pablo Galindo Salgado added the comment:
> So, to my eyes, absolutely nothing of the optimization remained. At least
> not in the example Ned posted here.
This is because his example did not include the changes in PR14116 that
implemente
Pablo Galindo Salgado added the comment:
> Which should be fixed, if possible. But, as damage goes - sorry! - it just
> seems minimal to me.
I think I failed to express myself correctly there :( I have absolutely no
problem with the way that behaves currently, I just wanted to poi
Pablo Galindo Salgado added the comment:
Yep, that is more or less the approach in PR14612. What I tried to achieve
there is also minimize the amount of changes to make the pass for errors non
intrusive.
--
___
Python tracker
<ht
New submission from Pablo Galindo Salgado :
Many functions are significantly slower after commit
aacc77fbd77640a8f03638216fa09372cc21673d was applied:
aacc77fbd77640a8f03638216fa09372cc21673d is the first bad commit
commit aacc77fbd77640a8f03638216fa09372cc21673d
Author: Jeroen Demeyer
Date
Pablo Galindo Salgado added the comment:
I have bisected again and I always get commit
aacc77fbd77640a8f03638216fa09372cc21673d but it would be great if someone can
confirm these results independently.
--
___
Python tracker
<ht
Pablo Galindo Salgado added the comment:
This is the stack difference for my previous experiment:
* frame #0: 0x0001001578ee
python.exe`unicode_length(self=0x00010140d220) at unicodeobject.c:12231:9
frame #1: 0x0001b453 python.exe`PyObject_Size(o=0x00010140d220
Pablo Galindo Salgado added the comment:
Updated stack for the tip of 3.8:
* frame #0: 0x00010015854e
python.exe`unicode_length(self=0x0001014a4040) at unicodeobject.c:12235:9
frame #1: 0x0001a913 python.exe`PyObject_Size(o=0x0001014a4040)
at abstract.c:57:26
Pablo Galindo Salgado added the comment:
>which commits are you comparing exactly? From your explanation, I guess
>aacc77fbd and its parent, but that's not completely fair since PEP 590
>consists of many commits (see #36974). A better comparison would be master
>aga
Change by Pablo Galindo Salgado :
--
title: PEP 590 implementation introduced a performance regression -> PEP 590
implementation may have introduced a performance regression
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +14574
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14778
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
Thanks for the report, Benjamin!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Pablo Galindo Salgado :
--
nosy: +Michael.Felt, pablogsal
___
Python tracker
<https://bugs.python.org/issue37690>
___
___
Python-bugs-list mailin
Change by Pablo Galindo Salgado :
--
nosy: +David.Edelsohn
___
Python tracker
<https://bugs.python.org/issue37690>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
Thanks Anthony Sottile for the fix!
I suggest adding more test cases that do not involve f-strings, what do you
think? Can you create another PR for those?
--
nosy: +pablogsal
___
Python tracker
<ht
3601 - 3700 of 4563 matches
Mail list logo