Bug 1869690 - Hack the vendored pip's vendored pkg_resources to support python 3.12. r=ahochheiden,mach-reviewers

While bug 1857470 is set to fix the problem with a pip upgrade, it is
going to take some time. In the meanwhile, we can just do the minimal
thing that makes things work well enough for a build to go through.

Differential Revision: https://phabricator.services.mozilla.com/D196256
This commit is contained in:
Mike Hommey 2023-12-13 20:21:49 +00:00
Родитель e548ae78da
Коммит ca039c7411
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -2161,7 +2161,8 @@ def resolve_egg_link(path):
return next(dist_groups, ())
register_finder(pkgutil.ImpImporter, find_on_path)
if hasattr(pkgutil, 'ImpImporter'):
register_finder(pkgutil.ImpImporter, find_on_path)
if hasattr(importlib_machinery, 'FileFinder'):
register_finder(importlib_machinery.FileFinder, find_on_path)
@ -2312,7 +2313,8 @@ def file_ns_handler(importer, path_item, packageName, module):
return subpath
register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)
if hasattr(pkgutil, 'ImpImporter'):
register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)
register_namespace_handler(zipimport.zipimporter, file_ns_handler)
if hasattr(importlib_machinery, 'FileFinder'):