[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- title: regression in cython due to peephole optomization -> regression in Cython when pickling objects ___ Python tracker ___

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Did you open a bug in the Cython tracker? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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/.loca

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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 3.9.

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg345668 ___ Python tracker ___ ___ Python-bugs-list

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg345665 ___ Python tracker ___ ___ Python-bugs-list

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg345663 ___ Python tracker ___ ___ Python-bugs-list

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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 __

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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 now I made a PR rever

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +13954 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14099 ___ Python tracker __

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide an example of the improperly optimized code? -- ___ Python tracker ___ ___

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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/7a68f8c28bb78d957555a5001dac4df6345434a0 -

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +13960 pull_request: https://github.com/python/cpython/pull/14111 ___ Python tracker ___ __

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +13961 pull_request: https://github.com/python/cpython/pull/14112 ___ Python tracker ___ __

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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)

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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/python/cpython/commit/284daeade210

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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/python/cpython/commit/81fecf7b7a6e

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to add a test? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Pablo Galindo Salgado
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

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it could be moved to the compiler. See issue32477 which moves at that direction. -- ___ Python tracker ___ __

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread Thomas Caswell
Thomas Caswell added the comment: I can confirm that master branches of cpython, cython, and numpy all build together again, thank you for the quick investigation and fix! -- ___ Python tracker

[issue37289] regression in Cython when pickling objects

2019-06-15 Thread STINNER Victor
STINNER Victor added the comment: I don't understand if this issue is a recent regression or not. Python 3.7 has been modified, but the reporter only mentions Python 3.8. I concur with Serhiy, a test is needed to prevent future regressions on this fix. -- __

[issue37289] regression in Cython when pickling objects

2019-06-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13974 pull_request: https://github.com/python/cpython/pull/14127 ___ Python tracker ___ ___

[issue37289] regression in Cython when pickling objects

2019-06-20 Thread Pablo Galindo Salgado
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/cpython/commit/1e61504b8b941494f3

[issue37289] regression in Cython when pickling objects

2019-10-26 Thread Thomas Caswell
Thomas Caswell added the comment: I believe this can be closed, the regression has been fixed and there is now a test to prevent it from coming back. -- ___ Python tracker __

[issue37289] regression in Cython when pickling objects

2019-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___