|
| 1 | +import sys |
1 | 2 | import types
|
2 | 3 | import zipimport
|
3 | 4 | from _typeshed import BytesPath, Incomplete, StrOrBytesPath, StrPath, Unused
|
@@ -174,13 +175,6 @@ class WorkingSet:
|
174 | 175 | def require(self, *requirements: _NestedStr) -> Sequence[Distribution]: ...
|
175 | 176 | def subscribe(self, callback: Callable[[Distribution], object], existing: bool = True) -> None: ...
|
176 | 177 |
|
177 |
| -working_set: WorkingSet |
178 |
| -require = working_set.require |
179 |
| -iter_entry_points = working_set.iter_entry_points |
180 |
| -add_activation_listener = working_set.subscribe |
181 |
| -run_script = working_set.run_script |
182 |
| -run_main = run_script |
183 |
| - |
184 | 178 | class Environment:
|
185 | 179 | def __init__(
|
186 | 180 | self, search_path: Iterable[str] | None = None, platform: str | None = ..., python: str | None = ...
|
@@ -289,16 +283,6 @@ class ResourceManager:
|
289 | 283 | def set_extraction_path(self, path: str) -> None: ...
|
290 | 284 | def cleanup_resources(self, force: bool = False) -> list[str]: ...
|
291 | 285 |
|
292 |
| -__resource_manager: ResourceManager # Doesn't exist at runtime |
293 |
| -resource_exists = __resource_manager.resource_exists |
294 |
| -resource_isdir = __resource_manager.resource_isdir |
295 |
| -resource_filename = __resource_manager.resource_filename |
296 |
| -resource_stream = __resource_manager.resource_stream |
297 |
| -resource_string = __resource_manager.resource_string |
298 |
| -resource_listdir = __resource_manager.resource_listdir |
299 |
| -set_extraction_path = __resource_manager.set_extraction_path |
300 |
| -cleanup_resources = __resource_manager.cleanup_resources |
301 |
| - |
302 | 286 | @overload
|
303 | 287 | def get_provider(moduleOrReq: str) -> IResourceProvider: ...
|
304 | 288 | @overload
|
@@ -498,3 +482,25 @@ def normalize_path(filename: StrPath) -> str: ...
|
498 | 482 | def normalize_path(filename: BytesPath) -> bytes: ...
|
499 | 483 |
|
500 | 484 | class PkgResourcesDeprecationWarning(Warning): ...
|
| 485 | + |
| 486 | +__resource_manager: ResourceManager # Doesn't exist at runtime |
| 487 | +resource_exists = __resource_manager.resource_exists |
| 488 | +resource_isdir = __resource_manager.resource_isdir |
| 489 | +resource_filename = __resource_manager.resource_filename |
| 490 | +resource_stream = __resource_manager.resource_stream |
| 491 | +resource_string = __resource_manager.resource_string |
| 492 | +resource_listdir = __resource_manager.resource_listdir |
| 493 | +set_extraction_path = __resource_manager.set_extraction_path |
| 494 | +cleanup_resources = __resource_manager.cleanup_resources |
| 495 | + |
| 496 | +working_set: WorkingSet |
| 497 | +require = working_set.require |
| 498 | +iter_entry_points = working_set.iter_entry_points |
| 499 | +add_activation_listener = working_set.subscribe |
| 500 | +run_script = working_set.run_script |
| 501 | +run_main = run_script |
| 502 | + |
| 503 | +if sys.version_info >= (3, 10): |
| 504 | + LOCALE_ENCODING: Final = "locale" |
| 505 | +else: |
| 506 | + LOCALE_ENCODING: Final = None |
0 commit comments