├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ └── feature-request.yml ├── PULL_REQUEST_TEMPLATE.md ├── chronographer.yml ├── triage-new-issues.yml └── workflows │ ├── ci.yml │ ├── lock-threads.yml │ ├── news-file.yml │ └── update-rtd-redirects.yml ├── .gitignore ├── .mailmap ├── .pre-commit-config.yaml ├── .readthedocs-custom-redirects.yml ├── .readthedocs.yml ├── AUTHORS.txt ├── LICENSE.txt ├── MANIFEST.in ├── NEWS.rst ├── README.rst ├── SECURITY.md ├── docs ├── html │ ├── cli │ │ ├── index.md │ │ ├── pip.rst │ │ ├── pip_cache.rst │ │ ├── pip_check.rst │ │ ├── pip_config.rst │ │ ├── pip_debug.rst │ │ ├── pip_download.rst │ │ ├── pip_freeze.rst │ │ ├── pip_hash.rst │ │ ├── pip_inspect.rst │ │ ├── pip_install.rst │ │ ├── pip_list.rst │ │ ├── pip_search.rst │ │ ├── pip_show.rst │ │ ├── pip_uninstall.rst │ │ └── pip_wheel.rst │ ├── conf.py │ ├── copyright.rst │ ├── development │ │ ├── architecture │ │ │ ├── anatomy.rst │ │ │ ├── command-line-interface.rst │ │ │ ├── configuration-files.rst │ │ │ ├── index.rst │ │ │ ├── overview.rst │ │ │ ├── package-finding.rst │ │ │ └── upgrade-options.rst │ │ ├── ci.rst │ │ ├── contributing.rst │ │ ├── conventions.rst │ │ ├── getting-started.rst │ │ ├── index.rst │ │ ├── issue-triage.md │ │ ├── release-process.rst │ │ └── vendoring-policy.rst │ ├── getting-started.md │ ├── index.md │ ├── installation.md │ ├── installing.rst │ ├── news.rst │ ├── quickstart.rst │ ├── reference │ │ ├── build-system │ │ │ ├── index.md │ │ │ ├── pyproject-toml.md │ │ │ └── setup-py.md │ │ ├── index.md │ │ ├── inspect-report.md │ │ ├── installation-report.md │ │ ├── pip.rst │ │ ├── pip_cache.rst │ │ ├── pip_check.rst │ │ ├── pip_config.rst │ │ ├── pip_debug.rst │ │ ├── pip_download.rst │ │ ├── pip_freeze.rst │ │ ├── pip_hash.rst │ │ ├── pip_install.rst │ │ ├── pip_list.rst │ │ ├── pip_search.rst │ │ ├── pip_show.rst │ │ ├── pip_uninstall.rst │ │ ├── pip_wheel.rst │ │ ├── requirement-specifiers.md │ │ └── requirements-file-format.md │ ├── topics │ │ ├── authentication.md │ │ ├── caching.md │ │ ├── configuration.md │ │ ├── dependency-resolution.md │ │ ├── deps.dot │ │ ├── deps.png │ │ ├── https-certificates.md │ │ ├── index.md │ │ ├── local-project-installs.md │ │ ├── more-dependency-resolution.md │ │ ├── python-option.md │ │ ├── repeatable-installs.md │ │ ├── secure-installs.md │ │ └── vcs-support.md │ ├── user_guide.rst │ └── ux_research_design.rst ├── man │ ├── commands │ │ ├── cache.rst │ │ ├── check.rst │ │ ├── config.rst │ │ ├── debug.rst │ │ ├── download.rst │ │ ├── freeze.rst │ │ ├── hash.rst │ │ ├── help.rst │ │ ├── install.rst │ │ ├── list.rst │ │ ├── search.rst │ │ ├── show.rst │ │ ├── uninstall.rst │ │ └── wheel.rst │ └── index.rst ├── pip_sphinxext.py └── requirements.txt ├── news ├── .gitignore ├── 11394.bugfix.rst ├── 12005.bugfix.rst ├── 12155.process.rst ├── 12175.removal.rst ├── 12183.trivial.rst ├── 12187.bugfix.rst ├── 12191.bugfix.rst ├── 12194.trivial.rst ├── 12204.feature.rst ├── 12215.feature.rst ├── 12224.feature.rst ├── 12225.bugfix.rst ├── 12252.trivial.rst ├── 12254.process.rst ├── 12261.trivial.rst ├── 4A0C40FF-ABE1-48C7-954C-7C3EB229135F.trivial.rst ├── 732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst ├── 85F7E260-68FF-4C1E-A2CB-CF8634829D2D.trivial.rst ├── certifi.vendor.rst └── zhsdgdlsjgksdfj.trivial.rst ├── noxfile.py ├── pyproject.toml ├── setup.cfg ├── setup.py ├── src └── pip │ ├── __init__.py │ ├── __main__.py │ ├── __pip-runner__.py │ ├── _internal │ ├── __init__.py │ ├── build_env.py │ ├── cache.py │ ├── cli │ │ ├── __init__.py │ │ ├── autocompletion.py │ │ ├── base_command.py │ │ ├── cmdoptions.py │ │ ├── command_context.py │ │ ├── main.py │ │ ├── main_parser.py │ │ ├── parser.py │ │ ├── progress_bars.py │ │ ├── req_command.py │ │ ├── spinners.py │ │ └── status_codes.py │ ├── commands │ │ ├── __init__.py │ │ ├── cache.py │ │ ├── check.py │ │ ├── completion.py │ │ ├── configuration.py │ │ ├── debug.py │ │ ├── download.py │ │ ├── freeze.py │ │ ├── hash.py │ │ ├── help.py │ │ ├── index.py │ │ ├── inspect.py │ │ ├── install.py │ │ ├── list.py │ │ ├── search.py │ │ ├── show.py │ │ ├── uninstall.py │ │ └── wheel.py │ ├── configuration.py │ ├── distributions │ │ ├── __init__.py │ │ ├── base.py │ │ ├── installed.py │ │ ├── sdist.py │ │ └── wheel.py │ ├── exceptions.py │ ├── index │ │ ├── __init__.py │ │ ├── collector.py │ │ ├── package_finder.py │ │ └── sources.py │ ├── locations │ │ ├── __init__.py │ │ ├── _distutils.py │ │ ├── _sysconfig.py │ │ └── base.py │ ├── main.py │ ├── metadata │ │ ├── __init__.py │ │ ├── _json.py │ │ ├── base.py │ │ ├── importlib │ │ │ ├── __init__.py │ │ │ ├── _compat.py │ │ │ ├── _dists.py │ │ │ └── _envs.py │ │ └── pkg_resources.py │ ├── models │ │ ├── __init__.py │ │ ├── candidate.py │ │ ├── direct_url.py │ │ ├── format_control.py │ │ ├── index.py │ │ ├── installation_report.py │ │ ├── link.py │ │ ├── scheme.py │ │ ├── search_scope.py │ │ ├── selection_prefs.py │ │ ├── target_python.py │ │ └── wheel.py │ ├── network │ │ ├── __init__.py │ │ ├── auth.py │ │ ├── cache.py │ │ ├── download.py │ │ ├── lazy_wheel.py │ │ ├── session.py │ │ ├── utils.py │ │ └── xmlrpc.py │ ├── operations │ │ ├── __init__.py │ │ ├── build │ │ │ ├── __init__.py │ │ │ ├── build_tracker.py │ │ │ ├── metadata.py │ │ │ ├── metadata_editable.py │ │ │ ├── metadata_legacy.py │ │ │ ├── wheel.py │ │ │ ├── wheel_editable.py │ │ │ └── wheel_legacy.py │ │ ├── check.py │ │ ├── freeze.py │ │ ├── install │ │ │ ├── __init__.py │ │ │ ├── editable_legacy.py │ │ │ └── wheel.py │ │ └── prepare.py │ ├── pyproject.py │ ├── req │ │ ├── __init__.py │ │ ├── constructors.py │ │ ├── req_file.py │ │ ├── req_install.py │ │ ├── req_set.py │ │ └── req_uninstall.py │ ├── resolution │ │ ├── __init__.py │ │ ├── base.py │ │ ├── legacy │ │ │ ├── __init__.py │ │ │ └── resolver.py │ │ └── resolvelib │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── candidates.py │ │ │ ├── factory.py │ │ │ ├── found_candidates.py │ │ │ ├── provider.py │ │ │ ├── reporter.py │ │ │ ├── requirements.py │ │ │ └── resolver.py │ ├── self_outdated_check.py │ ├── utils │ │ ├── __init__.py │ │ ├── _jaraco_text.py │ │ ├── _log.py │ │ ├── appdirs.py │ │ ├── compat.py │ │ ├── compatibility_tags.py │ │ ├── datetime.py │ │ ├── deprecation.py │ │ ├── direct_url_helpers.py │ │ ├── egg_link.py │ │ ├── encoding.py │ │ ├── entrypoints.py │ │ ├── filesystem.py │ │ ├── filetypes.py │ │ ├── glibc.py │ │ ├── hashes.py │ │ ├── logging.py │ │ ├── misc.py │ │ ├── models.py │ │ ├── packaging.py │ │ ├── setuptools_build.py │ │ ├── subprocess.py │ │ ├── temp_dir.py │ │ ├── unpacking.py │ │ ├── urls.py │ │ ├── virtualenv.py │ │ └── wheel.py │ ├── vcs │ │ ├── __init__.py │ │ ├── bazaar.py │ │ ├── git.py │ │ ├── mercurial.py │ │ ├── subversion.py │ │ └── versioncontrol.py │ └── wheel_builder.py │ ├── _vendor │ ├── README.rst │ ├── __init__.py │ ├── cachecontrol.pyi │ ├── cachecontrol │ │ ├── LICENSE.txt │ │ ├── __init__.py │ │ ├── _cmd.py │ │ ├── adapter.py │ │ ├── cache.py │ │ ├── caches │ │ │ ├── __init__.py │ │ │ ├── file_cache.py │ │ │ └── redis_cache.py │ │ ├── compat.py │ │ ├── controller.py │ │ ├── filewrapper.py │ │ ├── heuristics.py │ │ ├── serialize.py │ │ └── wrapper.py │ ├── certifi │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── cacert.pem │ │ ├── core.py │ │ └── py.typed │ ├── chardet │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── big5freq.py │ │ ├── big5prober.py │ │ ├── chardistribution.py │ │ ├── charsetgroupprober.py │ │ ├── charsetprober.py │ │ ├── cli │ │ │ ├── __init__.py │ │ │ └── chardetect.py │ │ ├── codingstatemachine.py │ │ ├── codingstatemachinedict.py │ │ ├── cp949prober.py │ │ ├── enums.py │ │ ├── escprober.py │ │ ├── escsm.py │ │ ├── eucjpprober.py │ │ ├── euckrfreq.py │ │ ├── euckrprober.py │ │ ├── euctwfreq.py │ │ ├── euctwprober.py │ │ ├── gb2312freq.py │ │ ├── gb2312prober.py │ │ ├── hebrewprober.py │ │ ├── jisfreq.py │ │ ├── johabfreq.py │ │ ├── johabprober.py │ │ ├── jpcntx.py │ │ ├── langbulgarianmodel.py │ │ ├── langgreekmodel.py │ │ ├── langhebrewmodel.py │ │ ├── langhungarianmodel.py │ │ ├── langrussianmodel.py │ │ ├── langthaimodel.py │ │ ├── langturkishmodel.py │ │ ├── latin1prober.py │ │ ├── macromanprober.py │ │ ├── mbcharsetprober.py │ │ ├── mbcsgroupprober.py │ │ ├── mbcssm.py │ │ ├── metadata │ │ │ ├── __init__.py │ │ │ └── languages.py │ │ ├── py.typed │ │ ├── resultdict.py │ │ ├── sbcharsetprober.py │ │ ├── sbcsgroupprober.py │ │ ├── sjisprober.py │ │ ├── universaldetector.py │ │ ├── utf1632prober.py │ │ ├── utf8prober.py │ │ └── version.py │ ├── colorama.pyi │ ├── colorama │ │ ├── LICENSE.txt │ │ ├── __init__.py │ │ ├── ansi.py │ │ ├── ansitowin32.py │ │ ├── initialise.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── ansi_test.py │ │ │ ├── ansitowin32_test.py │ │ │ ├── initialise_test.py │ │ │ ├── isatty_test.py │ │ │ ├── utils.py │ │ │ └── winterm_test.py │ │ ├── win32.py │ │ └── winterm.py │ ├── distlib.pyi │ ├── distlib │ │ ├── LICENSE.txt │ │ ├── __init__.py │ │ ├── compat.py │ │ ├── database.py │ │ ├── index.py │ │ ├── locators.py │ │ ├── manifest.py │ │ ├── markers.py │ │ ├── metadata.py │ │ ├── resources.py │ │ ├── scripts.py │ │ ├── t32.exe │ │ ├── t64-arm.exe │ │ ├── t64.exe │ │ ├── util.py │ │ ├── version.py │ │ ├── w32.exe │ │ ├── w64-arm.exe │ │ ├── w64.exe │ │ └── wheel.py │ ├── distro │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── distro.py │ │ └── py.typed │ ├── idna │ │ ├── LICENSE.md │ │ ├── __init__.py │ │ ├── codec.py │ │ ├── compat.py │ │ ├── core.py │ │ ├── idnadata.py │ │ ├── intranges.py │ │ ├── package_data.py │ │ ├── py.typed │ │ └── uts46data.py │ ├── msgpack.pyi │ ├── msgpack │ │ ├── COPYING │ │ ├── __init__.py │ │ ├── exceptions.py │ │ ├── ext.py │ │ └── fallback.py │ ├── packaging │ │ ├── LICENSE │ │ ├── LICENSE.APACHE │ │ ├── LICENSE.BSD │ │ ├── __about__.py │ │ ├── __init__.py │ │ ├── _manylinux.py │ │ ├── _musllinux.py │ │ ├── _structures.py │ │ ├── markers.py │ │ ├── py.typed │ │ ├── requirements.py │ │ ├── specifiers.py │ │ ├── tags.py │ │ ├── utils.py │ │ └── version.py │ ├── pkg_resources.pyi │ ├── pkg_resources │ │ ├── LICENSE │ │ └── __init__.py │ ├── platformdirs │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── android.py │ │ ├── api.py │ │ ├── macos.py │ │ ├── py.typed │ │ ├── unix.py │ │ ├── version.py │ │ └── windows.py │ ├── pygments.pyi │ ├── pygments │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── cmdline.py │ │ ├── console.py │ │ ├── filter.py │ │ ├── filters │ │ │ └── __init__.py │ │ ├── formatter.py │ │ ├── formatters │ │ │ ├── __init__.py │ │ │ ├── _mapping.py │ │ │ ├── bbcode.py │ │ │ ├── groff.py │ │ │ ├── html.py │ │ │ ├── img.py │ │ │ ├── irc.py │ │ │ ├── latex.py │ │ │ ├── other.py │ │ │ ├── pangomarkup.py │ │ │ ├── rtf.py │ │ │ ├── svg.py │ │ │ ├── terminal.py │ │ │ └── terminal256.py │ │ ├── lexer.py │ │ ├── lexers │ │ │ ├── __init__.py │ │ │ ├── _mapping.py │ │ │ └── python.py │ │ ├── modeline.py │ │ ├── plugin.py │ │ ├── regexopt.py │ │ ├── scanner.py │ │ ├── sphinxext.py │ │ ├── style.py │ │ ├── styles │ │ │ └── __init__.py │ │ ├── token.py │ │ ├── unistring.py │ │ └── util.py │ ├── pyparsing │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── actions.py │ │ ├── common.py │ │ ├── core.py │ │ ├── diagram │ │ │ └── __init__.py │ │ ├── exceptions.py │ │ ├── helpers.py │ │ ├── py.typed │ │ ├── results.py │ │ ├── testing.py │ │ ├── unicode.py │ │ └── util.py │ ├── pyproject_hooks.pyi │ ├── pyproject_hooks │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── _compat.py │ │ ├── _impl.py │ │ └── _in_process │ │ │ ├── __init__.py │ │ │ └── _in_process.py │ ├── requests.pyi │ ├── requests │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __version__.py │ │ ├── _internal_utils.py │ │ ├── adapters.py │ │ ├── api.py │ │ ├── auth.py │ │ ├── certs.py │ │ ├── compat.py │ │ ├── cookies.py │ │ ├── exceptions.py │ │ ├── help.py │ │ ├── hooks.py │ │ ├── models.py │ │ ├── packages.py │ │ ├── sessions.py │ │ ├── status_codes.py │ │ ├── structures.py │ │ └── utils.py │ ├── resolvelib │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __init__.pyi │ │ ├── compat │ │ │ ├── __init__.py │ │ │ ├── collections_abc.py │ │ │ └── collections_abc.pyi │ │ ├── providers.py │ │ ├── providers.pyi │ │ ├── py.typed │ │ ├── reporters.py │ │ ├── reporters.pyi │ │ ├── resolvers.py │ │ ├── resolvers.pyi │ │ ├── structs.py │ │ └── structs.pyi │ ├── rich │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── _cell_widths.py │ │ ├── _emoji_codes.py │ │ ├── _emoji_replace.py │ │ ├── _export_format.py │ │ ├── _extension.py │ │ ├── _fileno.py │ │ ├── _inspect.py │ │ ├── _log_render.py │ │ ├── _loop.py │ │ ├── _null_file.py │ │ ├── _palettes.py │ │ ├── _pick.py │ │ ├── _ratio.py │ │ ├── _spinners.py │ │ ├── _stack.py │ │ ├── _timer.py │ │ ├── _win32_console.py │ │ ├── _windows.py │ │ ├── _windows_renderer.py │ │ ├── _wrap.py │ │ ├── abc.py │ │ ├── align.py │ │ ├── ansi.py │ │ ├── bar.py │ │ ├── box.py │ │ ├── cells.py │ │ ├── color.py │ │ ├── color_triplet.py │ │ ├── columns.py │ │ ├── console.py │ │ ├── constrain.py │ │ ├── containers.py │ │ ├── control.py │ │ ├── default_styles.py │ │ ├── diagnose.py │ │ ├── emoji.py │ │ ├── errors.py │ │ ├── file_proxy.py │ │ ├── filesize.py │ │ ├── highlighter.py │ │ ├── json.py │ │ ├── jupyter.py │ │ ├── layout.py │ │ ├── live.py │ │ ├── live_render.py │ │ ├── logging.py │ │ ├── markup.py │ │ ├── measure.py │ │ ├── padding.py │ │ ├── pager.py │ │ ├── palette.py │ │ ├── panel.py │ │ ├── pretty.py │ │ ├── progress.py │ │ ├── progress_bar.py │ │ ├── prompt.py │ │ ├── protocol.py │ │ ├── py.typed │ │ ├── region.py │ │ ├── repr.py │ │ ├── rule.py │ │ ├── scope.py │ │ ├── screen.py │ │ ├── segment.py │ │ ├── spinner.py │ │ ├── status.py │ │ ├── style.py │ │ ├── styled.py │ │ ├── syntax.py │ │ ├── table.py │ │ ├── terminal_theme.py │ │ ├── text.py │ │ ├── theme.py │ │ ├── themes.py │ │ ├── traceback.py │ │ └── tree.py │ ├── six.LICENSE │ ├── six.py │ ├── six │ │ ├── __init__.pyi │ │ └── moves │ │ │ ├── __init__.pyi │ │ │ └── configparser.pyi │ ├── tenacity │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── _asyncio.py │ │ ├── _utils.py │ │ ├── after.py │ │ ├── before.py │ │ ├── before_sleep.py │ │ ├── nap.py │ │ ├── py.typed │ │ ├── retry.py │ │ ├── stop.py │ │ ├── tornadoweb.py │ │ └── wait.py │ ├── tomli │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── _parser.py │ │ ├── _re.py │ │ ├── _types.py │ │ └── py.typed │ ├── typing_extensions.LICENSE │ ├── typing_extensions.py │ ├── typing_extensions.pyi │ ├── urllib3.pyi │ ├── urllib3 │ │ ├── LICENSE.txt │ │ ├── __init__.py │ │ ├── _collections.py │ │ ├── _version.py │ │ ├── connection.py │ │ ├── connectionpool.py │ │ ├── contrib │ │ │ ├── __init__.py │ │ │ ├── _appengine_environ.py │ │ │ ├── _securetransport │ │ │ │ ├── __init__.py │ │ │ │ ├── bindings.py │ │ │ │ └── low_level.py │ │ │ ├── appengine.py │ │ │ ├── ntlmpool.py │ │ │ ├── pyopenssl.py │ │ │ ├── securetransport.py │ │ │ └── socks.py │ │ ├── exceptions.py │ │ ├── fields.py │ │ ├── filepost.py │ │ ├── packages │ │ │ ├── __init__.py │ │ │ ├── backports │ │ │ │ ├── __init__.py │ │ │ │ ├── makefile.py │ │ │ │ └── weakref_finalize.py │ │ │ └── six.py │ │ ├── poolmanager.py │ │ ├── request.py │ │ ├── response.py │ │ └── util │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ ├── proxy.py │ │ │ ├── queue.py │ │ │ ├── request.py │ │ │ ├── response.py │ │ │ ├── retry.py │ │ │ ├── ssl_.py │ │ │ ├── ssl_match_hostname.py │ │ │ ├── ssltransport.py │ │ │ ├── timeout.py │ │ │ ├── url.py │ │ │ └── wait.py │ ├── vendor.txt │ ├── webencodings.pyi │ └── webencodings │ │ ├── LICENSE │ │ ├── __init__.py │ │ ├── labels.py │ │ ├── mklabels.py │ │ ├── tests.py │ │ └── x_user_defined.py │ └── py.typed ├── tests ├── __init__.py ├── conftest.py ├── data │ ├── backends │ │ ├── dummy_backend-0.1-py2.py3-none-any.whl │ │ ├── test_backend-0.1-py2.py3-none-any.whl │ │ └── test_backend-0.1.tar.gz │ ├── completion_paths │ │ ├── README.txt │ │ ├── REPLAY │ │ │ └── video.mpeg │ │ ├── requirements.txt │ │ └── resources │ │ │ └── images │ │ │ └── icon.png │ ├── indexes │ │ ├── README.txt │ │ ├── datarequire │ │ │ └── fakepackage │ │ │ │ └── index.html │ │ ├── dev │ │ │ └── bar │ │ │ │ └── index.html │ │ ├── empty_with_pkg │ │ │ ├── index.html │ │ │ └── simple-1.0.tar.gz │ │ ├── in dex │ │ │ ├── README.txt │ │ │ └── simple │ │ │ │ └── index.html │ │ ├── pre │ │ │ └── bar │ │ │ │ └── index.html │ │ ├── simple │ │ │ └── simple │ │ │ │ └── index.html │ │ ├── yanked │ │ │ └── simple │ │ │ │ └── index.html │ │ └── yanked_all │ │ │ └── simple │ │ │ └── index.html │ ├── packages │ │ ├── BrokenEmitsUTF8 │ │ │ ├── broken.py │ │ │ └── setup.py │ │ ├── FSPkg │ │ │ ├── fspkg │ │ │ │ └── __init__.py │ │ │ └── setup.py │ │ ├── HackedEggInfo │ │ │ └── setup.py │ │ ├── INITools-0.2.tar.gz │ │ ├── LineEndings │ │ │ └── setup.py │ │ ├── LocalEnvironMarker │ │ │ ├── .gitignore │ │ │ ├── localenvironmarker │ │ │ │ └── __init__.py │ │ │ └── setup.py │ │ ├── LocalExtras-0.0.2 │ │ │ ├── .gitignore │ │ │ ├── localextras │ │ │ │ └── __init__.py │ │ │ └── setup.py │ │ ├── LocalExtras │ │ │ ├── .gitignore │ │ │ ├── localextras │ │ │ │ └── __init__.py │ │ │ └── setup.py │ │ ├── README.txt │ │ ├── SetupPyLatin1 │ │ │ └── setup.py │ │ ├── SetupPyUTF8 │ │ │ └── setup.py │ │ ├── TopoRequires-0.0.1.tar.gz │ │ ├── TopoRequires2-0.0.1.tar.gz │ │ ├── TopoRequires3-0.0.1.tar.gz │ │ ├── TopoRequires4-0.0.1.tar.gz │ │ ├── Upper-1.0.tar.gz │ │ ├── Upper-2.0.tar.gz │ │ ├── argparse-1.2.1.tar.gz │ │ ├── broken-0.1.tar.gz │ │ ├── broken-0.2broken.tar.gz │ │ ├── brokenegginfo-0.1.tar.gz │ │ ├── brokenwheel-1.0-py2.py3-none-any.whl │ │ ├── child-0.1.tar.gz │ │ ├── colander-0.9.9-py2.py3-none-any.whl │ │ ├── compilewheel-1.0-py2.py3-none-any.whl │ │ ├── complex_dist-0.1-py2.py3-none-any.whl │ │ ├── console_scripts_uppercase-1.0-py2.py3-none-any.whl │ │ ├── corruptwheel-1.0-py2.py3-none-any.whl │ │ ├── distribute-0.7.3.zip │ │ ├── duplicate-1.0.tar.gz │ │ ├── gmpy-1.15.tar.gz │ │ ├── gmpy2-2.0.tar.gz │ │ ├── has.script-1.0-py2.py3-none-any.whl │ │ ├── invalid.whl │ │ ├── meta-1.0-py2.py3-none-any.whl │ │ ├── mypy-0.782-py3-none-any.whl │ │ ├── parent-0.1.tar.gz │ │ ├── pep517_setup_and_pyproject │ │ │ ├── pyproject.toml │ │ │ ├── setup.cfg │ │ │ └── setup.py │ │ ├── pep517_wrapper_buildsys │ │ │ ├── mybuildsys.py │ │ │ ├── pyproject.toml │ │ │ ├── setup.cfg │ │ │ └── setup.py │ │ ├── pep518-3.0.tar.gz │ │ ├── pep518_forkbomb-235.tar.gz │ │ ├── pep518_twin_forkbombs_first-234.tar.gz │ │ ├── pep518_twin_forkbombs_second-238.tar.gz │ │ ├── pep518_with_extra_and_markers-1.0.tar.gz │ │ ├── pip-test-package-0.1.1.tar.gz │ │ ├── pip-test-package-0.1.tar.gz │ │ ├── pkgwithmpkg-1.0-py2.7-macosx10.7.mpkg.zip │ │ ├── pkgwithmpkg-1.0.tar.gz │ │ ├── priority-1.0-py2.py3-none-any.whl │ │ ├── priority-1.0.tar.gz │ │ ├── prjwithdatafile-1.0-py2.py3-none-any.whl │ │ ├── require_simple-1.0.tar.gz │ │ ├── requiresPaste │ │ │ ├── pyproject.toml │ │ │ └── requiresPaste.py │ │ ├── requires_simple_extra-0.1-py2.py3-none-any.whl │ │ ├── requires_source-1.0-py2.py3-none-any.whl │ │ ├── requires_wheelbroken_upper │ │ │ ├── requires_wheelbroken_upper │ │ │ │ └── __init__.py │ │ │ └── setup.py │ │ ├── requiresupper-1.0.tar.gz │ │ ├── script.wheel1-0.1-py2.py3-none-any.whl │ │ ├── script.wheel1a-0.1-py2.py3-none-any.whl │ │ ├── script.wheel2-0.1-py2.py3-none-any.whl │ │ ├── script.wheel2a-0.1-py2.py3-none-any.whl │ │ ├── script.wheel3-0.1-py2.py3-none-any.whl │ │ ├── setuptools-0.9.6.tar.gz │ │ ├── setuptools-0.9.8-py2.py3-none-any.whl │ │ ├── simple-1.0.tar.gz │ │ ├── simple-2.0.tar.gz │ │ ├── simple-3.0.tar.gz │ │ ├── simple.dist-0.1-py1-none-invalid.whl │ │ ├── simple.dist-0.1-py2.py3-none-any.whl │ │ ├── simple2-1.0.tar.gz │ │ ├── simple2-2.0.tar.gz │ │ ├── simple2-3.0.tar.gz │ │ ├── simple_namespace-1.0-py2.py3-none-any.whl │ │ ├── simplewheel-1.0-py2.py3-none-any.whl │ │ ├── simplewheel-2.0-1-py2.py3-none-any.whl │ │ ├── simplewheel-2.0-py2.py3-none-any.whl │ │ ├── simplewheel-2.0-py3-fakeabi-fakeplat.whl │ │ ├── singlemodule-0.0.0.tar.gz │ │ ├── singlemodule-0.0.1.tar.gz │ │ ├── singlemodule-0.0.1.tar.lzma │ │ ├── singlemodule-0.0.1.tar.xz │ │ ├── source-1.0.tar.gz │ │ ├── symlinks │ │ │ ├── doc │ │ │ │ └── intro │ │ │ ├── docs │ │ │ ├── setup.cfg │ │ │ ├── setup.py │ │ │ └── symlinks │ │ │ │ └── __init__.py │ │ ├── test_tar.tgz │ │ ├── test_zip.zip │ │ ├── translationstring-1.1.tar.gz │ │ ├── virtualenv-1.10.tar.gz │ │ ├── virtualenv-1.9.1.tar.gz │ │ ├── wheelbroken-0.1.tar.gz │ │ └── wheelbrokenafter-0.1.tar.gz │ ├── packages2 │ │ └── duplicate-1.0.tar.gz │ ├── packages3 │ │ ├── dinner │ │ │ ├── Dinner-1.0.tar.gz │ │ │ ├── Dinner-2.0.tar.gz │ │ │ └── index.html │ │ ├── index.html │ │ └── requiredinner │ │ │ ├── index.html │ │ │ └── requiredinner-1.0.tar.gz │ ├── reqfiles │ │ ├── README.txt │ │ └── supported_options2.txt │ └── src │ │ ├── TopoRequires │ │ ├── setup.py │ │ └── toporequires │ │ │ └── __init__.py │ │ ├── TopoRequires2 │ │ ├── setup.cfg.pending │ │ ├── setup.py │ │ └── toporequires2 │ │ │ └── __init__.py │ │ ├── TopoRequires3 │ │ ├── setup.cfg.pending │ │ ├── setup.py │ │ └── toporequires3 │ │ │ └── __init__.py │ │ ├── TopoRequires4 │ │ ├── setup.cfg.pending │ │ ├── setup.py │ │ └── toporequires4 │ │ │ └── __init__.py │ │ ├── chattymodule │ │ ├── chattymodule.py │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── compilewheel │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── simple │ │ │ └── __init__.py │ │ ├── extension │ │ ├── extension.c │ │ └── setup.py │ │ ├── pep517_pyproject_only │ │ └── pyproject.toml │ │ ├── pep517_setup_and_pyproject │ │ ├── pyproject.toml │ │ └── setup.py │ │ ├── pep517_setup_cfg_only │ │ └── setup.cfg │ │ ├── pep517_setup_only │ │ └── setup.py │ │ ├── pep518-3.0 │ │ ├── MANIFEST.in │ │ ├── pep518.py │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── pep518_conflicting_requires │ │ ├── MANIFEST.in │ │ ├── pep518.py │ │ ├── pyproject.toml │ │ └── setup.py │ │ ├── pep518_forkbomb-235 │ │ ├── MANIFEST.in │ │ ├── pep518_forkbomb.py │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── pep518_invalid_build_system │ │ ├── MANIFEST.in │ │ ├── pep518.py │ │ ├── pyproject.toml │ │ └── setup.py │ │ ├── pep518_invalid_requires │ │ ├── MANIFEST.in │ │ ├── pep518.py │ │ ├── pyproject.toml │ │ └── setup.py │ │ ├── pep518_missing_requires │ │ ├── MANIFEST.in │ │ ├── pep518.py │ │ ├── pyproject.toml │ │ └── setup.py │ │ ├── pep518_twin_forkbombs_first-234 │ │ ├── MANIFEST.in │ │ ├── pep518_twin_forkbombs_first.py │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── pep518_twin_forkbombs_second-238 │ │ ├── MANIFEST.in │ │ ├── pep518_twin_forkbombs_second.py │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── pep518_with_extra_and_markers-1.0 │ │ ├── MANIFEST.in │ │ ├── pep518_with_extra_and_markers.py │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── pep518_with_namespace_package-1.0 │ │ ├── pep518_with_namespace_package.py │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── prjwithdatafile │ │ ├── prjwithdatafile │ │ │ ├── README.txt │ │ │ └── somemodule.py │ │ └── setup.py │ │ ├── requires_capitalized │ │ └── setup.py │ │ ├── requires_requires_capitalized │ │ └── setup.py │ │ ├── requires_simple │ │ ├── requires_simple │ │ │ └── __init__.py │ │ └── setup.py │ │ ├── requires_simple_extra │ │ ├── requires_simple_extra.py │ │ ├── setup.cfg │ │ └── setup.py │ │ ├── setup_error │ │ └── setup.py │ │ ├── simple_namespace │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── simple_namespace │ │ │ ├── __init__.py │ │ │ └── module │ │ │ └── __init__.py │ │ ├── simplewheel-1.0 │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── simplewheel │ │ │ └── __init__.py │ │ ├── simplewheel-2.0 │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── simplewheel │ │ │ └── __init__.py │ │ ├── singlemodule │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── singlemodule.py │ │ └── withpyproject │ │ ├── pyproject.toml │ │ └── setup.py ├── functional │ ├── __init__.py │ ├── test_bad_url.py │ ├── test_broken_stdout.py │ ├── test_build_env.py │ ├── test_cache.py │ ├── test_check.py │ ├── test_cli.py │ ├── test_completion.py │ ├── test_config_settings.py │ ├── test_configuration.py │ ├── test_debug.py │ ├── test_download.py │ ├── test_fast_deps.py │ ├── test_freeze.py │ ├── test_hash.py │ ├── test_help.py │ ├── test_index.py │ ├── test_inspect.py │ ├── test_install.py │ ├── test_install_check.py │ ├── test_install_cleanup.py │ ├── test_install_compat.py │ ├── test_install_config.py │ ├── test_install_direct_url.py │ ├── test_install_extras.py │ ├── test_install_force_reinstall.py │ ├── test_install_index.py │ ├── test_install_report.py │ ├── test_install_reqs.py │ ├── test_install_requested.py │ ├── test_install_upgrade.py │ ├── test_install_user.py │ ├── test_install_vcs_git.py │ ├── test_install_wheel.py │ ├── test_list.py │ ├── test_new_resolver.py │ ├── test_new_resolver_errors.py │ ├── test_new_resolver_hashes.py │ ├── test_new_resolver_target.py │ ├── test_new_resolver_user.py │ ├── test_no_color.py │ ├── test_pep517.py │ ├── test_pep660.py │ ├── test_pep668.py │ ├── test_pip_runner_script.py │ ├── test_python_option.py │ ├── test_search.py │ ├── test_show.py │ ├── test_truststore.py │ ├── test_uninstall.py │ ├── test_uninstall_user.py │ ├── test_vcs_bazaar.py │ ├── test_vcs_git.py │ ├── test_vcs_mercurial.py │ ├── test_vcs_subversion.py │ ├── test_warning.py │ └── test_wheel.py ├── lib │ ├── __init__.py │ ├── certs.py │ ├── compat.py │ ├── configuration_helpers.py │ ├── direct_url.py │ ├── filesystem.py │ ├── git_submodule_helpers.py │ ├── index.py │ ├── local_repos.py │ ├── options_helpers.py │ ├── requests_mocks.py │ ├── server.py │ ├── test_lib.py │ ├── test_wheel.py │ ├── venv.py │ └── wheel.py ├── requirements-common_wheels.txt ├── requirements.txt └── unit │ ├── __init__.py │ ├── metadata │ ├── test_metadata.py │ └── test_metadata_pkg_resources.py │ ├── resolution_resolvelib │ ├── __init__.py │ ├── conftest.py │ ├── test_provider.py │ ├── test_requirement.py │ └── test_resolver.py │ ├── test_appdirs.py │ ├── test_base_command.py │ ├── test_cache.py │ ├── test_cmdoptions.py │ ├── test_collector.py │ ├── test_command_install.py │ ├── test_commands.py │ ├── test_compat.py │ ├── test_configuration.py │ ├── test_direct_url.py │ ├── test_direct_url_helpers.py │ ├── test_exceptions.py │ ├── test_finder.py │ ├── test_format_control.py │ ├── test_index.py │ ├── test_link.py │ ├── test_locations.py │ ├── test_logging.py │ ├── test_models.py │ ├── test_models_wheel.py │ ├── test_network_auth.py │ ├── test_network_cache.py │ ├── test_network_download.py │ ├── test_network_lazy_wheel.py │ ├── test_network_session.py │ ├── test_network_utils.py │ ├── test_operations_prepare.py │ ├── test_options.py │ ├── test_packaging.py │ ├── test_pep517.py │ ├── test_pyproject_config.py │ ├── test_req.py │ ├── test_req_file.py │ ├── test_req_install.py │ ├── test_req_uninstall.py │ ├── test_resolution_legacy_resolver.py │ ├── test_search_scope.py │ ├── test_self_check_outdated.py │ ├── test_target_python.py │ ├── test_urls.py │ ├── test_utils.py │ ├── test_utils_compatibility_tags.py │ ├── test_utils_filesystem.py │ ├── test_utils_subprocess.py │ ├── test_utils_temp_dir.py │ ├── test_utils_unpacking.py │ ├── test_utils_virtualenv.py │ ├── test_utils_wheel.py │ ├── test_vcs.py │ ├── test_vcs_mercurial.py │ ├── test_wheel.py │ └── test_wheel_builder.py └── tools ├── ci └── New-RAMDisk.ps1 ├── news └── template.rst ├── protected_pip.py ├── release ├── __init__.py └── check_version.py ├── update-rtd-redirects.py └── vendoring └── patches ├── certifi.patch ├── pkg_resources.patch ├── pygments.patch ├── requests.patch ├── tenacity.patch ├── urllib3-disable-brotli.patch └── urllib3.patch /.gitattributes: -------------------------------------------------------------------------------- 1 | # Patches must have Unix-style line endings, even on Windows 2 | tools/vendoring/patches/* eol=lf 3 | # The CA Bundle should always use Unix-style line endings, even on Windows 4 | src/pip/_vendor/certifi/*.pem eol=lf 5 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to pip 2 | 3 | Thank you for your interest in contributing to pip! There are many ways to 4 | contribute, and we appreciate all of them. 5 | 6 | As a reminder, all contributors are expected to follow our [Code of Conduct][coc]. 7 | 8 | [coc]: https://www.pypa.io/en/latest/code-of-conduct/ 9 | 10 | ## Development Documentation 11 | 12 | Our [development documentation](https://pip.pypa.io/en/latest/development/) contains details on how to get started with contributing to pip, and details of our development processes. 13 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 2 | patreon: # Replace with a single Patreon username 3 | open_collective: # Replace with a single Open Collective username 4 | ko_fi: # Replace with a single Ko-fi username 5 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 6 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 7 | liberapay: # Replace with a single Liberapay username 8 | issuehunt: # Replace with a single IssueHunt username 9 | otechie: # Replace with a single Otechie username 10 | custom: "https://pypi.org/sponsor/" # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # Documentation for this file can be found at: 2 | # https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository 3 | 4 | blank_issues_enabled: false 5 | contact_links: 6 | - name: "💬 IRC: #pypa" 7 | url: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa 8 | about: Chat with devs 9 | - name: "(maintainers only) Blank issue" 10 | url: https://github.com/pypa/pip/issues/new 11 | about: For maintainers only. 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /.github/chronographer.yml: -------------------------------------------------------------------------------- 1 | branch-protection-check-name: Changelog entry 2 | action-hints: 3 | check-title-prefix: "Chronographer: " 4 | external-docs-url: https://pip.pypa.io/dev/news-entry-failure 5 | inline-markdown: > 6 | See https://pip.pypa.io/dev/news-entry-failure for details. 7 | enforce-name: 8 | suffix: .rst 9 | labels: 10 | skip-changelog: skip news 11 | -------------------------------------------------------------------------------- /.github/triage-new-issues.yml: -------------------------------------------------------------------------------- 1 | # This is based off of reading the actual source code of the bot. :/ 2 | # https://github.com/tunnckoCoreLabs/triage-new-issues/blob/2ff406030ecce4c25f7bdd454125ba54db1301bd/src/index.js#L7 3 | # 4 | # While this file is currently a no-op, it serves the purpose of 5 | # documenting that this bot is indeed being used, since this is a 6 | # non-standard probot bot. 7 | label: "needs triage" 8 | -------------------------------------------------------------------------------- /.github/workflows/lock-threads.yml: -------------------------------------------------------------------------------- 1 | name: 'Lock Closed Threads' 2 | 3 | on: 4 | schedule: 5 | - cron: '0 7 * * *' # 7am UTC, daily 6 | workflow_dispatch: 7 | 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | 12 | concurrency: 13 | group: lock 14 | 15 | jobs: 16 | action: 17 | if: github.repository_owner == 'pypa' 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: dessant/lock-threads@v3 21 | with: 22 | issue-inactive-days: '30' 23 | pr-inactive-days: '15' 24 | -------------------------------------------------------------------------------- /.github/workflows/news-file.yml: -------------------------------------------------------------------------------- 1 | name: Check 2 | 3 | on: 4 | pull_request: 5 | types: [labeled, unlabeled, opened, reopened, synchronize] 6 | 7 | jobs: 8 | check-news-entry: 9 | name: news entry 10 | runs-on: ubuntu-20.04 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | with: 15 | # `towncrier check` runs `git diff --name-only origin/main...`, which 16 | # needs a non-shallow clone. 17 | fetch-depth: 0 18 | 19 | - name: Check news entry 20 | if: "!contains(github.event.pull_request.labels.*.name, 'skip news')" 21 | run: | 22 | if ! pipx run towncrier check --compare-with origin/${{ github.base_ref }}; then 23 | echo "Please see https://pip.pypa.io/dev/news-entry-failure for guidance." 24 | false 25 | fi 26 | -------------------------------------------------------------------------------- /.github/workflows/update-rtd-redirects.yml: -------------------------------------------------------------------------------- 1 | name: Update documentation redirects 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | schedule: 7 | - cron: 0 0 * * MON # Run every Monday at 00:00 UTC 8 | 9 | env: 10 | FORCE_COLOR: "1" 11 | 12 | concurrency: 13 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} 14 | cancel-in-progress: true 15 | 16 | jobs: 17 | update-rtd-redirects: 18 | runs-on: ubuntu-latest 19 | environment: RTD Deploys 20 | steps: 21 | - uses: actions/checkout@v3 22 | - uses: actions/setup-python@v4 23 | with: 24 | python-version: "3.11" 25 | - run: pip install httpx pyyaml rich 26 | - run: python tools/update-rtd-redirects.py 27 | env: 28 | RTD_API_TOKEN: ${{ secrets.RTD_API_TOKEN }} 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # Distribution / packaging 7 | /build/ 8 | /dist/ 9 | *.egg 10 | *.eggs 11 | *.egg-info/ 12 | MANIFEST 13 | 14 | # Documentation 15 | docs/build/ 16 | 17 | # mypy 18 | .mypy_cache/ 19 | 20 | # Unit test / coverage reports 21 | .[nt]ox/ 22 | htmlcov/ 23 | .coverage 24 | .coverage.* 25 | .*cache 26 | nosetests.xml 27 | coverage.xml 28 | *.cover 29 | tests/data/common_wheels/ 30 | 31 | # Misc 32 | *~ 33 | .*.sw? 34 | .env/ 35 | .venv/ 36 | 37 | # For IntelliJ IDEs (basically PyCharm) 38 | .idea/ 39 | 40 | # For Visual Studio Code 41 | .vscode/ 42 | 43 | # For Sublime Text 44 | *.sublime-workspace 45 | *.sublime-project 46 | 47 | # Scratch Pad for experiments 48 | .scratch/ 49 | 50 | # Mac 51 | .DS_Store 52 | 53 | # Profiling related artifacts 54 | *.prof 55 | -------------------------------------------------------------------------------- /.readthedocs-custom-redirects.yml: -------------------------------------------------------------------------------- 1 | # This file is read by tools/update-rtd-redirects.py. 2 | # It is related to Read the Docs, but is not a file processed by the platform. 3 | 4 | /dev/news-entry-failure: >- 5 | https://pip.pypa.io/en/latest/development/contributing/#news-entries 6 | /errors/resolution-impossible: >- 7 | https://pip.pypa.io/en/stable/topics/dependency-resolution/#dealing-with-dependency-conflicts 8 | /surveys/backtracking: >- 9 | https://forms.gle/LkZP95S4CfqBAU1N6 10 | /warnings/backtracking: >- 11 | https://pip.pypa.io/en/stable/topics/dependency-resolution/#possible-ways-to-reduce-backtracking 12 | /warnings/enable-long-paths: >- 13 | https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later 14 | /warnings/venv: >- 15 | https://docs.python.org/3/tutorial/venv.html 16 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | build: 4 | os: ubuntu-22.04 5 | tools: 6 | python: "3.11" 7 | 8 | sphinx: 9 | builder: dirhtml 10 | configuration: docs/html/conf.py 11 | 12 | python: 13 | install: 14 | - requirements: docs/requirements.txt 15 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-present The pip developers (see AUTHORS.txt file) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS.txt 2 | include LICENSE.txt 3 | include NEWS.rst 4 | include README.rst 5 | include SECURITY.md 6 | include pyproject.toml 7 | 8 | include src/pip/_vendor/README.rst 9 | include src/pip/_vendor/vendor.txt 10 | include src/pip/_vendor/pyparsing/diagram/template.jinja2 11 | recursive-include src/pip/_vendor *LICENSE* 12 | recursive-include src/pip/_vendor *COPYING* 13 | 14 | include docs/docutils.conf 15 | include docs/requirements.txt 16 | 17 | exclude .git-blame-ignore-revs 18 | exclude .coveragerc 19 | exclude .mailmap 20 | exclude .appveyor.yml 21 | exclude .readthedocs.yml 22 | exclude .pre-commit-config.yaml 23 | exclude .readthedocs-custom-redirects.yml 24 | exclude tox.ini 25 | exclude noxfile.py 26 | 27 | recursive-include src/pip/_vendor *.pem 28 | recursive-include src/pip/_vendor py.typed 29 | recursive-include docs *.css *.py *.rst *.md 30 | recursive-include docs *.dot *.png 31 | 32 | exclude src/pip/_vendor/six 33 | exclude src/pip/_vendor/six/moves 34 | recursive-exclude src/pip/_vendor *.pyi 35 | 36 | prune .github 37 | prune docs/build 38 | prune news 39 | prune tasks 40 | prune tests 41 | prune tools 42 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Please read the guidelines on reporting security issues [on the 6 | official website](https://www.python.org/dev/security/) for 7 | instructions on how to report a security-related problem to 8 | the Python Security Response Team responsibly. 9 | 10 | To reach the response team, email `security at python dot org`. 11 | -------------------------------------------------------------------------------- /docs/html/cli/index.md: -------------------------------------------------------------------------------- 1 | # Commands 2 | 3 | The general options that apply to all the commands listed below can be 4 | found [under the `pip` page in this section](pip). 5 | 6 | ```{toctree} 7 | :maxdepth: 1 8 | :hidden: 9 | 10 | pip 11 | ``` 12 | 13 | ```{toctree} 14 | :maxdepth: 1 15 | :caption: Environment Management and Introspection 16 | 17 | pip_install 18 | pip_uninstall 19 | pip_inspect 20 | pip_list 21 | pip_show 22 | pip_freeze 23 | pip_check 24 | ``` 25 | 26 | ```{toctree} 27 | :maxdepth: 1 28 | :caption: Handling Distribution Files 29 | 30 | pip_download 31 | pip_wheel 32 | pip_hash 33 | ``` 34 | 35 | ```{toctree} 36 | :maxdepth: 1 37 | :caption: Package Index information 38 | 39 | pip_search 40 | ``` 41 | 42 | ```{toctree} 43 | :maxdepth: 1 44 | :caption: Managing pip itself 45 | 46 | pip_cache 47 | pip_config 48 | pip_debug 49 | ``` 50 | -------------------------------------------------------------------------------- /docs/html/cli/pip_cache.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _`pip cache`: 3 | 4 | pip cache 5 | --------- 6 | 7 | 8 | Usage 9 | ***** 10 | 11 | .. tab:: Unix/macOS 12 | 13 | .. pip-command-usage:: cache "python -m pip" 14 | 15 | .. tab:: Windows 16 | 17 | .. pip-command-usage:: cache "py -m pip" 18 | 19 | Description 20 | *********** 21 | 22 | .. pip-command-description:: cache 23 | 24 | Options 25 | ******* 26 | 27 | .. pip-command-options:: cache 28 | -------------------------------------------------------------------------------- /docs/html/cli/pip_config.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _`pip config`: 3 | 4 | ========== 5 | pip config 6 | ========== 7 | 8 | 9 | Usage 10 | ===== 11 | 12 | .. tab:: Unix/macOS 13 | 14 | .. pip-command-usage:: config "python -m pip" 15 | 16 | .. tab:: Windows 17 | 18 | .. pip-command-usage:: config "py -m pip" 19 | 20 | 21 | Description 22 | =========== 23 | 24 | .. pip-command-description:: config 25 | 26 | 27 | Options 28 | ======= 29 | 30 | .. pip-command-options:: config 31 | -------------------------------------------------------------------------------- /docs/html/cli/pip_debug.rst: -------------------------------------------------------------------------------- 1 | .. _`pip debug`: 2 | 3 | ========= 4 | pip debug 5 | ========= 6 | 7 | 8 | Usage 9 | ===== 10 | 11 | .. tab:: Unix/macOS 12 | 13 | .. pip-command-usage:: debug "python -m pip" 14 | 15 | .. tab:: Windows 16 | 17 | .. pip-command-usage:: debug "py -m pip" 18 | 19 | 20 | .. warning:: 21 | 22 | This command is only meant for debugging. 23 | Its options and outputs are provisional and may change without notice. 24 | 25 | 26 | Description 27 | =========== 28 | 29 | .. pip-command-description:: debug 30 | 31 | 32 | Options 33 | ======= 34 | 35 | .. pip-command-options:: debug 36 | -------------------------------------------------------------------------------- /docs/html/cli/pip_inspect.rst: -------------------------------------------------------------------------------- 1 | .. _`pip inspect`: 2 | 3 | =========== 4 | pip inspect 5 | =========== 6 | 7 | .. versionadded:: 22.2 8 | 9 | 10 | Usage 11 | ===== 12 | 13 | .. tab:: Unix/macOS 14 | 15 | .. pip-command-usage:: inspect "python -m pip" 16 | 17 | .. tab:: Windows 18 | 19 | .. pip-command-usage:: inspect "py -m pip" 20 | 21 | 22 | Description 23 | =========== 24 | 25 | .. pip-command-description:: inspect 26 | 27 | The format of the JSON output is described in :doc:`../reference/inspect-report`. 28 | 29 | 30 | Options 31 | ======= 32 | 33 | .. pip-command-options:: inspect 34 | -------------------------------------------------------------------------------- /docs/html/cli/pip_search.rst: -------------------------------------------------------------------------------- 1 | .. _`pip search`: 2 | 3 | ========== 4 | pip search 5 | ========== 6 | 7 | 8 | 9 | Usage 10 | ===== 11 | 12 | .. tab:: Unix/macOS 13 | 14 | .. pip-command-usage:: search "python -m pip" 15 | 16 | .. tab:: Windows 17 | 18 | .. pip-command-usage:: search "py -m pip" 19 | 20 | 21 | Description 22 | =========== 23 | 24 | .. pip-command-description:: search 25 | 26 | 27 | Options 28 | ======= 29 | 30 | .. pip-command-options:: search 31 | 32 | 33 | Examples 34 | ======== 35 | 36 | #. Search for "peppercorn" 37 | 38 | .. tab:: Unix/macOS 39 | 40 | .. code-block:: console 41 | 42 | $ python -m pip search peppercorn 43 | pepperedform - Helpers for using peppercorn with formprocess. 44 | peppercorn - A library for converting a token stream into [...] 45 | 46 | .. tab:: Windows 47 | 48 | .. code-block:: console 49 | 50 | C:\> py -m pip search peppercorn 51 | pepperedform - Helpers for using peppercorn with formprocess. 52 | peppercorn - A library for converting a token stream into [...] 53 | -------------------------------------------------------------------------------- /docs/html/copyright.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========= 4 | Copyright 5 | ========= 6 | 7 | pip and this documentation is: 8 | 9 | Copyright © 2008-2020 The pip developers (see `AUTHORS.txt `_ file). All rights reserved. 10 | -------------------------------------------------------------------------------- /docs/html/development/architecture/index.rst: -------------------------------------------------------------------------------- 1 | .. _architecture-pip-internals: 2 | 3 | =============================== 4 | Architecture of pip's internals 5 | =============================== 6 | 7 | .. note:: 8 | 9 | This section of the documentation is currently being written. pip 10 | developers welcome your help to complete this documentation. If 11 | you're interested in helping out, please let us know in the 12 | `tracking issue`_, or just go ahead and submit a pull request and 13 | mention it in that tracking issue. 14 | 15 | .. note:: 16 | 17 | Direct use of pip's internals is *not supported*, and these internals 18 | can change at any time. For more details, see :ref:`Using pip from 19 | your program`. 20 | 21 | 22 | .. toctree:: 23 | :maxdepth: 2 24 | 25 | overview 26 | anatomy 27 | configuration-files 28 | package-finding 29 | command-line-interface 30 | upgrade-options 31 | 32 | 33 | .. _`tracking issue`: https://github.com/pypa/pip/issues/6831 34 | -------------------------------------------------------------------------------- /docs/html/development/index.rst: -------------------------------------------------------------------------------- 1 | =========== 2 | Development 3 | =========== 4 | 5 | pip is a volunteer maintained open source project and we welcome contributions 6 | of all forms. The sections below will help you get started with development, 7 | testing, and documentation. 8 | 9 | You can also join ``#pypa`` (general packaging discussion and user support) and 10 | ``#pypa-dev`` (discussion about development of packaging tools) `on Libera.chat`_, 11 | or the `distutils-sig mailing list`_, to ask questions or get involved. 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | getting-started 17 | contributing 18 | ci 19 | issue-triage 20 | architecture/index 21 | release-process 22 | vendoring-policy 23 | 24 | .. note:: 25 | 26 | pip's development documentation has been rearranged and some older 27 | references might be broken. 28 | 29 | .. _`on Libera.chat`: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev 30 | .. _`distutils-sig mailing list`: https://mail.python.org/mailman3/lists/distutils-sig.python.org/ 31 | -------------------------------------------------------------------------------- /docs/html/development/vendoring-policy.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../../../src/pip/_vendor/README.rst 2 | -------------------------------------------------------------------------------- /docs/html/installing.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../installation/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`installation` 12 | -------------------------------------------------------------------------------- /docs/html/news.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | Changelog 3 | ========= 4 | 5 | .. attention:: 6 | 7 | Major and minor releases of pip also include changes listed within 8 | prior beta releases. 9 | 10 | .. towncrier-draft-entries:: Not yet released 11 | 12 | .. pip-news-include:: ../../NEWS.rst 13 | -------------------------------------------------------------------------------- /docs/html/quickstart.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../getting-started/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`getting-started` 12 | -------------------------------------------------------------------------------- /docs/html/reference/index.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | Reference provides information about various file formats, interfaces and 4 | interoperability standards that pip utilises/implements. 5 | 6 | ```{toctree} 7 | :titlesonly: 8 | 9 | build-system/index 10 | requirement-specifiers 11 | requirements-file-format 12 | installation-report 13 | inspect-report 14 | ``` 15 | -------------------------------------------------------------------------------- /docs/html/reference/pip.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_cache.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_cache/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_cache` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_check.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_check/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_check` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_config.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_config/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_config` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_debug.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_debug/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_debug` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_download.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_download/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_download` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_freeze.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_freeze/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_freeze` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_hash.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_hash/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_hash` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_install.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_install/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_install` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_list.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_list/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_list` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_search.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_search/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_search` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_show.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_show/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_show` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_uninstall.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_uninstall/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_uninstall` 12 | -------------------------------------------------------------------------------- /docs/html/reference/pip_wheel.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. meta:: 4 | 5 | :http-equiv=refresh: 3; url=../../cli/pip_wheel/ 6 | 7 | This page has moved 8 | =================== 9 | 10 | You should be redirected automatically in 3 seconds. If that didn't 11 | work, here's a link: :doc:`../cli/pip_wheel` 12 | -------------------------------------------------------------------------------- /docs/html/topics/deps.dot: -------------------------------------------------------------------------------- 1 | digraph G { 2 | graph [fontname = "Handlee"]; 3 | node [fontname = "Handlee"]; 4 | edge [fontname = "Handlee"]; 5 | 6 | bgcolor=transparent; 7 | 8 | A [color=blue fontcolor=blue]; 9 | A -> B [color=red]; 10 | A -> C [color=red]; 11 | node [color=lightgrey fontcolor=lightgrey]; 12 | edge [color=lightgrey]; 13 | node [color=lightgrey]; 14 | B -> B1; 15 | B -> B2; 16 | C -> C1; 17 | C -> C2; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /docs/html/topics/deps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/docs/html/topics/deps.png -------------------------------------------------------------------------------- /docs/html/topics/index.md: -------------------------------------------------------------------------------- 1 | # Topic Guides 2 | 3 | These pages provide detailed information on individual topics. 4 | 5 | ```{note} 6 | This section of the documentation is currently being fleshed out. See 7 | {issue}`9475` for more details. 8 | ``` 9 | 10 | ```{toctree} 11 | :maxdepth: 1 12 | 13 | authentication 14 | caching 15 | configuration 16 | dependency-resolution 17 | more-dependency-resolution 18 | https-certificates 19 | local-project-installs 20 | repeatable-installs 21 | secure-installs 22 | vcs-support 23 | python-option 24 | ``` 25 | -------------------------------------------------------------------------------- /docs/html/topics/python-option.md: -------------------------------------------------------------------------------- 1 | # Managing a different Python interpreter 2 | 3 | ```{versionadded} 22.3 4 | ``` 5 | 6 | Occasionally, you may want to use pip to manage a Python installation other than 7 | the one pip is installed into. In this case, you can use the `--python` option 8 | to specify the interpreter you want to manage. This option can take one of two 9 | values: 10 | 11 | 1. The path to a Python executable. 12 | 2. The path to a virtual environment. 13 | 14 | In both cases, pip will run exactly as if it had been invoked from that Python 15 | environment. 16 | 17 | One example of where this might be useful is to manage a virtual environment 18 | that does not have pip installed. 19 | 20 | ```{pip-cli} 21 | $ python -m venv .venv --without-pip 22 | $ pip --python .venv install SomePackage 23 | [...] 24 | Successfully installed SomePackage 25 | ``` 26 | 27 | You could also use `--python .venv/bin/python` (or on Windows, 28 | `--python .venv\Scripts\python.exe`) if you wanted to be explicit, but the 29 | virtual environment name is shorter and works exactly the same. 30 | -------------------------------------------------------------------------------- /docs/man/commands/cache.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========= 4 | pip-cache 5 | ========= 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: cache 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: cache 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: cache 21 | -------------------------------------------------------------------------------- /docs/man/commands/check.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========= 4 | pip-check 5 | ========= 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: check 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: check 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: check 21 | -------------------------------------------------------------------------------- /docs/man/commands/config.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========== 4 | pip-config 5 | ========== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: config 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: config 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: config 21 | -------------------------------------------------------------------------------- /docs/man/commands/debug.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========== 4 | pip-debug 5 | ========== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: debug 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: debug 16 | 17 | 18 | .. warning:: 19 | This command is only meant for debugging. 20 | Its options and outputs are provisional and may change without notice. 21 | 22 | 23 | Options 24 | ******* 25 | 26 | .. pip-command-options:: debug 27 | -------------------------------------------------------------------------------- /docs/man/commands/download.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ============ 4 | pip-download 5 | ============ 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: download 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: download 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: download 21 | -------------------------------------------------------------------------------- /docs/man/commands/freeze.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========== 4 | pip-freeze 5 | ========== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: freeze 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: freeze 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: freeze 21 | -------------------------------------------------------------------------------- /docs/man/commands/hash.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ======== 4 | pip-hash 5 | ======== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: hash 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: hash 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: hash 21 | -------------------------------------------------------------------------------- /docs/man/commands/help.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ======== 4 | pip-help 5 | ======== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: help 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: help 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: help 21 | -------------------------------------------------------------------------------- /docs/man/commands/install.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | =========== 4 | pip-install 5 | =========== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: install 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: install 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: install 21 | -------------------------------------------------------------------------------- /docs/man/commands/list.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ======== 4 | pip-list 5 | ======== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: list 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: list 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: list 21 | -------------------------------------------------------------------------------- /docs/man/commands/search.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========== 4 | pip-search 5 | ========== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: search 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: search 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: search 21 | -------------------------------------------------------------------------------- /docs/man/commands/show.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ======== 4 | pip-show 5 | ======== 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: show 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: show 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: show 21 | -------------------------------------------------------------------------------- /docs/man/commands/uninstall.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ============= 4 | pip-uninstall 5 | ============= 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: uninstall 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: uninstall 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: uninstall 21 | -------------------------------------------------------------------------------- /docs/man/commands/wheel.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ========= 4 | pip-wheel 5 | ========= 6 | 7 | Description 8 | *********** 9 | 10 | .. pip-command-description:: wheel 11 | 12 | Usage 13 | ***** 14 | 15 | .. pip-command-usage:: wheel 16 | 17 | Options 18 | ******* 19 | 20 | .. pip-command-options:: wheel 21 | -------------------------------------------------------------------------------- /docs/man/index.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | ======== 4 | Man Page 5 | ======== 6 | 7 | SYNOPSIS 8 | ******** 9 | 10 | pip [options] 11 | 12 | DESCRIPTION 13 | *********** 14 | 15 | pip is the PyPA recommended package manager for Python packages 16 | 17 | OPTIONS 18 | ******* 19 | 20 | .. pip-general-options:: 21 | 22 | COMMANDS 23 | ******** 24 | 25 | pip-install(1) 26 | Install packages. 27 | 28 | pip-download(1) 29 | Download packages. 30 | 31 | pip-uninstall(1) 32 | Uninstall packages. 33 | 34 | pip-freeze(1) 35 | Output installed packages in requirements format. 36 | 37 | pip-list(1) 38 | List installed packages. 39 | 40 | pip-show(1) 41 | Show information about installed packages. 42 | 43 | pip-check(1) 44 | Verify installed packages have compatible dependencies. 45 | 46 | pip-search(1) 47 | Search PyPI for packages. 48 | 49 | pip-wheel(1) 50 | Build wheels from your requirements. 51 | 52 | pip-hash(1) 53 | Compute hashes of package archives. 54 | 55 | pip-help(1) 56 | Show help for pip commands. 57 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx ~= 7.0 2 | towncrier 3 | furo 4 | myst_parser 5 | sphinx-copybutton 6 | sphinx-inline-tabs 7 | sphinxcontrib-towncrier >= 0.2.0a0 8 | 9 | # `docs.pipext` uses pip's internals to generate documentation. So, we install 10 | # the current directory to make it work. 11 | . 12 | -------------------------------------------------------------------------------- /news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | -------------------------------------------------------------------------------- /news/11394.bugfix.rst: -------------------------------------------------------------------------------- 1 | Ignore errors in temporary directory cleanup (show a warning instead). 2 | -------------------------------------------------------------------------------- /news/12005.bugfix.rst: -------------------------------------------------------------------------------- 1 | Removed uses of ``datetime.datetime.utcnow`` from non-vendored code. 2 | -------------------------------------------------------------------------------- /news/12155.process.rst: -------------------------------------------------------------------------------- 1 | The metadata-fetching log message is moved to the VERBOSE level and now hidden 2 | by default. The more significant information in this message to most users are 3 | already available in surrounding logs (the package name and version of the 4 | metadata being fetched), while the URL to the exact metadata file is generally 5 | too long and clutters the output. The message can be brought back with 6 | ``--verbose``. 7 | -------------------------------------------------------------------------------- /news/12175.removal.rst: -------------------------------------------------------------------------------- 1 | Drop a fallback to using SecureTransport on macOS. It was useful when pip detected OpenSSL older than 1.0.1, but the current pip does not support any Python version supporting such old OpenSSL versions. 2 | -------------------------------------------------------------------------------- /news/12183.trivial.rst: -------------------------------------------------------------------------------- 1 | Add test cases for some behaviors of ``install --dry-run`` and ``--use-feature=fast-deps``. 2 | -------------------------------------------------------------------------------- /news/12187.bugfix.rst: -------------------------------------------------------------------------------- 1 | Fix improper handling of the new onexc argument of ``shutil.rmtree()`` in Python 3.12. 2 | -------------------------------------------------------------------------------- /news/12191.bugfix.rst: -------------------------------------------------------------------------------- 1 | Prevent downloading sdists twice when PEP 658 metadata is present. 2 | -------------------------------------------------------------------------------- /news/12194.trivial.rst: -------------------------------------------------------------------------------- 1 | Add lots of comments to the ``BuildTracker``. 2 | -------------------------------------------------------------------------------- /news/12204.feature.rst: -------------------------------------------------------------------------------- 1 | Improve use of datastructures to make candidate selection 1.6x faster 2 | -------------------------------------------------------------------------------- /news/12215.feature.rst: -------------------------------------------------------------------------------- 1 | Allow ``pip install --dry-run`` to use platform and ABI overriding options similar to ``--target``. 2 | -------------------------------------------------------------------------------- /news/12224.feature.rst: -------------------------------------------------------------------------------- 1 | Add ``is_yanked`` boolean entry to the installation report (``--report``) to indicate whether the requirement was yanked from the index, but was still selected by pip conform to PEP 592. 2 | -------------------------------------------------------------------------------- /news/12225.bugfix.rst: -------------------------------------------------------------------------------- 1 | Filter out yanked links from the available versions error message: "(from versions: 1.0, 2.0, 3.0)" will not contain yanked versions conform PEP 592. The yanked versions (if any) will be mentioned in a separate error message. 2 | -------------------------------------------------------------------------------- /news/12252.trivial.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/news/12252.trivial.rst -------------------------------------------------------------------------------- /news/12254.process.rst: -------------------------------------------------------------------------------- 1 | Added reference to `vulnerability reporting guidelines `_ to pip's security policy. 2 | -------------------------------------------------------------------------------- /news/12261.trivial.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/news/12261.trivial.rst -------------------------------------------------------------------------------- /news/4A0C40FF-ABE1-48C7-954C-7C3EB229135F.trivial.rst: -------------------------------------------------------------------------------- 1 | Add ruff rules ASYNC,C4,C90,PERF,PLE,PLR for minor optimizations and to set upper limits on code complexity. 2 | -------------------------------------------------------------------------------- /news/732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/news/732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst -------------------------------------------------------------------------------- /news/85F7E260-68FF-4C1E-A2CB-CF8634829D2D.trivial.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/news/85F7E260-68FF-4C1E-A2CB-CF8634829D2D.trivial.rst -------------------------------------------------------------------------------- /news/certifi.vendor.rst: -------------------------------------------------------------------------------- 1 | Upgrade certifi to 2023.7.22 2 | -------------------------------------------------------------------------------- /news/zhsdgdlsjgksdfj.trivial.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/news/zhsdgdlsjgksdfj.trivial.rst -------------------------------------------------------------------------------- /src/pip/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | __version__ = "23.3.dev0" 4 | 5 | 6 | def main(args: Optional[List[str]] = None) -> int: 7 | """This is an internal API only meant for use by pip's own console scripts. 8 | 9 | For additional details, see https://github.com/pypa/pip/issues/7498. 10 | """ 11 | from pip._internal.utils.entrypoints import _wrapper 12 | 13 | return _wrapper(args) 14 | -------------------------------------------------------------------------------- /src/pip/__main__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | # Remove '' and current working directory from the first entry 5 | # of sys.path, if present to avoid using current directory 6 | # in pip commands check, freeze, install, list and show, 7 | # when invoked as python -m pip 8 | if sys.path[0] in ("", os.getcwd()): 9 | sys.path.pop(0) 10 | 11 | # If we are running from a wheel, add the wheel to sys.path 12 | # This allows the usage python pip-*.whl/pip install pip-*.whl 13 | if __package__ == "": 14 | # __file__ is pip-*.whl/pip/__main__.py 15 | # first dirname call strips of '/__main__.py', second strips off '/pip' 16 | # Resulting path is the name of the wheel itself 17 | # Add that to sys.path so we can import pip 18 | path = os.path.dirname(os.path.dirname(__file__)) 19 | sys.path.insert(0, path) 20 | 21 | if __name__ == "__main__": 22 | from pip._internal.cli.main import main as _main 23 | 24 | sys.exit(_main()) 25 | -------------------------------------------------------------------------------- /src/pip/_internal/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | from pip._internal.utils import _log 4 | 5 | # init_logging() must be called before any call to logging.getLogger() 6 | # which happens at import of most modules. 7 | _log.init_logging() 8 | 9 | 10 | def main(args: (Optional[List[str]]) = None) -> int: 11 | """This is preserved for old console scripts that may still be referencing 12 | it. 13 | 14 | For additional details, see https://github.com/pypa/pip/issues/7498. 15 | """ 16 | from pip._internal.utils.entrypoints import _wrapper 17 | 18 | return _wrapper(args) 19 | -------------------------------------------------------------------------------- /src/pip/_internal/cli/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage containing all of pip's command line interface related code 2 | """ 3 | 4 | # This file intentionally does not import submodules 5 | -------------------------------------------------------------------------------- /src/pip/_internal/cli/command_context.py: -------------------------------------------------------------------------------- 1 | from contextlib import ExitStack, contextmanager 2 | from typing import ContextManager, Generator, TypeVar 3 | 4 | _T = TypeVar("_T", covariant=True) 5 | 6 | 7 | class CommandContextMixIn: 8 | def __init__(self) -> None: 9 | super().__init__() 10 | self._in_main_context = False 11 | self._main_context = ExitStack() 12 | 13 | @contextmanager 14 | def main_context(self) -> Generator[None, None, None]: 15 | assert not self._in_main_context 16 | 17 | self._in_main_context = True 18 | try: 19 | with self._main_context: 20 | yield 21 | finally: 22 | self._in_main_context = False 23 | 24 | def enter_context(self, context_provider: ContextManager[_T]) -> _T: 25 | assert self._in_main_context 26 | 27 | return self._main_context.enter_context(context_provider) 28 | -------------------------------------------------------------------------------- /src/pip/_internal/cli/status_codes.py: -------------------------------------------------------------------------------- 1 | SUCCESS = 0 2 | ERROR = 1 3 | UNKNOWN_ERROR = 2 4 | VIRTUALENV_NOT_FOUND = 3 5 | PREVIOUS_BUILD_DIR_ERROR = 4 6 | NO_MATCHES_FOUND = 23 7 | -------------------------------------------------------------------------------- /src/pip/_internal/distributions/__init__.py: -------------------------------------------------------------------------------- 1 | from pip._internal.distributions.base import AbstractDistribution 2 | from pip._internal.distributions.sdist import SourceDistribution 3 | from pip._internal.distributions.wheel import WheelDistribution 4 | from pip._internal.req.req_install import InstallRequirement 5 | 6 | 7 | def make_distribution_for_install_requirement( 8 | install_req: InstallRequirement, 9 | ) -> AbstractDistribution: 10 | """Returns a Distribution for the given InstallRequirement""" 11 | # Editable requirements will always be source distributions. They use the 12 | # legacy logic until we create a modern standard for them. 13 | if install_req.editable: 14 | return SourceDistribution(install_req) 15 | 16 | # If it's a wheel, it's a WheelDistribution 17 | if install_req.is_wheel: 18 | return WheelDistribution(install_req) 19 | 20 | # Otherwise, a SourceDistribution 21 | return SourceDistribution(install_req) 22 | -------------------------------------------------------------------------------- /src/pip/_internal/distributions/installed.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pip._internal.distributions.base import AbstractDistribution 4 | from pip._internal.index.package_finder import PackageFinder 5 | from pip._internal.metadata import BaseDistribution 6 | 7 | 8 | class InstalledDistribution(AbstractDistribution): 9 | """Represents an installed package. 10 | 11 | This does not need any preparation as the required information has already 12 | been computed. 13 | """ 14 | 15 | @property 16 | def build_tracker_id(self) -> Optional[str]: 17 | return None 18 | 19 | def get_metadata_distribution(self) -> BaseDistribution: 20 | assert self.req.satisfied_by is not None, "not actually installed" 21 | return self.req.satisfied_by 22 | 23 | def prepare_distribution_metadata( 24 | self, 25 | finder: PackageFinder, 26 | build_isolation: bool, 27 | check_build_deps: bool, 28 | ) -> None: 29 | pass 30 | -------------------------------------------------------------------------------- /src/pip/_internal/index/__init__.py: -------------------------------------------------------------------------------- 1 | """Index interaction code 2 | """ 3 | -------------------------------------------------------------------------------- /src/pip/_internal/main.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | 4 | def main(args: Optional[List[str]] = None) -> int: 5 | """This is preserved for old console scripts that may still be referencing 6 | it. 7 | 8 | For additional details, see https://github.com/pypa/pip/issues/7498. 9 | """ 10 | from pip._internal.utils.entrypoints import _wrapper 11 | 12 | return _wrapper(args) 13 | -------------------------------------------------------------------------------- /src/pip/_internal/metadata/importlib/__init__.py: -------------------------------------------------------------------------------- 1 | from ._dists import Distribution 2 | from ._envs import Environment 3 | 4 | __all__ = ["Distribution", "Environment"] 5 | -------------------------------------------------------------------------------- /src/pip/_internal/models/__init__.py: -------------------------------------------------------------------------------- 1 | """A package that contains models that represent entities. 2 | """ 3 | -------------------------------------------------------------------------------- /src/pip/_internal/models/candidate.py: -------------------------------------------------------------------------------- 1 | from pip._vendor.packaging.version import parse as parse_version 2 | 3 | from pip._internal.models.link import Link 4 | from pip._internal.utils.models import KeyBasedCompareMixin 5 | 6 | 7 | class InstallationCandidate(KeyBasedCompareMixin): 8 | """Represents a potential "candidate" for installation.""" 9 | 10 | __slots__ = ["name", "version", "link"] 11 | 12 | def __init__(self, name: str, version: str, link: Link) -> None: 13 | self.name = name 14 | self.version = parse_version(version) 15 | self.link = link 16 | 17 | super().__init__( 18 | key=(self.name, self.version, self.link), 19 | defining_class=InstallationCandidate, 20 | ) 21 | 22 | def __repr__(self) -> str: 23 | return "".format( 24 | self.name, 25 | self.version, 26 | self.link, 27 | ) 28 | 29 | def __str__(self) -> str: 30 | return "{!r} candidate (version {} at {})".format( 31 | self.name, 32 | self.version, 33 | self.link, 34 | ) 35 | -------------------------------------------------------------------------------- /src/pip/_internal/models/index.py: -------------------------------------------------------------------------------- 1 | import urllib.parse 2 | 3 | 4 | class PackageIndex: 5 | """Represents a Package Index and provides easier access to endpoints""" 6 | 7 | __slots__ = ["url", "netloc", "simple_url", "pypi_url", "file_storage_domain"] 8 | 9 | def __init__(self, url: str, file_storage_domain: str) -> None: 10 | super().__init__() 11 | self.url = url 12 | self.netloc = urllib.parse.urlsplit(url).netloc 13 | self.simple_url = self._url_for_path("simple") 14 | self.pypi_url = self._url_for_path("pypi") 15 | 16 | # This is part of a temporary hack used to block installs of PyPI 17 | # packages which depend on external urls only necessary until PyPI can 18 | # block such packages themselves 19 | self.file_storage_domain = file_storage_domain 20 | 21 | def _url_for_path(self, path: str) -> str: 22 | return urllib.parse.urljoin(self.url, path) 23 | 24 | 25 | PyPI = PackageIndex("https://pypi.org/", file_storage_domain="files.pythonhosted.org") 26 | TestPyPI = PackageIndex( 27 | "https://test.pypi.org/", file_storage_domain="test-files.pythonhosted.org" 28 | ) 29 | -------------------------------------------------------------------------------- /src/pip/_internal/models/scheme.py: -------------------------------------------------------------------------------- 1 | """ 2 | For types associated with installation schemes. 3 | 4 | For a general overview of available schemes and their context, see 5 | https://docs.python.org/3/install/index.html#alternate-installation. 6 | """ 7 | 8 | 9 | SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"] 10 | 11 | 12 | class Scheme: 13 | """A Scheme holds paths which are used as the base directories for 14 | artifacts associated with a Python package. 15 | """ 16 | 17 | __slots__ = SCHEME_KEYS 18 | 19 | def __init__( 20 | self, 21 | platlib: str, 22 | purelib: str, 23 | headers: str, 24 | scripts: str, 25 | data: str, 26 | ) -> None: 27 | self.platlib = platlib 28 | self.purelib = purelib 29 | self.headers = headers 30 | self.scripts = scripts 31 | self.data = data 32 | -------------------------------------------------------------------------------- /src/pip/_internal/network/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains purely network-related utilities. 2 | """ 3 | -------------------------------------------------------------------------------- /src/pip/_internal/operations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_internal/operations/__init__.py -------------------------------------------------------------------------------- /src/pip/_internal/operations/build/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_internal/operations/build/__init__.py -------------------------------------------------------------------------------- /src/pip/_internal/operations/build/wheel.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | from typing import Optional 4 | 5 | from pip._vendor.pyproject_hooks import BuildBackendHookCaller 6 | 7 | from pip._internal.utils.subprocess import runner_with_spinner_message 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | 12 | def build_wheel_pep517( 13 | name: str, 14 | backend: BuildBackendHookCaller, 15 | metadata_directory: str, 16 | tempd: str, 17 | ) -> Optional[str]: 18 | """Build one InstallRequirement using the PEP 517 build process. 19 | 20 | Returns path to wheel if successfully built. Otherwise, returns None. 21 | """ 22 | assert metadata_directory is not None 23 | try: 24 | logger.debug("Destination directory: %s", tempd) 25 | 26 | runner = runner_with_spinner_message( 27 | f"Building wheel for {name} (pyproject.toml)" 28 | ) 29 | with backend.subprocess_runner(runner): 30 | wheel_name = backend.build_wheel( 31 | tempd, 32 | metadata_directory=metadata_directory, 33 | ) 34 | except Exception: 35 | logger.error("Failed building wheel for %s", name) 36 | return None 37 | return os.path.join(tempd, wheel_name) 38 | -------------------------------------------------------------------------------- /src/pip/_internal/operations/install/__init__.py: -------------------------------------------------------------------------------- 1 | """For modules related to installing packages. 2 | """ 3 | -------------------------------------------------------------------------------- /src/pip/_internal/resolution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_internal/resolution/__init__.py -------------------------------------------------------------------------------- /src/pip/_internal/resolution/base.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, List, Optional 2 | 3 | from pip._internal.req.req_install import InstallRequirement 4 | from pip._internal.req.req_set import RequirementSet 5 | 6 | InstallRequirementProvider = Callable[ 7 | [str, Optional[InstallRequirement]], InstallRequirement 8 | ] 9 | 10 | 11 | class BaseResolver: 12 | def resolve( 13 | self, root_reqs: List[InstallRequirement], check_supported_wheels: bool 14 | ) -> RequirementSet: 15 | raise NotImplementedError() 16 | 17 | def get_installation_order( 18 | self, req_set: RequirementSet 19 | ) -> List[InstallRequirement]: 20 | raise NotImplementedError() 21 | -------------------------------------------------------------------------------- /src/pip/_internal/resolution/legacy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_internal/resolution/legacy/__init__.py -------------------------------------------------------------------------------- /src/pip/_internal/resolution/resolvelib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_internal/resolution/resolvelib/__init__.py -------------------------------------------------------------------------------- /src/pip/_internal/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_internal/utils/__init__.py -------------------------------------------------------------------------------- /src/pip/_internal/utils/_log.py: -------------------------------------------------------------------------------- 1 | """Customize logging 2 | 3 | Defines custom logger class for the `logger.verbose(...)` method. 4 | 5 | init_logging() must be called before any other modules that call logging.getLogger. 6 | """ 7 | 8 | import logging 9 | from typing import Any, cast 10 | 11 | # custom log level for `--verbose` output 12 | # between DEBUG and INFO 13 | VERBOSE = 15 14 | 15 | 16 | class VerboseLogger(logging.Logger): 17 | """Custom Logger, defining a verbose log-level 18 | 19 | VERBOSE is between INFO and DEBUG. 20 | """ 21 | 22 | def verbose(self, msg: str, *args: Any, **kwargs: Any) -> None: 23 | return self.log(VERBOSE, msg, *args, **kwargs) 24 | 25 | 26 | def getLogger(name: str) -> VerboseLogger: 27 | """logging.getLogger, but ensures our VerboseLogger class is returned""" 28 | return cast(VerboseLogger, logging.getLogger(name)) 29 | 30 | 31 | def init_logging() -> None: 32 | """Register our VerboseLogger and VERBOSE log level. 33 | 34 | Should be called before any calls to getLogger(), 35 | i.e. in pip._internal.__init__ 36 | """ 37 | logging.setLoggerClass(VerboseLogger) 38 | logging.addLevelName(VERBOSE, "VERBOSE") 39 | -------------------------------------------------------------------------------- /src/pip/_internal/utils/datetime.py: -------------------------------------------------------------------------------- 1 | """For when pip wants to check the date or time. 2 | """ 3 | 4 | import datetime 5 | 6 | 7 | def today_is_later_than(year: int, month: int, day: int) -> bool: 8 | today = datetime.date.today() 9 | given = datetime.date(year, month, day) 10 | 11 | return today > given 12 | -------------------------------------------------------------------------------- /src/pip/_internal/utils/filetypes.py: -------------------------------------------------------------------------------- 1 | """Filetype information. 2 | """ 3 | 4 | from typing import Tuple 5 | 6 | from pip._internal.utils.misc import splitext 7 | 8 | WHEEL_EXTENSION = ".whl" 9 | BZ2_EXTENSIONS: Tuple[str, ...] = (".tar.bz2", ".tbz") 10 | XZ_EXTENSIONS: Tuple[str, ...] = ( 11 | ".tar.xz", 12 | ".txz", 13 | ".tlz", 14 | ".tar.lz", 15 | ".tar.lzma", 16 | ) 17 | ZIP_EXTENSIONS: Tuple[str, ...] = (".zip", WHEEL_EXTENSION) 18 | TAR_EXTENSIONS: Tuple[str, ...] = (".tar.gz", ".tgz", ".tar") 19 | ARCHIVE_EXTENSIONS = ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS 20 | 21 | 22 | def is_archive_file(name: str) -> bool: 23 | """Return True if `name` is a considered as an archive file.""" 24 | ext = splitext(name)[1].lower() 25 | if ext in ARCHIVE_EXTENSIONS: 26 | return True 27 | return False 28 | -------------------------------------------------------------------------------- /src/pip/_internal/vcs/__init__.py: -------------------------------------------------------------------------------- 1 | # Expose a limited set of classes and functions so callers outside of 2 | # the vcs package don't need to import deeper than `pip._internal.vcs`. 3 | # (The test directory may still need to import from a vcs sub-package.) 4 | # Import all vcs modules to register each VCS in the VcsSupport object. 5 | import pip._internal.vcs.bazaar 6 | import pip._internal.vcs.git 7 | import pip._internal.vcs.mercurial 8 | import pip._internal.vcs.subversion # noqa: F401 9 | from pip._internal.vcs.versioncontrol import ( # noqa: F401 10 | RemoteNotFoundError, 11 | RemoteNotValidError, 12 | is_url, 13 | make_vcs_requirement_url, 14 | vcs, 15 | ) 16 | -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol.pyi: -------------------------------------------------------------------------------- 1 | from cachecontrol import * -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012-2021 Eric Larson 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | """CacheControl import Interface. 6 | 7 | Make it easy to import from cachecontrol without long namespaces. 8 | """ 9 | __author__ = "Eric Larson" 10 | __email__ = "eric@ionrock.org" 11 | __version__ = "0.12.11" 12 | 13 | from .wrapper import CacheControl 14 | from .adapter import CacheControlAdapter 15 | from .controller import CacheController 16 | 17 | import logging 18 | logging.getLogger(__name__).addHandler(logging.NullHandler()) 19 | -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol/caches/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | from .file_cache import FileCache, SeparateBodyFileCache 6 | from .redis_cache import RedisCache 7 | 8 | 9 | __all__ = ["FileCache", "SeparateBodyFileCache", "RedisCache"] 10 | -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol/caches/redis_cache.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | from __future__ import division 6 | 7 | from datetime import datetime 8 | from pip._vendor.cachecontrol.cache import BaseCache 9 | 10 | 11 | class RedisCache(BaseCache): 12 | 13 | def __init__(self, conn): 14 | self.conn = conn 15 | 16 | def get(self, key): 17 | return self.conn.get(key) 18 | 19 | def set(self, key, value, expires=None): 20 | if not expires: 21 | self.conn.set(key, value) 22 | elif isinstance(expires, datetime): 23 | expires = expires - datetime.utcnow() 24 | self.conn.setex(key, int(expires.total_seconds()), value) 25 | else: 26 | self.conn.setex(key, expires, value) 27 | 28 | def delete(self, key): 29 | self.conn.delete(key) 30 | 31 | def clear(self): 32 | """Helper for clearing all the keys in a database. Use with 33 | caution!""" 34 | for key in self.conn.keys(): 35 | self.conn.delete(key) 36 | 37 | def close(self): 38 | """Redis uses connection pooling, no need to close the connection.""" 39 | pass 40 | -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol/compat.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | try: 6 | from urllib.parse import urljoin 7 | except ImportError: 8 | from urlparse import urljoin 9 | 10 | 11 | try: 12 | import cPickle as pickle 13 | except ImportError: 14 | import pickle 15 | 16 | # Handle the case where the requests module has been patched to not have 17 | # urllib3 bundled as part of its source. 18 | try: 19 | from pip._vendor.requests.packages.urllib3.response import HTTPResponse 20 | except ImportError: 21 | from pip._vendor.urllib3.response import HTTPResponse 22 | 23 | try: 24 | from pip._vendor.requests.packages.urllib3.util import is_fp_closed 25 | except ImportError: 26 | from pip._vendor.urllib3.util import is_fp_closed 27 | 28 | # Replicate some six behaviour 29 | try: 30 | text_type = unicode 31 | except NameError: 32 | text_type = str 33 | -------------------------------------------------------------------------------- /src/pip/_vendor/cachecontrol/wrapper.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | from .adapter import CacheControlAdapter 6 | from .cache import DictCache 7 | 8 | 9 | def CacheControl( 10 | sess, 11 | cache=None, 12 | cache_etags=True, 13 | serializer=None, 14 | heuristic=None, 15 | controller_class=None, 16 | adapter_class=None, 17 | cacheable_methods=None, 18 | ): 19 | 20 | cache = DictCache() if cache is None else cache 21 | adapter_class = adapter_class or CacheControlAdapter 22 | adapter = adapter_class( 23 | cache, 24 | cache_etags=cache_etags, 25 | serializer=serializer, 26 | heuristic=heuristic, 27 | controller_class=controller_class, 28 | cacheable_methods=cacheable_methods, 29 | ) 30 | sess.mount("http://", adapter) 31 | sess.mount("https://", adapter) 32 | 33 | return sess 34 | -------------------------------------------------------------------------------- /src/pip/_vendor/certifi/LICENSE: -------------------------------------------------------------------------------- 1 | This package contains a modified version of ca-bundle.crt: 2 | 3 | ca-bundle.crt -- Bundle of CA Root Certificates 4 | 5 | Certificate data from Mozilla as of: Thu Nov 3 19:04:19 2011# 6 | This is a bundle of X.509 certificates of public Certificate Authorities 7 | (CA). These were automatically extracted from Mozilla's root certificates 8 | file (certdata.txt). This file can be found in the mozilla source tree: 9 | https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt 10 | It contains the certificates in PEM format and therefore 11 | can be directly used with curl / libcurl / php_curl, or with 12 | an Apache+mod_ssl webserver for SSL client authentication. 13 | Just configure this file as the SSLCACertificateFile.# 14 | 15 | ***** BEGIN LICENSE BLOCK ***** 16 | This Source Code Form is subject to the terms of the Mozilla Public License, 17 | v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain 18 | one at http://mozilla.org/MPL/2.0/. 19 | 20 | ***** END LICENSE BLOCK ***** 21 | @(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $ 22 | -------------------------------------------------------------------------------- /src/pip/_vendor/certifi/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import contents, where 2 | 3 | __all__ = ["contents", "where"] 4 | __version__ = "2023.07.22" 5 | -------------------------------------------------------------------------------- /src/pip/_vendor/certifi/__main__.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | from pip._vendor.certifi import contents, where 4 | 5 | parser = argparse.ArgumentParser() 6 | parser.add_argument("-c", "--contents", action="store_true") 7 | args = parser.parse_args() 8 | 9 | if args.contents: 10 | print(contents()) 11 | else: 12 | print(where()) 13 | -------------------------------------------------------------------------------- /src/pip/_vendor/certifi/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/certifi/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/chardet/cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/chardet/cli/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/chardet/codingstatemachinedict.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING, Tuple 2 | 3 | if TYPE_CHECKING: 4 | # TypedDict was introduced in Python 3.8. 5 | # 6 | # TODO: Remove the else block and TYPE_CHECKING check when dropping support 7 | # for Python 3.7. 8 | from typing import TypedDict 9 | 10 | class CodingStateMachineDict(TypedDict, total=False): 11 | class_table: Tuple[int, ...] 12 | class_factor: int 13 | state_table: Tuple[int, ...] 14 | char_len_table: Tuple[int, ...] 15 | name: str 16 | language: str # Optional key 17 | 18 | else: 19 | CodingStateMachineDict = dict 20 | -------------------------------------------------------------------------------- /src/pip/_vendor/chardet/metadata/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/chardet/metadata/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/chardet/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/chardet/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/chardet/resultdict.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING, Optional 2 | 3 | if TYPE_CHECKING: 4 | # TypedDict was introduced in Python 3.8. 5 | # 6 | # TODO: Remove the else block and TYPE_CHECKING check when dropping support 7 | # for Python 3.7. 8 | from typing import TypedDict 9 | 10 | class ResultDict(TypedDict): 11 | encoding: Optional[str] 12 | confidence: float 13 | language: Optional[str] 14 | 15 | else: 16 | ResultDict = dict 17 | -------------------------------------------------------------------------------- /src/pip/_vendor/chardet/version.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module exists only to simplify retrieving the version number of chardet 3 | from within setuptools and from chardet subpackages. 4 | 5 | :author: Dan Blanchard (dan.blanchard@gmail.com) 6 | """ 7 | 8 | __version__ = "5.1.0" 9 | VERSION = __version__.split(".") 10 | -------------------------------------------------------------------------------- /src/pip/_vendor/colorama.pyi: -------------------------------------------------------------------------------- 1 | from colorama import * -------------------------------------------------------------------------------- /src/pip/_vendor/colorama/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | from .initialise import init, deinit, reinit, colorama_text, just_fix_windows_console 3 | from .ansi import Fore, Back, Style, Cursor 4 | from .ansitowin32 import AnsiToWin32 5 | 6 | __version__ = '0.4.6' 7 | 8 | -------------------------------------------------------------------------------- /src/pip/_vendor/colorama/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | -------------------------------------------------------------------------------- /src/pip/_vendor/distlib.pyi: -------------------------------------------------------------------------------- 1 | from distlib import * -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2012-2022 Vinay Sajip. 4 | # Licensed to the Python Software Foundation under a contributor agreement. 5 | # See LICENSE.txt and CONTRIBUTORS.txt. 6 | # 7 | import logging 8 | 9 | __version__ = '0.3.6' 10 | 11 | class DistlibException(Exception): 12 | pass 13 | 14 | try: 15 | from logging import NullHandler 16 | except ImportError: # pragma: no cover 17 | class NullHandler(logging.Handler): 18 | def handle(self, record): pass 19 | def emit(self, record): pass 20 | def createLock(self): self.lock = None 21 | 22 | logger = logging.getLogger(__name__) 23 | logger.addHandler(NullHandler()) 24 | -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/t32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distlib/t32.exe -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/t64-arm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distlib/t64-arm.exe -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/t64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distlib/t64.exe -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/w32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distlib/w32.exe -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/w64-arm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distlib/w64-arm.exe -------------------------------------------------------------------------------- /src/pip/_vendor/distlib/w64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distlib/w64.exe -------------------------------------------------------------------------------- /src/pip/_vendor/distro/__init__.py: -------------------------------------------------------------------------------- 1 | from .distro import ( 2 | NORMALIZED_DISTRO_ID, 3 | NORMALIZED_LSB_ID, 4 | NORMALIZED_OS_ID, 5 | LinuxDistribution, 6 | __version__, 7 | build_number, 8 | codename, 9 | distro_release_attr, 10 | distro_release_info, 11 | id, 12 | info, 13 | like, 14 | linux_distribution, 15 | lsb_release_attr, 16 | lsb_release_info, 17 | major_version, 18 | minor_version, 19 | name, 20 | os_release_attr, 21 | os_release_info, 22 | uname_attr, 23 | uname_info, 24 | version, 25 | version_parts, 26 | ) 27 | 28 | __all__ = [ 29 | "NORMALIZED_DISTRO_ID", 30 | "NORMALIZED_LSB_ID", 31 | "NORMALIZED_OS_ID", 32 | "LinuxDistribution", 33 | "build_number", 34 | "codename", 35 | "distro_release_attr", 36 | "distro_release_info", 37 | "id", 38 | "info", 39 | "like", 40 | "linux_distribution", 41 | "lsb_release_attr", 42 | "lsb_release_info", 43 | "major_version", 44 | "minor_version", 45 | "name", 46 | "os_release_attr", 47 | "os_release_info", 48 | "uname_attr", 49 | "uname_info", 50 | "version", 51 | "version_parts", 52 | ] 53 | 54 | __version__ = __version__ 55 | -------------------------------------------------------------------------------- /src/pip/_vendor/distro/__main__.py: -------------------------------------------------------------------------------- 1 | from .distro import main 2 | 3 | if __name__ == "__main__": 4 | main() 5 | -------------------------------------------------------------------------------- /src/pip/_vendor/distro/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/distro/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/idna/__init__.py: -------------------------------------------------------------------------------- 1 | from .package_data import __version__ 2 | from .core import ( 3 | IDNABidiError, 4 | IDNAError, 5 | InvalidCodepoint, 6 | InvalidCodepointContext, 7 | alabel, 8 | check_bidi, 9 | check_hyphen_ok, 10 | check_initial_combiner, 11 | check_label, 12 | check_nfc, 13 | decode, 14 | encode, 15 | ulabel, 16 | uts46_remap, 17 | valid_contextj, 18 | valid_contexto, 19 | valid_label_length, 20 | valid_string_length, 21 | ) 22 | from .intranges import intranges_contain 23 | 24 | __all__ = [ 25 | "IDNABidiError", 26 | "IDNAError", 27 | "InvalidCodepoint", 28 | "InvalidCodepointContext", 29 | "alabel", 30 | "check_bidi", 31 | "check_hyphen_ok", 32 | "check_initial_combiner", 33 | "check_label", 34 | "check_nfc", 35 | "decode", 36 | "encode", 37 | "intranges_contain", 38 | "ulabel", 39 | "uts46_remap", 40 | "valid_contextj", 41 | "valid_contexto", 42 | "valid_label_length", 43 | "valid_string_length", 44 | ] 45 | -------------------------------------------------------------------------------- /src/pip/_vendor/idna/compat.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .codec import * 3 | from typing import Any, Union 4 | 5 | def ToASCII(label: str) -> bytes: 6 | return encode(label) 7 | 8 | def ToUnicode(label: Union[bytes, bytearray]) -> str: 9 | return decode(label) 10 | 11 | def nameprep(s: Any) -> None: 12 | raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol') 13 | 14 | -------------------------------------------------------------------------------- /src/pip/_vendor/idna/package_data.py: -------------------------------------------------------------------------------- 1 | __version__ = '3.4' 2 | 3 | -------------------------------------------------------------------------------- /src/pip/_vendor/idna/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/idna/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/msgpack.pyi: -------------------------------------------------------------------------------- 1 | from msgpack import * -------------------------------------------------------------------------------- /src/pip/_vendor/msgpack/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2008-2011 INADA Naoki 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /src/pip/_vendor/packaging/LICENSE: -------------------------------------------------------------------------------- 1 | This software is made available under the terms of *either* of the licenses 2 | found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made 3 | under the terms of *both* these licenses. 4 | -------------------------------------------------------------------------------- /src/pip/_vendor/packaging/__about__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | 5 | __all__ = [ 6 | "__title__", 7 | "__summary__", 8 | "__uri__", 9 | "__version__", 10 | "__author__", 11 | "__email__", 12 | "__license__", 13 | "__copyright__", 14 | ] 15 | 16 | __title__ = "packaging" 17 | __summary__ = "Core utilities for Python packages" 18 | __uri__ = "https://github.com/pypa/packaging" 19 | 20 | __version__ = "21.3" 21 | 22 | __author__ = "Donald Stufft and individual contributors" 23 | __email__ = "donald@stufft.io" 24 | 25 | __license__ = "BSD-2-Clause or Apache-2.0" 26 | __copyright__ = "2014-2019 %s" % __author__ 27 | -------------------------------------------------------------------------------- /src/pip/_vendor/packaging/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | 5 | from .__about__ import ( 6 | __author__, 7 | __copyright__, 8 | __email__, 9 | __license__, 10 | __summary__, 11 | __title__, 12 | __uri__, 13 | __version__, 14 | ) 15 | 16 | __all__ = [ 17 | "__title__", 18 | "__summary__", 19 | "__uri__", 20 | "__version__", 21 | "__author__", 22 | "__email__", 23 | "__license__", 24 | "__copyright__", 25 | ] 26 | -------------------------------------------------------------------------------- /src/pip/_vendor/packaging/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/packaging/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/pkg_resources.pyi: -------------------------------------------------------------------------------- 1 | from pkg_resources import * -------------------------------------------------------------------------------- /src/pip/_vendor/pkg_resources/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to 3 | deal in the Software without restriction, including without limitation the 4 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 5 | sell copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 16 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 17 | IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /src/pip/_vendor/platformdirs/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2010-202x The platformdirs developers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/pip/_vendor/platformdirs/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/platformdirs/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/platformdirs/version.py: -------------------------------------------------------------------------------- 1 | # file generated by setuptools_scm 2 | # don't change, don't track in version control 3 | __version__ = version = '3.8.1' 4 | __version_tuple__ = version_tuple = (3, 8, 1) 5 | -------------------------------------------------------------------------------- /src/pip/_vendor/pygments.pyi: -------------------------------------------------------------------------------- 1 | from pygments import * -------------------------------------------------------------------------------- /src/pip/_vendor/pygments/__main__.py: -------------------------------------------------------------------------------- 1 | """ 2 | pygments.__main__ 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Main entry point for ``python -m pygments``. 6 | 7 | :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | """ 10 | 11 | import sys 12 | from pip._vendor.pygments.cmdline import main 13 | 14 | try: 15 | sys.exit(main(sys.argv)) 16 | except KeyboardInterrupt: 17 | sys.exit(1) 18 | -------------------------------------------------------------------------------- /src/pip/_vendor/pygments/modeline.py: -------------------------------------------------------------------------------- 1 | """ 2 | pygments.modeline 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | A simple modeline parser (based on pymodeline). 6 | 7 | :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | """ 10 | 11 | import re 12 | 13 | __all__ = ['get_filetype_from_buffer'] 14 | 15 | 16 | modeline_re = re.compile(r''' 17 | (?: vi | vim | ex ) (?: [<=>]? \d* )? : 18 | .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ ) 19 | ''', re.VERBOSE) 20 | 21 | 22 | def get_filetype_from_line(l): 23 | m = modeline_re.search(l) 24 | if m: 25 | return m.group(1) 26 | 27 | 28 | def get_filetype_from_buffer(buf, max_lines=5): 29 | """ 30 | Scan the buffer for modelines and return filetype if one is found. 31 | """ 32 | lines = buf.splitlines() 33 | for l in lines[-1:-max_lines-1:-1]: 34 | ret = get_filetype_from_line(l) 35 | if ret: 36 | return ret 37 | for i in range(max_lines, -1, -1): 38 | if i < len(lines): 39 | ret = get_filetype_from_line(lines[i]) 40 | if ret: 41 | return ret 42 | 43 | return None 44 | -------------------------------------------------------------------------------- /src/pip/_vendor/pyparsing/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining 2 | a copy of this software and associated documentation files (the 3 | "Software"), to deal in the Software without restriction, including 4 | without limitation the rights to use, copy, modify, merge, publish, 5 | distribute, sublicense, and/or sell copies of the Software, and to 6 | permit persons to whom the Software is furnished to do so, subject to 7 | the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be 10 | included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 17 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /src/pip/_vendor/pyparsing/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/pyparsing/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/pyproject_hooks.pyi: -------------------------------------------------------------------------------- 1 | from pyproject_hooks import * -------------------------------------------------------------------------------- /src/pip/_vendor/pyproject_hooks/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Thomas Kluyver 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/pip/_vendor/pyproject_hooks/__init__.py: -------------------------------------------------------------------------------- 1 | """Wrappers to call pyproject.toml-based build backend hooks. 2 | """ 3 | 4 | from ._impl import ( 5 | BackendInvalid, 6 | BackendUnavailable, 7 | BuildBackendHookCaller, 8 | HookMissing, 9 | UnsupportedOperation, 10 | default_subprocess_runner, 11 | quiet_subprocess_runner, 12 | ) 13 | 14 | __version__ = '1.0.0' 15 | __all__ = [ 16 | 'BackendUnavailable', 17 | 'BackendInvalid', 18 | 'HookMissing', 19 | 'UnsupportedOperation', 20 | 'default_subprocess_runner', 21 | 'quiet_subprocess_runner', 22 | 'BuildBackendHookCaller', 23 | ] 24 | -------------------------------------------------------------------------------- /src/pip/_vendor/pyproject_hooks/_compat.py: -------------------------------------------------------------------------------- 1 | __all__ = ("tomllib",) 2 | 3 | import sys 4 | 5 | if sys.version_info >= (3, 11): 6 | import tomllib 7 | else: 8 | from pip._vendor import tomli as tomllib 9 | -------------------------------------------------------------------------------- /src/pip/_vendor/pyproject_hooks/_in_process/__init__.py: -------------------------------------------------------------------------------- 1 | """This is a subpackage because the directory is on sys.path for _in_process.py 2 | 3 | The subpackage should stay as empty as possible to avoid shadowing modules that 4 | the backend might import. 5 | """ 6 | 7 | import importlib.resources as resources 8 | 9 | try: 10 | resources.files 11 | except AttributeError: 12 | # Python 3.8 compatibility 13 | def _in_proc_script_path(): 14 | return resources.path(__package__, '_in_process.py') 15 | else: 16 | def _in_proc_script_path(): 17 | return resources.as_file( 18 | resources.files(__package__).joinpath('_in_process.py')) 19 | -------------------------------------------------------------------------------- /src/pip/_vendor/requests.pyi: -------------------------------------------------------------------------------- 1 | from requests import * -------------------------------------------------------------------------------- /src/pip/_vendor/requests/__version__.py: -------------------------------------------------------------------------------- 1 | # .-. .-. .-. . . .-. .-. .-. .-. 2 | # |( |- |.| | | |- `-. | `-. 3 | # ' ' `-' `-`.`-' `-' `-' ' `-' 4 | 5 | __title__ = "requests" 6 | __description__ = "Python HTTP for Humans." 7 | __url__ = "https://requests.readthedocs.io" 8 | __version__ = "2.31.0" 9 | __build__ = 0x023100 10 | __author__ = "Kenneth Reitz" 11 | __author_email__ = "me@kennethreitz.org" 12 | __license__ = "Apache 2.0" 13 | __copyright__ = "Copyright Kenneth Reitz" 14 | __cake__ = "\u2728 \U0001f370 \u2728" 15 | -------------------------------------------------------------------------------- /src/pip/_vendor/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | requests.certs 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module returns the preferred default CA certificate bundle. There is 8 | only one — the one from the certifi package. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os 16 | 17 | if "_PIP_STANDALONE_CERT" not in os.environ: 18 | from pip._vendor.certifi import where 19 | else: 20 | def where(): 21 | return os.environ["_PIP_STANDALONE_CERT"] 22 | 23 | if __name__ == "__main__": 24 | print(where()) 25 | -------------------------------------------------------------------------------- /src/pip/_vendor/requests/hooks.py: -------------------------------------------------------------------------------- 1 | """ 2 | requests.hooks 3 | ~~~~~~~~~~~~~~ 4 | 5 | This module provides the capabilities for the Requests hooks system. 6 | 7 | Available hooks: 8 | 9 | ``response``: 10 | The response generated from a Request. 11 | """ 12 | HOOKS = ["response"] 13 | 14 | 15 | def default_hooks(): 16 | return {event: [] for event in HOOKS} 17 | 18 | 19 | # TODO: response is the only one 20 | 21 | 22 | def dispatch_hook(key, hooks, hook_data, **kwargs): 23 | """Dispatches a hook dictionary on a given piece of data.""" 24 | hooks = hooks or {} 25 | hooks = hooks.get(key) 26 | if hooks: 27 | if hasattr(hooks, "__call__"): 28 | hooks = [hooks] 29 | for hook in hooks: 30 | _hook_data = hook(hook_data, **kwargs) 31 | if _hook_data is not None: 32 | hook_data = _hook_data 33 | return hook_data 34 | -------------------------------------------------------------------------------- /src/pip/_vendor/requests/packages.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # This code exists for backwards compatibility reasons. 4 | # I don't like it either. Just look the other way. :) 5 | 6 | for package in ('urllib3', 'idna', 'chardet'): 7 | vendored_package = "pip._vendor." + package 8 | locals()[package] = __import__(vendored_package) 9 | # This traversal is apparently necessary such that the identities are 10 | # preserved (requests.packages.urllib3.* is urllib3.*) 11 | for mod in list(sys.modules): 12 | if mod == vendored_package or mod.startswith(vendored_package + '.'): 13 | unprefixed_mod = mod[len("pip._vendor."):] 14 | sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] 15 | 16 | # Kinda cool, though, right? 17 | -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018, Tzu-ping Chung 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "__version__", 3 | "AbstractProvider", 4 | "AbstractResolver", 5 | "BaseReporter", 6 | "InconsistentCandidate", 7 | "Resolver", 8 | "RequirementsConflicted", 9 | "ResolutionError", 10 | "ResolutionImpossible", 11 | "ResolutionTooDeep", 12 | ] 13 | 14 | __version__ = "1.0.1" 15 | 16 | 17 | from .providers import AbstractProvider, AbstractResolver 18 | from .reporters import BaseReporter 19 | from .resolvers import ( 20 | InconsistentCandidate, 21 | RequirementsConflicted, 22 | ResolutionError, 23 | ResolutionImpossible, 24 | ResolutionTooDeep, 25 | Resolver, 26 | ) 27 | -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/__init__.pyi: -------------------------------------------------------------------------------- 1 | __version__: str 2 | 3 | from .providers import AbstractProvider as AbstractProvider 4 | from .providers import AbstractResolver as AbstractResolver 5 | from .reporters import BaseReporter as BaseReporter 6 | from .resolvers import InconsistentCandidate as InconsistentCandidate 7 | from .resolvers import RequirementsConflicted as RequirementsConflicted 8 | from .resolvers import ResolutionError as ResolutionError 9 | from .resolvers import ResolutionImpossible as ResolutionImpossible 10 | from .resolvers import ResolutionTooDeep as ResolutionTooDeep 11 | from .resolvers import Resolver as Resolver 12 | -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/compat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/resolvelib/compat/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/compat/collections_abc.py: -------------------------------------------------------------------------------- 1 | __all__ = ["Mapping", "Sequence"] 2 | 3 | try: 4 | from collections.abc import Mapping, Sequence 5 | except ImportError: 6 | from collections import Mapping, Sequence 7 | -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/compat/collections_abc.pyi: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping, Sequence 2 | -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/resolvelib/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/resolvelib/reporters.pyi: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | 3 | class BaseReporter: 4 | def starting(self) -> Any: ... 5 | def starting_round(self, index: int) -> Any: ... 6 | def ending_round(self, index: int, state: Any) -> Any: ... 7 | def ending(self, state: Any) -> Any: ... 8 | def adding_requirement(self, requirement: Any, parent: Any) -> Any: ... 9 | def rejecting_candidate(self, criterion: Any, candidate: Any) -> Any: ... 10 | def resolving_conflicts(self, causes: Any) -> Any: ... 11 | def pinning(self, candidate: Any) -> Any: ... 12 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Will McGugan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/_emoji_replace.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, Match, Optional 2 | import re 3 | 4 | from ._emoji_codes import EMOJI 5 | 6 | 7 | _ReStringMatch = Match[str] # regex match object 8 | _ReSubCallable = Callable[[_ReStringMatch], str] # Callable invoked by re.sub 9 | _EmojiSubMethod = Callable[[_ReSubCallable, str], str] # Sub method of a compiled re 10 | 11 | 12 | def _emoji_replace( 13 | text: str, 14 | default_variant: Optional[str] = None, 15 | _emoji_sub: _EmojiSubMethod = re.compile(r"(:(\S*?)(?:(?:\-)(emoji|text))?:)").sub, 16 | ) -> str: 17 | """Replace emoji code in text.""" 18 | get_emoji = EMOJI.__getitem__ 19 | variants = {"text": "\uFE0E", "emoji": "\uFE0F"} 20 | get_variant = variants.get 21 | default_variant_code = variants.get(default_variant, "") if default_variant else "" 22 | 23 | def do_replace(match: Match[str]) -> str: 24 | emoji_code, emoji_name, variant = match.groups() 25 | try: 26 | return get_emoji(emoji_name.lower()) + get_variant( 27 | variant, default_variant_code 28 | ) 29 | except KeyError: 30 | return emoji_code 31 | 32 | return _emoji_sub(do_replace, text) 33 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/_extension.py: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | 3 | 4 | def load_ipython_extension(ip: Any) -> None: # pragma: no cover 5 | # prevent circular import 6 | from pip._vendor.rich.pretty import install 7 | from pip._vendor.rich.traceback import install as tr_install 8 | 9 | install() 10 | tr_install() 11 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/_fileno.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import IO, Callable 4 | 5 | 6 | def get_fileno(file_like: IO[str]) -> int | None: 7 | """Get fileno() from a file, accounting for poorly implemented file-like objects. 8 | 9 | Args: 10 | file_like (IO): A file-like object. 11 | 12 | Returns: 13 | int | None: The result of fileno if available, or None if operation failed. 14 | """ 15 | fileno: Callable[[], int] | None = getattr(file_like, "fileno", None) 16 | if fileno is not None: 17 | try: 18 | return fileno() 19 | except Exception: 20 | # `fileno` is documented as potentially raising a OSError 21 | # Alas, from the issues, there are so many poorly implemented file-like objects, 22 | # that `fileno()` can raise just about anything. 23 | return None 24 | return None 25 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/_pick.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | 4 | def pick_bool(*values: Optional[bool]) -> bool: 5 | """Pick the first non-none bool or return the last value. 6 | 7 | Args: 8 | *values (bool): Any number of boolean or None values. 9 | 10 | Returns: 11 | bool: First non-none boolean. 12 | """ 13 | assert values, "1 or more values required" 14 | for value in values: 15 | if value is not None: 16 | return value 17 | return bool(value) 18 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/_stack.py: -------------------------------------------------------------------------------- 1 | from typing import List, TypeVar 2 | 3 | T = TypeVar("T") 4 | 5 | 6 | class Stack(List[T]): 7 | """A small shim over builtin list.""" 8 | 9 | @property 10 | def top(self) -> T: 11 | """Get top of stack.""" 12 | return self[-1] 13 | 14 | def push(self, item: T) -> None: 15 | """Push an item on to the stack (append in stack nomenclature).""" 16 | self.append(item) 17 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/_timer.py: -------------------------------------------------------------------------------- 1 | """ 2 | Timer context manager, only used in debug. 3 | 4 | """ 5 | 6 | from time import time 7 | 8 | import contextlib 9 | from typing import Generator 10 | 11 | 12 | @contextlib.contextmanager 13 | def timer(subject: str = "time") -> Generator[None, None, None]: 14 | """print the elapsed time. (only used in debugging)""" 15 | start = time() 16 | yield 17 | elapsed = time() - start 18 | elapsed_ms = elapsed * 1000 19 | print(f"{subject} elapsed {elapsed_ms:.1f}ms") 20 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/abc.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | 3 | 4 | class RichRenderable(ABC): 5 | """An abstract base class for Rich renderables. 6 | 7 | Note that there is no need to extend this class, the intended use is to check if an 8 | object supports the Rich renderable protocol. For example:: 9 | 10 | if isinstance(my_object, RichRenderable): 11 | console.print(my_object) 12 | 13 | """ 14 | 15 | @classmethod 16 | def __subclasshook__(cls, other: type) -> bool: 17 | """Check if this class supports the rich render protocol.""" 18 | return hasattr(other, "__rich_console__") or hasattr(other, "__rich__") 19 | 20 | 21 | if __name__ == "__main__": # pragma: no cover 22 | from pip._vendor.rich.text import Text 23 | 24 | t = Text() 25 | print(isinstance(Text, RichRenderable)) 26 | print(isinstance(t, RichRenderable)) 27 | 28 | class Foo: 29 | pass 30 | 31 | f = Foo() 32 | print(isinstance(f, RichRenderable)) 33 | print(isinstance("", RichRenderable)) 34 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/color_triplet.py: -------------------------------------------------------------------------------- 1 | from typing import NamedTuple, Tuple 2 | 3 | 4 | class ColorTriplet(NamedTuple): 5 | """The red, green, and blue components of a color.""" 6 | 7 | red: int 8 | """Red component in 0 to 255 range.""" 9 | green: int 10 | """Green component in 0 to 255 range.""" 11 | blue: int 12 | """Blue component in 0 to 255 range.""" 13 | 14 | @property 15 | def hex(self) -> str: 16 | """get the color triplet in CSS style.""" 17 | red, green, blue = self 18 | return f"#{red:02x}{green:02x}{blue:02x}" 19 | 20 | @property 21 | def rgb(self) -> str: 22 | """The color in RGB format. 23 | 24 | Returns: 25 | str: An rgb color, e.g. ``"rgb(100,23,255)"``. 26 | """ 27 | red, green, blue = self 28 | return f"rgb({red},{green},{blue})" 29 | 30 | @property 31 | def normalized(self) -> Tuple[float, float, float]: 32 | """Convert components into floats between 0 and 1. 33 | 34 | Returns: 35 | Tuple[float, float, float]: A tuple of three normalized colour components. 36 | """ 37 | red, green, blue = self 38 | return red / 255.0, green / 255.0, blue / 255.0 39 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/diagnose.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | from pip._vendor.rich import inspect 5 | from pip._vendor.rich.console import Console, get_windows_console_features 6 | from pip._vendor.rich.panel import Panel 7 | from pip._vendor.rich.pretty import Pretty 8 | 9 | 10 | def report() -> None: # pragma: no cover 11 | """Print a report to the terminal with debugging information""" 12 | console = Console() 13 | inspect(console) 14 | features = get_windows_console_features() 15 | inspect(features) 16 | 17 | env_names = ( 18 | "TERM", 19 | "COLORTERM", 20 | "CLICOLOR", 21 | "NO_COLOR", 22 | "TERM_PROGRAM", 23 | "COLUMNS", 24 | "LINES", 25 | "JUPYTER_COLUMNS", 26 | "JUPYTER_LINES", 27 | "JPY_PARENT_PID", 28 | "VSCODE_VERBOSE_LOGGING", 29 | ) 30 | env = {name: os.getenv(name) for name in env_names} 31 | console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables")) 32 | 33 | console.print(f'platform="{platform.system()}"') 34 | 35 | 36 | if __name__ == "__main__": # pragma: no cover 37 | report() 38 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/errors.py: -------------------------------------------------------------------------------- 1 | class ConsoleError(Exception): 2 | """An error in console operation.""" 3 | 4 | 5 | class StyleError(Exception): 6 | """An error in styles.""" 7 | 8 | 9 | class StyleSyntaxError(ConsoleError): 10 | """Style was badly formatted.""" 11 | 12 | 13 | class MissingStyle(StyleError): 14 | """No such style.""" 15 | 16 | 17 | class StyleStackError(ConsoleError): 18 | """Style stack is invalid.""" 19 | 20 | 21 | class NotRenderableError(ConsoleError): 22 | """Object is not renderable.""" 23 | 24 | 25 | class MarkupError(ConsoleError): 26 | """Markup was badly formatted.""" 27 | 28 | 29 | class LiveError(ConsoleError): 30 | """Error related to Live display.""" 31 | 32 | 33 | class NoAltScreen(ConsoleError): 34 | """Alt screen mode was required.""" 35 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/pager.py: -------------------------------------------------------------------------------- 1 | from abc import ABC, abstractmethod 2 | from typing import Any 3 | 4 | 5 | class Pager(ABC): 6 | """Base class for a pager.""" 7 | 8 | @abstractmethod 9 | def show(self, content: str) -> None: 10 | """Show content in pager. 11 | 12 | Args: 13 | content (str): Content to be displayed. 14 | """ 15 | 16 | 17 | class SystemPager(Pager): 18 | """Uses the pager installed on the system.""" 19 | 20 | def _pager(self, content: str) -> Any: #  pragma: no cover 21 | return __import__("pydoc").pager(content) 22 | 23 | def show(self, content: str) -> None: 24 | """Use the same pager used by pydoc.""" 25 | self._pager(content) 26 | 27 | 28 | if __name__ == "__main__": # pragma: no cover 29 | from .__main__ import make_test_card 30 | from .console import Console 31 | 32 | console = Console() 33 | with console.pager(styles=True): 34 | console.print(make_test_card()) 35 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/rich/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/rich/region.py: -------------------------------------------------------------------------------- 1 | from typing import NamedTuple 2 | 3 | 4 | class Region(NamedTuple): 5 | """Defines a rectangular region of the screen.""" 6 | 7 | x: int 8 | y: int 9 | width: int 10 | height: int 11 | -------------------------------------------------------------------------------- /src/pip/_vendor/rich/themes.py: -------------------------------------------------------------------------------- 1 | from .default_styles import DEFAULT_STYLES 2 | from .theme import Theme 3 | 4 | 5 | DEFAULT = Theme(DEFAULT_STYLES) 6 | -------------------------------------------------------------------------------- /src/pip/_vendor/six.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2020 Benjamin Peterson 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /src/pip/_vendor/six/__init__.pyi: -------------------------------------------------------------------------------- 1 | from six import * -------------------------------------------------------------------------------- /src/pip/_vendor/six/moves/__init__.pyi: -------------------------------------------------------------------------------- 1 | from six.moves import * -------------------------------------------------------------------------------- /src/pip/_vendor/six/moves/configparser.pyi: -------------------------------------------------------------------------------- 1 | from six.moves.configparser import * -------------------------------------------------------------------------------- /src/pip/_vendor/tenacity/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/tenacity/py.typed -------------------------------------------------------------------------------- /src/pip/_vendor/tomli/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Taneli Hukkinen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/pip/_vendor/tomli/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # SPDX-FileCopyrightText: 2021 Taneli Hukkinen 3 | # Licensed to PSF under a Contributor Agreement. 4 | 5 | __all__ = ("loads", "load", "TOMLDecodeError") 6 | __version__ = "2.0.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT 7 | 8 | from ._parser import TOMLDecodeError, load, loads 9 | 10 | # Pretend this exception was created here. 11 | TOMLDecodeError.__module__ = __name__ 12 | -------------------------------------------------------------------------------- /src/pip/_vendor/tomli/_types.py: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # SPDX-FileCopyrightText: 2021 Taneli Hukkinen 3 | # Licensed to PSF under a Contributor Agreement. 4 | 5 | from typing import Any, Callable, Tuple 6 | 7 | # Type annotations 8 | ParseFloat = Callable[[str], Any] 9 | Key = Tuple[str, ...] 10 | Pos = int 11 | -------------------------------------------------------------------------------- /src/pip/_vendor/tomli/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561 2 | -------------------------------------------------------------------------------- /src/pip/_vendor/typing_extensions.pyi: -------------------------------------------------------------------------------- 1 | from typing_extensions import * -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3.pyi: -------------------------------------------------------------------------------- 1 | from urllib3 import * -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/_version.py: -------------------------------------------------------------------------------- 1 | # This file is protected via CODEOWNERS 2 | __version__ = "1.26.16" 3 | -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/contrib/_appengine_environ.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module provides means to detect the App Engine environment. 3 | """ 4 | 5 | import os 6 | 7 | 8 | def is_appengine(): 9 | return is_local_appengine() or is_prod_appengine() 10 | 11 | 12 | def is_appengine_sandbox(): 13 | """Reports if the app is running in the first generation sandbox. 14 | 15 | The second generation runtimes are technically still in a sandbox, but it 16 | is much less restrictive, so generally you shouldn't need to check for it. 17 | see https://cloud.google.com/appengine/docs/standard/runtimes 18 | """ 19 | return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27" 20 | 21 | 22 | def is_local_appengine(): 23 | return "APPENGINE_RUNTIME" in os.environ and os.environ.get( 24 | "SERVER_SOFTWARE", "" 25 | ).startswith("Development/") 26 | 27 | 28 | def is_prod_appengine(): 29 | return "APPENGINE_RUNTIME" in os.environ and os.environ.get( 30 | "SERVER_SOFTWARE", "" 31 | ).startswith("Google App Engine/") 32 | 33 | 34 | def is_prod_appengine_mvms(): 35 | """Deprecated.""" 36 | return False 37 | -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/contrib/_securetransport/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/urllib3/contrib/_securetransport/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/urllib3/packages/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/packages/backports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/src/pip/_vendor/urllib3/packages/backports/__init__.py -------------------------------------------------------------------------------- /src/pip/_vendor/urllib3/util/queue.py: -------------------------------------------------------------------------------- 1 | import collections 2 | 3 | from ..packages import six 4 | from ..packages.six.moves import queue 5 | 6 | if six.PY2: 7 | # Queue is imported for side effects on MS Windows. See issue #229. 8 | import Queue as _unused_module_Queue # noqa: F401 9 | 10 | 11 | class LifoQueue(queue.Queue): 12 | def _init(self, _): 13 | self.queue = collections.deque() 14 | 15 | def _qsize(self, len=len): 16 | return len(self.queue) 17 | 18 | def _put(self, item): 19 | self.queue.append(item) 20 | 21 | def _get(self): 22 | return self.queue.pop() 23 | -------------------------------------------------------------------------------- /src/pip/_vendor/vendor.txt: -------------------------------------------------------------------------------- 1 | CacheControl==0.12.11 # Make sure to update the license in pyproject.toml for this. 2 | colorama==0.4.6 3 | distlib==0.3.6 4 | distro==1.8.0 5 | msgpack==1.0.5 6 | packaging==21.3 7 | platformdirs==3.8.1 8 | pyparsing==3.1.0 9 | pyproject-hooks==1.0.0 10 | requests==2.31.0 11 | certifi==2023.7.22 12 | chardet==5.1.0 13 | idna==3.4 14 | urllib3==1.26.16 15 | rich==13.4.2 16 | pygments==2.15.1 17 | typing_extensions==4.7.1 18 | resolvelib==1.0.1 19 | setuptools==68.0.0 20 | six==1.16.0 21 | tenacity==8.2.2 22 | tomli==2.0.1 23 | webencodings==0.5.1 24 | -------------------------------------------------------------------------------- /src/pip/_vendor/webencodings.pyi: -------------------------------------------------------------------------------- 1 | from webencodings import * -------------------------------------------------------------------------------- /src/pip/py.typed: -------------------------------------------------------------------------------- 1 | pip is a command line program. While it is implemented in Python, and so is 2 | available for import, you must not use pip's internal APIs in this way. Typing 3 | information is provided as a convenience only and is not a guarantee. Expect 4 | unannounced changes to the API and types in releases. 5 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/__init__.py -------------------------------------------------------------------------------- /tests/data/backends/dummy_backend-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/backends/dummy_backend-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/backends/test_backend-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/backends/test_backend-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/backends/test_backend-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/backends/test_backend-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/completion_paths/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/completion_paths/README.txt -------------------------------------------------------------------------------- /tests/data/completion_paths/REPLAY/video.mpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/completion_paths/REPLAY/video.mpeg -------------------------------------------------------------------------------- /tests/data/completion_paths/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/completion_paths/requirements.txt -------------------------------------------------------------------------------- /tests/data/completion_paths/resources/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/completion_paths/resources/images/icon.png -------------------------------------------------------------------------------- /tests/data/indexes/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Details on Test Indexes 3 | ======================= 4 | 5 | empty_with_pkg 6 | -------------- 7 | empty index, but there's a package in the dir 8 | 9 | in dex 10 | ------ 11 | for testing url quoting with indexes 12 | 13 | simple 14 | ------ 15 | contains index page for "simple" pkg 16 | -------------------------------------------------------------------------------- /tests/data/indexes/datarequire/fakepackage/index.html: -------------------------------------------------------------------------------- 1 | 2 | Links for fakepackage

