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 https://travis-ci.com/sarugaku/pip-shims.svg?branch=master 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 --pre 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

utils.misc

get_installed_distributions

utils

utils.compat

stdlib_pkgs

compat

cli.cmdoptions

index_group

cmdoptions

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.req_uninstall

UninstallPathSet

download

is_archive_file

download

is_file_url

utils.misc

is_installable_dir

utils

index

Link

operations.prepare

make_abstract_dist

req.req_set

cli.cmdoptions

make_option_group

cmdoptions

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

download

SafeFileCache

download

url_to_path

download

unpack_url

locations

USER_CACHE_DIR

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.3.dev0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

pip_shims-0.3.3.dev0-py2.py3-none-any.whl (8.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pip_shims-0.3.3.dev0.tar.gz.

File metadata

  • Download URL: pip_shims-0.3.3.dev0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pip_shims-0.3.3.dev0.tar.gz
Algorithm Hash digest
SHA256 adddee88367ef89833cb2092da1a59d7bf5355d57b22b6c3015133a7f495f7c5
MD5 987c626f566d38447f455e9c81922e17
BLAKE2b-256 132446cacbbb0c3cb2bfe56c9d9bc34ba6c69dfd271c96ef46720d50914c7fcc

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pip_shims-0.3.3.dev0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pip_shims-0.3.3.dev0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7bc6b2a9998617026db2f50263cf670dbaf6a1fe3899017e1d4ef5d9c66ffee1
MD5 3159f91adbf51c32f5be28b54f90bdf4
BLAKE2b-256 b4b17c1e5c2938701f695588dbddeb78a6db0f2a992a9da569f3f9b770e7dc88

See more details on using hashes here.

Provenance

Supported by

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