Commit Graph

5 Commits

Author SHA1 Message Date
Sebastian Rittau
0501e2b329 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
2019-10-14 09:53:48 +02:00
Rebecca Chen
fab2ee0d7c Remove unnecessary quotes around forward references. (#3191) 2019-08-16 20:29:32 -07:00
Igor Davydenko
8e6e178a5a As of Python 3.6 dump_stats method allows PathLike object to be passed. (#2741)
Replicate typings from `pstats.dump_stats` into `profile` and `cProfile`
libraries.
2019-01-15 10:27:53 -08:00
Ran Benita
8ab951c371 profile.run(sort=...) can be a string (#2413)
The int form is only accepted for backward compatibility.
https://docs.python.org/3/library/profile.html#pstats.Stats.sort_stats
2018-08-22 07:48:18 -07:00
Jelle Zijlstra
392eb4aa5a add stubs for Python 2 profile and cProfile (#699)
* add stubs for Python 2 profile and cProfile

Partially fixes #531. Contrary to the Python 2.7 docs at
https://docs.python.org/2/library/profile.html#module-cProfile,
these modules do not have exactly the same interface. For
example, profile.Profile() does not have an enable() method.

* profile stubs: move to 2and3, add __init__, use private names for typevars
2016-12-01 11:51:41 +00:00