Links for fakepackage

3 | fakepackage-1.0.0.tar.gz
4 | fakepackage-2.6.0.tar.gz
5 | fakepackage-2.7.0.tar.gz
6 | fakepackage-3.3.0.tar.gz
7 | fakepackage-9.9.9.tar.gz
8 | 9 | -------------------------------------------------------------------------------- /tests/data/indexes/dev/bar/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bar-1.0.tar.gz 5 | bar-2.0.dev1.tar.gz 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/data/indexes/empty_with_pkg/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/indexes/empty_with_pkg/index.html -------------------------------------------------------------------------------- /tests/data/indexes/empty_with_pkg/simple-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/indexes/empty_with_pkg/simple-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/indexes/in dex/README.txt: -------------------------------------------------------------------------------- 1 | This directory has the odd space in its name in order to test urlquoting and 2 | dequoting of file:// scheme index URLs. 3 | -------------------------------------------------------------------------------- /tests/data/indexes/in dex/simple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | simple-1.0.tar.gz 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/data/indexes/pre/bar/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bar-1.0.tar.gz 5 | bar-1.0b1.tar.gz 6 | bar-2.0.dev1.tar.gz 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/data/indexes/simple/simple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | simple-1.0.tar.gz 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/data/indexes/yanked/simple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | simple-1.0.tar.gz 5 | simple-2.0.tar.gz 6 | simple-3.0.tar.gz 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/data/indexes/yanked_all/simple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | simple-1.0.tar.gz 5 | simple-2.0.tar.gz 6 | simple-3.0.tar.gz 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/data/packages/BrokenEmitsUTF8/broken.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/BrokenEmitsUTF8/broken.py -------------------------------------------------------------------------------- /tests/data/packages/FSPkg/fspkg/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /tests/data/packages/FSPkg/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import find_packages, setup 2 | 3 | version = "0.1dev" 4 | 5 | setup( 6 | name="FSPkg", 7 | version=version, 8 | description="File system test package", 9 | long_description="""\ 10 | File system test package""", 11 | classifiers=[], # Get strings from https://pypi.org/pypi?%3Aaction=list_classifiers 12 | keywords="pip tests", 13 | author="pip", 14 | author_email="pip@openplans.org", 15 | url="http://pip.openplans.org", 16 | license="", 17 | packages=find_packages(exclude=["ez_setup", "examples", "tests"]), 18 | include_package_data=True, 19 | zip_safe=False, 20 | install_requires=[ 21 | # -*- Extra requirements: -*- 22 | ], 23 | entry_points=""" 24 | # -*- Entry points: -*- 25 | """, 26 | ) 27 | -------------------------------------------------------------------------------- /tests/data/packages/HackedEggInfo/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | from setuptools.command import egg_info as orig_egg_info 3 | 4 | 5 | class egg_info(orig_egg_info.egg_info): 6 | def run(self): 7 | orig_egg_info.egg_info.run(self) 8 | 9 | 10 | setup( 11 | name="hackedegginfo", 12 | version="0.0.0", 13 | cmdclass={"egg_info": egg_info}, 14 | zip_safe=False, 15 | ) 16 | -------------------------------------------------------------------------------- /tests/data/packages/INITools-0.2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/INITools-0.2.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/LineEndings/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | setup() 4 | -------------------------------------------------------------------------------- /tests/data/packages/LocalEnvironMarker/.gitignore: -------------------------------------------------------------------------------- 1 | /LocalEnvironMarker.egg-info 2 | -------------------------------------------------------------------------------- /tests/data/packages/LocalEnvironMarker/localenvironmarker/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/LocalEnvironMarker/localenvironmarker/__init__.py -------------------------------------------------------------------------------- /tests/data/packages/LocalEnvironMarker/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from setuptools import find_packages, setup 4 | 5 | 6 | def path_to_url(path): 7 | """ 8 | Convert a path to URI. The path will be made absolute and 9 | will not have quoted path parts. 10 | """ 11 | path = os.path.normpath(os.path.abspath(path)) 12 | drive, path = os.path.splitdrive(path) 13 | filepath = path.split(os.path.sep) 14 | url = "/".join(filepath) 15 | if drive: 16 | return "file:///" + drive + url 17 | return "file://" + url 18 | 19 | 20 | setup( 21 | name="LocalEnvironMarker", 22 | version="0.0.1", 23 | packages=find_packages(), 24 | extras_require={ 25 | ":python_version == '2.7'": ["simple"], 26 | }, 27 | ) 28 | -------------------------------------------------------------------------------- /tests/data/packages/LocalExtras-0.0.2/.gitignore: -------------------------------------------------------------------------------- 1 | /LocalExtras-0.0.2.egg-info 2 | -------------------------------------------------------------------------------- /tests/data/packages/LocalExtras-0.0.2/localextras/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/LocalExtras-0.0.2/localextras/__init__.py -------------------------------------------------------------------------------- /tests/data/packages/LocalExtras-0.0.2/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from setuptools import find_packages, setup 4 | 5 | 6 | def path_to_url(path): 7 | """ 8 | Convert a path to URI. The path will be made absolute and 9 | will not have quoted path parts. 10 | """ 11 | path = os.path.normpath(os.path.abspath(path)) 12 | drive, path = os.path.splitdrive(path) 13 | filepath = path.split(os.path.sep) 14 | url = "/".join(filepath) 15 | if drive: 16 | return "file:///" + drive + url 17 | return "file://" + url 18 | 19 | 20 | setup( 21 | name="LocalExtras", 22 | version="0.0.2", 23 | packages=find_packages(), 24 | install_requires=["simple==1.0"], 25 | extras_require={"bar": ["simple==2.0"], "baz": ["singlemodule"]}, 26 | ) 27 | -------------------------------------------------------------------------------- /tests/data/packages/LocalExtras/.gitignore: -------------------------------------------------------------------------------- 1 | /LocalExtras.egg-info 2 | -------------------------------------------------------------------------------- /tests/data/packages/LocalExtras/localextras/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/LocalExtras/localextras/__init__.py -------------------------------------------------------------------------------- /tests/data/packages/LocalExtras/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from setuptools import find_packages, setup 4 | 5 | 6 | def path_to_url(path): 7 | """ 8 | Convert a path to URI. The path will be made absolute and 9 | will not have quoted path parts. 10 | """ 11 | path = os.path.normpath(os.path.abspath(path)) 12 | drive, path = os.path.splitdrive(path) 13 | filepath = path.split(os.path.sep) 14 | url = "/".join(filepath) 15 | if drive: 16 | return "file:///" + drive + url 17 | return "file://" + url 18 | 19 | 20 | setup( 21 | name="LocalExtras", 22 | version="0.0.1", 23 | packages=find_packages(), 24 | extras_require={"bar": ["simple"], "baz": ["singlemodule"]}, 25 | ) 26 | -------------------------------------------------------------------------------- /tests/data/packages/SetupPyLatin1/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/SetupPyLatin1/setup.py -------------------------------------------------------------------------------- /tests/data/packages/SetupPyUTF8/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | setup( 4 | name="SetupPyUTF8", 5 | author="Saúl Ibarra Corretgé", 6 | ) 7 | -------------------------------------------------------------------------------- /tests/data/packages/TopoRequires-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/TopoRequires-0.0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/TopoRequires2-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/TopoRequires2-0.0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/TopoRequires3-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/TopoRequires3-0.0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/TopoRequires4-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/TopoRequires4-0.0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/Upper-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/Upper-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/Upper-2.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/Upper-2.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/argparse-1.2.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/argparse-1.2.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/broken-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/broken-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/broken-0.2broken.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/broken-0.2broken.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/brokenegginfo-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/brokenegginfo-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/brokenwheel-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/brokenwheel-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/child-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/child-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/colander-0.9.9-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/colander-0.9.9-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/compilewheel-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/compilewheel-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/complex_dist-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/complex_dist-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/console_scripts_uppercase-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/console_scripts_uppercase-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/corruptwheel-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- 1 | This is a corrupt wheel which _clearly_ is not a zip file. 2 | -------------------------------------------------------------------------------- /tests/data/packages/distribute-0.7.3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/distribute-0.7.3.zip -------------------------------------------------------------------------------- /tests/data/packages/duplicate-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/duplicate-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/gmpy-1.15.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/gmpy-1.15.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/gmpy2-2.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/gmpy2-2.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/has.script-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/has.script-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/invalid.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/invalid.whl -------------------------------------------------------------------------------- /tests/data/packages/meta-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/meta-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/mypy-0.782-py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/mypy-0.782-py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/parent-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/parent-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pep517_setup_and_pyproject/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ "setuptools" ] 3 | build-backend = "setuptools.build_meta" 4 | -------------------------------------------------------------------------------- /tests/data/packages/pep517_setup_and_pyproject/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = pep517-setup-and-pyproject 3 | version = 1.0 4 | -------------------------------------------------------------------------------- /tests/data/packages/pep517_setup_and_pyproject/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup() 4 | -------------------------------------------------------------------------------- /tests/data/packages/pep517_wrapper_buildsys/mybuildsys.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from setuptools.build_meta import build_sdist 4 | from setuptools.build_meta import build_wheel as setuptools_build_wheel 5 | from setuptools.build_meta import ( 6 | get_requires_for_build_sdist, 7 | get_requires_for_build_wheel, 8 | prepare_metadata_for_build_wheel, 9 | ) 10 | 11 | 12 | def build_wheel(*a, **kw): 13 | if os.environ.get("PIP_TEST_FAIL_BUILD_WHEEL"): 14 | raise RuntimeError("Failing build_wheel, as requested.") 15 | 16 | # Create the marker file to record that the hook was called 17 | with open(os.environ["PIP_TEST_MARKER_FILE"], "wb"): 18 | pass 19 | 20 | return setuptools_build_wheel(*a, **kw) 21 | -------------------------------------------------------------------------------- /tests/data/packages/pep517_wrapper_buildsys/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ "setuptools" ] 3 | build-backend = "mybuildsys" # setuptools.build_meta 4 | backend-path = ["."] 5 | -------------------------------------------------------------------------------- /tests/data/packages/pep517_wrapper_buildsys/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = pep517-wrapper-buildsys 3 | version = 1.0 4 | -------------------------------------------------------------------------------- /tests/data/packages/pep517_wrapper_buildsys/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup() 4 | -------------------------------------------------------------------------------- /tests/data/packages/pep518-3.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pep518-3.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pep518_forkbomb-235.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pep518_forkbomb-235.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pep518_twin_forkbombs_first-234.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pep518_twin_forkbombs_first-234.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pep518_twin_forkbombs_second-238.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pep518_twin_forkbombs_second-238.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pep518_with_extra_and_markers-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pep518_with_extra_and_markers-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pip-test-package-0.1.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pip-test-package-0.1.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pip-test-package-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pip-test-package-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/pkgwithmpkg-1.0-py2.7-macosx10.7.mpkg.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pkgwithmpkg-1.0-py2.7-macosx10.7.mpkg.zip -------------------------------------------------------------------------------- /tests/data/packages/pkgwithmpkg-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/pkgwithmpkg-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/priority-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/priority-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/priority-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/priority-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/prjwithdatafile-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/prjwithdatafile-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/require_simple-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/require_simple-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/requiresPaste/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ['flit_core >=2,<4'] 3 | build-backend = 'flit_core.buildapi' 4 | 5 | [tool.flit.metadata] 6 | module = 'requiresPaste' 7 | author = 'A. Random Developer' 8 | author-email = 'author@example.com' 9 | requires = ['Paste==3.4.2'] 10 | -------------------------------------------------------------------------------- /tests/data/packages/requiresPaste/requiresPaste.py: -------------------------------------------------------------------------------- 1 | """Module requiring Paste to test dependencies download of pip wheel.""" 2 | 3 | __version__ = "3.1.4" 4 | -------------------------------------------------------------------------------- /tests/data/packages/requires_simple_extra-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/requires_simple_extra-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/requires_source-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/requires_source-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/requires_wheelbroken_upper/requires_wheelbroken_upper/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/requires_wheelbroken_upper/requires_wheelbroken_upper/__init__.py -------------------------------------------------------------------------------- /tests/data/packages/requires_wheelbroken_upper/setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | setuptools.setup( 4 | name="requires_wheelbroken_upper", 5 | version="0", 6 | install_requires=["wheelbroken", "upper"], 7 | ) 8 | -------------------------------------------------------------------------------- /tests/data/packages/requiresupper-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/requiresupper-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/script.wheel1-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/script.wheel1-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/script.wheel1a-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/script.wheel1a-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/script.wheel2-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/script.wheel2-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/script.wheel2a-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/script.wheel2a-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/script.wheel3-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/script.wheel3-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/setuptools-0.9.6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/setuptools-0.9.6.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/setuptools-0.9.8-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/setuptools-0.9.8-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/simple-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/simple-2.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple-2.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/simple-3.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple-3.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/simple.dist-0.1-py1-none-invalid.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple.dist-0.1-py1-none-invalid.whl -------------------------------------------------------------------------------- /tests/data/packages/simple.dist-0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple.dist-0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/simple2-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple2-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/simple2-2.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple2-2.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/simple2-3.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple2-3.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/simple_namespace-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simple_namespace-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/simplewheel-1.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simplewheel-1.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/simplewheel-2.0-1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simplewheel-2.0-1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/simplewheel-2.0-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simplewheel-2.0-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/data/packages/simplewheel-2.0-py3-fakeabi-fakeplat.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/simplewheel-2.0-py3-fakeabi-fakeplat.whl -------------------------------------------------------------------------------- /tests/data/packages/singlemodule-0.0.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/singlemodule-0.0.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/singlemodule-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/singlemodule-0.0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/singlemodule-0.0.1.tar.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/singlemodule-0.0.1.tar.lzma -------------------------------------------------------------------------------- /tests/data/packages/singlemodule-0.0.1.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/singlemodule-0.0.1.tar.xz -------------------------------------------------------------------------------- /tests/data/packages/source-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/source-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/symlinks/doc/intro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/symlinks/doc/intro -------------------------------------------------------------------------------- /tests/data/packages/symlinks/docs: -------------------------------------------------------------------------------- 1 | IntxLNKdoc -------------------------------------------------------------------------------- /tests/data/packages/symlinks/setup.cfg: -------------------------------------------------------------------------------- 1 | [egg_info] 2 | tag_build = dev 3 | -------------------------------------------------------------------------------- /tests/data/packages/symlinks/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | version = "0.1" 4 | 5 | setup( 6 | name="symlinks", 7 | version=version, 8 | packages=["symlinks"], 9 | ) 10 | -------------------------------------------------------------------------------- /tests/data/packages/symlinks/symlinks/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /tests/data/packages/test_tar.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/test_tar.tgz -------------------------------------------------------------------------------- /tests/data/packages/test_zip.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/test_zip.zip -------------------------------------------------------------------------------- /tests/data/packages/translationstring-1.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/translationstring-1.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/virtualenv-1.10.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/virtualenv-1.10.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/virtualenv-1.9.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/virtualenv-1.9.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/wheelbroken-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/wheelbroken-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages/wheelbrokenafter-0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages/wheelbrokenafter-0.1.tar.gz -------------------------------------------------------------------------------- /tests/data/packages2/duplicate-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages2/duplicate-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages3/dinner/Dinner-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages3/dinner/Dinner-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages3/dinner/Dinner-2.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages3/dinner/Dinner-2.0.tar.gz -------------------------------------------------------------------------------- /tests/data/packages3/dinner/index.html: -------------------------------------------------------------------------------- 1 | 2 | PyPI Mirror 3 | 4 |

