Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add missing objects to plistlib, and improve __all__ in asyncio.tasks, http.server, & multiprocessing.__init__ #7363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 23, 2022
Merged
1 change: 0 additions & 1 deletion stdlib/asyncio/tasks.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ else:
"wait_for",
"as_completed",
"sleep",
"async",
"gather",
"shield",
"ensure_future",
Expand Down
5 changes: 4 additions & 1 deletion stdlib/http/server.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import sys
from _typeshed import StrPath, SupportsRead, SupportsWrite
from typing import Any, AnyStr, BinaryIO, ClassVar, Mapping, Sequence

__all__ = ["HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler"]
if sys.version_info >= (3, 7):
__all__ = ["HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler"]
else:
__all__ = ["HTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler"]

class HTTPServer(socketserver.TCPServer):
server_name: str
Expand Down
1 change: 0 additions & 1 deletion stdlib/multiprocessing/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ else:
"get_logger",
"get_start_method",
"log_to_stderr",
"parent_process",
"reducer",
"set_executable",
"set_forkserver_preload",
Expand Down
11 changes: 10 additions & 1 deletion stdlib/plistlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,20 @@ if sys.version_info < (3, 9):
def writePlistToBytes(value: Mapping[str, Any]) -> bytes: ...

if sys.version_info < (3, 7):
class Dict(dict[str, Any]):
class _InternalDict(dict[str, Any]):
def __getattr__(self, attr: str) -> Any: ...
def __setattr__(self, attr: str, value: Any) -> None: ...
def __delattr__(self, attr: str) -> None: ...

class Dict(_InternalDict): # deprecated
def __init__(self, **kwargs: Any) -> None: ...

class Plist(_InternalDict): # deprecated
def __init__(self, **kwargs: Any) -> None: ...
@classmethod
def fromFile(cls: type[Self], pathOrFile: str | IO[bytes]) -> Self: ...
def write(self, pathOrFile: str | IO[bytes]) -> None: ...

if sys.version_info < (3, 9):
class Data:
data: bytes
Expand Down
2 changes: 0 additions & 2 deletions tests/stubtest_allowlists/py36.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ipaddress._BaseNetwork.__init__
json.loads
mmap.ACCESS_DEFAULT
(os|posix).utime
plistlib.Dict.__init__
pyexpat.XMLParserType.ExternalEntityParserCreate # C signature is wrong - function gets only positional args
random.Random.randrange # missing undocumented arg _int
random.randrange # missing undocumented arg _int
Expand Down Expand Up @@ -121,7 +120,6 @@ html.parser.HTMLParser.unescape
platform.popen
plistlib.Data.asBase64
plistlib.Data.fromBase64
plistlib.Plist
ssl.SSLObject.verify_client_post_handshake
ssl.SSLSocket.verify_client_post_handshake
sys.callstats
Expand Down