Mailing List Archive

[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.
Change by STINNER Victor <vstinner@python.org>:


----------
title: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. -> codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Change by STINNER Victor <vstinner@python.org>:


----------
keywords: +patch
nosy: +vstinner
nosy_count: 3.0 -> 4.0
pull_requests: +20966
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21838

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:

I proposed a fix: PR 21838. Would you mind to review it?

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>:


----------
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +20968
pull_request: https://github.com/python/cpython/pull/21840

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:


New changeset 369a1cbdee14d9f27356fb3a8bb21e4fde289d25 by Victor Stinner in branch 'master':
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
https://github.com/python/cpython/commit/369a1cbdee14d9f27356fb3a8bb21e4fde289d25


----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>:


----------
pull_requests: +20969
pull_request: https://github.com/python/cpython/pull/21841

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment:


New changeset afff51fc09993dff1693aacb440221314b163409 by Miss Islington (bot) in branch '3.8':
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
https://github.com/python/cpython/commit/afff51fc09993dff1693aacb440221314b163409


----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment:


New changeset 90eff4ed4445a0fa9d8cdf74c0f86c50ed510dad by Miss Islington (bot) in branch '3.9':
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
https://github.com/python/cpython/commit/90eff4ed4445a0fa9d8cdf74c0f86c50ed510dad


----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:

Thanks Matthias Bussonnier for the fix. The regression should now be fixed. Also, I converted your reproducer into a regression test.

----------
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Matthias Bussonnier <bussonniermatthias@gmail.com> added the comment:

> Thanks Matthias Bussonnier for the fix.

Thank *YOU* for the fix, and the bug report is initially from tcaswell.

At least on 3.8 branch this is fixed for me.

Just for completeness, this was discovered as in IPython we try to guess whether "enter" is "insert new line" or "execute", and `1 is 1<enter>` would keep adding new lines.

Much love for the fast turnaround; looking fwd to 3.9

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:

Thanks tcaswell in this case ;-)

----------
priority: release blocker ->

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Change by Terry J. Reedy <tjreedy@udel.edu>:


----------
nosy: +terry.reedy
nosy_count: 5.0 -> 6.0
pull_requests: +20975
pull_request: https://github.com/python/cpython/pull/21848

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Terry J. Reedy <tjreedy@udel.edu> added the comment:

This 'fix' introduces another regression by undoing the previous fix in issue 40807 of emitting DeprecationWarning (for '\e', for instance) just once instead of thrice.

I suspect that the example of Matthias would fail in a debug build (with DeprecationWarnings on) for DeprecationWarning also.

PR-21848 removes the limitation of the first fix to SyntaxWarning and includes DeprecationWarning in the test for single emission.

----------
nosy: +cheryl.sabella
priority: -> release blocker
resolution: fixed ->
stage: resolved -> needs patch
status: closed -> open

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment:

The commit 369a1cbdee14d9f27356fb3a8bb21e4fde289d25 introduces a change in environment. I haven't checked the other PR though to see if this is fixed.

./python.exe -m test --fail-env-changed test_codeop -m test_warning
0:00:00 load avg: 2.30 Run tests sequentially
0:00:00 load avg: 2.30 [1/1] test_codeop
Warning -- warnings.filters was modified by test_codeop
Before: (4331716096, [.('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)], [.('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)])
After: (4331716096, [.('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)], [.('error', None, <class 'SyntaxWarning'>, None, 0), ('default', None, <class 'DeprecationWarning'>, '__main__', 0), ('ignore', None, <class 'DeprecationWarning'>, None, 0), ('ignore', None, <class 'PendingDeprecationWarning'>, None, 0), ('ignore', None, <class 'ImportWarning'>, None, 0), ('ignore', None, <class 'ResourceWarning'>, None, 0)])
test_codeop failed (env changed)

== Tests result: ENV CHANGED ==

1 test altered the execution environment:
test_codeop

Total duration: 38 ms
Tests result: ENV CHANGED


On an unrelated note the test passes with verbose mode though fail-env-changed flag is passed.

./python.exe -m test --fail-env-changed test_codeop -m test_warning -vvv
== CPython 3.10.0a0 (heads/master:c51db0ea40d, Aug 13 2020, 15:47:27) [Clang 10.0.1 (clang-1001.0.46.4)]
== macOS-10.14.6-x86_64-i386-64bit little-endian
== cwd: /Users/kasingar/stuff/python/cpython/build/test_python_29945æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.53 Run tests sequentially
0:00:00 load avg: 1.53 [1/1] test_codeop
test_warning (test.test_codeop.CodeopTests) ... ok

----------------------------------------------------------------------

Ran 1 test in 0.001s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 58 ms
Tests result: SUCCESS

----------
nosy: +xtreak

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:

> The commit 369a1cbdee14d9f27356fb3a8bb21e4fde289d25 introduces a change in environment. (...)

Right. It's fixed by PR 21848.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Terry J. Reedy <tjreedy@udel.edu> added the comment:


New changeset c818b15fa59039de67022c29085d439fa5d3ef95 by Terry Jan Reedy in branch 'master':
bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/c818b15fa59039de67022c29085d439fa5d3ef95


----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:

> New changeset c818b15fa59039de67022c29085d439fa5d3ef95 by Terry Jan Reedy in branch 'master':
> bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/c818b15fa59039de67022c29085d439fa5d3ef95

I confirm that this change fixed the "test altered the execution environment" issue.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Change by Terry J. Reedy <tjreedy@udel.edu>:


----------
pull_requests: +20987
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/21860

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Terry J. Reedy <tjreedy@udel.edu> added the comment:


New changeset f24430f1542ea2768793b48704ae2d4e241892ae by Terry Jan Reedy in branch '3.9':
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/f24430f1542ea2768793b48704ae2d4e241892ae


----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>:


----------
pull_requests: +20989
pull_request: https://github.com/python/cpython/pull/21862

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment:


New changeset a3416c13b51af25675e175d4ffe07d8b925e7dbf by Miss Islington (bot) in branch '3.8':
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
https://github.com/python/cpython/commit/a3416c13b51af25675e175d4ffe07d8b925e7dbf


----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue41520] codeop: 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise. [ In reply to ]
Terry J. Reedy <tjreedy@udel.edu> added the comment:

Lukasz, please cherry-pick the 3.9 commits for this issue
90eff4ed4445a0fa9d8cdf74c0f86c50ed510dad
f24430f1542ea2768793b48704ae2d4e241892ae
into 3.9.0rc2 before release.
They fix a regression introduced by a bug fix last June.

----------
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue41520>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com