Merge branch 'feature/UpdatePkgResources' into dev

This commit is contained in:
JackDandy 2024-06-26 00:47:28 +01:00
commit be24e6169b
3 changed files with 376 additions and 214 deletions

View file

@ -1,6 +1,7 @@
### 3.33.0 (2024-0x-xx xx:xx:00 UTC)
* Update filelock 3.14.0 (8556141) to 3.15.4 (9a979df)
* Update package resource API 68.2.2 (8ad627d) to 70.1.1 (222ebf9)
* Update urllib3 2.2.1 (54d6edf) to 2.2.2 (27e2a5c)

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,9 @@
from __future__ import annotations
from importlib.machinery import ModuleSpec
import importlib.util
import sys
from types import ModuleType
from typing import Iterable, Optional, Sequence
from typing import Iterable, Sequence
class VendorImporter:
@ -15,7 +16,7 @@ class VendorImporter:
self,
root_name: str,
vendored_names: Iterable[str] = (),
vendor_pkg: Optional[str] = None,
vendor_pkg: str | None = None,
):
self.root_name = root_name
self.vendored_names = set(vendored_names)
@ -65,8 +66,8 @@ class VendorImporter:
def find_spec(
self,
fullname: str,
path: Optional[Sequence[str]] = None,
target: Optional[ModuleType] = None,
path: Sequence[str] | None = None,
target: ModuleType | None = None,
):
"""Return a module spec for vendored names."""
return (