mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 01:53:24 +08:00
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:
@@ -210,6 +210,8 @@ class stat_result:
|
||||
st_atime_ns: int # time of most recent access, in nanoseconds
|
||||
st_mtime_ns: int # time of most recent content modification in nanoseconds
|
||||
st_ctime_ns: int # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) in nanoseconds
|
||||
if sys.version_info >= (3, 8) and sys.platform == "win32":
|
||||
st_reparse_tag: int
|
||||
|
||||
def __getitem__(self, i: int) -> int: ...
|
||||
|
||||
@@ -631,3 +633,31 @@ else:
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def register_at_fork(func: Callable[..., object], when: str) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
if sys.platform == "win32":
|
||||
class _AddedDllDirectory:
|
||||
path: Optional[str]
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def add_dll_directory(path: str) -> _AddedDllDirectory: ...
|
||||
if sys.platform == "linux":
|
||||
MFD_CLOEXEC: int
|
||||
MFD_ALLOW_SEALING: int
|
||||
MFD_HUGETLB: int
|
||||
MFD_HUGE_SHIFT: int
|
||||
MFD_HUGE_MASK: int
|
||||
MFD_HUGE_64KB: int
|
||||
MFD_HUGE_512KB: int
|
||||
MFD_HUGE_1MB: int
|
||||
MFD_HUGE_2MB: int
|
||||
MFD_HUGE_8MB: int
|
||||
MFD_HUGE_16MB: int
|
||||
MFD_HUGE_32MB: int
|
||||
MFD_HUGE_256MB: int
|
||||
MFD_HUGE_512MB: int
|
||||
MFD_HUGE_1GB: int
|
||||
MFD_HUGE_2GB: int
|
||||
MFD_HUGE_16GB: int
|
||||
def memfd_create(name: str, flags: int = ...) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user