├── .deepsource.toml ├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── Bug_report.md │ ├── Custom.md │ └── Feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── ci.yaml │ ├── pypi_upload.yml │ └── ruff.yml ├── .gitignore ├── .gitmodules ├── .isort.cfg ├── .pre-commit-config.yaml ├── .readthedocs.yaml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── HISTORY.txt ├── LICENSE ├── MANIFEST.in ├── Makefile ├── NOTICES ├── Pipfile ├── Pipfile.lock ├── README.md ├── RELEASING.md ├── SECURITY.md ├── docker ├── Dockerfile ├── Makefile └── README.md ├── docs ├── Makefile ├── _static │ ├── custom.css │ ├── konami.js │ └── pipenv.png ├── _templates │ ├── hacks.html │ └── sidebarlogo.html ├── advanced.md ├── best_practices.md ├── changelog.md ├── cli.md ├── commands.md ├── conf.py ├── configuration.md ├── credentials.md ├── dev │ └── contributing.md ├── diagnose.md ├── docker.md ├── faq.md ├── index.md ├── indexes.md ├── installation.md ├── locking.md ├── make.bat ├── migrating.md ├── pipfile.md ├── quick_start.md ├── requirements.txt ├── scripts.md ├── security.md ├── shell.md ├── specifiers.md ├── spelling_wordlist.txt ├── troubleshooting.md ├── virtualenv.md └── workflows.md ├── examples ├── Pipfile └── Pipfile.lock ├── get-pipenv.py ├── news └── towncrier_template.rst ├── pipenv ├── __init__.py ├── __main__.py ├── __version__.py ├── cli │ ├── __init__.py │ ├── command.py │ └── options.py ├── cmdparse.py ├── environment.py ├── environments.py ├── exceptions.py ├── help.py ├── installers.py ├── patched │ ├── README.md │ ├── __init__.py │ ├── patched.txt │ └── pip │ │ ├── COPYING │ │ ├── LICENSE │ │ ├── LICENSE-HEADER │ │ ├── LICENSE.APACHE │ │ ├── LICENSE.BSD │ │ ├── LICENSE.md │ │ ├── LICENSE.txt │ │ ├── __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 │ │ │ ├── index_command.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 │ │ │ ├── lock.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 │ │ │ ├── pylock.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_dependency_group.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 │ │ │ ├── entrypoints.py │ │ │ ├── filesystem.py │ │ │ ├── filetypes.py │ │ │ ├── glibc.py │ │ │ ├── hashes.py │ │ │ ├── logging.py │ │ │ ├── misc.py │ │ │ ├── packaging.py │ │ │ ├── retry.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 │ │ ├── __init__.py │ │ ├── cachecontrol │ │ │ ├── LICENSE.txt │ │ │ ├── __init__.py │ │ │ ├── _cmd.py │ │ │ ├── adapter.py │ │ │ ├── cache.py │ │ │ ├── caches │ │ │ │ ├── __init__.py │ │ │ │ ├── file_cache.py │ │ │ │ └── redis_cache.py │ │ │ ├── controller.py │ │ │ ├── filewrapper.py │ │ │ ├── heuristics.py │ │ │ ├── py.typed │ │ │ ├── serialize.py │ │ │ └── wrapper.py │ │ ├── certifi │ │ │ ├── LICENSE │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── cacert.pem │ │ │ ├── core.py │ │ │ └── py.typed │ │ ├── dependency_groups │ │ │ ├── LICENSE.txt │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── _implementation.py │ │ │ ├── _lint_dependency_groups.py │ │ │ ├── _pip_wrapper.py │ │ │ ├── _toml_compat.py │ │ │ └── py.typed │ │ ├── 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 │ │ │ ├── COPYING │ │ │ ├── __init__.py │ │ │ ├── exceptions.py │ │ │ ├── ext.py │ │ │ └── fallback.py │ │ ├── packaging │ │ │ ├── LICENSE │ │ │ ├── LICENSE.APACHE │ │ │ ├── LICENSE.BSD │ │ │ ├── __init__.py │ │ │ ├── _elffile.py │ │ │ ├── _manylinux.py │ │ │ ├── _musllinux.py │ │ │ ├── _parser.py │ │ │ ├── _structures.py │ │ │ ├── _tokenizer.py │ │ │ ├── licenses │ │ │ │ ├── __init__.py │ │ │ │ └── _spdx.py │ │ │ ├── markers.py │ │ │ ├── metadata.py │ │ │ ├── py.typed │ │ │ ├── requirements.py │ │ │ ├── specifiers.py │ │ │ ├── tags.py │ │ │ ├── utils.py │ │ │ └── version.py │ │ ├── pkg_resources │ │ │ ├── LICENSE │ │ │ ├── LICENSE.txt │ │ │ └── __init__.py │ │ ├── platformdirs │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── android.py │ │ │ ├── api.py │ │ │ ├── macos.py │ │ │ ├── py.typed │ │ │ ├── unix.py │ │ │ ├── version.py │ │ │ └── windows.py │ │ ├── pygments │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── console.py │ │ │ ├── filter.py │ │ │ ├── filters │ │ │ │ └── __init__.py │ │ │ ├── formatter.py │ │ │ ├── formatters │ │ │ │ ├── __init__.py │ │ │ │ └── _mapping.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 │ │ │ │ └── _mapping.py │ │ │ ├── token.py │ │ │ ├── unistring.py │ │ │ └── util.py │ │ ├── pyproject_hooks │ │ │ ├── LICENSE │ │ │ ├── __init__.py │ │ │ ├── _impl.py │ │ │ ├── _in_process │ │ │ │ ├── __init__.py │ │ │ │ └── _in_process.py │ │ │ └── py.typed │ │ ├── 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 │ │ │ ├── providers.py │ │ │ ├── py.typed │ │ │ ├── reporters.py │ │ │ ├── resolvers │ │ │ │ ├── __init__.py │ │ │ │ ├── abstract.py │ │ │ │ ├── criterion.py │ │ │ │ ├── exceptions.py │ │ │ │ └── resolution.py │ │ │ └── structs.py │ │ ├── rich │ │ │ ├── __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 │ │ ├── tomli │ │ │ ├── LICENSE │ │ │ ├── __init__.py │ │ │ ├── _parser.py │ │ │ ├── _re.py │ │ │ ├── _types.py │ │ │ └── py.typed │ │ ├── tomli_w │ │ │ ├── LICENSE │ │ │ ├── __init__.py │ │ │ ├── _writer.py │ │ │ └── py.typed │ │ ├── truststore │ │ │ ├── LICENSE │ │ │ ├── __init__.py │ │ │ ├── _api.py │ │ │ ├── _macos.py │ │ │ ├── _openssl.py │ │ │ ├── _ssl_constants.py │ │ │ ├── _windows.py │ │ │ └── py.typed │ │ ├── typing_extensions.LICENSE │ │ ├── typing_extensions.py │ │ ├── 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 │ │ ├── py.typed │ │ └── typing_extensions.LICENSE ├── pep508checker.py ├── pipenv.1 ├── project.py ├── resolver.py ├── routines │ ├── __init__.py │ ├── check.py │ ├── clean.py │ ├── clear.py │ ├── graph.py │ ├── install.py │ ├── lock.py │ ├── outdated.py │ ├── requirements.py │ ├── scan.py │ ├── shell.py │ ├── sync.py │ ├── uninstall.py │ └── update.py ├── shells.py ├── utils │ ├── __init__.py │ ├── constants.py │ ├── dependencies.py │ ├── display.py │ ├── environment.py │ ├── exceptions.py │ ├── fileutils.py │ ├── funktools.py │ ├── indexes.py │ ├── internet.py │ ├── locking.py │ ├── markers.py │ ├── pip.py │ ├── pipfile.py │ ├── processes.py │ ├── project.py │ ├── requirements.py │ ├── requirementslib.py │ ├── resolver.py │ ├── shell.py │ ├── toml.py │ └── virtualenv.py └── vendor │ ├── Makefile │ ├── README.md │ ├── __init__.py │ ├── click │ ├── LICENSE.rst │ ├── __init__.py │ ├── _compat.py │ ├── _termui_impl.py │ ├── _textwrap.py │ ├── _winconsole.py │ ├── core.py │ ├── decorators.py │ ├── exceptions.py │ ├── formatting.py │ ├── globals.py │ ├── parser.py │ ├── py.typed │ ├── shell_completion.py │ ├── termui.py │ ├── testing.py │ ├── types.py │ └── utils.py │ ├── click_didyoumean │ ├── LICENSE │ └── __init__.py │ ├── colorama │ ├── __init__.py │ ├── ansi.py │ ├── ansitowin32.py │ ├── initialise.py │ ├── win32.py │ └── winterm.py │ ├── dotenv │ ├── LICENSE │ ├── __init__.py │ ├── ipython.py │ ├── main.py │ ├── parser.py │ ├── py.typed │ ├── variables.py │ └── version.py │ ├── importlib_metadata │ ├── LICENSE │ ├── __init__.py │ ├── _adapters.py │ ├── _collections.py │ ├── _compat.py │ ├── _functools.py │ ├── _itertools.py │ ├── _meta.py │ ├── _text.py │ ├── compat │ │ ├── __init__.py │ │ ├── py311.py │ │ └── py39.py │ ├── diagnose.py │ └── py.typed │ ├── packaging │ ├── LICENSE │ ├── LICENSE.APACHE │ ├── LICENSE.BSD │ ├── __init__.py │ ├── _elffile.py │ ├── _manylinux.py │ ├── _musllinux.py │ ├── _parser.py │ ├── _structures.py │ ├── _tokenizer.py │ ├── markers.py │ ├── metadata.py │ ├── py.typed │ ├── requirements.py │ ├── specifiers.py │ ├── tags.py │ ├── utils.py │ └── version.py │ ├── pexpect │ ├── ANSI.py │ ├── FSM.py │ ├── LICENSE │ ├── __init__.py │ ├── _async.py │ ├── _async_pre_await.py │ ├── _async_w_await.py │ ├── bashrc.sh │ ├── exceptions.py │ ├── expect.py │ ├── fdpexpect.py │ ├── popen_spawn.py │ ├── pty_spawn.py │ ├── pxssh.py │ ├── replwrap.py │ ├── run.py │ ├── screen.py │ ├── socket_pexpect.py │ ├── spawnbase.py │ └── utils.py │ ├── pipdeptree │ ├── __init__.py │ ├── __main__.py │ ├── _cli.py │ ├── _detect_env.py │ ├── _discovery.py │ ├── _freeze.py │ ├── _models │ │ ├── __init__.py │ │ ├── dag.py │ │ └── package.py │ ├── _render │ │ ├── __init__.py │ │ ├── graphviz.py │ │ ├── json.py │ │ ├── json_tree.py │ │ ├── mermaid.py │ │ └── text.py │ ├── _validate.py │ ├── _warning.py │ ├── py.typed │ └── version.py │ ├── plette │ ├── LICENSE │ ├── __init__.py │ ├── lockfiles.py │ ├── models │ │ ├── __init__.py │ │ ├── base.py │ │ ├── hashes.py │ │ ├── packages.py │ │ ├── scripts.py │ │ ├── sections.py │ │ └── sources.py │ └── pipfiles.py │ ├── ptyprocess │ ├── LICENSE │ ├── __init__.py │ ├── _fork_pty.py │ ├── ptyprocess.py │ └── util.py │ ├── pythonfinder │ ├── LICENSE.txt │ ├── __init__.py │ ├── environment.py │ ├── exceptions.py │ ├── finders │ │ ├── __init__.py │ │ ├── asdf_finder.py │ │ ├── base_finder.py │ │ ├── path_finder.py │ │ ├── py_launcher_finder.py │ │ ├── pyenv_finder.py │ │ ├── system_finder.py │ │ └── windows_registry.py │ ├── main.py │ ├── models │ │ ├── __init__.py │ │ └── python_info.py │ ├── pythonfinder.py │ └── utils │ │ ├── __init__.py │ │ ├── path_utils.py │ │ └── version_utils.py │ ├── shellingham │ ├── LICENSE │ ├── __init__.py │ ├── _core.py │ ├── nt.py │ └── posix │ │ ├── __init__.py │ │ ├── _core.py │ │ ├── proc.py │ │ └── ps.py │ ├── tomli │ ├── LICENSE │ ├── __init__.py │ ├── _parser.py │ ├── _re.py │ ├── _types.py │ └── py.typed │ ├── tomlkit │ ├── LICENSE │ ├── __init__.py │ ├── _compat.py │ ├── _types.py │ ├── _utils.py │ ├── api.py │ ├── container.py │ ├── exceptions.py │ ├── items.py │ ├── parser.py │ ├── py.typed │ ├── source.py │ ├── toml_char.py │ ├── toml_document.py │ └── toml_file.py │ ├── vendor.txt │ └── zipp │ ├── LICENSE │ ├── __init__.py │ ├── compat │ ├── __init__.py │ ├── overlay.py │ └── py310.py │ └── glob.py ├── pyproject.toml ├── run-tests.bat ├── run-tests.sh ├── tasks ├── __init__.py ├── release.py └── vendoring │ ├── __init__.py │ └── patches │ ├── patched │ ├── circular_import.patch │ ├── import_scope.patch │ ├── pip_index_safety.patch │ ├── pip_specifier.patch │ └── pipenv_import.patch │ └── vendor │ ├── pipdeptree-update-import.patch │ └── ruamel-import.patch └── tests ├── __init__.py ├── conftest.py ├── fixtures ├── cython-import-package │ ├── pyproject.toml │ ├── setup.cfg │ ├── setup.py │ └── src │ │ └── cython_import_package │ │ └── __init__.py ├── fake-package │ ├── .coveragerc │ ├── .editorconfig │ ├── .gitignore │ ├── .pre-commit-config.yaml │ ├── .travis.yml │ ├── LICENSE │ ├── MANIFEST.in │ ├── Pipfile │ ├── README.md │ ├── appveyor.yml │ ├── docs │ │ ├── conf.py │ │ └── requirements.txt │ ├── news │ │ └── .gitignore │ ├── pyproject.toml │ ├── setup.cfg │ ├── setup.py │ ├── src │ │ └── fake_package │ │ │ └── __init__.py │ ├── tasks │ │ ├── CHANGELOG.rst.jinja2 │ │ └── __init__.py │ └── tox.ini └── legacy-backend-package │ ├── pyproject.toml │ ├── setup.cfg │ ├── setup.py │ └── src │ └── legacy_backend_package │ └── __init__.py ├── integration ├── __init__.py ├── conftest.py ├── test_cli.py ├── test_dot_venv.py ├── test_import_requirements.py ├── test_install_basic.py ├── test_install_categories.py ├── test_install_markers.py ├── test_install_misc.py ├── test_install_nested_setup.py ├── test_install_paths.py ├── test_install_twists.py ├── test_install_uri.py ├── test_install_vcs.py ├── test_lock.py ├── test_lockfile.py ├── test_pipenv.py ├── test_project.py ├── test_python_version_mismatch.py ├── test_requirements.py ├── test_run.py ├── test_sync.py ├── test_uninstall.py ├── test_update.py ├── test_upgrade.py ├── test_upgrade_cleanup.py └── test_windows.py ├── test_artifacts ├── django │ └── 3.4.x.zip ├── requests-2.19.1.tar.gz └── six-1.11.0+mkl-py2.py3-none-any.whl └── unit ├── __init__.py ├── test_cmdparse.py ├── test_core.py ├── test_dependencies.py ├── test_environments.py ├── test_funktools.py ├── test_help.py ├── test_utils.py ├── test_utils_windows_executable.py ├── test_vcs.py └── test_vendor.py /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | test_patterns = ["tests/**"] 4 | 5 | exclude_patterns = [ 6 | "examples/**", 7 | "pipenv/vendor/**", 8 | "pipenv/patched/**" 9 | ] 10 | 11 | [[analyzers]] 12 | name = "python" 13 | enabled = true 14 | 15 | [analyzers.meta] 16 | runtime_version = "3.x.x" 17 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.toml] 15 | indent_size = 2 16 | 17 | [*.yaml] 18 | indent_size = 2 19 | 20 | # Makefiles always use tabs for indentation 21 | [Makefile] 22 | indent_style = tab 23 | 24 | # Batch files use tabs for indentation 25 | [*.bat] 26 | indent_style = tab 27 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Defaults people to autocrlf if they dont have it set 2 | *.py text working-tree-encoding=utf-8 eol=lf 3 | * text=auto 4 | # binaries 5 | *.png 6 | *.jpg 7 | *.tar.gz 8 | *.zip 9 | *.whl 10 | *.exe 11 | *.gif 12 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [oz123,matteius] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | --- 5 | 6 | Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv. 7 | 8 | Check the [diagnose documentation](https://pipenv.pypa.io/en/latest/diagnose.html) for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way. 9 | 10 | Make sure to mention your debugging experience if the documented solution failed. 11 | 12 | 13 | ### Issue description 14 | 15 | Describe the issue briefly here. 16 | 17 | ### Expected result 18 | 19 | Describe what you expected. 20 | 21 | ### Actual result 22 | 23 | When possible, provide the verbose output (`--verbose`), especially for locking and dependencies resolving issues. 24 | 25 | ### Steps to replicate 26 | 27 | Provide the steps to replicate (which usually at least includes the commands and the Pipfile). 28 | 29 | ------------------------------------------------------------------------------- 30 | 31 | Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting. 32 | 33 | If you're on macOS, run the following: 34 | 35 | $ pipenv --support | pbcopy 36 | 37 | If you're on Windows, run the following: 38 | 39 | > pipenv --support | clip 40 | 41 | If you're on Linux, run the following: 42 | 43 | $ pipenv --support | xclip 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Usage / Requests for Help 3 | about: Requests for assistance or general usage guidance. 4 | --- 5 | 6 | **AVOID POSTING ISSUES UNDER THIS CATEGORY.** 7 | 8 | If Pipenv is not functioning as you would like it to, consider filing either a bug report, or a feature request instead. 9 | 10 | Please refer to [StackOverflow tag](https://stackoverflow.com/questions/tagged/pipenv) for more information. 11 | 12 | ------------------------------------------------------------------------------- 13 | 14 | Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting. 15 | 16 | If you're on macOS, run the following: 17 | 18 | $ pipenv --support | pbcopy 19 | 20 | If you're on Windows, run the following: 21 | 22 | > pipenv --support | clip 23 | 24 | If you're on Linux, run the following: 25 | 26 | $ pipenv --support | xclip 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | --- 5 | 6 | Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv. 7 | 8 | Check the [diagnose documentation](https://pipenv.pypa.io/en/latest/diagnose/) for common issues as well as the GitHub Issues page. 9 | 10 | Make sure to mention your debugging experience if the documented solution failed. 11 | 12 | ### Is your feature request related to a problem? Please describe. 13 | 14 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 15 | 16 | ### Describe the solution you'd like 17 | 18 | A clear and concise description of what you want to happen. 19 | 20 | ### Describe alternatives you've considered 21 | 22 | A clear and concise description of any alternative solutions or features you've considered. 23 | 24 | ### Additional context 25 | 26 | Add any other context or screenshots about the feature request here. It may be a good idea to mention that platform and Python version you are on. 27 | 28 | ------------------------------------------------------------------------------- 29 | 30 | Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting. 31 | 32 | If you're on macOS, run the following: 33 | 34 | $ pipenv --support | pbcopy 35 | 36 | If you're on Windows, run the following: 37 | 38 | > pipenv --support | clip 39 | 40 | If you're on Linux, run the following: 41 | 42 | $ pipenv --support | xclip 43 | -------------------------------------------------------------------------------- /.github/workflows/ruff.yml: -------------------------------------------------------------------------------- 1 | # https://beta.ruff.rs 2 | name: ruff 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | workflow_dispatch: 9 | jobs: 10 | ruff: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - run: pip install --user ruff 15 | - run: ruff check --output-format=github . 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "tests/test_artifacts/git/pinax"] 2 | path = tests/test_artifacts/git/pinax 3 | url = https://github.com/pinax/pinax.git 4 | [submodule "tests/test_artifacts/git/requests"] 5 | path = tests/test_artifacts/git/requests 6 | url = https://github.com/psf/requests.git 7 | [submodule "tests/test_artifacts/git/six"] 8 | path = tests/test_artifacts/git/six 9 | url = https://github.com/benjaminp/six.git 10 | [submodule "tests/test_artifacts/git/dateutil"] 11 | path = tests/test_artifacts/git/dateutil 12 | url = https://github.com/dateutil/dateutil 13 | [submodule "tests/test_artifacts/git/pyinstaller"] 14 | path = tests/test_artifacts/git/pyinstaller 15 | url = https://github.com/pyinstaller/pyinstaller.git 16 | [submodule "tests/test_artifacts/git/jinja2"] 17 | path = tests/test_artifacts/git/jinja2 18 | url = https://github.com/pallets/jinja.git 19 | [submodule "tests/test_artifacts/git/flask"] 20 | path = tests/test_artifacts/git/flask 21 | url = https://github.com/pallets/flask.git 22 | [submodule "tests/pypi"] 23 | path = tests/pypi 24 | url = https://github.com/sarugaku/pipenv-test-artifacts.git 25 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | profile = black 3 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Set the version of Python and other tools you might need 9 | build: 10 | os: ubuntu-22.04 11 | tools: 12 | python: "3.11" 13 | 14 | # Build documentation in the docs/ directory with Sphinx 15 | sphinx: 16 | configuration: docs/conf.py 17 | 18 | # We recommend specifying your dependencies to enable reproducible builds: 19 | # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html 20 | python: 21 | install: 22 | - requirements: docs/requirements.txt 23 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing to Pipenv 2 | ====================== 3 | 4 | Please see: [docs](https://pipenv.pypa.io/en/latest/dev/contributing.html). 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2020-2022 Python Packaging Authority 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 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE README.md CONTRIBUTING.md CHANGELOG.md NOTICES HISTORY.txt 2 | include Makefile pyproject.toml get-pipenv.py *.yml 3 | include examples/Pipfil* 4 | include *.md 5 | 6 | recursive-include pipenv LICENSE LICENSE* *LICENSE* *COPYING* t32.exe t64.exe w32.exe w64.exe cacert.pem 7 | recursive-include pipenv *.cfg 8 | recursive-include pipenv/vendor *.c 9 | recursive-include pipenv *.md *.APACHE *.BSD 10 | recursive-include pipenv Makefile 11 | recursive-include pipenv/vendor vendor.txt 12 | recursive-include pipenv *.json 13 | recursive-include pipenv *.rst 14 | 15 | include pipenv/patched/pip/_vendor/vendor.txt 16 | include pipenv/patched/patched.txt 17 | include pipenv/vendor/Makefile 18 | include pipenv/pipenv.1 19 | 20 | 21 | recursive-include docs Makefile *.rst *.py *.bat 22 | recursive-include docs/_templates *.html 23 | recursive-include docs/_static *.js *.css *.png 24 | recursive-exclude tests/test_artifacts *.pyd *.so *.pyc *.egg-info PKG-INFO 25 | 26 | prune .azure-pipelines 27 | prune .github 28 | prune pipenv/vendor/importlib_metadata/tests 29 | prune pipenv/vendor/importlib_resources/tests 30 | 31 | exclude examples/* 32 | -------------------------------------------------------------------------------- /NOTICES: -------------------------------------------------------------------------------- 1 | The contents of the vendor and patched directories are subject to different licenses 2 | than the rest of this project. 3 | 4 | Their respective licenses can be looked up at pypi.python.org or in their 5 | corresponding LICENSE files. 6 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [dev-packages] 7 | pipenv = {path = ".", editable = true, extras = ["tests", "dev"]} 8 | sphinx = "*" 9 | sphinx-click = "==4.*" 10 | sphinxcontrib-spelling = "==7.*" 11 | click = "==8.0.3" 12 | stdeb = {version="*", sys_platform = "== 'linux'"} 13 | pre-commit = "==2.*" 14 | atomicwrites = {version = "*", sys_platform = "== 'win32'"} 15 | pytest-cov = "==4.*" 16 | typing-extensions = "==4.*" 17 | waitress = {version = "3.*", sys_platform = "== 'win32'"} 18 | gunicorn = {version = "23.0.*", sys_platform = "== 'linux'"} 19 | parse = "*" 20 | importlib-metadata = "*" 21 | colorama= {version = "*", sys_platform = "== 'win32'"} 22 | myst-parser = {extras = ["linkify"], version = "*"} 23 | invoke = "*" 24 | exceptiongroup = "==1.1.0" 25 | tomli = "*" 26 | pyyaml = "==6.0.1" 27 | build = "*" 28 | twine = "*" 29 | semver = "*" 30 | pypiserver = "2.3.2" 31 | zipp = "==3.21.0" 32 | 33 | [packages] 34 | pytz = "*" 35 | 36 | [scripts] 37 | tests = "bash ./run-tests.sh" 38 | test = "pytest -vvs" 39 | 40 | [pipenv] 41 | allow_prereleases = true 42 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | # Releasing Pipenv 2 | 3 | To create a new release: 4 | 5 | ``` 6 | pipenv run invoke release.release 7 | ``` 8 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | ## Security contact information 2 | 3 | To report a security vulnerability, please use the 4 | [Tidelift security contact](https://tidelift.com/security). 5 | Tidelift will coordinate the fix and disclosure. 6 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PYVERSION 2 | FROM docker.io/python:${PYVERSION} 3 | 4 | ARG VERSION 5 | RUN pip install pipenv=="${VERSION}" 6 | -------------------------------------------------------------------------------- /docker/Makefile: -------------------------------------------------------------------------------- 1 | ALL_PYVERSIONS = 3.11-alpine 3.10-alpine 3.9-alpine 3.8-alpine 3.11 3.10 3.9 3.8 2 | 3 | 4 | ifneq (,$(wildcard ./.env)) 5 | include .env 6 | export 7 | endif 8 | 9 | 10 | docker-build: 11 | echo $(PYVERSION) $(PIPENV) 12 | docker build -t $(REGISTRY)/$(ORG)/$(IMG):$(TAG) --build-arg PYVERSION=$(PYVERSION) --build-arg VERSION=$(PIPENV) -f Dockerfile . 13 | 14 | 15 | docker-push: 16 | docker push $(REGISTRY)/$(ORG)/$(IMG):$(TAG) 17 | 18 | 19 | build-all: 20 | $(foreach var,$(ALL_PYVERSIONS), make docker-build docker-push TAG=$(var)-$(PIPENV) PYVERSION=$(var) PIPENV=$(PIPENV);) 21 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | # Public docker images 2 | 3 | Build all images with: 4 | ``` 5 | $ make build-all PIPENV=2023.07.3 6 | ``` 7 | Build a single image with with: 8 | 9 | ``` 10 | $ make docker-build docker-push TAG=3.11-alpine-v2023-6-26 PYVERSION=3.11-alpine PIPENV=2023.6.26 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = pipenv 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* Hide module name and default value for environment variable section */ 2 | div[id$='environment-variables'] code.descclassname { 3 | display: none; 4 | } 5 | div[id$='environment-variables'] em.property { 6 | display: none; 7 | } 8 | -------------------------------------------------------------------------------- /docs/_static/pipenv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/docs/_static/pipenv.png -------------------------------------------------------------------------------- /docs/changelog.md: -------------------------------------------------------------------------------- 1 | ```{include} ../CHANGELOG.md 2 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | set SPHINXPROJ=pipenv 13 | 14 | if "%1" == "" goto help 15 | 16 | %SPHINXBUILD% >NUL 2>NUL 17 | if errorlevel 9009 ( 18 | echo. 19 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 20 | echo.installed, then set the SPHINXBUILD environment variable to point 21 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 22 | echo.may add the Sphinx directory to PATH. 23 | echo. 24 | echo.If you don't have Sphinx installed, grab it from 25 | echo.http://sphinx-doc.org/ 26 | exit /b 1 27 | ) 28 | 29 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 30 | goto end 31 | 32 | :help 33 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 34 | 35 | :end 36 | popd 37 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | click>=8.1.7 2 | imagesize>=1.4.1 3 | Jinja2>=3.1.4 4 | MarkupSafe>=2.1.5 5 | myst-parser[linkify]>=4.0.0 6 | -e . 7 | pytz>=2024.1 8 | requests>=2.32.0 9 | snowballstemmer>=2.2.0 10 | Sphinx>=8.1.3 11 | sphinx-click>=6.0.0 12 | sphinxcontrib-spelling>=8.0.0 13 | sphinxcontrib-websupport>=2.0.0 14 | urllib3>=2.2.1 15 | virtualenv>=20.25.0 16 | virtualenv-clone>=0.5.7 17 | certifi>=2024.2.2 18 | idna>=3.6 19 | -------------------------------------------------------------------------------- /docs/spelling_wordlist.txt: -------------------------------------------------------------------------------- 1 | appdir 2 | ascii 3 | asdf 4 | backport 5 | bashrc 6 | bundler 7 | canonicalized 8 | cmder 9 | Cmder 10 | codebase 11 | Conda 12 | CPython 13 | cygwin 14 | Deduplicate 15 | Devops 16 | eval 17 | filesystem 18 | Homebrew 19 | ini 20 | installable 21 | Integrations 22 | io 23 | js 24 | json 25 | Linuxbrew 26 | lockfile 27 | macOS 28 | Makefile 29 | manpage 30 | metadata 31 | mingw 32 | misconfiguration 33 | misconfigured 34 | msys 35 | natively 36 | npm 37 | parallelization 38 | parsers 39 | pathlib 40 | pexpect 41 | pipenv 42 | Pipenv 43 | Pipfile 44 | Pipfiles 45 | piptools 46 | powershell 47 | Powershell 48 | pre 49 | py 50 | pyenv 51 | pypi 52 | PyPI 53 | pythonfinder 54 | resolvers 55 | runtime 56 | runtimes 57 | sayers 58 | scandir 59 | sha 60 | stateful 61 | subdirectory 62 | subprocess 63 | subprocesses 64 | subshell 65 | supervisord 66 | tox 67 | Tox 68 | tracebacks 69 | triaging 70 | txt 71 | unicode 72 | uninstallation 73 | unnesting 74 | untrusted 75 | url 76 | urls 77 | UTF 78 | vcs 79 | vendored 80 | Vendored 81 | venv 82 | virtualenv 83 | virtualenvs 84 | Virtualenv 85 | Virtualenvs 86 | zsh 87 | zshrc 88 | -------------------------------------------------------------------------------- /examples/Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | requests = ">=2.32.0" 8 | urllib3 = ">=2.2.1" 9 | certifi = ">=2024.2.2" 10 | idna = ">=3.6" 11 | charset-normalizer = ">=3.3.2" 12 | 13 | [dev-packages] 14 | pytest = ">=7.4.0" 15 | 16 | [requires] 17 | python_version = "3.11" 18 | -------------------------------------------------------------------------------- /news/towncrier_template.rst: -------------------------------------------------------------------------------- 1 | {% if top_line %} 2 | {{ top_line }} 3 | {{ top_underline * ((top_line)|length)}} 4 | {% elif versiondata.name %} 5 | {{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }}) 6 | {{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}} 7 | {% else %} 8 | {{ versiondata.version }} ({{ versiondata.date }}) 9 | {{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} 10 | {% endif %} 11 | 12 | {% for section in sections %} 13 | {% set underline = "-" %} 14 | {% if section %} 15 | {{section}}: 16 | {{ underline * section|length }}{% set underline = "~" %} 17 | 18 | {% endif %} 19 | {% if sections[section] %} 20 | {% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %} 21 | 22 | {{ definitions[category]['name'] }} 23 | {{ underline * definitions[category]['name']|length }} 24 | 25 | {% if definitions[category]['showcontent'] %} 26 | {% for text, values in sections[section][category]|dictsort(by='value') %} 27 | - {{ text }} {% if category != 'process' %}{{ values|sort|join(',\n ') }}{% endif %} 28 | 29 | {% endfor %} 30 | {% else %} 31 | - {{ sections[section][category]['']|sort|join(', ') }} 32 | 33 | 34 | {% endif %} 35 | {% if sections[section][category]|length == 0 %} 36 | 37 | No significant changes. 38 | 39 | 40 | {% else %} 41 | {% endif %} 42 | {% endfor %} 43 | {% else %} 44 | 45 | No significant changes. 46 | 47 | 48 | {% endif %} 49 | {% endfor %} 50 | -------------------------------------------------------------------------------- /pipenv/__init__.py: -------------------------------------------------------------------------------- 1 | import importlib.util 2 | import os 3 | import sys 4 | import warnings 5 | from pathlib import Path 6 | 7 | # This has to come before imports of pipenv 8 | PIPENV_ROOT = Path(__file__).resolve().parent.absolute() 9 | PIP_ROOT = str(PIPENV_ROOT / "patched" / "pip") 10 | sys.path.insert(0, str(PIPENV_ROOT)) 11 | sys.path.insert(0, PIP_ROOT) 12 | 13 | # Load patched pip instead of system pip 14 | os.environ["PIP_DISABLE_PIP_VERSION_CHECK"] = "1" 15 | 16 | 17 | def _ensure_modules(): 18 | # Ensure when pip gets invoked it uses our patched version 19 | location = Path(__file__).parent / "patched" / "pip" / "__init__.py" 20 | spec = importlib.util.spec_from_file_location( 21 | "pip", 22 | location=str(location), 23 | ) 24 | pip = importlib.util.module_from_spec(spec) 25 | sys.modules["pip"] = pip 26 | spec.loader.exec_module(pip) 27 | 28 | 29 | _ensure_modules() 30 | 31 | from pipenv.__version__ import __version__ # noqa 32 | from pipenv.cli import cli # noqa 33 | from pipenv.patched.pip._vendor.urllib3.exceptions import DependencyWarning # noqa 34 | 35 | warnings.filterwarnings("ignore", category=DependencyWarning) 36 | warnings.filterwarnings("ignore", category=ResourceWarning) 37 | warnings.filterwarnings("ignore", category=UserWarning) 38 | 39 | 40 | if os.name == "nt": 41 | from pipenv.vendor import colorama 42 | 43 | no_color = False 44 | if not os.getenv("NO_COLOR") or no_color: 45 | colorama.just_fix_windows_console() 46 | 47 | 48 | if __name__ == "__main__": 49 | cli() 50 | -------------------------------------------------------------------------------- /pipenv/__main__.py: -------------------------------------------------------------------------------- 1 | from pipenv.cli import cli 2 | 3 | if __name__ == "__main__": 4 | cli() 5 | -------------------------------------------------------------------------------- /pipenv/__version__.py: -------------------------------------------------------------------------------- 1 | # ___ ( ) ___ ___ __ 2 | # // ) ) / / // ) ) //___) ) // ) ) || / / 3 | # //___/ / / / //___/ / // // / / || / / 4 | # // / / // ((____ // / / ||/ / 5 | __version__ = "2025.0.3" 6 | -------------------------------------------------------------------------------- /pipenv/cli/__init__.py: -------------------------------------------------------------------------------- 1 | from .command import cli # noqa 2 | -------------------------------------------------------------------------------- /pipenv/patched/README.md: -------------------------------------------------------------------------------- 1 | # Don't touch! 2 | 3 | - Pip is modified, to make it work with Pipenv's custom virtualenv locations. 4 | - Pip is modified, to make it work with pip-tool modifications. 5 | - Pip is modified, to make it resolve deep extras links. 6 | - Safety is hacked together to always work on any system. 7 | - TOML libraries are upgraded to... work. 8 | 9 | Don't touch. 10 | 11 | When updating (remember, don't touch!), update the corresponding LICENSE files as well. 12 | -------------------------------------------------------------------------------- /pipenv/patched/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/patched.txt: -------------------------------------------------------------------------------- 1 | pip==25.1.1 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Seth Michael Larson 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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/LICENSE-HEADER: -------------------------------------------------------------------------------- 1 | SPDX-License-Identifier: MIT 2 | SPDX-FileCopyrightText: 2021 Taneli Hukkinen 3 | Licensed to PSF under a Contributor Agreement. 4 | -------------------------------------------------------------------------------- /pipenv/patched/pip/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Copyright (c) Donald Stufft and individual contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /pipenv/patched/pip/LICENSE.md: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2013-2024, Kim Davies and contributors. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | 1. Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | 3. Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 27 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /pipenv/patched/pip/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | __version__ = "25.1.1" 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 pipenv.patched.pip._internal.utils.entrypoints import _wrapper 12 | 13 | return _wrapper(args) 14 | -------------------------------------------------------------------------------- /pipenv/patched/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 | import importlib.util 23 | import sys 24 | spec = importlib.util.spec_from_file_location( 25 | "pipenv", 26 | location=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "__init__.py")) 27 | pipenv = importlib.util.module_from_spec(spec) 28 | sys.modules["pipenv"] = pipenv 29 | spec.loader.exec_module(pipenv) 30 | from pipenv.patched.pip._internal.cli.main import main as _main 31 | 32 | sys.exit(_main()) 33 | -------------------------------------------------------------------------------- /pipenv/patched/pip/__pip-runner__.py: -------------------------------------------------------------------------------- 1 | """Execute exactly this copy of pip, within a different environment. 2 | 3 | This file is named as it is, to ensure that this module can't be imported via 4 | an import statement. 5 | """ 6 | 7 | # /!\ This version compatibility check section must be Python 2 compatible. /!\ 8 | 9 | import sys 10 | 11 | # Copied from pyproject.toml 12 | PYTHON_REQUIRES = (3, 9) 13 | 14 | 15 | def version_str(version): # type: ignore 16 | return ".".join(str(v) for v in version) 17 | 18 | 19 | if sys.version_info[:2] < PYTHON_REQUIRES: 20 | raise SystemExit( 21 | "This version of pip does not support python {} (requires >={}).".format( 22 | version_str(sys.version_info[:2]), version_str(PYTHON_REQUIRES) 23 | ) 24 | ) 25 | 26 | # From here on, we can use Python 3 features, but the syntax must remain 27 | # Python 2 compatible. 28 | 29 | import runpy # noqa: E402 30 | from importlib.machinery import PathFinder # noqa: E402 31 | from os.path import dirname # noqa: E402 32 | 33 | PIP_SOURCES_ROOT = dirname(dirname(__file__)) 34 | 35 | 36 | class PipImportRedirectingFinder: 37 | @classmethod 38 | def find_spec(self, fullname, path=None, target=None): # type: ignore 39 | if fullname != "pip": 40 | return None 41 | 42 | spec = PathFinder.find_spec(fullname, [PIP_SOURCES_ROOT], target) 43 | assert spec, (PIP_SOURCES_ROOT, fullname) 44 | return spec 45 | 46 | 47 | sys.meta_path.insert(0, PipImportRedirectingFinder()) 48 | 49 | assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module" 50 | runpy.run_module("pip", run_name="__main__", alter_sys=True) 51 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | from pipenv.patched.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 pipenv.patched.pip._internal.utils.entrypoints import _wrapper 17 | 18 | return _wrapper(args) 19 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/cli/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage containing all of pip's command line interface related code""" 2 | 3 | # This file intentionally does not import submodules 4 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/commands/help.py: -------------------------------------------------------------------------------- 1 | from optparse import Values 2 | from typing import List 3 | 4 | from pipenv.patched.pip._internal.cli.base_command import Command 5 | from pipenv.patched.pip._internal.cli.status_codes import SUCCESS 6 | from pipenv.patched.pip._internal.exceptions import CommandError 7 | 8 | 9 | class HelpCommand(Command): 10 | """Show help for commands""" 11 | 12 | usage = """ 13 | %prog """ 14 | ignore_require_venv = True 15 | 16 | def run(self, options: Values, args: List[str]) -> int: 17 | from pipenv.patched.pip._internal.commands import ( 18 | commands_dict, 19 | create_command, 20 | get_similar_commands, 21 | ) 22 | 23 | try: 24 | # 'pip help' with no args is handled by pip.__init__.parseopt() 25 | cmd_name = args[0] # the command we need help for 26 | except IndexError: 27 | return SUCCESS 28 | 29 | if cmd_name not in commands_dict: 30 | guess = get_similar_commands(cmd_name) 31 | 32 | msg = [f'unknown command "{cmd_name}"'] 33 | if guess: 34 | msg.append(f'maybe you meant "{guess}"') 35 | 36 | raise CommandError(" - ".join(msg)) 37 | 38 | command = create_command(cmd_name) 39 | command.parser.print_help() 40 | 41 | return SUCCESS 42 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/distributions/__init__.py: -------------------------------------------------------------------------------- 1 | from pipenv.patched.pip._internal.distributions.base import AbstractDistribution 2 | from pipenv.patched.pip._internal.distributions.sdist import SourceDistribution 3 | from pipenv.patched.pip._internal.distributions.wheel import WheelDistribution 4 | from pipenv.patched.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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/distributions/installed.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pipenv.patched.pip._internal.distributions.base import AbstractDistribution 4 | from pipenv.patched.pip._internal.index.package_finder import PackageFinder 5 | from pipenv.patched.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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/distributions/wheel.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING, Optional 2 | 3 | from pipenv.patched.pip._vendor.packaging.utils import canonicalize_name 4 | 5 | from pipenv.patched.pip._internal.distributions.base import AbstractDistribution 6 | from pipenv.patched.pip._internal.metadata import ( 7 | BaseDistribution, 8 | FilesystemWheel, 9 | get_wheel_distribution, 10 | ) 11 | 12 | if TYPE_CHECKING: 13 | from pipenv.patched.pip._internal.index.package_finder import PackageFinder 14 | 15 | 16 | class WheelDistribution(AbstractDistribution): 17 | """Represents a wheel distribution. 18 | 19 | This does not need any preparation as wheels can be directly unpacked. 20 | """ 21 | 22 | @property 23 | def build_tracker_id(self) -> Optional[str]: 24 | return None 25 | 26 | def get_metadata_distribution(self) -> BaseDistribution: 27 | """Loads the metadata from the wheel file into memory and returns a 28 | Distribution that uses it, not relying on the wheel file or 29 | requirement. 30 | """ 31 | assert self.req.local_file_path, "Set as part of preparation during download" 32 | assert self.req.name, "Wheels are never unnamed" 33 | wheel = FilesystemWheel(self.req.local_file_path) 34 | return get_wheel_distribution(wheel, canonicalize_name(self.req.name)) 35 | 36 | def prepare_distribution_metadata( 37 | self, 38 | finder: "PackageFinder", 39 | build_isolation: bool, 40 | check_build_deps: bool, 41 | ) -> None: 42 | pass 43 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/index/__init__.py: -------------------------------------------------------------------------------- 1 | """Index interaction code""" 2 | -------------------------------------------------------------------------------- /pipenv/patched/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 pipenv.patched.pip._internal.utils.entrypoints import _wrapper 11 | 12 | return _wrapper(args) 13 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/metadata/importlib/__init__.py: -------------------------------------------------------------------------------- 1 | from ._dists import Distribution 2 | from ._envs import Environment 3 | 4 | __all__ = ["NAME", "Distribution", "Environment"] 5 | 6 | NAME = "importlib" 7 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/models/__init__.py: -------------------------------------------------------------------------------- 1 | """A package that contains models that represent entities.""" 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/models/candidate.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | from pipenv.patched.pip._vendor.packaging.version import Version 4 | from pipenv.patched.pip._vendor.packaging.version import parse as parse_version 5 | 6 | from pipenv.patched.pip._internal.models.link import Link 7 | 8 | 9 | @dataclass(frozen=True) 10 | class InstallationCandidate: 11 | """Represents a potential "candidate" for installation.""" 12 | 13 | __slots__ = ["name", "version", "link"] 14 | 15 | name: str 16 | version: Version 17 | link: Link 18 | 19 | def __init__(self, name: str, version: str, link: Link) -> None: 20 | object.__setattr__(self, "name", name) 21 | object.__setattr__(self, "version", parse_version(version)) 22 | object.__setattr__(self, "link", link) 23 | 24 | def __str__(self) -> str: 25 | return f"{self.name!r} candidate (version {self.version} at {self.link})" 26 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | from dataclasses import dataclass 9 | 10 | SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"] 11 | 12 | 13 | @dataclass(frozen=True) 14 | class Scheme: 15 | """A Scheme holds paths which are used as the base directories for 16 | artifacts associated with a Python package. 17 | """ 18 | 19 | __slots__ = SCHEME_KEYS 20 | 21 | platlib: str 22 | purelib: str 23 | headers: str 24 | scripts: str 25 | data: str 26 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/network/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains purely network-related utilities.""" 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/operations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_internal/operations/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/operations/build/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_internal/operations/build/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/operations/build/wheel.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | from typing import Optional 4 | 5 | from pipenv.patched.pip._vendor.pyproject_hooks import BuildBackendHookCaller 6 | 7 | from pipenv.patched.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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/operations/install/__init__.py: -------------------------------------------------------------------------------- 1 | """For modules related to installing packages.""" 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/operations/install/editable_legacy.py: -------------------------------------------------------------------------------- 1 | """Legacy editable installation process, i.e. `setup.py develop`.""" 2 | 3 | import logging 4 | from typing import Optional, Sequence 5 | 6 | from pipenv.patched.pip._internal.build_env import BuildEnvironment 7 | from pipenv.patched.pip._internal.utils.logging import indent_log 8 | from pipenv.patched.pip._internal.utils.setuptools_build import make_setuptools_develop_args 9 | from pipenv.patched.pip._internal.utils.subprocess import call_subprocess 10 | 11 | logger = logging.getLogger(__name__) 12 | 13 | 14 | def install_editable( 15 | *, 16 | global_options: Sequence[str], 17 | prefix: Optional[str], 18 | home: Optional[str], 19 | use_user_site: bool, 20 | name: str, 21 | setup_py_path: str, 22 | isolated: bool, 23 | build_env: BuildEnvironment, 24 | unpacked_source_directory: str, 25 | ) -> None: 26 | """Install a package in editable mode. Most arguments are pass-through 27 | to setuptools. 28 | """ 29 | logger.info("Running setup.py develop for %s", name) 30 | 31 | args = make_setuptools_develop_args( 32 | setup_py_path, 33 | global_options=global_options, 34 | no_user_config=isolated, 35 | prefix=prefix, 36 | home=home, 37 | use_user_site=use_user_site, 38 | ) 39 | 40 | with indent_log(): 41 | with build_env: 42 | call_subprocess( 43 | args, 44 | command_desc="python setup.py develop", 45 | cwd=unpacked_source_directory, 46 | ) 47 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/resolution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_internal/resolution/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/resolution/base.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, List, Optional 2 | 3 | from pipenv.patched.pip._internal.req.req_install import InstallRequirement 4 | from pipenv.patched.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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/resolution/legacy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_internal/resolution/legacy/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/resolution/resolvelib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_internal/resolution/resolvelib/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_internal/utils/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/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 pipenv.patched.pip._internal.__init__ 36 | """ 37 | logging.setLoggerClass(VerboseLogger) 38 | logging.addLevelName(VERBOSE, "VERBOSE") 39 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/utils/datetime.py: -------------------------------------------------------------------------------- 1 | """For when pip wants to check the date or time.""" 2 | 3 | import datetime 4 | 5 | 6 | def today_is_later_than(year: int, month: int, day: int) -> bool: 7 | today = datetime.date.today() 8 | given = datetime.date(year, month, day) 9 | 10 | return today > given 11 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/utils/filetypes.py: -------------------------------------------------------------------------------- 1 | """Filetype information.""" 2 | 3 | from typing import Tuple 4 | 5 | from pipenv.patched.pip._internal.utils.misc import splitext 6 | 7 | WHEEL_EXTENSION = ".whl" 8 | BZ2_EXTENSIONS: Tuple[str, ...] = (".tar.bz2", ".tbz") 9 | XZ_EXTENSIONS: Tuple[str, ...] = ( 10 | ".tar.xz", 11 | ".txz", 12 | ".tlz", 13 | ".tar.lz", 14 | ".tar.lzma", 15 | ) 16 | ZIP_EXTENSIONS: Tuple[str, ...] = (".zip", WHEEL_EXTENSION) 17 | TAR_EXTENSIONS: Tuple[str, ...] = (".tar.gz", ".tgz", ".tar") 18 | ARCHIVE_EXTENSIONS = ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS 19 | 20 | 21 | def is_archive_file(name: str) -> bool: 22 | """Return True if `name` is a considered as an archive file.""" 23 | ext = splitext(name)[1].lower() 24 | if ext in ARCHIVE_EXTENSIONS: 25 | return True 26 | return False 27 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_internal/utils/retry.py: -------------------------------------------------------------------------------- 1 | import functools 2 | from time import perf_counter, sleep 3 | from typing import Callable, TypeVar 4 | 5 | from pipenv.patched.pip._vendor.typing_extensions import ParamSpec 6 | 7 | T = TypeVar("T") 8 | P = ParamSpec("P") 9 | 10 | 11 | def retry( 12 | wait: float, stop_after_delay: float 13 | ) -> Callable[[Callable[P, T]], Callable[P, T]]: 14 | """Decorator to automatically retry a function on error. 15 | 16 | If the function raises, the function is recalled with the same arguments 17 | until it returns or the time limit is reached. When the time limit is 18 | surpassed, the last exception raised is reraised. 19 | 20 | :param wait: The time to wait after an error before retrying, in seconds. 21 | :param stop_after_delay: The time limit after which retries will cease, 22 | in seconds. 23 | """ 24 | 25 | def wrapper(func: Callable[P, T]) -> Callable[P, T]: 26 | 27 | @functools.wraps(func) 28 | def retry_wrapped(*args: P.args, **kwargs: P.kwargs) -> T: 29 | # The performance counter is monotonic on all platforms we care 30 | # about and has much better resolution than time.monotonic(). 31 | start_time = perf_counter() 32 | while True: 33 | try: 34 | return func(*args, **kwargs) 35 | except Exception: 36 | if perf_counter() - start_time > stop_after_delay: 37 | raise 38 | sleep(wait) 39 | 40 | return retry_wrapped 41 | 42 | return wrapper 43 | -------------------------------------------------------------------------------- /pipenv/patched/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 `pipenv.patched.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 pipenv.patched.pip._internal.vcs.bazaar 6 | import pipenv.patched.pip._internal.vcs.git 7 | import pipenv.patched.pip._internal.vcs.mercurial 8 | import pipenv.patched.pip._internal.vcs.subversion # noqa: F401 9 | from pipenv.patched.pip._internal.vcs.versioncontrol import ( # noqa: F401 10 | RemoteNotFoundError, 11 | RemoteNotValidError, 12 | is_url, 13 | make_vcs_requirement_url, 14 | vcs, 15 | ) 16 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | 10 | __author__ = "Eric Larson" 11 | __email__ = "eric@ionrock.org" 12 | __version__ = "0.14.2" 13 | 14 | from pipenv.patched.pip._vendor.cachecontrol.adapter import CacheControlAdapter 15 | from pipenv.patched.pip._vendor.cachecontrol.controller import CacheController 16 | from pipenv.patched.pip._vendor.cachecontrol.wrapper import CacheControl 17 | 18 | __all__ = [ 19 | "__author__", 20 | "__email__", 21 | "__version__", 22 | "CacheControlAdapter", 23 | "CacheController", 24 | "CacheControl", 25 | ] 26 | 27 | import logging 28 | 29 | logging.getLogger(__name__).addHandler(logging.NullHandler()) 30 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/cachecontrol/caches/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | from pipenv.patched.pip._vendor.cachecontrol.caches.file_cache import FileCache, SeparateBodyFileCache 6 | from pipenv.patched.pip._vendor.cachecontrol.caches.redis_cache import RedisCache 7 | 8 | __all__ = ["FileCache", "SeparateBodyFileCache", "RedisCache"] 9 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/cachecontrol/caches/redis_cache.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | from __future__ import annotations 5 | 6 | 7 | from datetime import datetime, timezone 8 | from typing import TYPE_CHECKING 9 | 10 | from pipenv.patched.pip._vendor.cachecontrol.cache import BaseCache 11 | 12 | if TYPE_CHECKING: 13 | from redis import Redis 14 | 15 | 16 | class RedisCache(BaseCache): 17 | def __init__(self, conn: Redis[bytes]) -> None: 18 | self.conn = conn 19 | 20 | def get(self, key: str) -> bytes | None: 21 | return self.conn.get(key) 22 | 23 | def set( 24 | self, key: str, value: bytes, expires: int | datetime | None = None 25 | ) -> None: 26 | if not expires: 27 | self.conn.set(key, value) 28 | elif isinstance(expires, datetime): 29 | now_utc = datetime.now(timezone.utc) 30 | if expires.tzinfo is None: 31 | now_utc = now_utc.replace(tzinfo=None) 32 | delta = expires - now_utc 33 | self.conn.setex(key, int(delta.total_seconds()), value) 34 | else: 35 | self.conn.setex(key, expires, value) 36 | 37 | def delete(self, key: str) -> None: 38 | self.conn.delete(key) 39 | 40 | def clear(self) -> None: 41 | """Helper for clearing all the keys in a database. Use with 42 | caution!""" 43 | for key in self.conn.keys(): 44 | self.conn.delete(key) 45 | 46 | def close(self) -> None: 47 | """Redis uses connection pooling, no need to close the connection.""" 48 | pass 49 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/cachecontrol/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/cachecontrol/py.typed -------------------------------------------------------------------------------- /pipenv/patched/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 | This is a bundle of X.509 certificates of public Certificate Authorities 6 | (CA). These were automatically extracted from Mozilla's root certificates 7 | file (certdata.txt). This file can be found in the mozilla source tree: 8 | https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt 9 | It contains the certificates in PEM format and therefore 10 | can be directly used with curl / libcurl / php_curl, or with 11 | an Apache+mod_ssl webserver for SSL client authentication. 12 | Just configure this file as the SSLCACertificateFile.# 13 | 14 | ***** BEGIN LICENSE BLOCK ***** 15 | This Source Code Form is subject to the terms of the Mozilla Public License, 16 | v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain 17 | one at http://mozilla.org/MPL/2.0/. 18 | 19 | ***** END LICENSE BLOCK ***** 20 | @(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $ 21 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/certifi/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import contents, where 2 | 3 | __all__ = ["contents", "where"] 4 | __version__ = "2025.01.31" 5 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/certifi/__main__.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | from pipenv.patched.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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/certifi/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/certifi/py.typed -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/dependency_groups/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024-present Stephen Rosen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/dependency_groups/__init__.py: -------------------------------------------------------------------------------- 1 | from ._implementation import ( 2 | CyclicDependencyError, 3 | DependencyGroupInclude, 4 | DependencyGroupResolver, 5 | resolve, 6 | ) 7 | 8 | __all__ = ( 9 | "CyclicDependencyError", 10 | "DependencyGroupInclude", 11 | "DependencyGroupResolver", 12 | "resolve", 13 | ) 14 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/dependency_groups/_toml_compat.py: -------------------------------------------------------------------------------- 1 | try: 2 | import tomllib 3 | except ImportError: 4 | try: 5 | from pipenv.patched.pip._vendor import tomli as tomllib # type: ignore[no-redef, unused-ignore] 6 | except ModuleNotFoundError: # pragma: no cover 7 | tomllib = None # type: ignore[assignment, unused-ignore] 8 | 9 | __all__ = ("tomllib",) 10 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/dependency_groups/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/dependency_groups/py.typed -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2012-2023 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.9' 10 | 11 | 12 | class DistlibException(Exception): 13 | pass 14 | 15 | 16 | try: 17 | from logging import NullHandler 18 | except ImportError: # pragma: no cover 19 | 20 | class NullHandler(logging.Handler): 21 | 22 | def handle(self, record): 23 | pass 24 | 25 | def emit(self, record): 26 | pass 27 | 28 | def createLock(self): 29 | self.lock = None 30 | 31 | 32 | logger = logging.getLogger(__name__) 33 | logger.addHandler(NullHandler()) 34 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/t32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distlib/t32.exe -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/t64-arm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distlib/t64-arm.exe -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/t64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distlib/t64.exe -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/w32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distlib/w32.exe -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/w64-arm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distlib/w64-arm.exe -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distlib/w64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distlib/w64.exe -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distro/__main__.py: -------------------------------------------------------------------------------- 1 | from .distro import main 2 | 3 | if __name__ == "__main__": 4 | main() 5 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/distro/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/distro/py.typed -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/idna/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import ( 2 | IDNABidiError, 3 | IDNAError, 4 | InvalidCodepoint, 5 | InvalidCodepointContext, 6 | alabel, 7 | check_bidi, 8 | check_hyphen_ok, 9 | check_initial_combiner, 10 | check_label, 11 | check_nfc, 12 | decode, 13 | encode, 14 | ulabel, 15 | uts46_remap, 16 | valid_contextj, 17 | valid_contexto, 18 | valid_label_length, 19 | valid_string_length, 20 | ) 21 | from .intranges import intranges_contain 22 | from .package_data import __version__ 23 | 24 | __all__ = [ 25 | "__version__", 26 | "IDNABidiError", 27 | "IDNAError", 28 | "InvalidCodepoint", 29 | "InvalidCodepointContext", 30 | "alabel", 31 | "check_bidi", 32 | "check_hyphen_ok", 33 | "check_initial_combiner", 34 | "check_label", 35 | "check_nfc", 36 | "decode", 37 | "encode", 38 | "intranges_contain", 39 | "ulabel", 40 | "uts46_remap", 41 | "valid_contextj", 42 | "valid_contexto", 43 | "valid_label_length", 44 | "valid_string_length", 45 | ] 46 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/idna/compat.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Union 2 | 3 | from .core import decode, encode 4 | 5 | 6 | def ToASCII(label: str) -> bytes: 7 | return encode(label) 8 | 9 | 10 | def ToUnicode(label: Union[bytes, bytearray]) -> str: 11 | return decode(label) 12 | 13 | 14 | def nameprep(s: Any) -> None: 15 | raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol") 16 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/idna/package_data.py: -------------------------------------------------------------------------------- 1 | __version__ = "3.10" 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/idna/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/idna/py.typed -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/msgpack/__init__.py: -------------------------------------------------------------------------------- 1 | # ruff: noqa: F401 2 | import os 3 | 4 | from .exceptions import * # noqa: F403 5 | from .ext import ExtType, Timestamp 6 | 7 | version = (1, 1, 0) 8 | __version__ = "1.1.0" 9 | 10 | 11 | if os.environ.get("MSGPACK_PUREPYTHON"): 12 | from .fallback import Packer, Unpacker, unpackb 13 | else: 14 | try: 15 | from ._cmsgpack import Packer, Unpacker, unpackb 16 | except ImportError: 17 | from .fallback import Packer, Unpacker, unpackb 18 | 19 | 20 | def pack(o, stream, **kwargs): 21 | """ 22 | Pack object `o` and write it to `stream` 23 | 24 | See :class:`Packer` for options. 25 | """ 26 | packer = Packer(**kwargs) 27 | stream.write(packer.pack(o)) 28 | 29 | 30 | def packb(o, **kwargs): 31 | """ 32 | Pack object `o` and return packed bytes 33 | 34 | See :class:`Packer` for options. 35 | """ 36 | return Packer(**kwargs).pack(o) 37 | 38 | 39 | def unpack(stream, **kwargs): 40 | """ 41 | Unpack an object from `stream`. 42 | 43 | Raises `ExtraData` when `stream` contains extra bytes. 44 | See :class:`Unpacker` for options. 45 | """ 46 | data = stream.read() 47 | return unpackb(data, **kwargs) 48 | 49 | 50 | # alias for compatibility to simplejson/marshal/pickle. 51 | load = unpack 52 | loads = unpackb 53 | 54 | dump = pack 55 | dumps = packb 56 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/msgpack/exceptions.py: -------------------------------------------------------------------------------- 1 | class UnpackException(Exception): 2 | """Base class for some exceptions raised while unpacking. 3 | 4 | NOTE: unpack may raise exception other than subclass of 5 | UnpackException. If you want to catch all error, catch 6 | Exception instead. 7 | """ 8 | 9 | 10 | class BufferFull(UnpackException): 11 | pass 12 | 13 | 14 | class OutOfData(UnpackException): 15 | pass 16 | 17 | 18 | class FormatError(ValueError, UnpackException): 19 | """Invalid msgpack format""" 20 | 21 | 22 | class StackError(ValueError, UnpackException): 23 | """Too nested""" 24 | 25 | 26 | # Deprecated. Use ValueError instead 27 | UnpackValueError = ValueError 28 | 29 | 30 | class ExtraData(UnpackValueError): 31 | """ExtraData is raised when there is trailing data. 32 | 33 | This exception is raised while only one-shot (not streaming) 34 | unpack. 35 | """ 36 | 37 | def __init__(self, unpacked, extra): 38 | self.unpacked = unpacked 39 | self.extra = extra 40 | 41 | def __str__(self): 42 | return "unpack(b) received extra data." 43 | 44 | 45 | # Deprecated. Use Exception instead to catch all exception during packing. 46 | PackException = Exception 47 | PackValueError = ValueError 48 | PackOverflowError = OverflowError 49 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/packaging/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Copyright (c) Donald Stufft and individual contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /pipenv/patched/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 | __title__ = "packaging" 6 | __summary__ = "Core utilities for Python packages" 7 | __uri__ = "https://github.com/pypa/packaging" 8 | 9 | __version__ = "25.0" 10 | 11 | __author__ = "Donald Stufft and individual contributors" 12 | __email__ = "donald@stufft.io" 13 | 14 | __license__ = "BSD-2-Clause or Apache-2.0" 15 | __copyright__ = f"2014 {__author__}" 16 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/packaging/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/packaging/py.typed -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/pkg_resources/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012 Daniel Holth and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation 8 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | and/or sell copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in 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 18 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 | OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/platformdirs/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/platformdirs/py.typed -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/platformdirs/version.py: -------------------------------------------------------------------------------- 1 | # file generated by setuptools-scm 2 | # don't change, don't track in version control 3 | 4 | __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"] 5 | 6 | TYPE_CHECKING = False 7 | if TYPE_CHECKING: 8 | from typing import Tuple 9 | from typing import Union 10 | 11 | VERSION_TUPLE = Tuple[Union[int, str], ...] 12 | else: 13 | VERSION_TUPLE = object 14 | 15 | version: str 16 | __version__: str 17 | __version_tuple__: VERSION_TUPLE 18 | version_tuple: VERSION_TUPLE 19 | 20 | __version__ = version = '4.3.7' 21 | __version_tuple__ = version_tuple = (4, 3, 7) 22 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/pygments/__main__.py: -------------------------------------------------------------------------------- 1 | """ 2 | pygments.__main__ 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Main entry point for ``python -m pygments``. 6 | 7 | :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | """ 10 | 11 | import sys 12 | from pipenv.patched.pip._vendor.pygments.cmdline import main 13 | 14 | try: 15 | sys.exit(main(sys.argv)) 16 | except KeyboardInterrupt: 17 | sys.exit(1) 18 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/pygments/modeline.py: -------------------------------------------------------------------------------- 1 | """ 2 | pygments.modeline 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | A simple modeline parser (based on pymodeline). 6 | 7 | :copyright: Copyright 2006-2025 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): # noqa: E741 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 line in lines[-1:-max_lines-1:-1]: 34 | ret = get_filetype_from_line(line) 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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/pyproject_hooks/__init__.py: -------------------------------------------------------------------------------- 1 | """Wrappers to call pyproject.toml-based build backend hooks. 2 | """ 3 | 4 | from typing import TYPE_CHECKING 5 | 6 | from ._impl import ( 7 | BackendUnavailable, 8 | BuildBackendHookCaller, 9 | HookMissing, 10 | UnsupportedOperation, 11 | default_subprocess_runner, 12 | quiet_subprocess_runner, 13 | ) 14 | 15 | __version__ = "1.2.0" 16 | __all__ = [ 17 | "BackendUnavailable", 18 | "BackendInvalid", 19 | "HookMissing", 20 | "UnsupportedOperation", 21 | "default_subprocess_runner", 22 | "quiet_subprocess_runner", 23 | "BuildBackendHookCaller", 24 | ] 25 | 26 | BackendInvalid = BackendUnavailable # Deprecated alias, previously a separate exception 27 | 28 | if TYPE_CHECKING: 29 | from ._impl import SubprocessRunner 30 | 31 | __all__ += ["SubprocessRunner"] 32 | -------------------------------------------------------------------------------- /pipenv/patched/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 | 16 | else: 17 | 18 | def _in_proc_script_path(): 19 | return resources.as_file( 20 | resources.files(__package__).joinpath("_in_process.py") 21 | ) 22 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/pyproject_hooks/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/pyproject_hooks/py.typed -------------------------------------------------------------------------------- /pipenv/patched/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.32.3" 9 | __build__ = 0x023203 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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | from pipenv.patched.pip._vendor.certifi import where 15 | 16 | if __name__ == "__main__": 17 | print(where()) 18 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/requests/packages.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from .compat import chardet 4 | 5 | # This code exists for backwards compatibility reasons. 6 | # I don't like it either. Just look the other way. :) 7 | 8 | for package in ("urllib3", "idna"): 9 | vendored_package = "pipenv.patched.pip._vendor." + package 10 | locals()[package] = __import__(vendored_package) 11 | # This traversal is apparently necessary such that the identities are 12 | # preserved (requests.packages.urllib3.* is urllib3.*) 13 | for mod in list(sys.modules): 14 | if mod == vendored_package or mod.startswith(vendored_package + '.'): 15 | unprefixed_mod = mod[len("pipenv.patched.pip._vendor."):] 16 | sys.modules['pipenv.patched.pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] 17 | 18 | if chardet is not None: 19 | target = chardet.__name__ 20 | for mod in list(sys.modules): 21 | if mod == target or mod.startswith(f"{target}."): 22 | imported_mod = sys.modules[mod] 23 | sys.modules[f"requests.packages.{mod}"] = imported_mod 24 | mod = mod.replace(target, "chardet") 25 | sys.modules[f"requests.packages.{mod}"] = imported_mod 26 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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.1.0" 15 | 16 | 17 | from .providers import AbstractProvider 18 | from .reporters import BaseReporter 19 | from .resolvers import ( 20 | AbstractResolver, 21 | InconsistentCandidate, 22 | RequirementsConflicted, 23 | ResolutionError, 24 | ResolutionImpossible, 25 | ResolutionTooDeep, 26 | Resolver, 27 | ) 28 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/resolvelib/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/resolvelib/py.typed -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/resolvelib/resolvers/__init__.py: -------------------------------------------------------------------------------- 1 | from ..structs import RequirementInformation 2 | from .abstract import AbstractResolver, Result 3 | from .criterion import Criterion 4 | from .exceptions import ( 5 | InconsistentCandidate, 6 | RequirementsConflicted, 7 | ResolutionError, 8 | ResolutionImpossible, 9 | ResolutionTooDeep, 10 | ResolverException, 11 | ) 12 | from .resolution import Resolution, Resolver 13 | 14 | __all__ = [ 15 | "AbstractResolver", 16 | "InconsistentCandidate", 17 | "Resolver", 18 | "Resolution", 19 | "RequirementsConflicted", 20 | "ResolutionError", 21 | "ResolutionImpossible", 22 | "ResolutionTooDeep", 23 | "RequirementInformation", 24 | "ResolverException", 25 | "Result", 26 | "Criterion", 27 | ] 28 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 pipenv.patched.pip._vendor.rich.pretty import install 7 | from pipenv.patched.pip._vendor.rich.traceback import install as tr_install 8 | 9 | install() 10 | tr_install() 11 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/rich/_loop.py: -------------------------------------------------------------------------------- 1 | from typing import Iterable, Tuple, TypeVar 2 | 3 | T = TypeVar("T") 4 | 5 | 6 | def loop_first(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: 7 | """Iterate and generate a tuple with a flag for first value.""" 8 | iter_values = iter(values) 9 | try: 10 | value = next(iter_values) 11 | except StopIteration: 12 | return 13 | yield True, value 14 | for value in iter_values: 15 | yield False, value 16 | 17 | 18 | def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: 19 | """Iterate and generate a tuple with a flag for last value.""" 20 | iter_values = iter(values) 21 | try: 22 | previous_value = next(iter_values) 23 | except StopIteration: 24 | return 25 | for value in iter_values: 26 | yield False, previous_value 27 | previous_value = value 28 | yield True, previous_value 29 | 30 | 31 | def loop_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]: 32 | """Iterate and generate a tuple with a flag for first and last value.""" 33 | iter_values = iter(values) 34 | try: 35 | previous_value = next(iter_values) 36 | except StopIteration: 37 | return 38 | first = True 39 | for value in iter_values: 40 | yield first, False, previous_value 41 | first = False 42 | previous_value = value 43 | yield first, True, previous_value 44 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 pipenv.patched.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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/rich/constrain.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, TYPE_CHECKING 2 | 3 | from .jupyter import JupyterMixin 4 | from .measure import Measurement 5 | 6 | if TYPE_CHECKING: 7 | from .console import Console, ConsoleOptions, RenderableType, RenderResult 8 | 9 | 10 | class Constrain(JupyterMixin): 11 | """Constrain the width of a renderable to a given number of characters. 12 | 13 | Args: 14 | renderable (RenderableType): A renderable object. 15 | width (int, optional): The maximum width (in characters) to render. Defaults to 80. 16 | """ 17 | 18 | def __init__(self, renderable: "RenderableType", width: Optional[int] = 80) -> None: 19 | self.renderable = renderable 20 | self.width = width 21 | 22 | def __rich_console__( 23 | self, console: "Console", options: "ConsoleOptions" 24 | ) -> "RenderResult": 25 | if self.width is None: 26 | yield self.renderable 27 | else: 28 | child_options = options.update_width(min(self.width, options.max_width)) 29 | yield from console.render(self.renderable, child_options) 30 | 31 | def __rich_measure__( 32 | self, console: "Console", options: "ConsoleOptions" 33 | ) -> "Measurement": 34 | if self.width is not None: 35 | options = options.update_width(self.width) 36 | measurement = Measurement.get(console, options, self.renderable) 37 | return measurement 38 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/rich/diagnose.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | from pipenv.patched.pip._vendor.rich import inspect 5 | from pipenv.patched.pip._vendor.rich.console import Console, get_windows_console_features 6 | from pipenv.patched.pip._vendor.rich.panel import Panel 7 | from pipenv.patched.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 | "CLICOLOR", 19 | "COLORTERM", 20 | "COLUMNS", 21 | "JPY_PARENT_PID", 22 | "JUPYTER_COLUMNS", 23 | "JUPYTER_LINES", 24 | "LINES", 25 | "NO_COLOR", 26 | "TERM_PROGRAM", 27 | "TERM", 28 | "TTY_COMPATIBLE", 29 | "VSCODE_VERBOSE_LOGGING", 30 | ) 31 | env = {name: os.getenv(name) for name in env_names} 32 | console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables")) 33 | 34 | console.print(f'platform="{platform.system()}"') 35 | 36 | 37 | if __name__ == "__main__": # pragma: no cover 38 | report() 39 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/rich/protocol.py: -------------------------------------------------------------------------------- 1 | from typing import Any, cast, Set, TYPE_CHECKING 2 | from inspect import isclass 3 | 4 | if TYPE_CHECKING: 5 | from pipenv.patched.pip._vendor.rich.console import RenderableType 6 | 7 | _GIBBERISH = """aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf""" 8 | 9 | 10 | def is_renderable(check_object: Any) -> bool: 11 | """Check if an object may be rendered by Rich.""" 12 | return ( 13 | isinstance(check_object, str) 14 | or hasattr(check_object, "__rich__") 15 | or hasattr(check_object, "__rich_console__") 16 | ) 17 | 18 | 19 | def rich_cast(renderable: object) -> "RenderableType": 20 | """Cast an object to a renderable by calling __rich__ if present. 21 | 22 | Args: 23 | renderable (object): A potentially renderable object 24 | 25 | Returns: 26 | object: The result of recursively calling __rich__. 27 | """ 28 | from pipenv.patched.pip._vendor.rich.console import RenderableType 29 | 30 | rich_visited_set: Set[type] = set() # Prevent potential infinite loop 31 | while hasattr(renderable, "__rich__") and not isclass(renderable): 32 | # Detect object which claim to have all the attributes 33 | if hasattr(renderable, _GIBBERISH): 34 | return repr(renderable) 35 | cast_method = getattr(renderable, "__rich__") 36 | renderable = cast_method() 37 | renderable_type = type(renderable) 38 | if renderable_type in rich_visited_set: 39 | break 40 | rich_visited_set.add(renderable_type) 41 | 42 | return cast(RenderableType, renderable) 43 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/rich/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/rich/py.typed -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/rich/styled.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING 2 | 3 | from .measure import Measurement 4 | from .segment import Segment 5 | from .style import StyleType 6 | 7 | if TYPE_CHECKING: 8 | from .console import Console, ConsoleOptions, RenderResult, RenderableType 9 | 10 | 11 | class Styled: 12 | """Apply a style to a renderable. 13 | 14 | Args: 15 | renderable (RenderableType): Any renderable. 16 | style (StyleType): A style to apply across the entire renderable. 17 | """ 18 | 19 | def __init__(self, renderable: "RenderableType", style: "StyleType") -> None: 20 | self.renderable = renderable 21 | self.style = style 22 | 23 | def __rich_console__( 24 | self, console: "Console", options: "ConsoleOptions" 25 | ) -> "RenderResult": 26 | style = console.get_style(self.style) 27 | rendered_segments = console.render(self.renderable, options) 28 | segments = Segment.apply_style(rendered_segments, style) 29 | return segments 30 | 31 | def __rich_measure__( 32 | self, console: "Console", options: "ConsoleOptions" 33 | ) -> Measurement: 34 | return Measurement.get(console, options, self.renderable) 35 | 36 | 37 | if __name__ == "__main__": # pragma: no cover 38 | from pipenv.patched.pip._vendor.rich import print 39 | from pipenv.patched.pip._vendor.rich.panel import Panel 40 | 41 | panel = Styled(Panel("hello"), "on blue") 42 | print(panel) 43 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/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.2.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT 7 | 8 | from ._parser import TOMLDecodeError, load, loads 9 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/tomli/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/tomli_w/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/tomli_w/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ("dumps", "dump") 2 | __version__ = "1.2.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT 3 | 4 | from pipenv.patched.pip._vendor.tomli_w._writer import dump, dumps 5 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/tomli_w/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561 2 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/truststore/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 Seth Michael Larson 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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/truststore/__init__.py: -------------------------------------------------------------------------------- 1 | """Verify certificates using native system trust stores""" 2 | 3 | import sys as _sys 4 | 5 | if _sys.version_info < (3, 10): 6 | raise ImportError("truststore requires Python 3.10 or later") 7 | 8 | # Detect Python runtimes which don't implement SSLObject.get_unverified_chain() API 9 | # This API only became public in Python 3.13 but was available in CPython and PyPy since 3.10. 10 | if _sys.version_info < (3, 13) and _sys.implementation.name not in ("cpython", "pypy"): 11 | try: 12 | import ssl as _ssl 13 | except ImportError: 14 | raise ImportError("truststore requires the 'ssl' module") 15 | else: 16 | _sslmem = _ssl.MemoryBIO() 17 | _sslobj = _ssl.create_default_context().wrap_bio( 18 | _sslmem, 19 | _sslmem, 20 | ) 21 | try: 22 | while not hasattr(_sslobj, "get_unverified_chain"): 23 | _sslobj = _sslobj._sslobj # type: ignore[attr-defined] 24 | except AttributeError: 25 | raise ImportError( 26 | "truststore requires peer certificate chain APIs to be available" 27 | ) from None 28 | 29 | del _ssl, _sslobj, _sslmem # noqa: F821 30 | 31 | from ._api import SSLContext, extract_from_ssl, inject_into_ssl # noqa: E402 32 | 33 | del _api, _sys # type: ignore[name-defined] # noqa: F821 34 | 35 | __all__ = ["SSLContext", "inject_into_ssl", "extract_from_ssl"] 36 | __version__ = "0.10.1" 37 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/truststore/_ssl_constants.py: -------------------------------------------------------------------------------- 1 | import ssl 2 | import sys 3 | import typing 4 | 5 | # Hold on to the original class so we can create it consistently 6 | # even if we inject our own SSLContext into the ssl module. 7 | _original_SSLContext = ssl.SSLContext 8 | _original_super_SSLContext = super(_original_SSLContext, _original_SSLContext) 9 | 10 | # CPython is known to be good, but non-CPython implementations 11 | # may implement SSLContext differently so to be safe we don't 12 | # subclass the SSLContext. 13 | 14 | # This is returned by truststore.SSLContext.__class__() 15 | _truststore_SSLContext_dunder_class: typing.Optional[type] 16 | 17 | # This value is the superclass of truststore.SSLContext. 18 | _truststore_SSLContext_super_class: type 19 | 20 | if sys.implementation.name == "cpython": 21 | _truststore_SSLContext_super_class = _original_SSLContext 22 | _truststore_SSLContext_dunder_class = None 23 | else: 24 | _truststore_SSLContext_super_class = object 25 | _truststore_SSLContext_dunder_class = _original_SSLContext 26 | 27 | 28 | def _set_ssl_context_verify_mode( 29 | ssl_context: ssl.SSLContext, verify_mode: ssl.VerifyMode 30 | ) -> None: 31 | _original_super_SSLContext.verify_mode.__set__(ssl_context, verify_mode) # type: ignore[attr-defined] 32 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/truststore/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/truststore/py.typed -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/_version.py: -------------------------------------------------------------------------------- 1 | # This file is protected via CODEOWNERS 2 | __version__ = "1.26.20" 3 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/contrib/_securetransport/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/urllib3/contrib/_securetransport/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/urllib3/packages/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/packages/backports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/patched/pip/_vendor/urllib3/packages/backports/__init__.py -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/packages/backports/makefile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | backports.makefile 4 | ~~~~~~~~~~~~~~~~~~ 5 | 6 | Backports the Python 3 ``socket.makefile`` method for use with anything that 7 | wants to create a "fake" socket object. 8 | """ 9 | import io 10 | from socket import SocketIO 11 | 12 | 13 | def backport_makefile( 14 | self, mode="r", buffering=None, encoding=None, errors=None, newline=None 15 | ): 16 | """ 17 | Backport of ``socket.makefile`` from Python 3.5. 18 | """ 19 | if not set(mode) <= {"r", "w", "b"}: 20 | raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,)) 21 | writing = "w" in mode 22 | reading = "r" in mode or not writing 23 | assert reading or writing 24 | binary = "b" in mode 25 | rawmode = "" 26 | if reading: 27 | rawmode += "r" 28 | if writing: 29 | rawmode += "w" 30 | raw = SocketIO(self, rawmode) 31 | self._makefile_refs += 1 32 | if buffering is None: 33 | buffering = -1 34 | if buffering < 0: 35 | buffering = io.DEFAULT_BUFFER_SIZE 36 | if buffering == 0: 37 | if not binary: 38 | raise ValueError("unbuffered streams must be binary") 39 | return raw 40 | if reading and writing: 41 | buffer = io.BufferedRWPair(raw, raw, buffering) 42 | elif reading: 43 | buffer = io.BufferedReader(raw, buffering) 44 | else: 45 | assert writing 46 | buffer = io.BufferedWriter(raw, buffering) 47 | if binary: 48 | return buffer 49 | text = io.TextIOWrapper(buffer, encoding, errors, newline) 50 | text.mode = mode 51 | return text 52 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # For backwards compatibility, provide imports that used to be here. 4 | from .connection import is_connection_dropped 5 | from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers 6 | from .response import is_fp_closed 7 | from .retry import Retry 8 | from .ssl_ import ( 9 | ALPN_PROTOCOLS, 10 | HAS_SNI, 11 | IS_PYOPENSSL, 12 | IS_SECURETRANSPORT, 13 | PROTOCOL_TLS, 14 | SSLContext, 15 | assert_fingerprint, 16 | resolve_cert_reqs, 17 | resolve_ssl_version, 18 | ssl_wrap_socket, 19 | ) 20 | from .timeout import Timeout, current_time 21 | from .url import Url, get_host, parse_url, split_first 22 | from .wait import wait_for_read, wait_for_write 23 | 24 | __all__ = ( 25 | "HAS_SNI", 26 | "IS_PYOPENSSL", 27 | "IS_SECURETRANSPORT", 28 | "SSLContext", 29 | "PROTOCOL_TLS", 30 | "ALPN_PROTOCOLS", 31 | "Retry", 32 | "Timeout", 33 | "Url", 34 | "assert_fingerprint", 35 | "current_time", 36 | "is_connection_dropped", 37 | "is_fp_closed", 38 | "get_host", 39 | "parse_url", 40 | "make_headers", 41 | "resolve_cert_reqs", 42 | "resolve_ssl_version", 43 | "split_first", 44 | "ssl_wrap_socket", 45 | "wait_for_read", 46 | "wait_for_write", 47 | "SKIP_HEADER", 48 | "SKIPPABLE_HEADERS", 49 | ) 50 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/patched/pip/_vendor/vendor.txt: -------------------------------------------------------------------------------- 1 | CacheControl==0.14.2 2 | distlib==0.3.9 3 | distro==1.9.0 4 | msgpack==1.1.0 5 | packaging==25.0 6 | platformdirs==4.3.7 7 | pyproject-hooks==1.2.0 8 | requests==2.32.3 9 | certifi==2025.1.31 10 | idna==3.10 11 | urllib3==1.26.20 12 | rich==14.0.0 13 | pygments==2.19.1 14 | typing_extensions==4.13.2 15 | resolvelib==1.1.0 16 | setuptools==70.3.0 17 | tomli==2.2.1 18 | tomli-w==1.2.0 19 | truststore==0.10.1 20 | dependency-groups==1.3.1 21 | -------------------------------------------------------------------------------- /pipenv/patched/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 | -------------------------------------------------------------------------------- /pipenv/pep508checker.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import platform 4 | import sys 5 | 6 | 7 | def format_full_version(info): 8 | version = f"{info.major}.{info.minor}.{info.micro}" 9 | kind = info.releaselevel 10 | if kind != "final": 11 | version += kind[0] + str(info.serial) 12 | return version 13 | 14 | 15 | # Support for 508's implementation_version. 16 | if hasattr(sys, "implementation"): 17 | implementation_version = format_full_version(sys.implementation.version) 18 | else: 19 | implementation_version = "0" 20 | # Default to cpython for 2.7. 21 | if hasattr(sys, "implementation"): 22 | implementation_name = sys.implementation.name 23 | else: 24 | implementation_name = "cpython" 25 | lookup = { 26 | "os_name": os.name, 27 | "sys_platform": sys.platform, 28 | "platform_machine": platform.machine(), 29 | "platform_python_implementation": platform.python_implementation(), 30 | "platform_release": platform.release(), 31 | "platform_system": platform.system(), 32 | "platform_version": platform.version(), 33 | "python_version": ".".join(platform.python_version().split(".")[:2]), 34 | "python_full_version": platform.python_version(), 35 | "implementation_name": implementation_name, 36 | "implementation_version": implementation_version, 37 | } 38 | if __name__ == "__main__": 39 | print(json.dumps(lookup)) 40 | -------------------------------------------------------------------------------- /pipenv/routines/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/routines/__init__.py -------------------------------------------------------------------------------- /pipenv/routines/clear.py: -------------------------------------------------------------------------------- 1 | import shutil 2 | 3 | from pipenv import environments 4 | from pipenv.utils import console 5 | from pipenv.utils.funktools import handle_remove_readonly 6 | 7 | 8 | def do_clear(project): 9 | from pipenv.patched.pip._internal import locations 10 | 11 | console.print("Clearing caches...", style="bold") 12 | try: 13 | shutil.rmtree(project.s.PIPENV_CACHE_DIR, onerror=handle_remove_readonly) 14 | # Other processes may be writing into this directory simultaneously. 15 | shutil.rmtree( 16 | locations.USER_CACHE_DIR, 17 | ignore_errors=environments.PIPENV_IS_CI, 18 | onerror=handle_remove_readonly, 19 | ) 20 | except OSError as e: 21 | # Ignore FileNotFoundError. This is needed for Python 2.7. 22 | import errno 23 | 24 | if e.errno == errno.ENOENT: 25 | pass 26 | raise 27 | -------------------------------------------------------------------------------- /pipenv/utils/__init__.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from pipenv.patched.pip._vendor.rich.console import Console 4 | from pipenv.patched.pip._vendor.rich.prompt import Confirm # noqa 5 | 6 | logging.basicConfig(level=logging.INFO) 7 | console = Console(highlight=False) 8 | err = Console(stderr=True) 9 | -------------------------------------------------------------------------------- /pipenv/utils/constants.py: -------------------------------------------------------------------------------- 1 | # List of version control systems we support. 2 | VCS_LIST = ("git", "svn", "hg", "bzr") 3 | SCHEME_LIST = ("http://", "https://", "ftp://", "ftps://", "file://") 4 | FALSE_VALUES = ("0", "false", "no", "off") 5 | TRUE_VALUES = ("1", "true", "yes", "on") 6 | REMOTE_FILE_SCHEMES = [ 7 | "http", 8 | "https", 9 | "ftp", 10 | ] 11 | VCS_SCHEMES = [ 12 | "git+http", 13 | "git+https", 14 | "git+ssh", 15 | "git+git", 16 | "hg+http", 17 | "hg+https", 18 | "hg+ssh", 19 | "svn+http", 20 | "svn+https", 21 | "svn+svn", 22 | "bzr+http", 23 | "bzr+https", 24 | "bzr+ssh", 25 | "bzr+sftp", 26 | "bzr+ftp", 27 | "bzr+lp", 28 | ] 29 | REMOTE_SCHEMES = REMOTE_FILE_SCHEMES + VCS_SCHEMES 30 | 31 | RELEVANT_PROJECT_FILES = ( 32 | "METADATA", 33 | "PKG-INFO", 34 | "setup.py", 35 | "setup.cfg", 36 | "pyproject.toml", 37 | ) 38 | 39 | INSTALLABLE_EXTENSIONS = (".whl", ".zip", ".tar", ".tar.gz", ".tgz") 40 | 41 | 42 | def is_type_checking(): 43 | try: 44 | from typing import TYPE_CHECKING 45 | except ImportError: 46 | return False 47 | return TYPE_CHECKING 48 | 49 | 50 | MYPY_RUNNING = is_type_checking() 51 | -------------------------------------------------------------------------------- /pipenv/vendor/Makefile: -------------------------------------------------------------------------------- 1 | # Taken from pip: https://github.com/pypa/pip/blob/95bcf8c5f6394298035a7332c441868f3b0169f4/src/pip/_vendor/Makefile 2 | all: clean vendor 3 | 4 | clean: 5 | @# Delete vendored items 6 | find . -maxdepth 1 -mindepth 1 -type d -exec rm -rf {} \; 7 | 8 | vendor: 9 | @# Install vendored libraries 10 | pip install -t . -r vendor.txt 11 | 12 | @# Cleanup .egg-info directories 13 | rm -rf *.egg-info 14 | rm -rf *.dist-info 15 | -------------------------------------------------------------------------------- /pipenv/vendor/README.md: -------------------------------------------------------------------------------- 1 | # Vendored packages 2 | 3 | These packages are copied as-is from upstream to reduce Pipenv dependencies. 4 | They should always be kept synced with upstream. DO NOT MODIFY DIRECTLY! If 5 | you need to patch anything, move the package to `patched` and generate a 6 | patch for it using `git diff -p `. This patch belongs 7 | in `./pipenv/tasks/vendoring/patches/patched/.patch`. 8 | 9 | To add a vendored dependency or to update a single dependency, add the package 10 | name and version to `pipenv/vendor/vendor.txt`, for example: 11 | 12 | ``` 13 | appdirs==1.4.4 14 | ``` 15 | 16 | And the run the vendoring script: 17 | 18 | ``` 19 | python -m invoke vendoring.update 20 | ``` 21 | 22 | This will automatically download or pin if the package is already present, 23 | and it will also download any necessary licenses (if available). 24 | Note that this will not download any dependencies, you must add those each 25 | individually. 26 | 27 | When updating, ensure that the corresponding LICENSE files are still 28 | up-to-date. 29 | -------------------------------------------------------------------------------- /pipenv/vendor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/__init__.py -------------------------------------------------------------------------------- /pipenv/vendor/click/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright 2014 Pallets 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /pipenv/vendor/click/_textwrap.py: -------------------------------------------------------------------------------- 1 | import textwrap 2 | import typing as t 3 | from contextlib import contextmanager 4 | 5 | 6 | class TextWrapper(textwrap.TextWrapper): 7 | def _handle_long_word( 8 | self, 9 | reversed_chunks: t.List[str], 10 | cur_line: t.List[str], 11 | cur_len: int, 12 | width: int, 13 | ) -> None: 14 | space_left = max(width - cur_len, 1) 15 | 16 | if self.break_long_words: 17 | last = reversed_chunks[-1] 18 | cut = last[:space_left] 19 | res = last[space_left:] 20 | cur_line.append(cut) 21 | reversed_chunks[-1] = res 22 | elif not cur_line: 23 | cur_line.append(reversed_chunks.pop()) 24 | 25 | @contextmanager 26 | def extra_indent(self, indent: str) -> t.Iterator[None]: 27 | old_initial_indent = self.initial_indent 28 | old_subsequent_indent = self.subsequent_indent 29 | self.initial_indent += indent 30 | self.subsequent_indent += indent 31 | 32 | try: 33 | yield 34 | finally: 35 | self.initial_indent = old_initial_indent 36 | self.subsequent_indent = old_subsequent_indent 37 | 38 | def indent_only(self, text: str) -> str: 39 | rv = [] 40 | 41 | for idx, line in enumerate(text.splitlines()): 42 | indent = self.initial_indent 43 | 44 | if idx > 0: 45 | indent = self.subsequent_indent 46 | 47 | rv.append(f"{indent}{line}") 48 | 49 | return "\n".join(rv) 50 | -------------------------------------------------------------------------------- /pipenv/vendor/click/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/click/py.typed -------------------------------------------------------------------------------- /pipenv/vendor/click_didyoumean/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Timo Furrer 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 11 | all 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 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /pipenv/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 | -------------------------------------------------------------------------------- /pipenv/vendor/dotenv/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Saurabh Kumar (python-dotenv), 2013, Ted Tieken (django-dotenv-rw), 2013, Jacob Kaplan-Moss (django-dotenv) 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | - Neither the name of django-dotenv nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /pipenv/vendor/dotenv/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Optional 2 | 3 | from .main import (dotenv_values, find_dotenv, get_key, load_dotenv, set_key, 4 | unset_key) 5 | 6 | 7 | def load_ipython_extension(ipython: Any) -> None: 8 | from .ipython import load_ipython_extension 9 | load_ipython_extension(ipython) 10 | 11 | 12 | def get_cli_string( 13 | path: Optional[str] = None, 14 | action: Optional[str] = None, 15 | key: Optional[str] = None, 16 | value: Optional[str] = None, 17 | quote: Optional[str] = None, 18 | ): 19 | """Returns a string suitable for running as a shell script. 20 | 21 | Useful for converting a arguments passed to a fabric task 22 | to be passed to a `local` or `run` command. 23 | """ 24 | command = ['dotenv'] 25 | if quote: 26 | command.append(f'-q {quote}') 27 | if path: 28 | command.append(f'-f {path}') 29 | if action: 30 | command.append(action) 31 | if key: 32 | command.append(key) 33 | if value: 34 | if ' ' in value: 35 | command.append(f'"{value}"') 36 | else: 37 | command.append(value) 38 | 39 | return ' '.join(command).strip() 40 | 41 | 42 | __all__ = ['get_cli_string', 43 | 'load_dotenv', 44 | 'dotenv_values', 45 | 'get_key', 46 | 'set_key', 47 | 'unset_key', 48 | 'find_dotenv', 49 | 'load_ipython_extension'] 50 | -------------------------------------------------------------------------------- /pipenv/vendor/dotenv/ipython.py: -------------------------------------------------------------------------------- 1 | from IPython.core.magic import Magics, line_magic, magics_class # type: ignore 2 | from IPython.core.magic_arguments import (argument, magic_arguments, # type: ignore 3 | parse_argstring) # type: ignore 4 | 5 | from .main import find_dotenv, load_dotenv 6 | 7 | 8 | @magics_class 9 | class IPythonDotEnv(Magics): 10 | 11 | @magic_arguments() 12 | @argument( 13 | '-o', '--override', action='store_true', 14 | help="Indicate to override existing variables" 15 | ) 16 | @argument( 17 | '-v', '--verbose', action='store_true', 18 | help="Indicate function calls to be verbose" 19 | ) 20 | @argument('dotenv_path', nargs='?', type=str, default='.env', 21 | help='Search in increasingly higher folders for the `dotenv_path`') 22 | @line_magic 23 | def dotenv(self, line): 24 | args = parse_argstring(self.dotenv, line) 25 | # Locate the .env file 26 | dotenv_path = args.dotenv_path 27 | try: 28 | dotenv_path = find_dotenv(dotenv_path, True, True) 29 | except IOError: 30 | print("cannot find .env file") 31 | return 32 | 33 | # Load the .env file 34 | load_dotenv(dotenv_path, verbose=args.verbose, override=args.override) 35 | 36 | 37 | def load_ipython_extension(ipython): 38 | """Register the %dotenv magic.""" 39 | ipython.register_magics(IPythonDotEnv) 40 | -------------------------------------------------------------------------------- /pipenv/vendor/dotenv/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561 2 | -------------------------------------------------------------------------------- /pipenv/vendor/dotenv/version.py: -------------------------------------------------------------------------------- 1 | __version__ = "1.0.1" 2 | -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/_collections.py: -------------------------------------------------------------------------------- 1 | import collections 2 | 3 | 4 | # from jaraco.collections 3.3 5 | class FreezableDefaultDict(collections.defaultdict): 6 | """ 7 | Often it is desirable to prevent the mutation of 8 | a default dict after its initial construction, such 9 | as to prevent mutation during iteration. 10 | 11 | >>> dd = FreezableDefaultDict(list) 12 | >>> dd[0].append('1') 13 | >>> dd.freeze() 14 | >>> dd[1] 15 | [] 16 | >>> len(dd) 17 | 1 18 | """ 19 | 20 | def __missing__(self, key): 21 | return getattr(self, '_frozen', super().__missing__)(key) 22 | 23 | def freeze(self): 24 | self._frozen = lambda key: self.default_factory() 25 | 26 | 27 | class Pair(collections.namedtuple('Pair', 'name value')): 28 | @classmethod 29 | def parse(cls, text): 30 | return cls(*map(str.strip, text.split("=", 1))) 31 | -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/_compat.py: -------------------------------------------------------------------------------- 1 | import platform 2 | import sys 3 | 4 | __all__ = ['install', 'NullFinder'] 5 | 6 | 7 | def install(cls): 8 | """ 9 | Class decorator for installation on sys.meta_path. 10 | 11 | Adds the backport DistributionFinder to sys.meta_path and 12 | attempts to disable the finder functionality of the stdlib 13 | DistributionFinder. 14 | """ 15 | sys.meta_path.append(cls()) 16 | disable_stdlib_finder() 17 | return cls 18 | 19 | 20 | def disable_stdlib_finder(): 21 | """ 22 | Give the backport primacy for discovering path-based distributions 23 | by monkey-patching the stdlib O_O. 24 | 25 | See #91 for more background for rationale on this sketchy 26 | behavior. 27 | """ 28 | 29 | def matches(finder): 30 | return getattr( 31 | finder, '__module__', None 32 | ) == '_frozen_importlib_external' and hasattr(finder, 'find_distributions') 33 | 34 | for finder in filter(matches, sys.meta_path): # pragma: nocover 35 | del finder.find_distributions 36 | 37 | 38 | class NullFinder: 39 | """ 40 | A "Finder" (aka "MetaPathFinder") that never finds any modules, 41 | but may find distributions. 42 | """ 43 | 44 | @staticmethod 45 | def find_spec(*args, **kwargs): 46 | return None 47 | 48 | 49 | def pypy_partial(val): 50 | """ 51 | Adjust for variable stacklevel on partial under PyPy. 52 | 53 | Workaround for #327. 54 | """ 55 | is_pypy = platform.python_implementation() == 'PyPy' 56 | return val + is_pypy 57 | -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/compat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/importlib_metadata/compat/__init__.py -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/compat/py311.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pathlib 3 | import sys 4 | import types 5 | 6 | 7 | def wrap(path): # pragma: no cover 8 | """ 9 | Workaround for https://github.com/python/cpython/issues/84538 10 | to add backward compatibility for walk_up=True. 11 | An example affected package is dask-labextension, which uses 12 | jupyter-packaging to install JupyterLab javascript files outside 13 | of site-packages. 14 | """ 15 | 16 | def relative_to(root, *, walk_up=False): 17 | return pathlib.Path(os.path.relpath(path, root)) 18 | 19 | return types.SimpleNamespace(relative_to=relative_to) 20 | 21 | 22 | relative_fix = wrap if sys.version_info < (3, 12) else lambda x: x 23 | -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/compat/py39.py: -------------------------------------------------------------------------------- 1 | """ 2 | Compatibility layer with Python 3.8/3.9 3 | """ 4 | 5 | from typing import TYPE_CHECKING, Any, Optional 6 | 7 | if TYPE_CHECKING: # pragma: no cover 8 | # Prevent circular imports on runtime. 9 | from .. import Distribution, EntryPoint 10 | else: 11 | Distribution = EntryPoint = Any 12 | 13 | 14 | def normalized_name(dist: Distribution) -> Optional[str]: 15 | """ 16 | Honor name normalization for distributions that don't provide ``_normalized_name``. 17 | """ 18 | try: 19 | return dist._normalized_name 20 | except AttributeError: 21 | from .. import Prepared # -> delay to prevent circular imports. 22 | 23 | return Prepared.normalize(getattr(dist, "name", None) or dist.metadata['Name']) 24 | 25 | 26 | def ep_matches(ep: EntryPoint, **params) -> bool: 27 | """ 28 | Workaround for ``EntryPoint`` objects without the ``matches`` method. 29 | """ 30 | try: 31 | return ep.matches(**params) 32 | except AttributeError: 33 | from .. import EntryPoint # -> delay to prevent circular imports. 34 | 35 | # Reconstruct the EntryPoint object to make sure it is compatible. 36 | return EntryPoint(ep.name, ep.value, ep.group).matches(**params) 37 | -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/diagnose.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from . import Distribution 4 | 5 | 6 | def inspect(path): 7 | print("Inspecting", path) 8 | dists = list(Distribution.discover(path=[path])) 9 | if not dists: 10 | return 11 | print("Found", len(dists), "packages:", end=' ') 12 | print(', '.join(dist.name for dist in dists)) 13 | 14 | 15 | def run(): 16 | for path in sys.path: 17 | inspect(path) 18 | 19 | 20 | if __name__ == '__main__': 21 | run() 22 | -------------------------------------------------------------------------------- /pipenv/vendor/importlib_metadata/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/importlib_metadata/py.typed -------------------------------------------------------------------------------- /pipenv/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 | -------------------------------------------------------------------------------- /pipenv/vendor/packaging/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Copyright (c) Donald Stufft and individual contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /pipenv/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 | __title__ = "packaging" 6 | __summary__ = "Core utilities for Python packages" 7 | __uri__ = "https://github.com/pypa/packaging" 8 | 9 | __version__ = "24.1" 10 | 11 | __author__ = "Donald Stufft and individual contributors" 12 | __email__ = "donald@stufft.io" 13 | 14 | __license__ = "BSD-2-Clause or Apache-2.0" 15 | __copyright__ = "2014 %s" % __author__ 16 | -------------------------------------------------------------------------------- /pipenv/vendor/packaging/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/packaging/py.typed -------------------------------------------------------------------------------- /pipenv/vendor/pexpect/LICENSE: -------------------------------------------------------------------------------- 1 | ISC LICENSE 2 | 3 | This license is approved by the OSI and FSF as GPL-compatible. 4 | http://opensource.org/licenses/isc-license.txt 5 | 6 | Copyright (c) 2013-2014, Pexpect development team 7 | Copyright (c) 2012, Noah Spurrier 8 | 9 | Permission to use, copy, modify, and/or distribute this software for any 10 | purpose with or without fee is hereby granted, provided that the above 11 | copyright notice and this permission notice appear in all copies. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 14 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 16 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 19 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /pipenv/vendor/pexpect/_async.py: -------------------------------------------------------------------------------- 1 | """Facade that provides coroutines implementation pertinent to running Py version. 2 | 3 | Python 3.5 introduced the async def/await syntax keyword. 4 | With later versions coroutines and methods to get the running asyncio loop are 5 | being deprecated, not supported anymore. 6 | 7 | For Python versions later than 3.6, coroutines and objects that are defined via 8 | ``async def``/``await`` keywords are imported. 9 | 10 | Here the code is just imported, to provide the same interface to older code. 11 | """ 12 | # pylint: disable=unused-import 13 | # flake8: noqa: F401 14 | from sys import version_info as py_version_info 15 | 16 | # this assumes async def/await are more stable 17 | if py_version_info >= (3, 6): 18 | from pipenv.vendor.pexpect._async_w_await import ( 19 | PatternWaiter, 20 | expect_async, 21 | repl_run_command_async, 22 | ) 23 | else: 24 | from pipenv.vendor.pexpect._async_pre_await import ( 25 | PatternWaiter, 26 | expect_async, 27 | repl_run_command_async, 28 | ) 29 | -------------------------------------------------------------------------------- /pipenv/vendor/pexpect/bashrc.sh: -------------------------------------------------------------------------------- 1 | # Different platforms have different names for the systemwide bashrc 2 | if [[ -f /etc/bashrc ]]; then 3 | source /etc/bashrc 4 | fi 5 | if [[ -f /etc/bash.bashrc ]]; then 6 | source /etc/bash.bashrc 7 | fi 8 | if [[ -f ~/.bashrc ]]; then 9 | source ~/.bashrc 10 | fi 11 | 12 | # Reset PS1 so pexpect can find it 13 | PS1="$" 14 | 15 | # Unset PROMPT_COMMAND, so that it can't change PS1 to something unexpected. 16 | unset PROMPT_COMMAND 17 | 18 | bind 'set enable-bracketed-paste off' 19 | -------------------------------------------------------------------------------- /pipenv/vendor/pexpect/exceptions.py: -------------------------------------------------------------------------------- 1 | """Exception classes used by Pexpect""" 2 | 3 | import traceback 4 | import sys 5 | 6 | class ExceptionPexpect(Exception): 7 | '''Base class for all exceptions raised by this module. 8 | ''' 9 | 10 | def __init__(self, value): 11 | super(ExceptionPexpect, self).__init__(value) 12 | self.value = value 13 | 14 | def __str__(self): 15 | return str(self.value) 16 | 17 | def get_trace(self): 18 | '''This returns an abbreviated stack trace with lines that only concern 19 | the caller. In other words, the stack trace inside the Pexpect module 20 | is not included. ''' 21 | 22 | tblist = traceback.extract_tb(sys.exc_info()[2]) 23 | tblist = [item for item in tblist if ('pexpect/__init__' not in item[0]) 24 | and ('pexpect/expect' not in item[0])] 25 | tblist = traceback.format_list(tblist) 26 | return ''.join(tblist) 27 | 28 | 29 | class EOF(ExceptionPexpect): 30 | '''Raised when EOF is read from a child. 31 | This usually means the child has exited.''' 32 | 33 | 34 | class TIMEOUT(ExceptionPexpect): 35 | '''Raised when a read time exceeds the timeout. ''' 36 | -------------------------------------------------------------------------------- /pipenv/vendor/pipdeptree/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/pipdeptree/__init__.py -------------------------------------------------------------------------------- /pipenv/vendor/pipdeptree/_models/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from .dag import PackageDAG, ReversedPackageDAG 4 | from .package import DistPackage, ReqPackage 5 | 6 | __all__ = [ 7 | "DistPackage", 8 | "PackageDAG", 9 | "ReqPackage", 10 | "ReversedPackageDAG", 11 | ] 12 | -------------------------------------------------------------------------------- /pipenv/vendor/pipdeptree/_render/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import TYPE_CHECKING 4 | 5 | from .graphviz import render_graphviz 6 | from .json import render_json 7 | from .json_tree import render_json_tree 8 | from .mermaid import render_mermaid 9 | from .text import render_text 10 | 11 | if TYPE_CHECKING: 12 | from pipenv.vendor.pipdeptree._cli import Options 13 | from pipenv.vendor.pipdeptree._models import PackageDAG 14 | 15 | 16 | def render(options: Options, tree: PackageDAG) -> None: 17 | if options.json: 18 | print(render_json(tree)) # noqa: T201 19 | elif options.json_tree: 20 | print(render_json_tree(tree)) # noqa: T201 21 | elif options.mermaid: 22 | print(render_mermaid(tree)) # noqa: T201 23 | elif options.output_format: 24 | assert options.output_format is not None 25 | render_graphviz(tree, output_format=options.output_format, reverse=options.reverse) 26 | else: 27 | render_text( 28 | tree, 29 | max_depth=options.depth, 30 | encoding=options.encoding_type, 31 | list_all=options.all, 32 | frozen=options.freeze, 33 | include_license=options.license, 34 | ) 35 | 36 | 37 | __all__ = [ 38 | "render", 39 | ] 40 | -------------------------------------------------------------------------------- /pipenv/vendor/pipdeptree/_render/json.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import json 4 | from typing import TYPE_CHECKING 5 | 6 | if TYPE_CHECKING: 7 | from pipenv.vendor.pipdeptree._models import PackageDAG 8 | 9 | 10 | def render_json(tree: PackageDAG) -> str: 11 | """ 12 | Convert the tree into a flat json representation. 13 | 14 | The json repr will be a list of hashes, each hash having 2 fields: 15 | - package 16 | - dependencies: list of dependencies 17 | 18 | :param tree: dependency tree 19 | :returns: JSON representation of the tree 20 | 21 | """ 22 | tree = tree.sort() 23 | return json.dumps( 24 | [{"package": k.as_dict(), "dependencies": [v.as_dict() for v in vs]} for k, vs in tree.items()], 25 | indent=4, 26 | ) 27 | 28 | 29 | __all__ = [ 30 | "render_json", 31 | ] 32 | -------------------------------------------------------------------------------- /pipenv/vendor/pipdeptree/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/pipdeptree/py.typed -------------------------------------------------------------------------------- /pipenv/vendor/pipdeptree/version.py: -------------------------------------------------------------------------------- 1 | # file generated by setuptools_scm 2 | # don't change, don't track in version control 3 | TYPE_CHECKING = False 4 | if TYPE_CHECKING: 5 | from typing import Tuple, Union 6 | VERSION_TUPLE = Tuple[Union[int, str], ...] 7 | else: 8 | VERSION_TUPLE = object 9 | 10 | version: str 11 | __version__: str 12 | __version_tuple__: VERSION_TUPLE 13 | version_tuple: VERSION_TUPLE 14 | 15 | __version__ = version = '2.23.4' 16 | __version_tuple__ = version_tuple = (2, 23, 4) 17 | -------------------------------------------------------------------------------- /pipenv/vendor/plette/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 | -------------------------------------------------------------------------------- /pipenv/vendor/plette/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "__version__", 3 | "Lockfile", "Pipfile", 4 | ] 5 | 6 | __version__ = '2.1.0' 7 | 8 | from .lockfiles import Lockfile 9 | from .pipfiles import Pipfile 10 | -------------------------------------------------------------------------------- /pipenv/vendor/plette/models/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "DataModel", "DataModelCollection", "DataModelMapping", "DataModelSequence", 3 | "DataValidationError", 4 | "Hash", "Package", "Requires", "Source", "Script", 5 | "Meta", "PackageCollection", "ScriptCollection", "SourceCollection", 6 | ] 7 | 8 | from .base import ( 9 | DataModel, DataModelCollection, DataModelMapping, DataModelSequence, 10 | DataValidationError, 11 | ) 12 | 13 | from .hashes import Hash 14 | from .packages import Package 15 | from .scripts import Script 16 | from .sources import Source 17 | 18 | from .sections import ( 19 | Meta, 20 | Requires, 21 | PackageCollection, 22 | Pipenv, 23 | PipfileSection, 24 | ScriptCollection, 25 | SourceCollection, 26 | ) 27 | -------------------------------------------------------------------------------- /pipenv/vendor/plette/models/sources.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from .base import DataModel 4 | 5 | 6 | class Source(DataModel): 7 | """Information on a "simple" Python package index. 8 | 9 | This could be PyPI, or a self-hosted index server, etc. The server 10 | specified by the `url` attribute is expected to provide the "simple" 11 | package API. 12 | """ 13 | __SCHEMA__ = { 14 | "name": str, 15 | "url": str, 16 | "verify_ssl": bool, 17 | } 18 | 19 | @property 20 | def name(self): 21 | return self._data["name"] 22 | 23 | @name.setter 24 | def name(self, value): 25 | self._data["name"] = value 26 | 27 | @property 28 | def url(self): 29 | return self._data["url"] 30 | 31 | @url.setter 32 | def url(self, value): 33 | self._data["url"] = value 34 | 35 | @property 36 | def verify_ssl(self): 37 | return self._data["verify_ssl"] 38 | 39 | @verify_ssl.setter 40 | def verify_ssl(self, value): 41 | self._data["verify_ssl"] = value 42 | 43 | @property 44 | def url_expanded(self): 45 | return os.path.expandvars(self._data["url"]) 46 | -------------------------------------------------------------------------------- /pipenv/vendor/ptyprocess/LICENSE: -------------------------------------------------------------------------------- 1 | Ptyprocess is under the ISC license, as code derived from Pexpect. 2 | http://opensource.org/licenses/ISC 3 | 4 | Copyright (c) 2013-2014, Pexpect development team 5 | Copyright (c) 2012, Noah Spurrier 6 | 7 | PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY PURPOSE 8 | WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE COPYRIGHT NOTICE 9 | AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES. THE SOFTWARE IS PROVIDED 10 | "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 11 | INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT 12 | SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 14 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 15 | OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /pipenv/vendor/ptyprocess/__init__.py: -------------------------------------------------------------------------------- 1 | """Run a subprocess in a pseudo terminal""" 2 | from .ptyprocess import PtyProcess, PtyProcessUnicode, PtyProcessError 3 | 4 | __version__ = '0.7.0' 5 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Dan Ryan 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 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from .exceptions import InvalidPythonVersion, PythonNotFound 4 | from .models.python_info import PythonInfo 5 | from .pythonfinder import Finder 6 | 7 | __version__ = "3.0.0" 8 | 9 | __all__ = ["Finder", "PythonInfo", "InvalidPythonVersion", "PythonNotFound"] 10 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/exceptions.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | 4 | class InvalidPythonVersion(Exception): 5 | """Raised when parsing an invalid python version""" 6 | 7 | pass 8 | 9 | 10 | class PythonNotFound(Exception): 11 | """Raised when a requested Python version is not found""" 12 | 13 | pass 14 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/finders/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from .asdf_finder import AsdfFinder 4 | from .base_finder import BaseFinder 5 | from .path_finder import PathFinder 6 | from .pyenv_finder import PyenvFinder 7 | from .system_finder import SystemFinder 8 | 9 | __all__ = [ 10 | "BaseFinder", 11 | "PathFinder", 12 | "SystemFinder", 13 | "PyenvFinder", 14 | "AsdfFinder", 15 | ] 16 | 17 | # Import Windows-specific finders if on Windows 18 | import os 19 | 20 | if os.name == "nt": 21 | from .windows_registry import WindowsRegistryFinder 22 | from .py_launcher_finder import PyLauncherFinder 23 | 24 | __all__.extend(["WindowsRegistryFinder", "PyLauncherFinder"]) 25 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import annotations 4 | 5 | import os 6 | import sys 7 | 8 | from .cli import cli 9 | 10 | PYTHONFINDER_MAIN = os.path.dirname(os.path.abspath(__file__)) 11 | PYTHONFINDER_PACKAGE = os.path.dirname(PYTHONFINDER_MAIN) 12 | 13 | 14 | if __name__ == "__main__": 15 | sys.exit(cli()) 16 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/models/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from .python_info import PythonInfo 4 | 5 | __all__ = ["PythonInfo"] 6 | -------------------------------------------------------------------------------- /pipenv/vendor/pythonfinder/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from .path_utils import ( 4 | PYTHON_IMPLEMENTATIONS, 5 | ensure_path, 6 | filter_pythons, 7 | is_executable, 8 | is_in_path, 9 | looks_like_python, 10 | path_is_python, 11 | resolve_path, 12 | ) 13 | from .version_utils import ( 14 | get_python_version, 15 | guess_company, 16 | parse_asdf_version_order, 17 | parse_pyenv_version_order, 18 | parse_python_version, 19 | ) 20 | 21 | __all__ = [ 22 | "PYTHON_IMPLEMENTATIONS", 23 | "ensure_path", 24 | "filter_pythons", 25 | "get_python_version", 26 | "guess_company", 27 | "is_executable", 28 | "is_in_path", 29 | "looks_like_python", 30 | "parse_asdf_version_order", 31 | "parse_pyenv_version_order", 32 | "parse_python_version", 33 | "path_is_python", 34 | "resolve_path", 35 | ] 36 | -------------------------------------------------------------------------------- /pipenv/vendor/shellingham/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 | -------------------------------------------------------------------------------- /pipenv/vendor/shellingham/__init__.py: -------------------------------------------------------------------------------- 1 | import importlib 2 | import os 3 | 4 | from ._core import ShellDetectionFailure 5 | 6 | __version__ = "1.5.4" 7 | 8 | 9 | def detect_shell(pid=None, max_depth=10): 10 | name = os.name 11 | try: 12 | impl = importlib.import_module(".{}".format(name), __name__) 13 | except ImportError: 14 | message = "Shell detection not implemented for {0!r}".format(name) 15 | raise RuntimeError(message) 16 | try: 17 | get_shell = impl.get_shell 18 | except AttributeError: 19 | raise RuntimeError("get_shell not implemented for {0!r}".format(name)) 20 | shell = get_shell(pid, max_depth=max_depth) 21 | if shell: 22 | return shell 23 | raise ShellDetectionFailure() 24 | -------------------------------------------------------------------------------- /pipenv/vendor/shellingham/_core.py: -------------------------------------------------------------------------------- 1 | SHELL_NAMES = ( 2 | {"sh", "bash", "dash", "ash"} # Bourne. 3 | | {"csh", "tcsh"} # C. 4 | | {"ksh", "zsh", "fish"} # Common alternatives. 5 | | {"cmd", "powershell", "pwsh"} # Microsoft. 6 | | {"elvish", "xonsh", "nu"} # More exotic. 7 | ) 8 | 9 | 10 | class ShellDetectionFailure(EnvironmentError): 11 | pass 12 | -------------------------------------------------------------------------------- /pipenv/vendor/shellingham/posix/_core.py: -------------------------------------------------------------------------------- 1 | import collections 2 | 3 | Process = collections.namedtuple("Process", "args pid ppid") 4 | -------------------------------------------------------------------------------- /pipenv/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 | -------------------------------------------------------------------------------- /pipenv/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.2" # 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 | -------------------------------------------------------------------------------- /pipenv/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 | -------------------------------------------------------------------------------- /pipenv/vendor/tomli/py.typed: -------------------------------------------------------------------------------- 1 | # Marker file for PEP 561 2 | -------------------------------------------------------------------------------- /pipenv/vendor/tomlkit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Sébastien Eustace 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 | -------------------------------------------------------------------------------- /pipenv/vendor/tomlkit/_compat.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import contextlib 4 | import sys 5 | 6 | from typing import Any 7 | 8 | 9 | PY38 = sys.version_info >= (3, 8) 10 | 11 | 12 | def decode(string: Any, encodings: list[str] | None = None): 13 | if not isinstance(string, bytes): 14 | return string 15 | 16 | encodings = encodings or ["utf-8", "latin1", "ascii"] 17 | 18 | for encoding in encodings: 19 | with contextlib.suppress(UnicodeEncodeError, UnicodeDecodeError): 20 | return string.decode(encoding) 21 | 22 | return string.decode(encodings[0], errors="ignore") 23 | -------------------------------------------------------------------------------- /pipenv/vendor/tomlkit/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/tomlkit/py.typed -------------------------------------------------------------------------------- /pipenv/vendor/tomlkit/toml_char.py: -------------------------------------------------------------------------------- 1 | import string 2 | 3 | 4 | class TOMLChar(str): 5 | def __init__(self, c): 6 | super().__init__() 7 | 8 | if len(self) > 1: 9 | raise ValueError("A TOML character must be of length 1") 10 | 11 | BARE = string.ascii_letters + string.digits + "-_" 12 | KV = "= \t" 13 | NUMBER = string.digits + "+-_.e" 14 | SPACES = " \t" 15 | NL = "\n\r" 16 | WS = SPACES + NL 17 | 18 | def is_bare_key_char(self) -> bool: 19 | """ 20 | Whether the character is a valid bare key name or not. 21 | """ 22 | return self in self.BARE 23 | 24 | def is_kv_sep(self) -> bool: 25 | """ 26 | Whether the character is a valid key/value separator or not. 27 | """ 28 | return self in self.KV 29 | 30 | def is_int_float_char(self) -> bool: 31 | """ 32 | Whether the character if a valid integer or float value character or not. 33 | """ 34 | return self in self.NUMBER 35 | 36 | def is_ws(self) -> bool: 37 | """ 38 | Whether the character is a whitespace character or not. 39 | """ 40 | return self in self.WS 41 | 42 | def is_nl(self) -> bool: 43 | """ 44 | Whether the character is a new line character or not. 45 | """ 46 | return self in self.NL 47 | 48 | def is_spaces(self) -> bool: 49 | """ 50 | Whether the character is a space or not 51 | """ 52 | return self in self.SPACES 53 | -------------------------------------------------------------------------------- /pipenv/vendor/tomlkit/toml_document.py: -------------------------------------------------------------------------------- 1 | from pipenv.vendor.tomlkit.container import Container 2 | 3 | 4 | class TOMLDocument(Container): 5 | """ 6 | A TOML document. 7 | """ 8 | -------------------------------------------------------------------------------- /pipenv/vendor/vendor.txt: -------------------------------------------------------------------------------- 1 | click-didyoumean==0.3.1 2 | click==8.1.7 3 | colorama==0.4.6 4 | importlib-metadata==8.5.0 5 | zipp==3.20.2 6 | packaging==24.1 7 | pexpect==4.9.0 8 | pipdeptree==2.23.4 9 | plette==2.1.0 10 | ptyprocess==0.7.0 11 | python-dotenv==1.0.1 12 | pythonfinder==3.0.0 13 | shellingham==1.5.4 14 | tomli==2.0.2 15 | tomlkit==0.13.2 16 | -------------------------------------------------------------------------------- /pipenv/vendor/zipp/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 | -------------------------------------------------------------------------------- /pipenv/vendor/zipp/compat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/pipenv/vendor/zipp/compat/__init__.py -------------------------------------------------------------------------------- /pipenv/vendor/zipp/compat/overlay.py: -------------------------------------------------------------------------------- 1 | """ 2 | Expose zipp.Path as .zipfile.Path. 3 | 4 | Includes everything else in ``zipfile`` to match future usage. Just 5 | use: 6 | 7 | >>> from zipp.compat.overlay import zipfile 8 | 9 | in place of ``import zipfile``. 10 | 11 | Relative imports are supported too. 12 | 13 | >>> from zipp.compat.overlay.zipfile import ZipInfo 14 | 15 | The ``zipfile`` object added to ``sys.modules`` needs to be 16 | hashable (#126). 17 | 18 | >>> _ = hash(sys.modules['zipp.compat.overlay.zipfile']) 19 | """ 20 | 21 | import importlib 22 | import sys 23 | import types 24 | 25 | import pipenv.vendor.zipp as zipp 26 | 27 | 28 | class HashableNamespace(types.SimpleNamespace): 29 | def __hash__(self): 30 | return hash(tuple(vars(self))) 31 | 32 | 33 | zipfile = HashableNamespace(**vars(importlib.import_module('zipfile'))) 34 | zipfile.Path = zipp.Path 35 | zipfile._path = zipp 36 | 37 | sys.modules[__name__ + '.zipfile'] = zipfile # type: ignore[assignment] 38 | -------------------------------------------------------------------------------- /pipenv/vendor/zipp/compat/py310.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import io 3 | 4 | 5 | def _text_encoding(encoding, stacklevel=2, /): # pragma: no cover 6 | return encoding 7 | 8 | 9 | text_encoding = ( 10 | io.text_encoding # type: ignore[unused-ignore, attr-defined] 11 | if sys.version_info > (3, 10) 12 | else _text_encoding 13 | ) 14 | -------------------------------------------------------------------------------- /run-tests.bat: -------------------------------------------------------------------------------- 1 | 2 | pip install -e .[test] --upgrade --upgrade-strategy=only-if-needed 3 | pipenv install --dev 4 | git submodule sync && git submodule update --init --recursive 5 | cmd /c start pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures 6 | pipenv run pytest -n auto -v tests 7 | -------------------------------------------------------------------------------- /tasks/__init__.py: -------------------------------------------------------------------------------- 1 | # Copied from pip's vendoring process 2 | # see https://github.com/pypa/pip/blob/95bcf8c5f6394298035a7332c441868f3b0169f4/tasks/__init__.py 3 | from pathlib import Path 4 | 5 | import invoke 6 | 7 | from . import release, vendoring 8 | 9 | ROOT = Path(".").parent.parent.absolute() 10 | 11 | ns = invoke.Collection(vendoring, release, release.clean_mdchangelog) 12 | -------------------------------------------------------------------------------- /tasks/vendoring/patches/patched/circular_import.patch: -------------------------------------------------------------------------------- 1 | diff --git a/pipenv/patched/pip/_internal/cli/progress_bars.py b/pipenv/patched/pip/_internal/cli/progress_bars.py 2 | index ab9d76b25..0c007e068 100644 3 | --- a/pipenv/patched/pip/_internal/cli/progress_bars.py 4 | +++ b/pipenv/patched/pip/_internal/cli/progress_bars.py 5 | @@ -1,6 +1,6 @@ 6 | import functools 7 | import sys 8 | -from typing import Callable, Generator, Iterable, Iterator, Optional, Tuple, TypeVar 9 | +from typing import Any, Callable, Generator, Iterable, Iterator, Optional, Tuple, TypeVar 10 | 11 | from pip._vendor.rich.progress import ( 12 | BarColumn, 13 | @@ -17,11 +17,12 @@ from pip._vendor.rich.progress import ( 14 | ) 15 | 16 | from pip._internal.cli.spinners import RateLimiter 17 | -from pip._internal.req.req_install import InstallRequirement 18 | -from pip._internal.utils.logging import get_console, get_indentation 19 | +from pipenv.patched.pip._internal.utils.logging import get_indentation 20 | +from pipenv.patched.pip._vendor.rich import get_console 21 | 22 | T = TypeVar("T") 23 | ProgressRenderer = Callable[[Iterable[T]], Iterator[T]] 24 | +InstallRequirement = Any 25 | 26 | 27 | def _rich_download_progress_bar( 28 | -------------------------------------------------------------------------------- /tasks/vendoring/patches/patched/pip_specifier.patch: -------------------------------------------------------------------------------- 1 | diff --git a/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py b/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py 2 | index d976026ac..49706667c 100644 3 | --- a/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py 4 | +++ b/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py 5 | @@ -3,6 +3,7 @@ import sys 6 | from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast 7 | 8 | from pip._vendor.packaging.requirements import InvalidRequirement 9 | +from pip._vendor.packaging.specifiers import SpecifierSet 10 | from pip._vendor.packaging.utils import NormalizedName, canonicalize_name 11 | from pip._vendor.packaging.version import Version 12 | 13 | @@ -257,7 +258,10 @@ class _InstallRequirementBackedCandidate(Candidate): 14 | yield from self._factory.make_requirements_from_spec(str(r), self._ireq) 15 | 16 | def get_install_requirement(self) -> Optional[InstallRequirement]: 17 | - return self._ireq 18 | + ireq = self._ireq 19 | + if self._version and ireq.req and not ireq.req.url: 20 | + ireq.req.specifier = SpecifierSet(f"=={self._version}") 21 | + return ireq 22 | 23 | 24 | class LinkCandidate(_InstallRequirementBackedCandidate): 25 | -------------------------------------------------------------------------------- /tasks/vendoring/patches/patched/pipenv_import.patch: -------------------------------------------------------------------------------- 1 | diff --git a/pipenv/patched/pip/__main__.py b/pipenv/patched/pip/__main__.py 2 | index 599132611..1fa416e9a 100644 3 | --- a/pipenv/patched/pip/__main__.py 4 | +++ b/pipenv/patched/pip/__main__.py 5 | @@ -19,6 +19,14 @@ if __package__ == "": 6 | sys.path.insert(0, path) 7 | 8 | if __name__ == "__main__": 9 | + import importlib.util 10 | + import sys 11 | + spec = importlib.util.spec_from_file_location( 12 | + "pipenv", 13 | + location=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "__init__.py")) 14 | + pipenv = importlib.util.module_from_spec(spec) 15 | + sys.modules["pipenv"] = pipenv 16 | + spec.loader.exec_module(pipenv) 17 | from pip._internal.cli.main import main as _main 18 | 19 | sys.exit(_main()) 20 | -------------------------------------------------------------------------------- /tasks/vendoring/patches/vendor/pipdeptree-update-import.patch: -------------------------------------------------------------------------------- 1 | --- a/pipenv/vendor/pipdeptree/__main__.py 2024-10-12 19:43:30.971617798 +0200 2 | +++ b/pipenv/vendor/pipdeptree/__main__.py 2024-10-12 20:20:58.508248189 +0200 3 | @@ -2,9 +2,16 @@ 4 | 5 | from __future__ import annotations 6 | 7 | +import os 8 | import sys 9 | from typing import Sequence 10 | 11 | +pardir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 12 | +# for finding pipdeptree itself 13 | +sys.path.append(pardir) 14 | +# for finding stuff in vendor and patched 15 | +sys.path.append(os.path.dirname(os.path.dirname(pardir))) 16 | + 17 | from pipenv.vendor.pipdeptree._cli import get_options 18 | from pipenv.vendor.pipdeptree._detect_env import detect_active_interpreter 19 | from pipenv.vendor.pipdeptree._discovery import get_installed_distributions 20 | -------------------------------------------------------------------------------- /tasks/vendoring/patches/vendor/ruamel-import.patch: -------------------------------------------------------------------------------- 1 | diff --git a/pipenv/vendor/ruamel/__init__.py b/pipenv/vendor/ruamel/__init__.py 2 | new file mode 100644 3 | index 00000000..e69de29b 4 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/tests/__init__.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | @pytest.fixture() 5 | def project(): 6 | from pipenv.project import Project 7 | 8 | return Project() 9 | -------------------------------------------------------------------------------- /tests/fixtures/cython-import-package/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools >= 40.6.0", "setuptools-scm", "cython"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [tool.black] 6 | line-length = 90 7 | target_version = ['py27', 'py35', 'py36', 'py37', 'py38'] 8 | include = '\.pyi?$' 9 | exclude = ''' 10 | /( 11 | \.eggs 12 | | \.git 13 | | \.hg 14 | | \.mypy_cache 15 | | \.tox 16 | | \.pyre_configuration 17 | | \.venv 18 | | _build 19 | | buck-out 20 | | build 21 | | dist 22 | ) 23 | ''' 24 | 25 | [tool.towncrier] 26 | package = 'cython-import-package' 27 | package_dir = 'src' 28 | filename = 'CHANGELOG.rst' 29 | directory = 'news/' 30 | title_format = '{version} ({project_date})' 31 | issue_format = '`#{issue} `_' 32 | template = 'tasks/CHANGELOG.rst.jinja2' 33 | 34 | [[tool.towncrier.type]] 35 | directory = 'feature' 36 | name = 'Features' 37 | showcontent = true 38 | 39 | [[tool.towncrier.type]] 40 | directory = 'bugfix' 41 | name = 'Bug Fixes' 42 | showcontent = true 43 | 44 | [[tool.towncrier.type]] 45 | directory = 'trivial' 46 | name = 'Trivial Changes' 47 | showcontent = false 48 | 49 | [[tool.towncrier.type]] 50 | directory = 'removal' 51 | name = 'Removals and Deprecations' 52 | showcontent = true 53 | -------------------------------------------------------------------------------- /tests/fixtures/cython-import-package/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = cython_import_package 3 | package_name = cython-import-package 4 | description = A fake python package. 5 | url = https://github.com/sarugaku/cython_import_package 6 | author = Dan Ryan 7 | author_email = dan@danryan.co 8 | long_description = file: README.rst 9 | license = ISC License 10 | keywords = fake package test 11 | classifier = 12 | Development Status :: 1 - Planning 13 | License :: OSI Approved :: ISC License (ISCL) 14 | Operating System :: OS Independent 15 | Programming Language :: Python :: 2 16 | Programming Language :: Python :: 2.6 17 | Programming Language :: Python :: 2.7 18 | Programming Language :: Python :: 3 19 | Programming Language :: Python :: 3.4 20 | Programming Language :: Python :: 3.5 21 | Programming Language :: Python :: 3.6 22 | Programming Language :: Python :: 3.7 23 | Topic :: Software Development :: Libraries :: Python Modules 24 | 25 | [options.extras_require] 26 | tests = 27 | pytest 28 | pytest-xdist 29 | pytest-cov 30 | pytest-timeout 31 | readme-renderer[md] 32 | twine 33 | dev = 34 | black;python_version>="3.6" 35 | flake8 36 | flake8-bugbear;python_version>="3.5" 37 | invoke 38 | isort 39 | mypy;python_version>="3.5" 40 | parver 41 | pre-commit 42 | rope 43 | wheel 44 | 45 | [options] 46 | zip_safe = true 47 | python_requires = >=2.6,!=3.0,!=3.1,!=3.2,!=3.3 48 | install_requires = 49 | attrs 50 | vistir 51 | 52 | [bdist_wheel] 53 | universal = 1 54 | 55 | [egg_info] 56 | tag_build = 57 | tag_date = 0 58 | -------------------------------------------------------------------------------- /tests/fixtures/cython-import-package/setup.py: -------------------------------------------------------------------------------- 1 | import ast 2 | import os 3 | 4 | from setuptools import setup, find_packages 5 | from setuptools.command.test import test as TestCommand 6 | 7 | # ORDER MATTERS 8 | # Import this after setuptools or it will fail 9 | from Cython.Build import cythonize # noqa: I100 10 | import Cython.Distutils 11 | 12 | 13 | ROOT = os.path.dirname(__file__) 14 | 15 | PACKAGE_NAME = "cython_import_package" 16 | 17 | VERSION = None 18 | 19 | with open(os.path.join(ROOT, "src", PACKAGE_NAME.replace("-", "_"), "__init__.py")) as f: 20 | for line in f: 21 | if line.startswith("__version__ = "): 22 | VERSION = ast.literal_eval(line[len("__version__ = ") :].strip()) 23 | break 24 | if VERSION is None: 25 | raise OSError("failed to read version") 26 | 27 | 28 | # Put everything in setup.cfg, except those that don't actually work? 29 | setup( 30 | # These really don't work. 31 | package_dir={"": "src"}, 32 | packages=find_packages("src"), 33 | # I don't know how to specify an empty key in setup.cfg. 34 | package_data={ 35 | "": ["LICENSE*", "README*"], 36 | }, 37 | setup_requires=["setuptools_scm", "cython"], 38 | # I need this to be dynamic. 39 | version=VERSION, 40 | ) 41 | -------------------------------------------------------------------------------- /tests/fixtures/cython-import-package/src/cython_import_package/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.0.1" 2 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | parallel = True 4 | source = src/fake_package/ 5 | 6 | [report] 7 | # Regexes for lines to exclude from consideration 8 | exclude_lines = 9 | # Have to re-enable the standard pragma 10 | pragma: no cover 11 | 12 | # Don't complain about missing debug-only code: 13 | def __repr__ 14 | if self\.debug 15 | 16 | # Don't complain if tests don't hit defensive assertion code: 17 | raise AssertionError 18 | raise NotImplementedError 19 | # Don't complain if non-runnable code isn't run: 20 | if 0: 21 | if __name__ == .__main__.: 22 | 23 | [html] 24 | directory = htmlcov 25 | 26 | [xml] 27 | output = coverage.xml 28 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.toml] 15 | indent_size = 2 16 | 17 | [*.{yaml,yml}] 18 | indent_size = 2 19 | 20 | # Makefiles always use tabs for indentation. 21 | [Makefile] 22 | indent_style = tab 23 | 24 | # Batch files use tabs for indentation, and old Notepad hates LF. 25 | [*.bat] 26 | indent_style = tab 27 | end_of_line = crlf 28 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/ambv/black 3 | rev: stable 4 | hooks: 5 | - id: black 6 | 7 | - repo: https://github.com/pre-commit/pre-commit-hooks 8 | rev: v2.0.0 9 | hooks: 10 | - id: flake8 11 | 12 | - repo: https://github.com/asottile/seed-isort-config 13 | rev: v1.7.0 14 | hooks: 15 | - id: seed-isort-config 16 | 17 | - repo: https://github.com/pre-commit/mirrors-isort 18 | rev: v4.3.9 19 | hooks: 20 | - id: isort 21 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | sudo: false 3 | cache: pip 4 | dist: trusty 5 | 6 | matrix: 7 | fast_finish: true 8 | 9 | install: 10 | - "python -m pip install --upgrade pip pytest-timeout" 11 | - "python -m pip install -e .[tests]" 12 | script: 13 | - "python -m pytest -v -n 8 tests/" 14 | 15 | jobs: 16 | include: 17 | - stage: test 18 | - python: "3.7" 19 | dist: xenial 20 | sudo: required 21 | - python: "3.6" 22 | - python: "2.7" 23 | - python: "3.5" 24 | - python: "3.4" 25 | - stage: packaging 26 | python: "3.6" 27 | install: 28 | - "pip install --upgrade twine readme-renderer[md]" 29 | script: 30 | - "python setup.py sdist" 31 | - "twine check dist/*" 32 | - stage: coverage 33 | python: "3.6" 34 | install: 35 | - "python -m pip install --upgrade pip pytest-timeout pytest-cov" 36 | - "python -m pip install --upgrade -e .[tests]" 37 | script: 38 | - "python -m pytest -n auto --timeout 300 --cov=fake_package --cov-report=term-missing --cov-report=xml --cov-report=html tests" 39 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019, Dan Ryan 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 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE* README* 2 | include CHANGELOG.rst 3 | include pyproject.toml 4 | 5 | exclude .editorconfig 6 | exclude .coveragerc 7 | exclude .travis.yml 8 | exclude tox.ini 9 | exclude appveyor.yml 10 | exclude Pipfile* 11 | 12 | recursive-include docs Makefile *.rst *.py *.bat 13 | recursive-exclude docs requirements*.txt 14 | 15 | prune .github 16 | prune docs/build 17 | prune news 18 | prune tasks 19 | prune tests 20 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/Pipfile: -------------------------------------------------------------------------------- 1 | [packages] 2 | fake_package = { path = '.', editable = true, extras = ["dev", "tests"] } 3 | 4 | [dev-packages] 5 | towncrier = '*' 6 | sphinx = '*' 7 | sphinx-rtd-theme = '*' 8 | 9 | [scripts] 10 | release = 'inv release' 11 | tests = "pytest -v tests" 12 | draft = "towncrier --draft" 13 | changelog = "towncrier" 14 | build = "setup.py sdist bdist_wheel" 15 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/README.md: -------------------------------------------------------------------------------- 1 | # fake_package: A fake python package. 2 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | sphinx_rtd_theme 3 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/news/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ['setuptools>=40.8.0', 'wheel>=0.33.0'] 3 | 4 | [tool.black] 5 | line-length = 90 6 | include = '\.pyi?$' 7 | exclude = ''' 8 | /( 9 | \.eggs 10 | | \.git 11 | | \.hg 12 | | \.mypy_cache 13 | | \.tox 14 | | \.pyre_configuration 15 | | \.venv 16 | | _build 17 | | buck-out 18 | | build 19 | | dist 20 | ) 21 | ''' 22 | 23 | [tool.towncrier] 24 | package = 'fake-package' 25 | package_dir = 'src' 26 | filename = 'CHANGELOG.rst' 27 | directory = 'news/' 28 | title_format = '{version} ({project_date})' 29 | issue_format = '`#{issue} `_' 30 | template = 'tasks/CHANGELOG.rst.jinja2' 31 | 32 | [[tool.towncrier.type]] 33 | directory = 'feature' 34 | name = 'Features' 35 | showcontent = true 36 | 37 | [[tool.towncrier.type]] 38 | directory = 'bugfix' 39 | name = 'Bug Fixes' 40 | showcontent = true 41 | 42 | [[tool.towncrier.type]] 43 | directory = 'trivial' 44 | name = 'Trivial Changes' 45 | showcontent = false 46 | 47 | [[tool.towncrier.type]] 48 | directory = 'removal' 49 | name = 'Removals and Deprecations' 50 | showcontent = true 51 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/setup.py: -------------------------------------------------------------------------------- 1 | import ast 2 | import os 3 | 4 | from setuptools import find_packages, setup 5 | 6 | 7 | ROOT = os.path.dirname(__file__) 8 | 9 | PACKAGE_NAME = "fake_package" 10 | 11 | VERSION = None 12 | 13 | with open(os.path.join(ROOT, "src", PACKAGE_NAME.replace("-", "_"), "__init__.py")) as f: 14 | for line in f: 15 | if line.startswith("__version__ = "): 16 | VERSION = ast.literal_eval(line[len("__version__ = ") :].strip()) 17 | break 18 | if VERSION is None: 19 | raise OSError("failed to read version") 20 | 21 | 22 | # Put everything in setup.cfg, except those that don't actually work? 23 | setup( 24 | # These really don't work. 25 | package_dir={"": "src"}, 26 | packages=find_packages("src"), 27 | # I don't know how to specify an empty key in setup.cfg. 28 | package_data={ 29 | "": ["LICENSE*", "README*"], 30 | }, 31 | # I need this to be dynamic. 32 | version=VERSION, 33 | ) 34 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/src/fake_package/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.0.1" 2 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/tasks/CHANGELOG.rst.jinja2: -------------------------------------------------------------------------------- 1 | {% for section in sections %} 2 | {% set underline = "-" %} 3 | {% if section %} 4 | {{section}} 5 | {{ underline * section|length }}{% set underline = "~" %} 6 | 7 | {% endif %} 8 | {% if sections[section] %} 9 | {% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %} 10 | 11 | {{ definitions[category]['name'] }} 12 | {{ underline * definitions[category]['name']|length }} 13 | 14 | {% if definitions[category]['showcontent'] %} 15 | {% for text, values in sections[section][category]|dictsort(by='value') %} 16 | - {{ text }}{% if category != 'process' %} 17 | {{ values|sort|join(',\n ') }} 18 | {% endif %} 19 | 20 | {% endfor %} 21 | {% else %} 22 | - {{ sections[section][category]['']|sort|join(', ') }} 23 | 24 | 25 | {% endif %} 26 | {% if sections[section][category]|length == 0 %} 27 | 28 | No significant changes. 29 | 30 | 31 | {% else %} 32 | {% endif %} 33 | {% endfor %} 34 | {% else %} 35 | 36 | No significant changes. 37 | 38 | 39 | {% endif %} 40 | {% endfor %} 41 | -------------------------------------------------------------------------------- /tests/fixtures/fake-package/tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = 3 | docs, packaging, py27, py35, py36, py37, coverage-report 4 | 5 | [testenv] 6 | passenv = CI GIT_SSL_CAINFO 7 | setenv = 8 | LC_ALL = en_US.UTF-8 9 | deps = 10 | coverage 11 | -e .[tests] 12 | commands = coverage run --parallel -m pytest --timeout 300 [] 13 | install_command = python -m pip install {opts} {packages} 14 | usedevelop = True 15 | 16 | [testenv:coverage-report] 17 | deps = coverage 18 | skip_install = true 19 | commands = 20 | coverage combine 21 | coverage report 22 | 23 | [testenv:docs] 24 | deps = 25 | -r{toxinidir}/docs/requirements.txt 26 | -e .[tests] 27 | commands = 28 | sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html 29 | sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man 30 | 31 | [testenv:packaging] 32 | deps = 33 | check-manifest 34 | readme_renderer 35 | commands = 36 | check-manifest 37 | python setup.py check -m -r -s 38 | -------------------------------------------------------------------------------- /tests/fixtures/legacy-backend-package/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm>=3.3.1"] 3 | 4 | [tool.black] 5 | line-length = 90 6 | target_version = ['py27', 'py35', 'py36', 'py37', 'py38'] 7 | include = '\.pyi?$' 8 | exclude = ''' 9 | /( 10 | \.eggs 11 | | \.git 12 | | \.hg 13 | | \.mypy_cache 14 | | \.tox 15 | | \.pyre_configuration 16 | | \.venv 17 | | _build 18 | | buck-out 19 | | build 20 | | dist 21 | ) 22 | ''' 23 | 24 | [tool.towncrier] 25 | package = 'legacy-backend-package' 26 | package_dir = 'src' 27 | filename = 'CHANGELOG.rst' 28 | directory = 'news/' 29 | title_format = '{version} ({project_date})' 30 | issue_format = '`#{issue} `_' 31 | template = 'tasks/CHANGELOG.rst.jinja2' 32 | 33 | [[tool.towncrier.type]] 34 | directory = 'feature' 35 | name = 'Features' 36 | showcontent = true 37 | 38 | [[tool.towncrier.type]] 39 | directory = 'bugfix' 40 | name = 'Bug Fixes' 41 | showcontent = true 42 | 43 | [[tool.towncrier.type]] 44 | directory = 'trivial' 45 | name = 'Trivial Changes' 46 | showcontent = false 47 | 48 | [[tool.towncrier.type]] 49 | directory = 'removal' 50 | name = 'Removals and Deprecations' 51 | showcontent = true 52 | -------------------------------------------------------------------------------- /tests/fixtures/legacy-backend-package/setup.py: -------------------------------------------------------------------------------- 1 | import ast 2 | import os 3 | 4 | from setuptools import setup, find_packages 5 | from setuptools.command.test import test as TestCommand 6 | 7 | ROOT = os.path.dirname(__file__) 8 | 9 | PACKAGE_NAME = "legacy_backend_package" 10 | 11 | VERSION = None 12 | 13 | with open(os.path.join(ROOT, "src", PACKAGE_NAME.replace("-", "_"), "__init__.py")) as f: 14 | for line in f: 15 | if line.startswith("__version__ = "): 16 | VERSION = ast.literal_eval(line[len("__version__ = ") :].strip()) 17 | break 18 | if VERSION is None: 19 | raise OSError("failed to read version") 20 | 21 | 22 | # Put everything in setup.cfg, except those that don't actually work? 23 | setup( 24 | # These really don't work. 25 | package_dir={"": "src"}, 26 | packages=find_packages("src"), 27 | # I don't know how to specify an empty key in setup.cfg. 28 | package_data={ 29 | "": ["LICENSE*", "README*"], 30 | }, 31 | # I need this to be dynamic. 32 | version=VERSION, 33 | ) 34 | -------------------------------------------------------------------------------- /tests/fixtures/legacy-backend-package/src/legacy_backend_package/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.0.1" 2 | -------------------------------------------------------------------------------- /tests/integration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/tests/integration/__init__.py -------------------------------------------------------------------------------- /tests/integration/test_upgrade_cleanup.py: -------------------------------------------------------------------------------- 1 | 2 | import pytest 3 | 4 | 5 | @pytest.mark.upgrade 6 | @pytest.mark.cleanup 7 | def test_upgrade_removes_unused_dependencies(pipenv_instance_pypi): 8 | """Test that `pipenv upgrade` removes dependencies that are no longer needed.""" 9 | with pipenv_instance_pypi() as p: 10 | # Create a Pipfile with Django 3.2.10 (which depends on pytz) 11 | with open(p.pipfile_path, "w") as f: 12 | f.write(""" 13 | [[source]] 14 | url = "https://pypi.org/simple" 15 | verify_ssl = true 16 | name = "pypi" 17 | 18 | [packages] 19 | django = "==3.2.10" 20 | 21 | [dev-packages] 22 | """) 23 | 24 | # Install dependencies 25 | c = p.pipenv("install") 26 | assert c.returncode == 0 27 | 28 | # Verify pytz is in the lockfile 29 | assert "pytz" in p.lockfile["default"] 30 | 31 | # Upgrade Django to 4.2.7 (which doesn't depend on pytz) 32 | c = p.pipenv("upgrade django==4.2.7") 33 | assert c.returncode == 0 34 | 35 | # Verify pytz is no longer in the lockfile 36 | assert "pytz" not in p.lockfile["default"] 37 | -------------------------------------------------------------------------------- /tests/test_artifacts/django/3.4.x.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/tests/test_artifacts/django/3.4.x.zip -------------------------------------------------------------------------------- /tests/test_artifacts/requests-2.19.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/tests/test_artifacts/requests-2.19.1.tar.gz -------------------------------------------------------------------------------- /tests/test_artifacts/six-1.11.0+mkl-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/tests/test_artifacts/six-1.11.0+mkl-py2.py3-none-any.whl -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pypa/pipenv/218f1a897cf1490e407188f564b76a9e946b3610/tests/unit/__init__.py -------------------------------------------------------------------------------- /tests/unit/test_dependencies.py: -------------------------------------------------------------------------------- 1 | from pipenv.utils.dependencies import clean_resolved_dep 2 | 3 | 4 | def test_clean_resolved_dep_with_vcs_url(): 5 | project = {} # Mock project object, adjust as needed 6 | dep = { 7 | "name": "example-package", 8 | "git": "git+https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/username/repo.git", 9 | "ref": "main" 10 | } 11 | 12 | result = clean_resolved_dep(project, dep) 13 | 14 | assert "example-package" in result 15 | assert result["example-package"]["git"] == "git+https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/username/repo.git" 16 | assert result["example-package"]["ref"] == "main" 17 | 18 | def test_clean_resolved_dep_with_vcs_url_and_extras(): 19 | project = {} # Mock project object, adjust as needed 20 | dep = { 21 | "name": "example-package", 22 | "git": "git+https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/username/repo.git[extra1,extra2]", 23 | "ref": "main" 24 | } 25 | 26 | result = clean_resolved_dep(project, dep) 27 | 28 | assert "example-package" in result 29 | assert result["example-package"]["git"] == "git+https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/username/repo.git[extra1,extra2]" 30 | assert result["example-package"]["ref"] == "main" 31 | assert result["example-package"]["extras"] == ["extra1", "extra2"] 32 | -------------------------------------------------------------------------------- /tests/unit/test_funktools.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from pipenv.utils.funktools import _is_iterable, dedup, unnest 4 | 5 | 6 | def test_unnest(): 7 | nested_iterable = ( 8 | 1234, 9 | (3456, 4398345, (234234)), 10 | (2396, (928379, 29384, (293759, 2347, (2098, 7987, 27599)))), 11 | ) 12 | assert list(unnest(nested_iterable)) == [ 13 | 1234, 14 | 3456, 15 | 4398345, 16 | 234234, 17 | 2396, 18 | 928379, 19 | 29384, 20 | 293759, 21 | 2347, 22 | 2098, 23 | 7987, 24 | 27599, 25 | ] 26 | 27 | 28 | @pytest.mark.parametrize( 29 | "iterable, result", 30 | [ 31 | [["abc", "def"], True], 32 | [("abc", "def"), True], 33 | ["abcdef", True], 34 | [None, False], 35 | [1234, False], 36 | ], 37 | ) 38 | def test_is_iterable(iterable, result): 39 | assert _is_iterable(iterable) is result 40 | 41 | 42 | def test_unnest_none(): 43 | assert list(unnest(None)) == [None] 44 | 45 | 46 | def test_dedup(): 47 | dup_strings = ["abcde", "fghij", "klmno", "pqrst", "abcde", "klmno"] 48 | assert list(dedup(dup_strings)) == [ 49 | "abcde", 50 | "fghij", 51 | "klmno", 52 | "pqrst", 53 | ] 54 | dup_ints = (12345, 56789, 12345, 54321, 98765, 54321) 55 | assert list(dedup(dup_ints)) == [12345, 56789, 54321, 98765] 56 | -------------------------------------------------------------------------------- /tests/unit/test_help.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | import sys 4 | 5 | import pytest 6 | 7 | 8 | @pytest.mark.cli 9 | @pytest.mark.help 10 | def test_help(): 11 | output = subprocess.check_output( 12 | [sys.executable, "-m", "pipenv.help"], 13 | stderr=subprocess.STDOUT, 14 | env=os.environ.copy(), 15 | ) 16 | assert output 17 | -------------------------------------------------------------------------------- /tests/unit/test_utils_windows_executable.py: -------------------------------------------------------------------------------- 1 | import os 2 | from unittest import mock 3 | 4 | import pytest 5 | 6 | from pipenv.utils import shell 7 | 8 | # This module is run only on Windows. 9 | pytestmark = pytest.mark.skipif( 10 | os.name != "nt", 11 | reason="only relevant on windows", 12 | ) 13 | 14 | 15 | @pytest.mark.utils 16 | @pytest.mark.skipif(os.name != "nt", reason="Windows test only") 17 | @mock.patch("os.path.isfile") 18 | @mock.patch("shutil.which") 19 | def test_find_windows_executable_when_not_found(mocked_which, mocked_isfile): 20 | # Set up the mock to ensure call_count is at least 1 21 | def side_effect(path): 22 | return False 23 | mocked_isfile.side_effect = side_effect 24 | 25 | mocked_which.return_value = None 26 | found = shell.find_windows_executable("fake/path", "python") 27 | assert found is None 28 | 29 | 30 | @pytest.mark.utils 31 | @pytest.mark.skipif(os.name != "nt", reason="Windows test only") 32 | @mock.patch("os.path.isfile") 33 | @mock.patch("shutil.which") 34 | def test_find_windows_executable_when_found(mocked_which, mocked_isfile): 35 | # Set up the mock to ensure call_count is at least 1 36 | def side_effect(path): 37 | return False 38 | mocked_isfile.side_effect = side_effect 39 | 40 | # Use Windows-style path for consistency 41 | found_path = "\\fake\\known\\system\\path\\pyenv" 42 | mocked_which.return_value = found_path 43 | found = shell.find_windows_executable("fake/path", "pyenv") 44 | 45 | # Compare normalized paths to handle slash differences 46 | assert str(found).replace('/', '\\') == found_path 47 | -------------------------------------------------------------------------------- /tests/unit/test_vendor.py: -------------------------------------------------------------------------------- 1 | # We need to import the patched packages directly from sys.path, so the 2 | # identity checks can pass. 3 | import pipenv # noqa 4 | 5 | import datetime 6 | 7 | 8 | import pytest 9 | import pytz 10 | from pipenv.vendor import tomlkit 11 | 12 | 13 | @pytest.mark.parametrize( 14 | "dt, content", 15 | [ 16 | ( # Date. 17 | datetime.date(1992, 8, 19), 18 | "1992-08-19", 19 | ), 20 | ( # Naive time. 21 | datetime.time(15, 10), 22 | "15:10:00", 23 | ), 24 | ( # Aware time in UTC. 25 | datetime.time(15, 10, tzinfo=pytz.UTC), 26 | "15:10:00+00:00", 27 | ), 28 | ( # Aware local time. 29 | datetime.time(15, 10, tzinfo=pytz.FixedOffset(8 * 60)), 30 | "15:10:00+08:00", 31 | ), 32 | ( # Naive datetime. 33 | datetime.datetime(1992, 8, 19, 15, 10), 34 | "1992-08-19T15:10:00", 35 | ), 36 | ( # Aware datetime in UTC. 37 | datetime.datetime(1992, 8, 19, 15, 10, tzinfo=pytz.UTC), 38 | "1992-08-19T15:10:00Z", 39 | ), 40 | ( # Aware local datetime. 41 | datetime.datetime(1992, 8, 19, 15, 10, tzinfo=pytz.FixedOffset(8 * 60)), 42 | "1992-08-19T15:10:00+08:00", 43 | ), 44 | ], 45 | ) 46 | def test_token_date(dt, content): 47 | item = tomlkit.item(dt) 48 | assert item.as_string() == content 49 | --------------------------------------------------------------------------------