PyPI Mirror

5 |

For testing --index-url with a file:// url for the index

6 | Dinner-1.0.tar.gz
7 | Dinner-2.0.tar.gz
8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/data/packages3/index.html: -------------------------------------------------------------------------------- 1 | 2 | PyPI Mirror 3 | 4 |

PyPI Mirror

5 |

For testing --index-url with a file:// url for the index

6 | requiredinner
7 | Dinner
8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/data/packages3/requiredinner/index.html: -------------------------------------------------------------------------------- 1 | 2 | PyPI Mirror 3 | 4 |

PyPI Mirror

5 |

For testing --index-url with a file:// url for the index

6 | requiredinner=1.0.tar.gz
7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/data/packages3/requiredinner/requiredinner-1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/packages3/requiredinner/requiredinner-1.0.tar.gz -------------------------------------------------------------------------------- /tests/data/reqfiles/README.txt: -------------------------------------------------------------------------------- 1 | supported_options.txt 2 | --------------------- 3 | 4 | Contains --no-use-wheel. 5 | 6 | supported_options2.txt 7 | ---------------------- 8 | 9 | Contains --no-binary and --only-binary options. 10 | -------------------------------------------------------------------------------- /tests/data/reqfiles/supported_options2.txt: -------------------------------------------------------------------------------- 1 | # default is no constraints 2 | # We're not testing the format control logic here, just that the options are 3 | # accepted 4 | --no-binary fred 5 | --only-binary wilma 6 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="TopoRequires", 5 | version="0.0.1", 6 | packages=["toporequires"], 7 | ) 8 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires/toporequires/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/TopoRequires/toporequires/__init__.py -------------------------------------------------------------------------------- /tests/data/src/TopoRequires2/setup.cfg.pending: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = TopoRequires2 3 | install-requires = 4 | TopoRequires 5 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires2/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="TopoRequires2", 5 | version="0.0.1", 6 | packages=["toporequires2"], 7 | install_requires=["TopoRequires"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires2/toporequires2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/TopoRequires2/toporequires2/__init__.py -------------------------------------------------------------------------------- /tests/data/src/TopoRequires3/setup.cfg.pending: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = TopoRequires3 3 | install-requires = 4 | TopoRequires 5 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires3/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="TopoRequires3", 5 | version="0.0.1", 6 | packages=["toporequires3"], 7 | install_requires=["TopoRequires"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires3/toporequires3/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/TopoRequires3/toporequires3/__init__.py -------------------------------------------------------------------------------- /tests/data/src/TopoRequires4/setup.cfg.pending: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = TopoRequires4 3 | install-requires = 4 | TopoRequires2 5 | TopoRequires 6 | TopoRequires3 7 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires4/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="TopoRequires4", 5 | version="0.0.1", 6 | packages=["toporequires4"], 7 | install_requires=["TopoRequires2", "TopoRequires", "TopoRequires3"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/TopoRequires4/toporequires4/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/TopoRequires4/toporequires4/__init__.py -------------------------------------------------------------------------------- /tests/data/src/chattymodule/chattymodule.py: -------------------------------------------------------------------------------- 1 | def main(): 2 | """Entry point for the application script""" 3 | print("Call your main application code here") 4 | -------------------------------------------------------------------------------- /tests/data/src/chattymodule/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | # This flag says that the code is written to work on both Python 2 and Python 3 | # 3. If at all possible, it is good practice to do this. If you cannot, you 4 | # will need to generate wheels for each Python version that you support. 5 | universal=1 6 | -------------------------------------------------------------------------------- /tests/data/src/chattymodule/setup.py: -------------------------------------------------------------------------------- 1 | # A chatty setup.py for testing pip subprocess output handling 2 | 3 | import os 4 | import sys 5 | 6 | from setuptools import setup 7 | 8 | print(f"HELLO FROM CHATTYMODULE {sys.argv[1]}") 9 | print(sys.argv) 10 | print(sys.executable) 11 | print(sys.version) 12 | 13 | if "--fail" in sys.argv: 14 | print("I DIE, I DIE") 15 | sys.exit(1) 16 | 17 | setup( 18 | name="chattymodule", 19 | version="0.0.1", 20 | description="A sample Python project with a single module", 21 | py_modules=["chattymodule"], 22 | ) 23 | -------------------------------------------------------------------------------- /tests/data/src/compilewheel/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | # This flag says that the code is written to work on both Python 2 and Python 3 | # 3. If at all possible, it is good practice to do this. If you cannot, you 4 | # will need to generate wheels for each Python version that you support. 5 | universal=1 6 | -------------------------------------------------------------------------------- /tests/data/src/compilewheel/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import find_packages, setup 3 | 4 | setup(name="compilewheel", version="1.0", packages=find_packages()) 5 | -------------------------------------------------------------------------------- /tests/data/src/compilewheel/simple/__init__.py: -------------------------------------------------------------------------------- 1 | def spam(gen): 2 | yield from gen 3 | -------------------------------------------------------------------------------- /tests/data/src/extension/extension.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/extension/extension.c -------------------------------------------------------------------------------- /tests/data/src/extension/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import Extension, setup 2 | 3 | module = Extension("extension", sources=["extension.c"]) 4 | setup(name="extension", version="0.0.1", ext_modules=[module]) 5 | -------------------------------------------------------------------------------- /tests/data/src/pep517_pyproject_only/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["foo"] 3 | build-backend = "foo" 4 | -------------------------------------------------------------------------------- /tests/data/src/pep517_setup_and_pyproject/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["foo"] 3 | build-backend = "foo" 4 | -------------------------------------------------------------------------------- /tests/data/src/pep517_setup_and_pyproject/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name="dummy", version="0.1") 4 | -------------------------------------------------------------------------------- /tests/data/src/pep517_setup_cfg_only/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = "dummy" 3 | version = "0.1" 4 | -------------------------------------------------------------------------------- /tests/data/src/pep517_setup_only/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name="dummy", version="0.1") 4 | -------------------------------------------------------------------------------- /tests/data/src/pep518-3.0/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518-3.0/pep518.py: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518-3.0/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires=["simplewheel==2.0", "setuptools", "wheel"] 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518-3.0/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518-3.0/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/pep518-3.0/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | import simplewheel # ensure dependency is installed 5 | 6 | setup( 7 | name="pep518", 8 | version="3.0", 9 | py_modules=["pep518"], 10 | ) 11 | -------------------------------------------------------------------------------- /tests/data/src/pep518_conflicting_requires/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_conflicting_requires/pep518.py: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_conflicting_requires/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools==1.0", "wheel"] 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_conflicting_requires/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | setup( 5 | name="pep518_conflicting_requires", 6 | version="1.0.0", 7 | py_modules=["pep518"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/pep518_forkbomb-235/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_forkbomb-235/pep518_forkbomb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_forkbomb-235/pep518_forkbomb.py -------------------------------------------------------------------------------- /tests/data/src/pep518_forkbomb-235/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel", "pep518_forkbomb"] 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_forkbomb-235/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_forkbomb-235/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/pep518_forkbomb-235/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name="pep518_forkbomb", version="235", py_modules=["pep518_forkbomb"]) 4 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_build_system/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_build_system/pep518.py: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_build_system/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | # This table is intentionally empty. 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_build_system/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | setup( 5 | name="pep518_invalid_build_system", 6 | version="1.0.0", 7 | py_modules=["pep518"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_requires/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_requires/pep518.py: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_requires/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [1, 2, 3] # not a list of strings 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_invalid_requires/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | setup( 5 | name="pep518_invalid_requires", 6 | version="1.0.0", 7 | py_modules=["pep518"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/pep518_missing_requires/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_missing_requires/pep518.py: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_missing_requires/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_missing_requires/pyproject.toml -------------------------------------------------------------------------------- /tests/data/src/pep518_missing_requires/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | setup( 5 | name="pep518_missing_requires", 6 | version="1.0.0", 7 | py_modules=["pep518"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_first-234/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_first-234/pep518_twin_forkbombs_first.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_twin_forkbombs_first-234/pep518_twin_forkbombs_first.py -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_first-234/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel", "pep518_twin_forkbombs_second"] 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_first-234/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_twin_forkbombs_first-234/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_first-234/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="pep518_twin_forkbombs_first", 5 | version="234", 6 | py_modules=["pep518_twin_forkbombs_first"], 7 | ) 8 | -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_second-238/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_second-238/pep518_twin_forkbombs_second.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_twin_forkbombs_second-238/pep518_twin_forkbombs_second.py -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_second-238/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel", "pep518_twin_forkbombs_first"] 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_second-238/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_twin_forkbombs_second-238/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/pep518_twin_forkbombs_second-238/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="pep518_twin_forkbombs_second", 5 | version="238", 6 | py_modules=["pep518_twin_forkbombs_second"], 7 | ) 8 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_extra_and_markers-1.0/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pyproject.toml 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_extra_and_markers-1.0/pep518_with_extra_and_markers.py: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_extra_and_markers-1.0/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | "requires_simple_extra[extra]", 4 | "simplewheel==1.0; python_version < '3'", 5 | "simplewheel==2.0; python_version >= '3'", 6 | "setuptools", 7 | "wheel", 8 | ] 9 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_extra_and_markers-1.0/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_with_extra_and_markers-1.0/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/pep518_with_extra_and_markers-1.0/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | # ensure dependencies are installed 5 | import simple 6 | import simplewheel 7 | 8 | assert simplewheel.__version__ == "2.0" 9 | 10 | setup( 11 | name="pep518_with_extra_and_markers", 12 | version="1.0", 13 | py_modules=["pep518_with_extra_and_markers"], 14 | ) 15 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_namespace_package-1.0/pep518_with_namespace_package.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/pep518_with_namespace_package-1.0/pep518_with_namespace_package.py -------------------------------------------------------------------------------- /tests/data/src/pep518_with_namespace_package-1.0/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | "setuptools", 4 | "wheel", 5 | "simple_namespace", 6 | ] 7 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_namespace_package-1.0/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 3 | -------------------------------------------------------------------------------- /tests/data/src/pep518_with_namespace_package-1.0/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | import simple_namespace.module 4 | 5 | setup( 6 | name="pep518_with_namespace_package", 7 | version="1.0", 8 | py_modules=["pep518_with_namespace_package"], 9 | ) 10 | -------------------------------------------------------------------------------- /tests/data/src/prjwithdatafile/prjwithdatafile/README.txt: -------------------------------------------------------------------------------- 1 | README 2 | ====== 3 | 4 | Test project file 5 | -------------------------------------------------------------------------------- /tests/data/src/prjwithdatafile/prjwithdatafile/somemodule.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/prjwithdatafile/prjwithdatafile/somemodule.py -------------------------------------------------------------------------------- /tests/data/src/prjwithdatafile/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="prjwithdatafile", 5 | version="1.0", 6 | packages=["prjwithdatafile"], 7 | data_files=[ 8 | (r"packages1", ["prjwithdatafile/README.txt"]), 9 | (r"packages2", ["prjwithdatafile/README.txt"]), 10 | ], 11 | ) 12 | -------------------------------------------------------------------------------- /tests/data/src/requires_capitalized/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name="Requires_Capitalized", version="0.1", install_requires=["simple==1.0"]) 4 | -------------------------------------------------------------------------------- /tests/data/src/requires_requires_capitalized/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="requires_requires_capitalized", 5 | version="1.0", 6 | install_requires=["requires_Capitalized==0.1"], 7 | ) 8 | -------------------------------------------------------------------------------- /tests/data/src/requires_simple/requires_simple/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /tests/data/src/requires_simple/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import find_packages, setup 2 | 3 | setup(name="requires_simple", version="0.1", install_requires=["simple==1.0"]) 4 | -------------------------------------------------------------------------------- /tests/data/src/requires_simple_extra/requires_simple_extra.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/requires_simple_extra/requires_simple_extra.py -------------------------------------------------------------------------------- /tests/data/src/requires_simple_extra/setup.cfg: -------------------------------------------------------------------------------- 1 | [wheel] 2 | universal=1 3 | -------------------------------------------------------------------------------- /tests/data/src/requires_simple_extra/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="requires_simple_extra", 5 | version="0.1", 6 | py_modules=["requires_simple_extra"], 7 | extras_require={"extra": ["simple==1.0"]}, 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/setup_error/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | # This is to get an error that originates from setuptools, which generates a 4 | # decently sized output. 5 | setup( 6 | cmdclass={ 7 | "egg_info": "", 8 | "install": "", 9 | "bdist_wheel": "", 10 | } 11 | ) 12 | -------------------------------------------------------------------------------- /tests/data/src/simple_namespace/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 3 | -------------------------------------------------------------------------------- /tests/data/src/simple_namespace/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="simple_namespace", 5 | version="1.0", 6 | namespace_packages=["simple_namespace"], 7 | packages=["simple_namespace.module"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/simple_namespace/simple_namespace/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/simple_namespace/simple_namespace/__init__.py -------------------------------------------------------------------------------- /tests/data/src/simple_namespace/simple_namespace/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/simple_namespace/simple_namespace/module/__init__.py -------------------------------------------------------------------------------- /tests/data/src/simplewheel-1.0/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/simplewheel-1.0/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/simplewheel-1.0/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | import simplewheel 5 | 6 | setup( 7 | name="simplewheel", 8 | version=simplewheel.__version__, 9 | packages=["simplewheel"], 10 | ) 11 | -------------------------------------------------------------------------------- /tests/data/src/simplewheel-1.0/simplewheel/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "1.0" 2 | -------------------------------------------------------------------------------- /tests/data/src/simplewheel-2.0/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/data/src/simplewheel-2.0/setup.cfg -------------------------------------------------------------------------------- /tests/data/src/simplewheel-2.0/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from setuptools import setup 3 | 4 | import simplewheel 5 | 6 | setup( 7 | name="simplewheel", 8 | version=simplewheel.__version__, 9 | packages=["simplewheel"], 10 | ) 11 | -------------------------------------------------------------------------------- /tests/data/src/simplewheel-2.0/simplewheel/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "2.0" 2 | -------------------------------------------------------------------------------- /tests/data/src/singlemodule/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | # This flag says that the code is written to work on both Python 2 and Python 3 | # 3. If at all possible, it is good practice to do this. If you cannot, you 4 | # will need to generate wheels for each Python version that you support. 5 | universal=1 6 | -------------------------------------------------------------------------------- /tests/data/src/singlemodule/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="singlemodule", 5 | version="0.0.1", 6 | description="A sample Python project with a single module", 7 | py_modules=["singlemodule"], 8 | ) 9 | -------------------------------------------------------------------------------- /tests/data/src/singlemodule/singlemodule.py: -------------------------------------------------------------------------------- 1 | def main(): 2 | """Entry point for the application script""" 3 | print("Call your main application code here") 4 | -------------------------------------------------------------------------------- /tests/data/src/withpyproject/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel"] 3 | 4 | # Note: pyproject.toml is always UTF-8 🤡 5 | -------------------------------------------------------------------------------- /tests/data/src/withpyproject/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name="withpyproject", version="0.0.1") 4 | -------------------------------------------------------------------------------- /tests/functional/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/functional/__init__.py -------------------------------------------------------------------------------- /tests/functional/test_bad_url.py: -------------------------------------------------------------------------------- 1 | # test the error message returned by pip when 2 | # a bad "file:" URL is passed to it. 3 | 4 | from typing import Any 5 | 6 | 7 | def test_filenotfound_error_message(script: Any) -> None: 8 | # Test the error message returned when using a bad 'file:' URL. 9 | # make pip to fail and get an error message 10 | # by running "pip install -r file:nonexistent_file" 11 | proc = script.pip("install", "-r", "file:unexistent_file", expect_error=True) 12 | assert proc.returncode == 1 13 | expect = ( 14 | "ERROR: 404 Client Error: FileNotFoundError for url: file:///unexistent_file" 15 | ) 16 | assert proc.stderr.rstrip() == expect 17 | -------------------------------------------------------------------------------- /tests/functional/test_pip_runner_script.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pathlib import Path 3 | 4 | from pip import __version__ 5 | from tests.lib import PipTestEnvironment 6 | 7 | 8 | def test_runner_work_in_environments_with_no_pip( 9 | script: PipTestEnvironment, pip_src: Path 10 | ) -> None: 11 | runner = pip_src / "src" / "pip" / "__pip-runner__.py" 12 | 13 | # Ensure there's no pip installed in the environment 14 | script.pip("uninstall", "pip", "--yes", use_module=True) 15 | # We don't use script.pip to check here, as when testing a 16 | # zipapp, script.pip will run pip from the zipapp. 17 | script.run("python", "-c", "import pip", expect_error=True) 18 | 19 | # The runner script should still invoke a usable pip 20 | result = script.run("python", os.fspath(runner), "--version") 21 | 22 | assert __version__ in result.stdout 23 | -------------------------------------------------------------------------------- /tests/functional/test_vcs_bazaar.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains functional tests of the Bazaar class. 3 | """ 4 | 5 | import os 6 | import sys 7 | from pathlib import Path 8 | 9 | import pytest 10 | 11 | from pip._internal.vcs.bazaar import Bazaar 12 | from pip._internal.vcs.versioncontrol import RemoteNotFoundError 13 | from tests.lib import PipTestEnvironment, is_bzr_installed, need_bzr 14 | 15 | 16 | @pytest.mark.skipif( 17 | sys.platform == "win32" or "CI" not in os.environ, 18 | reason="Bazaar is only required under CI", 19 | ) 20 | def test_ensure_bzr_available() -> None: 21 | """Make sure that bzr is available when running in CI.""" 22 | assert is_bzr_installed() 23 | 24 | 25 | @need_bzr 26 | def test_get_remote_url__no_remote(script: PipTestEnvironment, tmpdir: Path) -> None: 27 | repo_dir = tmpdir / "temp-repo" 28 | repo_dir.mkdir() 29 | 30 | script.run("bzr", "init", os.fspath(repo_dir)) 31 | 32 | with pytest.raises(RemoteNotFoundError): 33 | Bazaar().get_remote_url(os.fspath(repo_dir)) 34 | -------------------------------------------------------------------------------- /tests/functional/test_vcs_mercurial.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from pip._internal.vcs.mercurial import Mercurial 4 | from tests.lib import PipTestEnvironment, _create_test_package, need_mercurial 5 | 6 | 7 | @need_mercurial 8 | def test_get_repository_root(script: PipTestEnvironment) -> None: 9 | version_pkg_path = _create_test_package(script.scratch_path, vcs="hg") 10 | tests_path = version_pkg_path.joinpath("tests") 11 | tests_path.mkdir() 12 | 13 | root1 = Mercurial.get_repository_root(os.fspath(version_pkg_path)) 14 | assert root1 is not None 15 | assert os.path.normcase(root1) == os.path.normcase(version_pkg_path) 16 | 17 | root2 = Mercurial.get_repository_root(os.fspath(tests_path)) 18 | assert root2 is not None 19 | assert os.path.normcase(root2) == os.path.normcase(version_pkg_path) 20 | -------------------------------------------------------------------------------- /tests/functional/test_vcs_subversion.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | import pytest 4 | 5 | from pip._internal.vcs.subversion import Subversion 6 | from pip._internal.vcs.versioncontrol import RemoteNotFoundError 7 | from tests.lib import PipTestEnvironment, _create_svn_repo, need_svn 8 | 9 | 10 | @need_svn 11 | def test_get_remote_url__no_remote(script: PipTestEnvironment, tmpdir: Path) -> None: 12 | repo_path = tmpdir / "temp-repo" 13 | repo_path.mkdir() 14 | repo_dir = str(repo_path) 15 | 16 | _create_svn_repo(script.scratch_path, repo_dir) 17 | 18 | with pytest.raises(RemoteNotFoundError): 19 | Subversion().get_remote_url(repo_dir) 20 | 21 | 22 | @need_svn 23 | def test_get_remote_url__no_remote_with_setup( 24 | script: PipTestEnvironment, tmpdir: Path 25 | ) -> None: 26 | repo_path = tmpdir / "temp-repo" 27 | repo_path.mkdir() 28 | setup = repo_path / "setup.py" 29 | setup.touch() 30 | repo_dir = str(repo_path) 31 | 32 | _create_svn_repo(script.scratch_path, repo_dir) 33 | 34 | with pytest.raises(RemoteNotFoundError): 35 | Subversion().get_remote_url(repo_dir) 36 | -------------------------------------------------------------------------------- /tests/lib/direct_url.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | from pathlib import Path 4 | from typing import Optional 5 | 6 | from pip._internal.models.direct_url import DIRECT_URL_METADATA_NAME, DirectUrl 7 | from tests.lib import TestPipResult 8 | 9 | 10 | def get_created_direct_url_path(result: TestPipResult, pkg: str) -> Optional[Path]: 11 | direct_url_metadata_re = re.compile( 12 | pkg + r"-[\d\.]+\.dist-info." + DIRECT_URL_METADATA_NAME + r"$" 13 | ) 14 | for filename in result.files_created: 15 | if direct_url_metadata_re.search(os.fspath(filename)): 16 | return result.test_env.base_path / filename 17 | return None 18 | 19 | 20 | def get_created_direct_url(result: TestPipResult, pkg: str) -> Optional[DirectUrl]: 21 | direct_url_path = get_created_direct_url_path(result, pkg) 22 | if direct_url_path: 23 | with open(direct_url_path) as f: 24 | return DirectUrl.from_json(f.read()) 25 | return None 26 | -------------------------------------------------------------------------------- /tests/lib/filesystem.py: -------------------------------------------------------------------------------- 1 | """Helpers for filesystem-dependent tests. 2 | """ 3 | import os 4 | from functools import partial 5 | from itertools import chain 6 | from typing import Iterator, List, Set 7 | 8 | 9 | def get_filelist(base: str) -> Set[str]: 10 | def join(dirpath: str, dirnames: List[str], filenames: List[str]) -> Iterator[str]: 11 | relative_dirpath = os.path.relpath(dirpath, base) 12 | join_dirpath = partial(os.path.join, relative_dirpath) 13 | return chain( 14 | (join_dirpath(p) for p in dirnames), 15 | (join_dirpath(p) for p in filenames), 16 | ) 17 | 18 | return set(chain.from_iterable(join(*dirinfo) for dirinfo in os.walk(base))) 19 | -------------------------------------------------------------------------------- /tests/lib/index.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pip._internal.models.candidate import InstallationCandidate 4 | from pip._internal.models.link import Link 5 | 6 | 7 | def make_mock_candidate( 8 | version: str, yanked_reason: Optional[str] = None, hex_digest: Optional[str] = None 9 | ) -> InstallationCandidate: 10 | url = f"https://example.com/pkg-{version}.tar.gz" 11 | if hex_digest is not None: 12 | assert len(hex_digest) == 64 13 | url += f"#sha256={hex_digest}" 14 | 15 | link = Link(url, yanked_reason=yanked_reason) 16 | candidate = InstallationCandidate("mypackage", version, link) 17 | 18 | return candidate 19 | -------------------------------------------------------------------------------- /tests/lib/options_helpers.py: -------------------------------------------------------------------------------- 1 | """Provides helper classes for testing option handling in pip 2 | """ 3 | 4 | from optparse import Values 5 | from typing import List, Tuple 6 | 7 | from pip._internal.cli import cmdoptions 8 | from pip._internal.cli.base_command import Command 9 | from pip._internal.commands import CommandInfo, commands_dict 10 | 11 | 12 | class FakeCommand(Command): 13 | def main( # type: ignore[override] 14 | self, args: List[str] 15 | ) -> Tuple[Values, List[str]]: 16 | index_opts = cmdoptions.make_option_group( 17 | cmdoptions.index_group, 18 | self.parser, 19 | ) 20 | self.parser.add_option_group(index_opts) 21 | return self.parse_args(args) 22 | 23 | 24 | class AddFakeCommandMixin: 25 | def setup_method(self) -> None: 26 | commands_dict["fake"] = CommandInfo( 27 | "tests.lib.options_helpers", 28 | "FakeCommand", 29 | "fake summary", 30 | ) 31 | 32 | def teardown_method(self) -> None: 33 | commands_dict.pop("fake") 34 | -------------------------------------------------------------------------------- /tests/requirements-common_wheels.txt: -------------------------------------------------------------------------------- 1 | # Create local setuptools wheel files for testing by: 2 | # 1. Cloning setuptools and checking out the branch of interest 3 | # 2. Running `python3 bootstrap.py` in that directory 4 | # 3. Running `python3 -m pip wheel --no-cache -w /tmp/setuptools_build_meta_legacy/ .` 5 | # 4. Replacing the `setuptools` entry below with a `file:///...` URL 6 | # (Adjust artifact directory used based on preference and operating system) 7 | 8 | setuptools >= 40.8.0, != 60.6.0 9 | wheel 10 | # As required by pytest-cov. 11 | coverage >= 4.4 12 | -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | cryptography 2 | freezegun 3 | installer 4 | pytest 5 | pytest-cov 6 | pytest-rerunfailures 7 | pytest-xdist 8 | scripttest 9 | setuptools 10 | virtualenv < 20.0 ; python_version < '3.10' 11 | virtualenv >= 20.0 ; python_version >= '3.10' 12 | werkzeug 13 | wheel 14 | tomli-w 15 | -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/unit/__init__.py -------------------------------------------------------------------------------- /tests/unit/resolution_resolvelib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Python-Repository-Hub/pip/6f3a7181b6bfa0e95d479b3269baa0e551ff2cb2/tests/unit/resolution_resolvelib/__init__.py -------------------------------------------------------------------------------- /tests/unit/test_network_utils.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from pip._internal.exceptions import NetworkConnectionError 4 | from pip._internal.network.utils import raise_for_status 5 | from tests.lib.requests_mocks import MockResponse 6 | 7 | 8 | @pytest.mark.parametrize( 9 | ("status_code", "error_type"), 10 | [ 11 | (401, "Client Error"), 12 | (501, "Server Error"), 13 | ], 14 | ) 15 | def test_raise_for_status_raises_exception(status_code: int, error_type: str) -> None: 16 | contents = b"downloaded" 17 | resp = MockResponse(contents) 18 | resp.status_code = status_code 19 | resp.url = "http://www.example.com/whatever.tgz" 20 | resp.reason = "Network Error" 21 | with pytest.raises(NetworkConnectionError) as excinfo: 22 | raise_for_status(resp) 23 | assert str(excinfo.value) == ( 24 | "{} {}: Network Error for url:" 25 | " http://www.example.com/whatever.tgz".format(status_code, error_type) 26 | ) 27 | 28 | 29 | def test_raise_for_status_does_not_raises_exception() -> None: 30 | contents = b"downloaded" 31 | resp = MockResponse(contents) 32 | resp.status_code = 201 33 | resp.url = "http://www.example.com/whatever.tgz" 34 | resp.reason = "No error" 35 | raise_for_status(resp) 36 | -------------------------------------------------------------------------------- /tests/unit/test_utils_filesystem.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pathlib import Path 3 | 4 | 5 | def make_file(path: str) -> None: 6 | Path(path).touch() 7 | 8 | 9 | def make_valid_symlink(path: str) -> None: 10 | target = path + "1" 11 | make_file(target) 12 | os.symlink(target, path) 13 | 14 | 15 | def make_broken_symlink(path: str) -> None: 16 | os.symlink("foo", path) 17 | 18 | 19 | def make_dir(path: str) -> None: 20 | os.mkdir(path) 21 | -------------------------------------------------------------------------------- /tests/unit/test_vcs_mercurial.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains functional tests of the Mercurial class. 3 | """ 4 | 5 | import configparser 6 | import os 7 | from pathlib import Path 8 | 9 | from pip._internal.utils.misc import hide_url 10 | from pip._internal.vcs.mercurial import Mercurial 11 | from tests.lib import need_mercurial 12 | 13 | 14 | @need_mercurial 15 | def test_mercurial_switch_updates_config_file_when_found(tmpdir: Path) -> None: 16 | hg = Mercurial() 17 | options = hg.make_rev_options() 18 | hg_dir = os.path.join(tmpdir, ".hg") 19 | os.mkdir(hg_dir) 20 | 21 | config = configparser.RawConfigParser() 22 | config.add_section("paths") 23 | config.set("paths", "default", "old_url") 24 | 25 | hgrc_path = os.path.join(hg_dir, "hgrc") 26 | with open(hgrc_path, "w") as f: 27 | config.write(f) 28 | hg.switch(os.fspath(tmpdir), hide_url("new_url"), options) 29 | 30 | config.read(hgrc_path) 31 | 32 | default_path = config.get("paths", "default") 33 | assert default_path == "new_url" 34 | -------------------------------------------------------------------------------- /tools/protected_pip.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pathlib 3 | import shutil 4 | import subprocess 5 | import sys 6 | from glob import glob 7 | from typing import Iterable, Union 8 | 9 | VIRTUAL_ENV = os.environ["VIRTUAL_ENV"] 10 | TOX_PIP_DIR = os.path.join(VIRTUAL_ENV, "pip") 11 | 12 | 13 | def pip(args: Iterable[Union[str, pathlib.Path]]) -> None: 14 | # First things first, get a recent (stable) version of pip. 15 | if not os.path.exists(TOX_PIP_DIR): 16 | subprocess.check_call( 17 | [ 18 | sys.executable, 19 | "-m", 20 | "pip", 21 | "--disable-pip-version-check", 22 | "install", 23 | "-t", 24 | TOX_PIP_DIR, 25 | "pip", 26 | ] 27 | ) 28 | shutil.rmtree(glob(os.path.join(TOX_PIP_DIR, "pip-*.dist-info"))[0]) 29 | # And use that version. 30 | pypath_env = os.environ.get("PYTHONPATH") 31 | pypath = pypath_env.split(os.pathsep) if pypath_env is not None else [] 32 | pypath.insert(0, TOX_PIP_DIR) 33 | os.environ["PYTHONPATH"] = os.pathsep.join(pypath) 34 | subprocess.check_call([sys.executable, "-m", "pip", *(os.fspath(a) for a in args)]) 35 | 36 | 37 | if __name__ == "__main__": 38 | pip(sys.argv[1:]) 39 | -------------------------------------------------------------------------------- /tools/release/check_version.py: -------------------------------------------------------------------------------- 1 | """Checks if the version is acceptable, as per this project's release process. 2 | """ 3 | 4 | import sys 5 | from datetime import datetime 6 | from typing import Optional 7 | 8 | from packaging.version import InvalidVersion, Version 9 | 10 | 11 | def is_this_a_good_version_number(string: str) -> Optional[str]: 12 | try: 13 | v = Version(string) 14 | except InvalidVersion as e: 15 | return str(e) 16 | 17 | if v.local: 18 | return "Nope. PyPI refuses local release versions." 19 | 20 | if v.dev: 21 | return "No development releases on PyPI. What are you even thinking?" 22 | 23 | if v.pre and v.pre[0] != "b": 24 | return "Only beta releases are allowed. No alphas." 25 | 26 | release = v.release 27 | expected_major = datetime.now().year % 100 28 | 29 | if len(release) not in [2, 3]: 30 | return "Not of the form: {0}.N or {0}.N.P".format(expected_major) 31 | 32 | return None 33 | 34 | 35 | def main() -> None: 36 | problem = is_this_a_good_version_number(sys.argv[1]) 37 | if problem is not None: 38 | print("ERROR:", problem) 39 | sys.exit(1) 40 | 41 | 42 | if __name__ == "__main__": 43 | main() 44 | -------------------------------------------------------------------------------- /tools/vendoring/patches/pkg_resources.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/pip/_vendor/pkg_resources/__init__.py b/src/pip/_vendor/pkg_resources/__init__.py 2 | index 3f2476a0c..8d5727d35 100644 3 | --- a/src/pip/_vendor/pkg_resources/__init__.py 4 | +++ b/src/pip/_vendor/pkg_resources/__init__.py 5 | @@ -71,7 +71,7 @@ 6 | except ImportError: 7 | importlib_machinery = None 8 | 9 | -from pkg_resources.extern.jaraco.text import ( 10 | +from pip._internal.utils._jaraco_text import ( 11 | yield_lines, 12 | drop_comment, 13 | join_continuation, 14 | -------------------------------------------------------------------------------- /tools/vendoring/patches/urllib3.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/pip/_vendor/urllib3/contrib/securetransport.py b/src/pip/_vendor/urllib3/contrib/securetransport.py 2 | index b97555454..189132baa 100644 3 | --- a/src/pip/_vendor/urllib3/contrib/securetransport.py 4 | +++ b/src/pip/_vendor/urllib3/contrib/securetransport.py 5 | @@ -19,8 +19,8 @@ 6 | 7 | To use this module, simply import and inject it:: 8 | 9 | - import urllib3.contrib.securetransport 10 | - urllib3.contrib.securetransport.inject_into_urllib3() 11 | + import urllib3.contrib.securetransport as securetransport 12 | + securetransport.inject_into_urllib3() 13 | 14 | Happy TLSing! 15 | 16 | diff --git a/src/pip/_vendor/urllib3/contrib/pyopenssl.py b/src/pip/_vendor/urllib3/contrib/pyopenssl.py 17 | index c43146279..4cded53f6 100644 18 | --- a/src/pip/_vendor/urllib3/contrib/pyopenssl.py 19 | +++ b/src/pip/_vendor/urllib3/contrib/pyopenssl.py 20 | @@ -28,7 +28,7 @@ 21 | .. code-block:: python 22 | 23 | try: 24 | - import urllib3.contrib.pyopenssl 25 | - urllib3.contrib.pyopenssl.inject_into_urllib3() 26 | + import urllib3.contrib.pyopenssl as pyopenssl 27 | + pyopenssl.inject_into_urllib3() 28 | except ImportError: 29 | pass 30 | --------------------------------------------------------------------------------