bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26961)

This commit is contained in:
Steve Dower 2021-06-30 17:21:37 +01:00 committed by GitHub
parent 86eeeb4259
commit 139de04518
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 10 deletions

View file

@ -66,6 +66,8 @@ The module defines these functions:
The *version* argument indicates the data format that ``dump`` should use
(see below).
.. audit-event:: marshal.dumps value,version marshal.dump
.. function:: load(file)
@ -74,6 +76,8 @@ The module defines these functions:
format), raise :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. The
file must be a readable :term:`binary file`.
.. audit-event:: marshal.loads bytes marshal.load
.. note::
If an object containing an unsupported type was marshalled with :func:`dump`,
@ -89,6 +93,8 @@ The module defines these functions:
The *version* argument indicates the data format that ``dumps`` should use
(see below).
.. audit-event:: marshal.dumps value,version marshal.dump
.. function:: loads(bytes)
@ -96,6 +102,8 @@ The module defines these functions:
:exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. Extra bytes in the
input are ignored.
.. audit-event:: marshal.loads bytes marshal.load
In addition, the following constants are defined: