https://github.com/python/cpython/commit/ced2d3552374de053bd8a09ae64e5a3cb75d0b1e commit: ced2d3552374de053bd8a09ae64e5a3cb75d0b1e branch: 3.11 author: Miss Islington (bot) <[email protected]> committer: ronaldoussoren <[email protected]> date: 2023-12-29T09:57:21+01:00 summary:
[3.11] gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544) (#113550) gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544) (cherry picked from commit fba324154e65b752e42aa59dea287d639935565f) Co-authored-by: Nikita Sobolev <[email protected]> files: A Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst M Lib/webbrowser.py diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 44974d433b4696..5d72524c087677 100755 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -688,6 +688,7 @@ def _name(self, val): self.name = val def open(self, url, new=0, autoraise=True): + sys.audit("webbrowser.open", url) if self.name == 'default': script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser else: diff --git a/Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst b/Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst new file mode 100644 index 00000000000000..5bf557bedd0204 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst @@ -0,0 +1,2 @@ +Make sure that ``webbrowser.MacOSXOSAScript`` sends ``webbrowser.open`` +audit event. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
