Package: pip-shims
WarningWarningThe authors ofpipdo not condonethe use of this package. Relying on pip’s
internals is adangerousidea for your software as they are broken intentionally
and regularly.  This package may not always be completely updated up PyPI, so relying
on it may break your code! User beware!InstallationInstall fromPyPI:$pipenvinstallpip-shimsInstall fromGithub:$pipenvinstall-egit+https://github.com/sarugaku/pip-shims.git#egg=pip-shimsSummarypip-shimsis a set of compatibilty access shims to thepipinternal API.pip-shimsprovides compatibility across several pip releases.  The shims are provided using a lazy
import strategy by hacking a module by overloading a class instance’sgetattrmethod.
This library exists due to my constant writing of the same set of import shims across
many different libraries, includingpipenv,pip-tools,requirementslib, andpassa.Pip CompatibilityDue to the fact that pip has adoptedcalver, this project provides shims for pip releases
up to 2 years. pip earlier than that period MAY work but the compatibility isn’t guaranteed
by the continous integration. For example, the support forpip==20.0will be dropped at 1/1/2023.UsageImporting a shimYou can usepip-shimsto expose elements ofpip’s internal API by importing them:>>>frompip_shimsimportWheel>>>mywheel=Wheel('/path/to/my/wheel.whl')Resolving DependenciesYou can resolve the dependencies of a package using the shimmed resolver interface:>>>frompip_shims.shimsimportresolve,InstallRequirement>>>ireq=InstallRequirement.from_line("requests>=2.20")>>>results=resolve(ireq)>>>fork,vinresults.items():...print("{0}:{1!r}".format(k,v))requests: <InstallRequirement object: requests>=2.20 from https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl#sha256=9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31 editable=False>
idna: <InstallRequirement object: idna<2.9,>=2.5 from https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl#sha256=ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c (from requests>=2.20) editable=False>
urllib3: <InstallRequirement object: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 from https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl#sha256=a8a318824cc77d1fd4b2bec2ded92646630d7fe8619497b142c84a9e6f5a7293 (from requests>=2.20) editable=False>
chardet: <InstallRequirement object: chardet<3.1.0,>=3.0.2 from https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl#sha256=fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691 (from requests>=2.20) editable=False>
certifi: <InstallRequirement object: certifi>=2017.4.17 from https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl#sha256=fd7c7c74727ddcf00e9acd26bba8da604ffec95bf1c2144e67aff7a8b50e6cef (from requests>=2.20) editable=False>Available Shimspip-shimsprovides the following compatibility shims:Import PathImport NameFormer Path__version__pip_version<shimmed>build_wheel<shimmed>get_package_finder<shimmed>get_requirement_set<shimmed>get_resolver<shimmed>is_archive_filedownload<shimmed>is_file_urldownload<shimmed>make_preparer<shimmed>resolve<shimmed>shim_unpackcacheWheelCachewheelclicmdoptionscmdoptionscli.base_commandCommandbasecommandcli.cmdoptionsindex_groupcmdoptionscli.cmdoptionsmake_option_groupcmdoptionscli.parserConfigOptionParserbaseparsercli.req_commandSessionCommandMixincollectorLinkCollectorcommandscommands_dictcommands.freezeDEV_PKGScommands.installInstallCommanddistributionsmake_distribution_for_install_requirementoperations.prepare.make_abstract_distdistributions.baseAbstractDistributiondistributions.installedInstalledDistributiondistributions.sourceSourceDistributiondistributions.wheelWheelDistributiondownloadpath_to_urldownloadunpack_urlexceptionsBadCommandexceptionsBestVersionAlreadyInstalledexceptionsCommandErrorexceptionsDistributionNotFoundexceptionsDistributionNotFoundexceptionsInstallationErrorexceptionsPipErrorexceptionsPreviousBuildDirErrorexceptionsRequirementsFileParseErrorexceptionsUninstallationErrorindexCandidateEvaluatorindexCandidatePreferencesindexLinkEvaluatorindexPackageFinderindexparse_versionlocationsUSER_CACHE_DIRmodelsFormatControlindexmodels.indexPyPImodels.linkLinkindexmodels.search_scopeSearchScopemodels.selection_prefsSelectionPreferencesmodels.target_pythonTargetPythonnetwork.cacheSafeFileCachedownloadoperations.freezeFrozenRequirement<__init__>operations.prepareDownloaderoperations.preparemake_abstract_distreq.req_setoperations.prepareRequirementPreparerpep425tagsget_supportedpep425tagsget_tagsreq.constructors_strip_extrasreq.req_installreq.constructorsinstall_req_from_editablereq.req_install.InstallRequirementreq.constructorsinstall_req_from_linereq.req_install.InstallRequirementreq.constructorsinstall_req_from_req_stringreq.req_fileparse_requirementsreq.req_installInstallRequirementreq.req_setRequirementSetreq.req_trackerget_requirement_trackerreq.req_trackerRequirementTrackerreq.req_uninstallUninstallPathSetresolveResolverutils.compatstdlib_pkgscompatutils.hashesFAVORITE_HASHutils.miscget_installed_distributionsutilsutils.miscis_installable_dirutilsutils.temp_dirglobal_tempdir_managerutils.temp_dirTempDirectoryutils.urlsurl_to_pathdownloadvcs.versioncontrolVcsSupportvcs.VcsSupportwheelWheelwheelWheelBuilderwheel_builderbuildwheel_builderbuild_onewheel_builderbuild_one_inside_env