mirror of
https://github.com/python/cpython.git
synced 2025-10-26 16:27:06 +00:00
gh-99127: Allow some features of syslog to the main interpreter only (gh-99128)
This commit is contained in:
parent
ed391090cc
commit
8bb2303fd7
5 changed files with 122 additions and 2 deletions
|
|
@ -40,6 +40,13 @@ The module defines the following functions:
|
|||
it wasn't called prior to the call to :func:`syslog`, deferring to the syslog
|
||||
implementation to call ``openlog()``.
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
This function is restricted in subinterpreters.
|
||||
(Only code that runs in multiple interpreters is affected and
|
||||
the restriction is not relevant for most users.)
|
||||
:func:`openlog` must be called in the main interpreter before :func:`syslog` may be used
|
||||
in a subinterpreter. Otherwise it will raise :exc:`RuntimeError`.
|
||||
|
||||
|
||||
.. function:: openlog([ident[, logoption[, facility]]])
|
||||
|
||||
|
|
@ -60,6 +67,13 @@ The module defines the following functions:
|
|||
In previous versions, keyword arguments were not allowed, and *ident* was
|
||||
required.
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
This function is restricted in subinterpreters.
|
||||
(Only code that runs in multiple interpreters is affected and
|
||||
the restriction is not relevant for most users.)
|
||||
This may only be called in the main interpreter.
|
||||
It will raise :exc:`RuntimeError` if called in a subinterpreter.
|
||||
|
||||
|
||||
.. function:: closelog()
|
||||
|
||||
|
|
@ -72,6 +86,13 @@ The module defines the following functions:
|
|||
|
||||
.. audit-event:: syslog.closelog "" syslog.closelog
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
This function is restricted in subinterpreters.
|
||||
(Only code that runs in multiple interpreters is affected and
|
||||
the restriction is not relevant for most users.)
|
||||
This may only be called in the main interpreter.
|
||||
It will raise :exc:`RuntimeError` if called in a subinterpreter.
|
||||
|
||||
|
||||
.. function:: setlogmask(maskpri)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue