[issue40807] Codeop: Show warnings once during _maybe_compile

2020-08-12 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 5.0 -> 6.0 pull_requests: +20976 pull_request: https://github.com/python/cpython/pull/21838 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-08-10 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: I think that might have introduce https://bugs.python.org/issue41520 where now `warnings.simplefilter('error', SyntaxWarning)` is silently ignored... -- nosy: +mbussonn ___ Python tracker

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 3.7 backport is needed but required a revised example. The changeset is 4b378acb97a575892c0e372a6bb0c17da1ccdf3e. PRs 20486, 20639, 20672, and 20673 are the main patch. PRs 20646 and 20647 for 3.8 and 3.7 backport a test_codeop import change made

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-06 Thread miss-islington
miss-islington added the comment: New changeset c067183605cf84bb1a246635f52827251d0476f8 by Miss Islington (bot) in branch '3.8': bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486) https://github.com/python/cpython/commit/c067183605cf84bb1a246635f52827251d0476f8 --

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +19888 pull_request: https://github.com/python/cpython/pull/20672 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +19889 pull_request: https://github.com/python/cpython/pull/20673 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is a spinoff of #37824. My above comments about compile are wrong. The example nests '' within ''. And, with freshly compiled master, I found an example where Deprecation warning, but not SyntaxWarning, accompanies SyntaxError, and which requires

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 12d3061c7819a73d891dcce44327410eaf0e1bc2 by Miss Islington (bot) in branch '3.7': [3.8] bpo-40807: Backport test_codeop change [GH-19670] https://github.com/python/cpython/commit/12d3061c7819a73d891dcce44327410eaf0e1bc2 --

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset a5d6aba318ead9cc756ba750a70da41f5def3f8f by Terry Jan Reedy in branch '3.8': [3.8] bpo-40807: Backport test_codeop change [GH-19670] https://github.com/python/cpython/commit/a5d6aba318ead9cc756ba750a70da41f5def3f8f --

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +19867 pull_request: https://github.com/python/cpython/pull/20647 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +19866 pull_request: https://github.com/python/cpython/pull/20646 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread miss-islington
miss-islington added the comment: New changeset 3dfe549bfa08a099b88efd030669359199f31064 by Miss Islington (bot) in branch '3.9': bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486) https://github.com/python/cpython/commit/3dfe549bfa08a099b88efd030669359199f31064 --

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +19861 pull_request: https://github.com/python/cpython/pull/20641 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +19860 pull_request: https://github.com/python/cpython/pull/20640 ___ Python tracker ___

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19859 pull_request: https://github.com/python/cpython/pull/20639 ___ Python tracker

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 052d3fc0907be253cfd64b2c737a0b0aca586011 by Cheryl Sabella in branch 'master': bpo-40807: Show warnings once from codeop._maybe_compile (#20486) https://github.com/python/cpython/commit/052d3fc0907be253cfd64b2c737a0b0aca586011 --

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am not sure if 3 compiles are always needed. At one time, compile required a final '\n' to not raise, but that is no longer true. And as near as I can tell, 'code without final newline\n' and 'code without final newline\n\n' always compile the same.

[issue40807] Codeop: Show warnings once during _maybe_compile

2020-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: The purpose of code and codeop is to imitate interactive python in python. Calling compile() thrice is an implementation detail. Exposing that is a bug. On #37824, Serhiy reported 3 'IDLE' bugs for 3.7 to 3.9: tripled DeprecationWarning (now joined by

[issue40807] CODEOP: Show warnings once during _maybe_compile

2020-05-28 Thread Cheryl Sabella
New submission from Cheryl Sabella : When calling `codeop._maybe_compile`, `compile` is run three times. If the code being compiled causes a warning message, the warning is generated each time that `compile` is called, thus (possibly) showing the message three times. See msg370163 and that

[issue40807] CODEOP: Show warnings once during _maybe_compile

2020-05-28 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +19735 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20486 ___ Python tracker ___