MCPcopy Index your code
hub / github.com/python/cpython / _get_pip_version

Function _get_pip_version

Lib/ensurepip/__init__.py:54–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53
54def _get_pip_version():
55 with _get_pip_whl_path_ctx() as bundled_wheel_path:
56 wheel_name = bundled_wheel_path.name
57 return (
58 # Extract '21.2.4' from 'pip-21.2.4-py3-none-any.whl'
59 wheel_name.
60 removeprefix('pip-').
61 partition('-')[0]
62 )
63
64
65def _run_pip(args, additional_paths=None):

Callers 1

versionFunction · 0.85

Calls 3

_get_pip_whl_path_ctxFunction · 0.85
partitionMethod · 0.45
removeprefixMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…