mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-03 00:22:44 +08:00
Add os.unshare clone flags for Linux, Python 3.12+ (#10757)
This commit is contained in:
@@ -1056,3 +1056,19 @@ if sys.version_info >= (3, 12) and sys.platform == "win32":
|
||||
def listdrives() -> list[str]: ...
|
||||
def listmounts(volume: str) -> list[str]: ...
|
||||
def listvolumes() -> list[str]: ...
|
||||
|
||||
if sys.version_info >= (3, 12) and sys.platform == "linux":
|
||||
CLONE_FILES: int
|
||||
CLONE_FS: int
|
||||
CLONE_NEWCGROUP: int
|
||||
CLONE_NEWIPC: int
|
||||
CLONE_NEWNET: int
|
||||
CLONE_NEWNS: int
|
||||
CLONE_NEWPID: int
|
||||
CLONE_NEWTIME: int
|
||||
CLONE_NEWUSER: int
|
||||
CLONE_NEWUTS: int
|
||||
CLONE_SIGHAND: int
|
||||
CLONE_SYSVSEM: int
|
||||
CLONE_THREAD: int
|
||||
CLONE_VM: int
|
||||
|
||||
@@ -314,6 +314,24 @@ if sys.platform != "win32":
|
||||
if sys.platform != "darwin":
|
||||
from os import RWF_DSYNC as RWF_DSYNC, RWF_HIPRI as RWF_HIPRI, RWF_NOWAIT as RWF_NOWAIT, RWF_SYNC as RWF_SYNC
|
||||
|
||||
if sys.version_info >= (3, 12) and sys.platform == "linux":
|
||||
from os import (
|
||||
CLONE_FILES as CLONE_FILES,
|
||||
CLONE_FS as CLONE_FS,
|
||||
CLONE_NEWCGROUP as CLONE_NEWCGROUP,
|
||||
CLONE_NEWIPC as CLONE_NEWIPC,
|
||||
CLONE_NEWNET as CLONE_NEWNET,
|
||||
CLONE_NEWNS as CLONE_NEWNS,
|
||||
CLONE_NEWPID as CLONE_NEWPID,
|
||||
CLONE_NEWTIME as CLONE_NEWTIME,
|
||||
CLONE_NEWUSER as CLONE_NEWUSER,
|
||||
CLONE_NEWUTS as CLONE_NEWUTS,
|
||||
CLONE_SIGHAND as CLONE_SIGHAND,
|
||||
CLONE_SYSVSEM as CLONE_SYSVSEM,
|
||||
CLONE_THREAD as CLONE_THREAD,
|
||||
CLONE_VM as CLONE_VM,
|
||||
)
|
||||
|
||||
# Not same as os.environ or os.environb
|
||||
# Because of this variable, we can't do "from posix import *" in os/__init__.pyi
|
||||
environ: dict[bytes, bytes]
|
||||
|
||||
Reference in New Issue
Block a user