@@ -710,6 +710,18 @@ class _Environ(MutableMapping[AnyStr, AnyStr], Generic[AnyStr]):
710710 encodevalue : _EnvironCodeFunc [AnyStr ],
711711 decodevalue : _EnvironCodeFunc [AnyStr ],
712712 ) -> None : ...
713+ @overload
714+ def get (self , key : AnyStr , default : None = None ) -> AnyStr | None : ...
715+ @overload
716+ def get (self , key : AnyStr , default : AnyStr ) -> AnyStr : ...
717+ @overload
718+ def get (self , key : AnyStr , default : _T ) -> AnyStr | _T : ...
719+ @overload
720+ def pop (self , key : AnyStr ) -> AnyStr : ...
721+ @overload
722+ def pop (self , key : AnyStr , default : AnyStr ) -> AnyStr : ...
723+ @overload
724+ def pop (self , key : AnyStr , default : _T ) -> AnyStr | _T : ...
713725 def setdefault (self , key : AnyStr , value : AnyStr ) -> AnyStr : ...
714726 def copy (self ) -> dict [AnyStr , AnyStr ]: ...
715727 def __delitem__ (self , key : AnyStr ) -> None : ...
@@ -1395,19 +1407,48 @@ class _wrap_close:
13951407 def write (self , s : str , / ) -> int : ...
13961408 def writelines (self , lines : Iterable [str ], / ) -> None : ...
13971409
1398- def popen (cmd : str , mode : str = "r" , buffering : int = - 1 ) -> _wrap_close : ...
1399- def spawnl (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : StrOrBytesPath ) -> int : ...
1400- def spawnle (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : Any ) -> int : ... # Imprecise sig
1410+ if sys .version_info >= (3 , 14 ):
1411+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1412+ def popen (cmd : str , mode : str = "r" , buffering : int = - 1 ) -> _wrap_close : ...
1413+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1414+ def spawnl (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : StrOrBytesPath ) -> int : ...
1415+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1416+ def spawnle (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : Any ) -> int : ... # Imprecise sig
1417+
1418+ else :
1419+ def popen (cmd : str , mode : str = "r" , buffering : int = - 1 ) -> _wrap_close : ...
1420+ def spawnl (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : StrOrBytesPath ) -> int : ...
1421+ def spawnle (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : Any ) -> int : ... # Imprecise sig
14011422
14021423if sys .platform != "win32" :
1403- def spawnv (mode : int , file : StrOrBytesPath , args : _ExecVArgs ) -> int : ...
1404- def spawnve (mode : int , file : StrOrBytesPath , args : _ExecVArgs , env : _ExecEnv ) -> int : ...
1424+ if sys .version_info >= (3 , 14 ):
1425+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1426+ def spawnv (mode : int , file : StrOrBytesPath , args : _ExecVArgs ) -> int : ...
1427+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1428+ def spawnve (mode : int , file : StrOrBytesPath , args : _ExecVArgs , env : _ExecEnv ) -> int : ...
1429+
1430+ else :
1431+ def spawnv (mode : int , file : StrOrBytesPath , args : _ExecVArgs ) -> int : ...
1432+ def spawnve (mode : int , file : StrOrBytesPath , args : _ExecVArgs , env : _ExecEnv ) -> int : ...
1433+
1434+ else :
1435+ if sys .version_info >= (3 , 14 ):
1436+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1437+ def spawnv (mode : int , path : StrOrBytesPath , argv : _ExecVArgs , / ) -> int : ...
1438+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1439+ def spawnve (mode : int , path : StrOrBytesPath , argv : _ExecVArgs , env : _ExecEnv , / ) -> int : ...
1440+
1441+ else :
1442+ def spawnv (mode : int , path : StrOrBytesPath , argv : _ExecVArgs , / ) -> int : ...
1443+ def spawnve (mode : int , path : StrOrBytesPath , argv : _ExecVArgs , env : _ExecEnv , / ) -> int : ...
1444+
1445+ if sys .version_info >= (3 , 14 ):
1446+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1447+ def system (command : StrOrBytesPath ) -> int : ...
14051448
14061449else :
1407- def spawnv (mode : int , path : StrOrBytesPath , argv : _ExecVArgs , / ) -> int : ...
1408- def spawnve (mode : int , path : StrOrBytesPath , argv : _ExecVArgs , env : _ExecEnv , / ) -> int : ...
1450+ def system (command : StrOrBytesPath ) -> int : ...
14091451
1410- def system (command : StrOrBytesPath ) -> int : ...
14111452@final
14121453class times_result (structseq [float ], tuple [float , float , float , float , float ]):
14131454 if sys .version_info >= (3 , 10 ):
@@ -1440,10 +1481,22 @@ if sys.platform == "win32":
14401481 def startfile (filepath : StrOrBytesPath , operation : str = ...) -> None : ...
14411482
14421483else :
1443- def spawnlp (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : StrOrBytesPath ) -> int : ...
1444- def spawnlpe (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : Any ) -> int : ... # Imprecise signature
1445- def spawnvp (mode : int , file : StrOrBytesPath , args : _ExecVArgs ) -> int : ...
1446- def spawnvpe (mode : int , file : StrOrBytesPath , args : _ExecVArgs , env : _ExecEnv ) -> int : ...
1484+ if sys .version_info >= (3 , 14 ):
1485+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1486+ def spawnlp (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : StrOrBytesPath ) -> int : ...
1487+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1488+ def spawnlpe (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : Any ) -> int : ... # Imprecise signature
1489+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1490+ def spawnvp (mode : int , file : StrOrBytesPath , args : _ExecVArgs ) -> int : ...
1491+ @deprecated ("Soft deprecated. Use the subprocess module instead." )
1492+ def spawnvpe (mode : int , file : StrOrBytesPath , args : _ExecVArgs , env : _ExecEnv ) -> int : ...
1493+
1494+ else :
1495+ def spawnlp (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : StrOrBytesPath ) -> int : ...
1496+ def spawnlpe (mode : int , file : StrOrBytesPath , arg0 : StrOrBytesPath , * args : Any ) -> int : ... # Imprecise signature
1497+ def spawnvp (mode : int , file : StrOrBytesPath , args : _ExecVArgs ) -> int : ...
1498+ def spawnvpe (mode : int , file : StrOrBytesPath , args : _ExecVArgs , env : _ExecEnv ) -> int : ...
1499+
14471500 def wait () -> tuple [int , int ]: ... # Unix only
14481501 # Added to MacOS in 3.13
14491502 if sys .platform != "darwin" or sys .version_info >= (3 , 13 ):
0 commit comments