@@ -292,7 +292,9 @@ are always available. They are listed here in alphabetical order.
292292 :func: `property `.
293293
294294
295- .. function :: compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)
295+ .. function :: compile(source, filename, mode, flags=0, \
296+ dont_inherit=False, optimize=-1, \
297+ *, module=None)
296298
297299 Compile the *source * into a code or AST object. Code objects can be executed
298300 by :func: `exec ` or :func: `eval `. *source * can either be a normal string, a
@@ -334,6 +336,10 @@ are always available. They are listed here in alphabetical order.
334336 ``__debug__ `` is true), ``1 `` (asserts are removed, ``__debug__ `` is false)
335337 or ``2 `` (docstrings are removed too).
336338
339+ The optional argument *module * specifies the module name.
340+ It is needed to unambiguous :ref: `filter <warning-filter >` syntax warnings
341+ by module name.
342+
337343 This function raises :exc: `SyntaxError ` if the compiled source is invalid,
338344 and :exc: `ValueError ` if the source contains null bytes.
339345
@@ -371,6 +377,9 @@ are always available. They are listed here in alphabetical order.
371377 ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT `` can now be passed in flags to enable
372378 support for top-level ``await ``, ``async for ``, and ``async with ``.
373379
380+ .. versionadded :: next
381+ Added the *module * parameter.
382+
374383
375384.. class :: complex(number=0, /)
376385 complex(string, /)
0 commit comments