(cls, fullname, path=None, target=None)
| 701 | |
| 702 | @classmethod |
| 703 | def find_spec(cls, fullname, path=None, target=None): |
| 704 | _warnings.warn('importlib.machinery.WindowsRegistryFinder is ' |
| 705 | 'deprecated; use site configuration instead. ' |
| 706 | 'Future versions of Python may not enable this ' |
| 707 | 'finder by default.', |
| 708 | DeprecationWarning, stacklevel=2) |
| 709 | |
| 710 | filepath = cls._search_registry(fullname) |
| 711 | if filepath is None: |
| 712 | return None |
| 713 | try: |
| 714 | _path_stat(filepath) |
| 715 | except OSError: |
| 716 | return None |
| 717 | for loader, suffixes in _get_supported_file_loaders(): |
| 718 | if filepath.endswith(tuple(suffixes)): |
| 719 | spec = _bootstrap.spec_from_loader(fullname, |
| 720 | loader(fullname, filepath), |
| 721 | origin=filepath) |
| 722 | return spec |
| 723 | |
| 724 | |
| 725 | class _LoaderBasics: |
nothing calls this directly
no test coverage detected