Commit Graph

13 Commits

Author SHA1 Message Date
Pavel Karateev
f4c5ae01c4 Add importlib.metadata.packages_distributions() (#5565) 2021-06-01 20:07:18 +02:00
Sebastian Rittau
f0bf6eebbd AnyStr cleanup (#5487)
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.

Part of #5470
2021-05-17 20:45:48 +02:00
Sebastian Rittau
e5abd08f93 Replace PathLike unions with aliases from _typeshed (#5467)
Standardize on 'from os import PathLike'
2021-05-16 21:38:00 +02:00
Akuli
e66b7fa660 delete _importlib_modulespec (#5350)
* delete _importlib_modulespec

* use typing_extensions.runtime_checkable
2021-05-06 17:13:35 +03:00
Akuli
bb5fb845f2 use protocol for sys.meta_path (#5349) 2021-05-06 17:12:34 +03:00
Sebastian Rittau
4ac3ccad45 black: enable skip_magic_trailing_comma (#5252)
* black: enable skip_magic_trailing_comma

* Remove spurious commas
2021-04-27 08:32:32 -07:00
Sebastian Rittau
bac1918b5f PathLike cleanup (#5242)
Copy builtins._PathLike to os.PathLike

Use os.PathLike exclusively outside of builtins
2021-04-23 10:15:07 -07:00
Vyom Pathak
f68ef6ca76 spec_from_loader and spec_from_file_location can return None (#5224)
Closes #5117
2021-04-19 12:03:33 +02:00
Henry Schreiner
67090510ba importlib.resouces: add as_file for Python 3.9 (#5216) 2021-04-13 23:02:34 -07:00
Henry Schreiner
ce1871a5bb importlib.abc: Traversable takes a path (#5214) 2021-04-13 19:43:20 -07:00
hatal175
2e703c37e9 Fix importlib stubtest exceptions (#5148)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2021-04-05 12:01:26 -07:00
Eric Traut
0ec182227c Added a few missing type arguments for generic types used in stdlib stubs
I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130)

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-03-22 18:28:04 -07:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00