Skip to main content

Compatibility shims for pip versions 8 thru current.

Project description

https://img.shields.io/pypi/v/pip-shims.svg https://img.shields.io/pypi/l/pip-shims.svg Build Status https://img.shields.io/pypi/pyversions/pip-shims.svg https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg Documentation Status

Warning

Installation

Install from PyPI:

$ pipenv install pip-shims

Install from Github:

$ pipenv install -e git+https://github.com/sarugaku/pip-shims.git#egg=pip-shims

Summary

pip-shims is a set of compatibilty access shims to the pip internal API. pip-shims provides compatibility with pip versions 8.0 through the current release (18.x). The shims are provided using a lazy import strategy by hacking a module by overloading a class instance’s getattr method. This library exists due to my constant writing of the same set of import shims across many different libraries, including pipenv, pip-tools, requirementslib, and passa.

Usage

Importing a shim

You can use pip-shims to expose elements of pip’s internal API by importing them:

from pip_shims import Wheel
mywheel = Wheel('/path/to/my/wheel.whl')

Available Shims

pip-shims provides the following compatibility shims:

Import Path

Import Name

Former Path

req.constructors

_strip_extras

req.req_install

cli

cmdoptions

cmdoptions

cli.base_command

Command

basecommand

cli.parser

ConfigOptionParser

baseparser

commands.freeze

DEV_PKGS

exceptions

DistributionNotFound

utils.hashes

FAVORITE_HASH

models

FormatControl

index

models.target_python

TargetPython

models.selection_prefs

SelectionPreferences

collector

LinkCollector

index

LinkEvaluator

index

CandidatePreferences

utils.misc

get_installed_distributions

utils

utils.compat

stdlib_pkgs

compat

cli.cmdoptions

index_group

cmdoptions

cli.req_command

SessionCommandMixin

req.req_install

InstallRequirement

req.constructors

install_req_from_line

req.req_install.InstallRequirement

req.constructors

install_req_from_editable

req.req_install.InstallRequirement

req.constructors

install_req_from_req_string

req.req_uninstall

UninstallPathSet

distributions

make_distribution_for_install_requirement

operations.prepare.make_abstract_dist

distributions.base

AbstractDistribution

distributions.source

SourceDistribution

distributions.installed

InstalledDistribution

distributions.wheel

WheelDistribution

<shimmed>

is_archive_file

download

<shimmed>

is_file_url

download

utils.misc

is_installable_dir

utils

models.link

Link

index

models.search_scope

SearchScope

operations.prepare

make_abstract_dist

req.req_set

cli.cmdoptions

make_option_group

cmdoptions

index

CandidateEvaluator

index

PackageFinder

req.req_file

parse_requirements

index

parse_version

download

path_to_url

__version__

pip_version

exceptions

PipError

exceptions

InstallationError

exceptions

UninstallationError

exceptions

DistributionNotFound

exceptions

RequirementsFileParseError

exceptions

BestVersionAlreadyInstalled

exceptions

BadCommand

exceptions

CommandError

exceptions

PreviousBuildDirError

operations.prepare

RequirementPreparer

operations.freeze

FrozenRequirement

<__init__>

req.req_set

RequirementSet

req.req_tracker

RequirementTracker

resolve

Resolver

network.cache

SafeFileCache

download

utils.urls

url_to_path

download

download

unpack_url

locations

USER_CACHE_DIR

vcs.versioncontrol

VcsSupport

vcs.VcsSupport

wheel

Wheel

wheel

WheelBuilder

cache

WheelCache

wheel

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pip_shims-0.3.4.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pip_shims-0.3.4-py2.py3-none-any.whl (11.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pip_shims-0.3.4.tar.gz.

File metadata

  • Download URL: pip_shims-0.3.4.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for pip_shims-0.3.4.tar.gz
Algorithm Hash digest
SHA256 e37f7049034c6595418874a068b672e3eb39378a9640dc9203e0a8549c88a755
MD5 23a9dbad9848dd914ea230f2f7cee77c
BLAKE2b-256 16e2953165ad661a3b824cc3a566c5de66711f8745d42511aeab87eac5ab5fa6

See more details on using hashes here.

File details

Details for the file pip_shims-0.3.4-py2.py3-none-any.whl.

File metadata

  • Download URL: pip_shims-0.3.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for pip_shims-0.3.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81772e056f2d13e33ca98fecba0484a27174c9571a2e397707e83e33cffc919e
MD5 a0ed680bdc970e94c8a4d7063dfa7123
BLAKE2b-256 806422300860f1dd597f6a3bb0163a3f1ff246cdf492d4ba30d4f02b00c998e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page