File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -340,12 +340,8 @@ are always available. They are listed here in alphabetical order.
340340 It is needed to unambiguous :ref: `filter <warning-filter >` syntax warnings
341341 by module name.
342342
343- This function raises the following exceptions:
344-
345- - :exc: `SyntaxError ` if the compiled source is invalid
346- - :exc: `ValueError ` if the source contains null bytes
347- - :exc: `UnicodeDecodeError ` if the source code contains docstrings that
348- cannot be encoded as UTF-8 and the optimization level is below ``2 ``
343+ This function raises :exc: `SyntaxError ` or :exc: `ValueError ` if the compiled
344+ source is invalid.
349345
350346 If you want to parse Python code into its AST representation, see
351347 :func: `ast.parse `.
@@ -377,11 +373,6 @@ are always available. They are listed here in alphabetical order.
377373 Previously, :exc: `TypeError ` was raised when null bytes were encountered
378374 in *source *.
379375
380- .. versionchanged :: 3.13
381- :exc: `UnicodeDecodeError ` is now raised if any docstring in *source *
382- contains surrogates (like ``\ud800 ``) and therefore cannot be encoded
383- as UTF-8.
384-
385376 .. versionadded :: 3.8
386377 ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT `` can now be passed in flags to enable
387378 support for top-level ``await ``, ``async for ``, and ``async with ``.
You can’t perform that action at this time.
0 commit comments