bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486)


* bpo-40807: Show warnings once from codeop._maybe_compile

* Move catch_warnings

* news

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 052d3fc0907be253cfd64b2c737a0b0aca586011)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
3 files changed