(cls, fullname, path=None, target=None)
| 713 | |
| 714 | @classmethod |
| 715 | def find_spec(cls, fullname, path=None, target=None): |
| 716 | _warnings.warn('importlib.machinery.WindowsRegistryFinder is ' |
| 717 | 'deprecated; use site configuration instead. ' |
| 718 | 'Future versions of Python may not enable this ' |
| 719 | 'finder by default.', |
| 720 | DeprecationWarning, stacklevel=2) |
| 721 | |
| 722 | filepath = cls._search_registry(fullname) |
| 723 | if filepath is None: |
| 724 | return None |
| 725 | try: |
| 726 | _path_stat(filepath) |
| 727 | except OSError: |
| 728 | return None |
| 729 | for loader, suffixes in _get_supported_file_loaders(): |
| 730 | if filepath.endswith(tuple(suffixes)): |
| 731 | spec = _bootstrap.spec_from_loader(fullname, |
| 732 | loader(fullname, filepath), |
| 733 | origin=filepath) |
| 734 | return spec |
| 735 | |
| 736 | |
| 737 | class _LoaderBasics: |
nothing calls this directly
no test coverage detected