Annotations for remaining Python 3.8 additions (#3358)

* Add os.add_dll_directory()
* Add memfd_create() and flags
* Add type annotation to flags
* Add stat_result.st_reparse_tag and flags
* Add ncurses_version
* Add Path.link_to()
* Add Picker.reducer_override()
* Add plistlib.UID
* Add has_dualstack_ipv6() and create_server()
* Add shlex.join()
* Add SSL methods and fields
* Add Python 3.8 statistics functions and classes
* Remove obsolete sys.subversion
* Add sys.unraisablehook
* Add threading.excepthook
* Add get_native_id() and Thread.native_id
* Add Python 3.8 tkinter methods
* Add CLOCK_UPTIME_RAW
* Add SupportsIndex
* Add typing.get_origin() and get_args()
* Add unicodedata.is_normalized
* Add unittest.mock.AsyncMock

Currently this is just an alias for Any like Mock and MagicMock. All of
these classes should probably be sub-classing Any and add their own
methods. See also #3224.

* Add unittest cleanup methods
* Add IsolatedAsyncioTestCase
* Add ElementTree.canonicalize() and C14NWriterTarget
* cProfile.Profile can be used as a context manager
* Add asyncio task name handling
* mmap.flush() now always returns None
* Add posonlyargcount to CodeType
This commit is contained in:
Sebastian Rittau
2019-10-14 09:53:48 +02:00
committed by GitHub
parent 6507875f28
commit 0501e2b329
30 changed files with 419 additions and 102 deletions

View File

@@ -17,58 +17,81 @@ def S_IFMT(mode: int) -> int: ...
def filemode(mode: int) -> str: ...
ST_MODE = 0
ST_INO = 0
ST_DEV = 0
ST_NLINK = 0
ST_UID = 0
ST_GID = 0
ST_SIZE = 0
ST_ATIME = 0
ST_MTIME = 0
ST_CTIME = 0
ST_MODE: int
ST_INO: int
ST_DEV: int
ST_NLINK: int
ST_UID: int
ST_GID: int
ST_SIZE: int
ST_ATIME: int
ST_MTIME: int
ST_CTIME: int
S_IFSOCK = 0
S_IFLNK = 0
S_IFREG = 0
S_IFBLK = 0
S_IFDIR = 0
S_IFCHR = 0
S_IFIFO = 0
S_ISUID = 0
S_ISGID = 0
S_ISVTX = 0
S_IFSOCK: int
S_IFLNK: int
S_IFREG: int
S_IFBLK: int
S_IFDIR: int
S_IFCHR: int
S_IFIFO: int
S_ISUID: int
S_ISGID: int
S_ISVTX: int
S_IRWXU = 0
S_IRUSR = 0
S_IWUSR = 0
S_IXUSR = 0
S_IRWXU: int
S_IRUSR: int
S_IWUSR: int
S_IXUSR: int
S_IRWXG = 0
S_IRGRP = 0
S_IWGRP = 0
S_IXGRP = 0
S_IRWXG: int
S_IRGRP: int
S_IWGRP: int
S_IXGRP: int
S_IRWXO = 0
S_IROTH = 0
S_IWOTH = 0
S_IXOTH = 0
S_IRWXO: int
S_IROTH: int
S_IWOTH: int
S_IXOTH: int
S_ENFMT = 0
S_IREAD = 0
S_IWRITE = 0
S_IEXEC = 0
S_ENFMT: int
S_IREAD: int
S_IWRITE: int
S_IEXEC: int
UF_NODUMP = 0
UF_IMMUTABLE = 0
UF_APPEND = 0
UF_OPAQUE = 0
UF_NOUNLINK = 0
UF_NODUMP: int
UF_IMMUTABLE: int
UF_APPEND: int
UF_OPAQUE: int
UF_NOUNLINK: int
if sys.platform == 'darwin':
UF_COMPRESSED = 0 # OS X 10.6+ only
UF_HIDDEN = 0 # OX X 10.5+ only
SF_ARCHIVED = 0
SF_IMMUTABLE = 0
SF_APPEND = 0
SF_NOUNLINK = 0
SF_SNAPSHOT = 0
UF_COMPRESSED: int # OS X 10.6+ only
UF_HIDDEN: int # OX X 10.5+ only
SF_ARCHIVED: int
SF_IMMUTABLE: int
SF_APPEND: int
SF_NOUNLINK: int
SF_SNAPSHOT: int
FILE_ATTRIBUTE_ARCHIVE: int
FILE_ATTRIBUTE_COMPRESSED: int
FILE_ATTRIBUTE_DEVICE: int
FILE_ATTRIBUTE_DIRECTORY: int
FILE_ATTRIBUTE_ENCRYPTED: int
FILE_ATTRIBUTE_HIDDEN: int
FILE_ATTRIBUTE_INTEGRITY_STREAM: int
FILE_ATTRIBUTE_NORMAL: int
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: int
FILE_ATTRIBUTE_NO_SCRUB_DATA: int
FILE_ATTRIBUTE_OFFLINE: int
FILE_ATTRIBUTE_READONLY: int
FILE_ATTRIBUTE_REPARSE_POINT: int
FILE_ATTRIBUTE_SPARSE_FILE: int
FILE_ATTRIBUTE_SYSTEM: int
FILE_ATTRIBUTE_TEMPORARY: int
FILE_ATTRIBUTE_VIRTUAL: int
if sys.platform == "win32" and sys.version_info >= (3, 8):
IO_REPARSE_TAG_SYMLINK: int
IO_REPARSE_TAG_MOUNT_POINT: int
IO_REPARSE_TAG_APPEXECLINK: int