diff --git a/pipenv/patched/notpip/COPYING b/pipenv/patched/notpip/COPYING deleted file mode 100644 index f067af3a..00000000 --- a/pipenv/patched/notpip/COPYING +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (C) 2008-2011 INADA Naoki - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/pipenv/patched/notpip/LICENSE b/pipenv/patched/notpip/LICENSE deleted file mode 100644 index 3d0d3e70..00000000 --- a/pipenv/patched/notpip/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Copyright (c) 2012 by Simon Sapin. - -Some rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pipenv/patched/notpip/LICENSE.APACHE b/pipenv/patched/notpip/LICENSE.APACHE deleted file mode 100644 index f433b1a5..00000000 --- a/pipenv/patched/notpip/LICENSE.APACHE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/pipenv/patched/notpip/LICENSE.BSD b/pipenv/patched/notpip/LICENSE.BSD deleted file mode 100644 index 42ce7b75..00000000 --- a/pipenv/patched/notpip/LICENSE.BSD +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) Donald Stufft and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pipenv/patched/notpip/LICENSE.md b/pipenv/patched/notpip/LICENSE.md deleted file mode 100644 index b6f87326..00000000 --- a/pipenv/patched/notpip/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2013-2021, Kim Davies -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pipenv/patched/notpip/LICENSE.txt b/pipenv/patched/notpip/LICENSE.txt deleted file mode 100644 index 429a1767..00000000 --- a/pipenv/patched/notpip/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt) - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. diff --git a/pipenv/patched/notpip/__main__.py b/pipenv/patched/notpip/__main__.py index 546caab1..b5c1fce5 100644 --- a/pipenv/patched/notpip/__main__.py +++ b/pipenv/patched/notpip/__main__.py @@ -15,7 +15,7 @@ if __package__ == "": # __file__ is pip-*.whl/pip/__main__.py # first dirname call strips of '/__main__.py', second strips off '/pip' # Resulting path is the name of the wheel itself - # Add that to sys.path so we can import pipenv.patched.notpip + # Add that to sys.path so we can import pip path = os.path.dirname(os.path.dirname(__file__)) sys.path.insert(0, path) diff --git a/pipenv/patched/notpip/_internal/cli/main.py b/pipenv/patched/notpip/_internal/cli/main.py index e9abedd7..e1064f8e 100644 --- a/pipenv/patched/notpip/_internal/cli/main.py +++ b/pipenv/patched/notpip/_internal/cli/main.py @@ -59,7 +59,7 @@ def main(args: Optional[List[str]] = None) -> int: sys.exit(1) # Needed for locale.getpreferredencoding(False) to work - # in pip._internal.utils.encoding.auto_decode + # in pipenv.patched.notpip._internal.utils.encoding.auto_decode try: locale.setlocale(locale.LC_ALL, "") except locale.Error as e: diff --git a/pipenv/patched/notpip/_internal/commands/__init__.py b/pipenv/patched/notpip/_internal/commands/__init__.py index f56b5414..24ad0b49 100644 --- a/pipenv/patched/notpip/_internal/commands/__init__.py +++ b/pipenv/patched/notpip/_internal/commands/__init__.py @@ -12,7 +12,7 @@ CommandInfo = namedtuple('CommandInfo', 'module_path, class_name, summary') # The ordering matters for help display. # Also, even though the module path starts with the same -# "pip._internal.commands" prefix in each case, we include the full path +# "pipenv.patched.notpip._internal.commands" prefix in each case, we include the full path # because it makes testing easier (specifically when modifying commands_dict # in test setup / teardown by adding info for a FakeCommand class defined # in a test-related module). diff --git a/pipenv/patched/notpip/_internal/commands/debug.py b/pipenv/patched/notpip/_internal/commands/debug.py index 23f3061c..97035956 100644 --- a/pipenv/patched/notpip/_internal/commands/debug.py +++ b/pipenv/patched/notpip/_internal/commands/debug.py @@ -59,12 +59,12 @@ def get_module_from_module_name(module_name: str) -> ModuleType: module_name = 'pkg_resources' __import__( - f'pip._vendor.{module_name}', + f'pipenv.patched.notpip._vendor.{module_name}', globals(), locals(), level=0 ) - return getattr(pip._vendor, module_name) + return getattr(pipenv.patched.notpip._vendor, module_name) def get_vendor_version_from_module(module_name: str) -> Optional[str]: @@ -194,8 +194,8 @@ class DebugCommand(Command): show_value("'cert' config value", ca_bundle_info(self.parser.config)) show_value("REQUESTS_CA_BUNDLE", os.environ.get('REQUESTS_CA_BUNDLE')) show_value("CURL_CA_BUNDLE", os.environ.get('CURL_CA_BUNDLE')) - show_value("pip._vendor.certifi.where()", where()) - show_value("pip._vendor.DEBUNDLED", pip._vendor.DEBUNDLED) + show_value("pipenv.patched.notpip._vendor.certifi.where()", where()) + show_value("pipenv.patched.notpip._vendor.DEBUNDLED", pipenv.patched.notpip._vendor.DEBUNDLED) show_vendor_versions() diff --git a/pipenv/patched/notpip/_internal/exceptions.py b/pipenv/patched/notpip/_internal/exceptions.py index d474f682..79fc0edb 100644 --- a/pipenv/patched/notpip/_internal/exceptions.py +++ b/pipenv/patched/notpip/_internal/exceptions.py @@ -32,7 +32,7 @@ class UninstallationError(PipError): class NoneMetadataError(PipError): """ Raised when accessing "METADATA" or "PKG-INFO" metadata for a - pip._vendor.pkg_resources.Distribution object and + pipenv.patched.notpip._vendor.pkg_resources.Distribution object and `dist.has_metadata('METADATA')` returns True but `dist.get_metadata('METADATA')` returns None (and similarly for "PKG-INFO"). diff --git a/pipenv/patched/notpip/_internal/index/package_finder.py b/pipenv/patched/notpip/_internal/index/package_finder.py index ea9d3979..ab48628c 100644 --- a/pipenv/patched/notpip/_internal/index/package_finder.py +++ b/pipenv/patched/notpip/_internal/index/package_finder.py @@ -891,7 +891,7 @@ class PackageFinder: def _format_versions(cand_iter: Iterable[InstallationCandidate]) -> str: # This repeated parse_version and str() conversion is needed to - # handle different vendoring sources from pipenv.patched.notpip and pkg_resources. + # handle different vendoring sources from pip and pkg_resources. # If we stop using the pkg_resources provided specifier and start # using our own, we can drop the cast to str(). return ", ".join(sorted( diff --git a/pipenv/patched/notpip/_internal/utils/_log.py b/pipenv/patched/notpip/_internal/utils/_log.py index 92c4c6a1..2705c259 100644 --- a/pipenv/patched/notpip/_internal/utils/_log.py +++ b/pipenv/patched/notpip/_internal/utils/_log.py @@ -32,7 +32,7 @@ def init_logging() -> None: """Register our VerboseLogger and VERBOSE log level. Should be called before any calls to getLogger(), - i.e. in pip._internal.__init__ + i.e. in pipenv.patched.notpip._internal.__init__ """ logging.setLoggerClass(VerboseLogger) logging.addLevelName(VERBOSE, "VERBOSE") diff --git a/pipenv/patched/notpip/_internal/utils/deprecation.py b/pipenv/patched/notpip/_internal/utils/deprecation.py index f6ca247a..c9cd17eb 100644 --- a/pipenv/patched/notpip/_internal/utils/deprecation.py +++ b/pipenv/patched/notpip/_internal/utils/deprecation.py @@ -35,7 +35,7 @@ def _showwarning( elif issubclass(category, PipDeprecationWarning): # We use a specially named logger which will handle all of the # deprecation messages for pip. - logger = logging.getLogger("pip._internal.deprecations") + logger = logging.getLogger("pipenv.patched.notpip._internal.deprecations") logger.warning(message) else: _original_showwarning(message, category, filename, lineno, file, line) diff --git a/pipenv/patched/notpip/_internal/utils/logging.py b/pipenv/patched/notpip/_internal/utils/logging.py index fab4a6a1..c8f31e57 100644 --- a/pipenv/patched/notpip/_internal/utils/logging.py +++ b/pipenv/patched/notpip/_internal/utils/logging.py @@ -308,8 +308,8 @@ def setup_logging(verbosity, no_color, user_log_file): "stderr": "ext://sys.stderr", } handler_classes = { - "stream": "pip._internal.utils.logging.ColorizedStreamHandler", - "file": "pip._internal.utils.logging.BetterRotatingFileHandler", + "stream": "pipenv.patched.notpip._internal.utils.logging.ColorizedStreamHandler", + "file": "pipenv.patched.notpip._internal.utils.logging.BetterRotatingFileHandler", } handlers = ["console", "console_errors", "console_subprocess"] + ( ["user_log"] if include_user_log else [] @@ -321,7 +321,7 @@ def setup_logging(verbosity, no_color, user_log_file): "disable_existing_loggers": False, "filters": { "exclude_warnings": { - "()": "pip._internal.utils.logging.MaxLevelFilter", + "()": "pipenv.patched.notpip._internal.utils.logging.MaxLevelFilter", "level": logging.WARNING, }, "restrict_to_subprocess": { @@ -329,7 +329,7 @@ def setup_logging(verbosity, no_color, user_log_file): "name": subprocess_logger.name, }, "exclude_subprocess": { - "()": "pip._internal.utils.logging.ExcludeLoggerFilter", + "()": "pipenv.patched.notpip._internal.utils.logging.ExcludeLoggerFilter", "name": subprocess_logger.name, }, }, @@ -384,7 +384,7 @@ def setup_logging(verbosity, no_color, user_log_file): "level": root_level, "handlers": handlers, }, - "loggers": {"pip._vendor": {"level": vendored_log_level}}, + "loggers": {"pipenv.patched.notpip._vendor": {"level": vendored_log_level}}, } ) diff --git a/pipenv/patched/notpip/_internal/utils/misc.py b/pipenv/patched/notpip/_internal/utils/misc.py index a5ff69fe..4224909d 100644 --- a/pipenv/patched/notpip/_internal/utils/misc.py +++ b/pipenv/patched/notpip/_internal/utils/misc.py @@ -794,7 +794,7 @@ def is_wheel_installed(): Return whether the wheel package is installed. """ try: - import wheel # noqa: F401 + import pipenv.vendor.wheel as wheel # noqa: F401 except ImportError: return False diff --git a/pipenv/patched/notpip/_internal/vcs/__init__.py b/pipenv/patched/notpip/_internal/vcs/__init__.py index 8624078a..5ed81940 100644 --- a/pipenv/patched/notpip/_internal/vcs/__init__.py +++ b/pipenv/patched/notpip/_internal/vcs/__init__.py @@ -1,5 +1,5 @@ # Expose a limited set of classes and functions so callers outside of -# the vcs package don't need to import deeper than `pip._internal.vcs`. +# the vcs package don't need to import deeper than `pipenv.patched.notpip._internal.vcs`. # (The test directory may still need to import from a vcs sub-package.) # Import all vcs modules to register each VCS in the VcsSupport object. import pipenv.patched.notpip._internal.vcs.bazaar diff --git a/pipenv/patched/notpip/_vendor/__init__.py b/pipenv/patched/notpip/_vendor/__init__.py index fa173805..d6c55e38 100644 --- a/pipenv/patched/notpip/_vendor/__init__.py +++ b/pipenv/patched/notpip/_vendor/__init__.py @@ -1,8 +1,8 @@ """ -pip._vendor is for vendoring dependencies of pip to prevent needing pip to +pipenv.patched.notpip._vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. -Files inside of pip._vendor should be considered immutable and should only be +Files inside of pipenv.patched.notpip._vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import diff --git a/pipenv/patched/notpip/_vendor/appdirs.py b/pipenv/patched/notpip/_vendor/appdirs.py index 33a3b774..65501092 100644 --- a/pipenv/patched/notpip/_vendor/appdirs.py +++ b/pipenv/patched/notpip/_vendor/appdirs.py @@ -38,7 +38,7 @@ if sys.platform.startswith('java'): # *sys.platform* style strings. system = 'linux2' elif sys.platform == 'cli' and os.name == 'nt': - # Detect Windows in IronPython to match pip._internal.utils.compat.WINDOWS + # Detect Windows in IronPython to match pipenv.patched.notpip._internal.utils.compat.WINDOWS # Discussion: system = 'win32' else: diff --git a/pipenv/patched/notpip/_vendor/pep517/compat.py b/pipenv/patched/notpip/_vendor/pep517/compat.py index 834624e5..c2c4aaa8 100644 --- a/pipenv/patched/notpip/_vendor/pep517/compat.py +++ b/pipenv/patched/notpip/_vendor/pep517/compat.py @@ -35,8 +35,8 @@ except NameError: if sys.version_info < (3, 6): - from toml import load as toml_load # noqa: F401 - from toml import TomlDecodeError as TOMLDecodeError # noqa: F401 + from pipenv.vendor.toml import load as toml_load # noqa: F401 + from pipenv.vendor.toml import TomlDecodeError as TOMLDecodeError # noqa: F401 else: from pipenv.patched.notpip._vendor.tomli import load as toml_load # noqa: F401 from pipenv.patched.notpip._vendor.tomli import TOMLDecodeError # noqa: F401 diff --git a/pipenv/patched/notpip/_vendor/pep517/meta.py b/pipenv/patched/notpip/_vendor/pep517/meta.py index d525de5c..5f7d9485 100644 --- a/pipenv/patched/notpip/_vendor/pep517/meta.py +++ b/pipenv/patched/notpip/_vendor/pep517/meta.py @@ -9,12 +9,12 @@ import functools try: import importlib.metadata as imp_meta except ImportError: - import importlib_metadata as imp_meta + import pipenv.vendor.importlib_metadata as imp_meta try: from zipfile import Path except ImportError: - from zipp import Path + from pipenv.vendor.zipp import Path from .envbuild import BuildEnvironment from .wrappers import Pep517HookCaller, quiet_subprocess_runner diff --git a/pipenv/patched/notpip/appdirs.LICENSE.txt b/pipenv/patched/notpip/appdirs.LICENSE.txt deleted file mode 100644 index 107c6140..00000000 --- a/pipenv/patched/notpip/appdirs.LICENSE.txt +++ /dev/null @@ -1,23 +0,0 @@ -# This is the MIT license - -Copyright (c) 2010 ActiveState Software Inc. - -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: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -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. - diff --git a/pipenv/patched/notpip/distro.LICENSE b/pipenv/patched/notpip/distro.LICENSE deleted file mode 100644 index e06d2081..00000000 --- a/pipenv/patched/notpip/distro.LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/pipenv/patched/notpip/pyparsing.LICENSE b/pipenv/patched/notpip/pyparsing.LICENSE deleted file mode 100644 index 1bf98523..00000000 --- a/pipenv/patched/notpip/pyparsing.LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -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: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -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. diff --git a/pipenv/patched/notpip/six.LICENSE b/pipenv/patched/notpip/six.LICENSE deleted file mode 100644 index de663311..00000000 --- a/pipenv/patched/notpip/six.LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2010-2020 Benjamin Peterson - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. diff --git a/pipenv/patched/pipfile/api.py b/pipenv/patched/pipfile/api.py index e8fa0277..ae8ee252 100644 --- a/pipenv/patched/pipfile/api.py +++ b/pipenv/patched/pipfile/api.py @@ -1,10 +1,10 @@ -import toml +import pipenv.vendor.toml as toml import codecs import json import hashlib import platform -import six +import pipenv.vendor.six as six import sys import os diff --git a/pipenv/patched/safety/__main__.py b/pipenv/patched/safety/__main__.py index f905408a..90e702a7 100644 --- a/pipenv/patched/safety/__main__.py +++ b/pipenv/patched/safety/__main__.py @@ -47,5 +47,5 @@ if __name__ == "__main__": # pragma: no cover yaml_lib = "pipenv.patched.yaml{0}".format(sys.version_info[0]) locals()[yaml_lib] = __import__(yaml_lib) sys.modules["yaml"] = sys.modules[yaml_lib] - from safety.cli import cli + from pipenv.patched.safety.cli import cli cli(prog_name="safety") diff --git a/pipenv/patched/safety/cli.py b/pipenv/patched/safety/cli.py index 09737831..0d092fb2 100644 --- a/pipenv/patched/safety/cli.py +++ b/pipenv/patched/safety/cli.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import import sys -import click -from safety import __version__ -from safety import safety -from safety.formatter import report, license_report +import pipenv.vendor.click as click +from pipenv.patched.safety import __version__ +from pipenv.patched.safety import safety +from pipenv.patched.safety.formatter import report, license_report import itertools -from safety.util import read_requirements, read_vulnerabilities, get_proxy_dict, get_packages_licenses -from safety.errors import DatabaseFetchError, DatabaseFileNotFoundError, InvalidKeyError, TooManyRequestsError +from pipenv.patched.safety.util import read_requirements, read_vulnerabilities, get_proxy_dict, get_packages_licenses +from pipenv.patched.safety.errors import DatabaseFetchError, DatabaseFileNotFoundError, InvalidKeyError, TooManyRequestsError try: from json.decoder import JSONDecodeError diff --git a/pipenv/patched/safety/safety.py b/pipenv/patched/safety/safety.py index 9f3a5bbd..8a8f9c84 100644 --- a/pipenv/patched/safety/safety.py +++ b/pipenv/patched/safety/safety.py @@ -5,8 +5,8 @@ import os import time from collections import namedtuple -import requests -from packaging.specifiers import SpecifierSet +import pipenv.vendor.requests as requests +from pipenv.vendor.packaging.specifiers import SpecifierSet from .constants import (API_MIRRORS, CACHE_FILE, CACHE_LICENSES_VALID_SECONDS, CACHE_VALID_SECONDS, OPEN_MIRRORS, REQUEST_TIMEOUT) diff --git a/pipenv/patched/safety/util.py b/pipenv/patched/safety/util.py index 760b21a5..a9428054 100644 --- a/pipenv/patched/safety/util.py +++ b/pipenv/patched/safety/util.py @@ -1,7 +1,7 @@ -from dparse.parser import setuptools_parse_requirements_backport as _parse_requirements +from pipenv.vendor.dparse.parser import setuptools_parse_requirements_backport as _parse_requirements from collections import namedtuple -from packaging.version import parse as parse_version -import click +from pipenv.vendor.packaging.version import parse as parse_version +import pipenv.vendor.click as click import sys import json import os diff --git a/pipenv/vendor/attr/_next_gen.py b/pipenv/vendor/attr/_next_gen.py index fab0af96..e98f4671 100644 --- a/pipenv/vendor/attr/_next_gen.py +++ b/pipenv/vendor/attr/_next_gen.py @@ -5,7 +5,7 @@ These are Python 3.6+-only and keyword-only APIs that call `attr.s` and from functools import partial -from attr.exceptions import UnannotatedAttributeError +from pipenv.vendor.attr.exceptions import UnannotatedAttributeError from . import setters from ._make import NOTHING, _frozen_setattrs, attrib, attrs diff --git a/pipenv/vendor/cerberus/__init__.py b/pipenv/vendor/cerberus/__init__.py index e4dedf6c..b4628a52 100644 --- a/pipenv/vendor/cerberus/__init__.py +++ b/pipenv/vendor/cerberus/__init__.py @@ -12,9 +12,9 @@ from __future__ import absolute_import from pkg_resources import get_distribution, DistributionNotFound -from cerberus.validator import DocumentError, Validator -from cerberus.schema import rules_set_registry, schema_registry, SchemaError -from cerberus.utils import TypeDefinition +from pipenv.vendor.cerberus.validator import DocumentError, Validator +from pipenv.vendor.cerberus.schema import rules_set_registry, schema_registry, SchemaError +from pipenv.vendor.cerberus.utils import TypeDefinition try: diff --git a/pipenv/vendor/cerberus/benchmarks/test_overall_performance_1.py b/pipenv/vendor/cerberus/benchmarks/test_overall_performance_1.py index a1f76201..1f9eeb1d 100644 --- a/pipenv/vendor/cerberus/benchmarks/test_overall_performance_1.py +++ b/pipenv/vendor/cerberus/benchmarks/test_overall_performance_1.py @@ -16,8 +16,8 @@ from typing import Callable, List from pytest import mark -from cerberus import rules_set_registry, schema_registry, TypeDefinition, Validator -from cerberus.benchmarks import DOCUMENTS_PATH +from pipenv.vendor.cerberus import rules_set_registry, schema_registry, TypeDefinition, Validator +from pipenv.vendor.cerberus.benchmarks import DOCUMENTS_PATH rules_set_registry.add("path_rules", {"coerce": Path, "type": "path"}) diff --git a/pipenv/vendor/cerberus/benchmarks/test_overall_performance_2.py b/pipenv/vendor/cerberus/benchmarks/test_overall_performance_2.py index 8bf49a59..227f81aa 100644 --- a/pipenv/vendor/cerberus/benchmarks/test_overall_performance_2.py +++ b/pipenv/vendor/cerberus/benchmarks/test_overall_performance_2.py @@ -5,9 +5,9 @@ from typing import Counter as CounterType from pytest import mark -from cerberus import Validator -from cerberus.benchmarks.schemas.overalll_schema_2 import product_schema -from cerberus.benchmarks import DOCUMENTS_PATH +from pipenv.vendor.cerberus import Validator +from pipenv.vendor.cerberus.benchmarks.schemas.overalll_schema_2 import product_schema +from pipenv.vendor.cerberus.benchmarks import DOCUMENTS_PATH def init_validator(): diff --git a/pipenv/vendor/cerberus/errors.py b/pipenv/vendor/cerberus/errors.py index 97afc045..1492f1d1 100644 --- a/pipenv/vendor/cerberus/errors.py +++ b/pipenv/vendor/cerberus/errors.py @@ -8,8 +8,8 @@ from copy import copy, deepcopy from functools import wraps from pprint import pformat -from cerberus.platform import PYTHON_VERSION, MutableMapping -from cerberus.utils import compare_paths_lt, quote_string +from pipenv.vendor.cerberus.platform import PYTHON_VERSION, MutableMapping +from pipenv.vendor.cerberus.utils import compare_paths_lt, quote_string ErrorDefinition = namedtuple('ErrorDefinition', 'code, rule') diff --git a/pipenv/vendor/cerberus/schema.py b/pipenv/vendor/cerberus/schema.py index da313274..3841d384 100644 --- a/pipenv/vendor/cerberus/schema.py +++ b/pipenv/vendor/cerberus/schema.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from warnings import warn -from cerberus import errors -from cerberus.platform import ( +from pipenv.vendor.cerberus import errors +from pipenv.vendor.cerberus.platform import ( _str_type, Callable, Hashable, @@ -11,7 +11,7 @@ from cerberus.platform import ( MutableMapping, Sequence, ) -from cerberus.utils import ( +from pipenv.vendor.cerberus.utils import ( get_Validator_class, validator_factory, mapping_hash, diff --git a/pipenv/vendor/cerberus/tests/__init__.py b/pipenv/vendor/cerberus/tests/__init__.py index 7e136cc2..b5e66e06 100644 --- a/pipenv/vendor/cerberus/tests/__init__.py +++ b/pipenv/vendor/cerberus/tests/__init__.py @@ -4,8 +4,8 @@ import re import pytest -from cerberus import errors, Validator, SchemaError, DocumentError -from cerberus.tests.conftest import sample_schema +from pipenv.vendor.cerberus import errors, Validator, SchemaError, DocumentError +from pipenv.vendor.cerberus.tests.conftest import sample_schema def assert_exception(exception, document={}, schema=None, validator=None, msg=None): diff --git a/pipenv/vendor/cerberus/tests/conftest.py b/pipenv/vendor/cerberus/tests/conftest.py index 776c97bc..6c701060 100644 --- a/pipenv/vendor/cerberus/tests/conftest.py +++ b/pipenv/vendor/cerberus/tests/conftest.py @@ -4,7 +4,7 @@ from copy import deepcopy import pytest -from cerberus import Validator +from pipenv.vendor.cerberus import Validator @pytest.fixture diff --git a/pipenv/vendor/cerberus/tests/test_assorted.py b/pipenv/vendor/cerberus/tests/test_assorted.py index b84ef810..f45fdd5f 100644 --- a/pipenv/vendor/cerberus/tests/test_assorted.py +++ b/pipenv/vendor/cerberus/tests/test_assorted.py @@ -5,11 +5,11 @@ from pkg_resources import Distribution, DistributionNotFound from pytest import mark -from cerberus import TypeDefinition, Validator -from cerberus.tests import assert_fail, assert_success -from cerberus.utils import validator_factory -from cerberus.validator import BareValidator -from cerberus.platform import PYTHON_VERSION +from pipenv.vendor.cerberus import TypeDefinition, Validator +from pipenv.vendor.cerberus.tests import assert_fail, assert_success +from pipenv.vendor.cerberus.utils import validator_factory +from pipenv.vendor.cerberus.validator import BareValidator +from pipenv.vendor.cerberus.platform import PYTHON_VERSION if PYTHON_VERSION > 3 and PYTHON_VERSION < 3.4: diff --git a/pipenv/vendor/cerberus/tests/test_customization.py b/pipenv/vendor/cerberus/tests/test_customization.py index 1af4b537..4dcb8dd0 100644 --- a/pipenv/vendor/cerberus/tests/test_customization.py +++ b/pipenv/vendor/cerberus/tests/test_customization.py @@ -2,9 +2,9 @@ from pytest import mark -import cerberus -from cerberus.tests import assert_fail, assert_success -from cerberus.tests.conftest import sample_schema +import pipenv.vendor.cerberus as cerberus +from pipenv.vendor.cerberus.tests import assert_fail, assert_success +from pipenv.vendor.cerberus.tests.conftest import sample_schema def test_contextual_data_preservation(): diff --git a/pipenv/vendor/cerberus/tests/test_errors.py b/pipenv/vendor/cerberus/tests/test_errors.py index 2ada7fde..6d8ffd6c 100644 --- a/pipenv/vendor/cerberus/tests/test_errors.py +++ b/pipenv/vendor/cerberus/tests/test_errors.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from cerberus import Validator, errors -from cerberus.tests import assert_fail +from pipenv.vendor.cerberus import Validator, errors +from pipenv.vendor.cerberus.tests import assert_fail ValidationError = errors.ValidationError diff --git a/pipenv/vendor/cerberus/tests/test_normalization.py b/pipenv/vendor/cerberus/tests/test_normalization.py index adc281ef..43191504 100644 --- a/pipenv/vendor/cerberus/tests/test_normalization.py +++ b/pipenv/vendor/cerberus/tests/test_normalization.py @@ -5,8 +5,8 @@ from tempfile import NamedTemporaryFile from pytest import mark -from cerberus import Validator, errors -from cerberus.tests import ( +from pipenv.vendor.cerberus import Validator, errors +from pipenv.vendor.cerberus.tests import ( assert_fail, assert_has_error, assert_normalized, diff --git a/pipenv/vendor/cerberus/tests/test_registries.py b/pipenv/vendor/cerberus/tests/test_registries.py index b628952d..3cb3e6ef 100644 --- a/pipenv/vendor/cerberus/tests/test_registries.py +++ b/pipenv/vendor/cerberus/tests/test_registries.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from cerberus import schema_registry, rules_set_registry, Validator -from cerberus.tests import ( +from pipenv.vendor.cerberus import schema_registry, rules_set_registry, Validator +from pipenv.vendor.cerberus.tests import ( assert_fail, assert_normalized, assert_schema_error, diff --git a/pipenv/vendor/cerberus/tests/test_schema.py b/pipenv/vendor/cerberus/tests/test_schema.py index 28b5dd34..a44a4042 100644 --- a/pipenv/vendor/cerberus/tests/test_schema.py +++ b/pipenv/vendor/cerberus/tests/test_schema.py @@ -4,9 +4,9 @@ import re import pytest -from cerberus import Validator, errors, SchemaError -from cerberus.schema import UnvalidatedSchema -from cerberus.tests import assert_schema_error +from pipenv.vendor.cerberus import Validator, errors, SchemaError +from pipenv.vendor.cerberus.schema import UnvalidatedSchema +from pipenv.vendor.cerberus.tests import assert_schema_error def test_empty_schema(): diff --git a/pipenv/vendor/cerberus/tests/test_utils.py b/pipenv/vendor/cerberus/tests/test_utils.py index 6ab38790..f09cae6b 100644 --- a/pipenv/vendor/cerberus/tests/test_utils.py +++ b/pipenv/vendor/cerberus/tests/test_utils.py @@ -1,4 +1,4 @@ -from cerberus.utils import compare_paths_lt +from pipenv.vendor.cerberus.utils import compare_paths_lt def test_compare_paths(): diff --git a/pipenv/vendor/cerberus/tests/test_validation.py b/pipenv/vendor/cerberus/tests/test_validation.py index ae5f5444..801bf6fa 100644 --- a/pipenv/vendor/cerberus/tests/test_validation.py +++ b/pipenv/vendor/cerberus/tests/test_validation.py @@ -9,8 +9,8 @@ from string import ascii_lowercase from pytest import mark -from cerberus import errors, Validator -from cerberus.tests import ( +from pipenv.vendor.cerberus import errors, Validator +from pipenv.vendor.cerberus.tests import ( assert_bad_type, assert_document_error, assert_fail, @@ -18,7 +18,7 @@ from cerberus.tests import ( assert_not_has_error, assert_success, ) -from cerberus.tests.conftest import sample_schema +from pipenv.vendor.cerberus.tests.conftest import sample_schema def test_empty_document(): diff --git a/pipenv/vendor/cerberus/utils.py b/pipenv/vendor/cerberus/utils.py index f84b0966..908c5fa1 100644 --- a/pipenv/vendor/cerberus/utils.py +++ b/pipenv/vendor/cerberus/utils.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from collections import namedtuple -from cerberus.platform import _int_types, _str_type, Mapping, Sequence, Set +from pipenv.vendor.cerberus.platform import _int_types, _str_type, Mapping, Sequence, Set TypeDefinition = namedtuple('TypeDefinition', 'name,included_types,excluded_types') @@ -50,7 +50,7 @@ def drop_item_from_tuple(t, i): def get_Validator_class(): global Validator if 'Validator' not in globals(): - from cerberus.validator import Validator + from pipenv.vendor.cerberus.validator import Validator return Validator diff --git a/pipenv/vendor/cerberus/validator.py b/pipenv/vendor/cerberus/validator.py index 7d50b2da..3d6b2122 100644 --- a/pipenv/vendor/cerberus/validator.py +++ b/pipenv/vendor/cerberus/validator.py @@ -16,8 +16,8 @@ from datetime import date, datetime import re from warnings import warn -from cerberus import errors -from cerberus.platform import ( +from pipenv.vendor.cerberus import errors +from pipenv.vendor.cerberus.platform import ( _int_types, _str_type, Container, @@ -27,13 +27,13 @@ from cerberus.platform import ( Sequence, Sized, ) -from cerberus.schema import ( +from pipenv.vendor.cerberus.schema import ( schema_registry, rules_set_registry, DefinitionSchema, SchemaError, ) -from cerberus.utils import drop_item_from_tuple, readonly_classproperty, TypeDefinition +from pipenv.vendor.cerberus.utils import drop_item_from_tuple, readonly_classproperty, TypeDefinition toy_error_handler = errors.ToyErrorHandler() diff --git a/pipenv/vendor/certifi/__main__.py b/pipenv/vendor/certifi/__main__.py index 8945b5da..244882d9 100644 --- a/pipenv/vendor/certifi/__main__.py +++ b/pipenv/vendor/certifi/__main__.py @@ -1,6 +1,6 @@ import argparse -from certifi import contents, where +from pipenv.vendor.certifi import contents, where parser = argparse.ArgumentParser() parser.add_argument("-c", "--contents", action="store_true") diff --git a/pipenv/vendor/chardet/cli/chardetect.py b/pipenv/vendor/chardet/cli/chardetect.py index e1d8cd69..33c228ab 100644 --- a/pipenv/vendor/chardet/cli/chardetect.py +++ b/pipenv/vendor/chardet/cli/chardetect.py @@ -17,9 +17,9 @@ from __future__ import absolute_import, print_function, unicode_literals import argparse import sys -from chardet import __version__ -from chardet.compat import PY2 -from chardet.universaldetector import UniversalDetector +from pipenv.vendor.chardet import __version__ +from pipenv.vendor.chardet.compat import PY2 +from pipenv.vendor.chardet.universaldetector import UniversalDetector def description_of(lines, name='stdin'): diff --git a/pipenv/vendor/chardet/langbulgarianmodel.py b/pipenv/vendor/chardet/langbulgarianmodel.py index 561bfd90..1c04bac9 100644 --- a/pipenv/vendor/chardet/langbulgarianmodel.py +++ b/pipenv/vendor/chardet/langbulgarianmodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/chardet/langgreekmodel.py b/pipenv/vendor/chardet/langgreekmodel.py index 02b94de6..42cd0137 100644 --- a/pipenv/vendor/chardet/langgreekmodel.py +++ b/pipenv/vendor/chardet/langgreekmodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/chardet/langhebrewmodel.py b/pipenv/vendor/chardet/langhebrewmodel.py index 40fd674c..b20f5912 100644 --- a/pipenv/vendor/chardet/langhebrewmodel.py +++ b/pipenv/vendor/chardet/langhebrewmodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/chardet/langhungarianmodel.py b/pipenv/vendor/chardet/langhungarianmodel.py index 24a097f5..c7d1b777 100644 --- a/pipenv/vendor/chardet/langhungarianmodel.py +++ b/pipenv/vendor/chardet/langhungarianmodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/chardet/langrussianmodel.py b/pipenv/vendor/chardet/langrussianmodel.py index 569689d0..15b88712 100644 --- a/pipenv/vendor/chardet/langrussianmodel.py +++ b/pipenv/vendor/chardet/langrussianmodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/chardet/langthaimodel.py b/pipenv/vendor/chardet/langthaimodel.py index d0191f24..80025411 100644 --- a/pipenv/vendor/chardet/langthaimodel.py +++ b/pipenv/vendor/chardet/langthaimodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/chardet/langturkishmodel.py b/pipenv/vendor/chardet/langturkishmodel.py index 8ba93224..59983a24 100644 --- a/pipenv/vendor/chardet/langturkishmodel.py +++ b/pipenv/vendor/chardet/langturkishmodel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from chardet.sbcharsetprober import SingleByteCharSetModel +from pipenv.vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive diff --git a/pipenv/vendor/charset_normalizer/__init__.py b/pipenv/vendor/charset_normalizer/__init__.py index f14a90b1..550c205f 100644 --- a/pipenv/vendor/charset_normalizer/__init__.py +++ b/pipenv/vendor/charset_normalizer/__init__.py @@ -20,12 +20,12 @@ at . :copyright: (c) 2021 by Ahmed TAHRI :license: MIT, see LICENSE for more details. """ -from charset_normalizer.api import from_fp, from_path, from_bytes, normalize -from charset_normalizer.legacy import detect -from charset_normalizer.version import __version__, VERSION -from charset_normalizer.models import CharsetMatch, CharsetMatches +from pipenv.vendor.charset_normalizer.api import from_fp, from_path, from_bytes, normalize +from pipenv.vendor.charset_normalizer.legacy import detect +from pipenv.vendor.charset_normalizer.version import __version__, VERSION +from pipenv.vendor.charset_normalizer.models import CharsetMatch, CharsetMatches # Backward-compatible v1 imports -from charset_normalizer.models import CharsetNormalizerMatch -import charset_normalizer.api as CharsetDetector +from pipenv.vendor.charset_normalizer.models import CharsetNormalizerMatch +import pipenv.vendor.charset_normalizer.api as CharsetDetector CharsetNormalizerMatches = CharsetDetector diff --git a/pipenv/vendor/charset_normalizer/api.py b/pipenv/vendor/charset_normalizer/api.py index 7ad912cb..bd555d9e 100644 --- a/pipenv/vendor/charset_normalizer/api.py +++ b/pipenv/vendor/charset_normalizer/api.py @@ -6,15 +6,15 @@ try: except ImportError: PathLike = Union[str, 'os.PathLike[str]'] # type: ignore -from charset_normalizer.constant import TOO_SMALL_SEQUENCE, TOO_BIG_SEQUENCE, IANA_SUPPORTED -from charset_normalizer.md import mess_ratio -from charset_normalizer.models import CharsetMatches, CharsetMatch +from pipenv.vendor.charset_normalizer.constant import TOO_SMALL_SEQUENCE, TOO_BIG_SEQUENCE, IANA_SUPPORTED +from pipenv.vendor.charset_normalizer.md import mess_ratio +from pipenv.vendor.charset_normalizer.models import CharsetMatches, CharsetMatch from warnings import warn import logging -from charset_normalizer.utils import any_specified_encoding, is_multi_byte_encoding, identify_sig_or_bom, \ +from pipenv.vendor.charset_normalizer.utils import any_specified_encoding, is_multi_byte_encoding, identify_sig_or_bom, \ should_strip_sig_or_bom, is_cp_similar, iana_name -from charset_normalizer.cd import coherence_ratio, encoding_languages, mb_encoding_languages, merge_coherence_ratios +from pipenv.vendor.charset_normalizer.cd import coherence_ratio, encoding_languages, mb_encoding_languages, merge_coherence_ratios logger = logging.getLogger("charset_normalizer") logger.setLevel(logging.DEBUG) diff --git a/pipenv/vendor/charset_normalizer/cd.py b/pipenv/vendor/charset_normalizer/cd.py index c4fc1ba5..a89022e2 100644 --- a/pipenv/vendor/charset_normalizer/cd.py +++ b/pipenv/vendor/charset_normalizer/cd.py @@ -3,10 +3,10 @@ from functools import lru_cache from typing import List, Set, Optional, Tuple, Dict import importlib -from charset_normalizer.models import CoherenceMatches -from charset_normalizer.utils import unicode_range, is_unicode_range_secondary, is_multi_byte_encoding -from charset_normalizer.md import is_suspiciously_successive_range -from charset_normalizer.assets import FREQUENCIES +from pipenv.vendor.charset_normalizer.models import CoherenceMatches +from pipenv.vendor.charset_normalizer.utils import unicode_range, is_unicode_range_secondary, is_multi_byte_encoding +from pipenv.vendor.charset_normalizer.md import is_suspiciously_successive_range +from pipenv.vendor.charset_normalizer.assets import FREQUENCIES from collections import Counter diff --git a/pipenv/vendor/charset_normalizer/cli/normalizer.py b/pipenv/vendor/charset_normalizer/cli/normalizer.py index 189dde3c..26c94b7c 100644 --- a/pipenv/vendor/charset_normalizer/cli/normalizer.py +++ b/pipenv/vendor/charset_normalizer/cli/normalizer.py @@ -3,9 +3,9 @@ import sys from os.path import abspath from json import dumps -from charset_normalizer import from_fp -from charset_normalizer.models import CliDetectionResult -from charset_normalizer.version import __version__ +from pipenv.vendor.charset_normalizer import from_fp +from pipenv.vendor.charset_normalizer.models import CliDetectionResult +from pipenv.vendor.charset_normalizer.version import __version__ from platform import python_version diff --git a/pipenv/vendor/charset_normalizer/legacy.py b/pipenv/vendor/charset_normalizer/legacy.py index 7b28cb48..c4d7cd74 100644 --- a/pipenv/vendor/charset_normalizer/legacy.py +++ b/pipenv/vendor/charset_normalizer/legacy.py @@ -1,5 +1,5 @@ -from charset_normalizer.api import from_bytes -from charset_normalizer.constant import CHARDET_CORRESPONDENCE +from pipenv.vendor.charset_normalizer.api import from_bytes +from pipenv.vendor.charset_normalizer.constant import CHARDET_CORRESPONDENCE from typing import Dict, Optional, Union diff --git a/pipenv/vendor/charset_normalizer/md.py b/pipenv/vendor/charset_normalizer/md.py index 4f9c7140..b8c5fbf5 100644 --- a/pipenv/vendor/charset_normalizer/md.py +++ b/pipenv/vendor/charset_normalizer/md.py @@ -1,8 +1,8 @@ from functools import lru_cache from typing import Optional, List -from charset_normalizer.constant import UNICODE_SECONDARY_RANGE_KEYWORD -from charset_normalizer.utils import is_punctuation, is_symbol, unicode_range, is_accentuated, is_latin, \ +from pipenv.vendor.charset_normalizer.constant import UNICODE_SECONDARY_RANGE_KEYWORD +from pipenv.vendor.charset_normalizer.utils import is_punctuation, is_symbol, unicode_range, is_accentuated, is_latin, \ remove_accent, is_separator, is_cjk diff --git a/pipenv/vendor/charset_normalizer/models.py b/pipenv/vendor/charset_normalizer/models.py index 2bf75a4e..a0a94cb7 100644 --- a/pipenv/vendor/charset_normalizer/models.py +++ b/pipenv/vendor/charset_normalizer/models.py @@ -6,9 +6,9 @@ from typing import Optional, List, Tuple, Set from collections import Counter from re import sub, compile as re_compile -from charset_normalizer.constant import TOO_BIG_SEQUENCE -from charset_normalizer.md import mess_ratio -from charset_normalizer.utils import iana_name, is_multi_byte_encoding, unicode_range +from pipenv.vendor.charset_normalizer.constant import TOO_BIG_SEQUENCE +from pipenv.vendor.charset_normalizer.md import mess_ratio +from pipenv.vendor.charset_normalizer.utils import iana_name, is_multi_byte_encoding, unicode_range class CharsetMatch: @@ -153,7 +153,7 @@ class CharsetMatch: return "English" # doing it there to avoid circular import - from charset_normalizer.cd import mb_encoding_languages, encoding_languages + from pipenv.vendor.charset_normalizer.cd import mb_encoding_languages, encoding_languages languages = mb_encoding_languages(self.encoding) if is_multi_byte_encoding(self.encoding) else encoding_languages(self.encoding) diff --git a/pipenv/vendor/charset_normalizer/utils.py b/pipenv/vendor/charset_normalizer/utils.py index db59739f..1d674e4e 100644 --- a/pipenv/vendor/charset_normalizer/utils.py +++ b/pipenv/vendor/charset_normalizer/utils.py @@ -12,7 +12,7 @@ from _multibytecodec import MultibyteIncrementalDecoder # type: ignore from encodings.aliases import aliases from functools import lru_cache -from charset_normalizer.constant import UNICODE_RANGES_COMBINED, UNICODE_SECONDARY_RANGE_KEYWORD, \ +from pipenv.vendor.charset_normalizer.constant import UNICODE_RANGES_COMBINED, UNICODE_SECONDARY_RANGE_KEYWORD, \ RE_POSSIBLE_ENCODING_INDICATION, ENCODING_MARKS, UTF8_MAXIMAL_ALLOCATION, IANA_SUPPORTED_SIMILAR diff --git a/pipenv/vendor/click/_compat.py b/pipenv/vendor/click/_compat.py index b9e1f0d3..7877b529 100644 --- a/pipenv/vendor/click/_compat.py +++ b/pipenv/vendor/click/_compat.py @@ -538,7 +538,7 @@ if sys.platform.startswith("win") and WIN: if cached is not None: return cached - import colorama + import pipenv.vendor.colorama as colorama strip = should_strip_ansi(stream, color) ansi_wrapper = colorama.AnsiToWin32(stream, strip=strip) diff --git a/pipenv/vendor/click/core.py b/pipenv/vendor/click/core.py index e2ccf59a..9e41d8b2 100644 --- a/pipenv/vendor/click/core.py +++ b/pipenv/vendor/click/core.py @@ -949,7 +949,7 @@ class BaseCommand: .. versionadded:: 8.0 """ - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem results: t.List["CompletionItem"] = [] @@ -1412,7 +1412,7 @@ class Command(BaseCommand): .. versionadded:: 8.0 """ - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem results: t.List["CompletionItem"] = [] @@ -1748,7 +1748,7 @@ class MultiCommand(Command): .. versionadded:: 8.0 """ - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem results = [ CompletionItem(name, help=command.get_short_help_str()) @@ -2072,7 +2072,7 @@ class Parameter: def shell_complete( ctx: Context, param: "Parameter", incomplete: str ) -> t.List["CompletionItem"]: - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem out = [] @@ -2401,7 +2401,7 @@ class Parameter: results = self._custom_shell_complete(ctx, self, incomplete) if results and isinstance(results[0], str): - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem results = [CompletionItem(c) for c in results] diff --git a/pipenv/vendor/click/decorators.py b/pipenv/vendor/click/decorators.py index 5940e69f..fef3fb32 100644 --- a/pipenv/vendor/click/decorators.py +++ b/pipenv/vendor/click/decorators.py @@ -373,7 +373,7 @@ def version_option( from importlib import metadata # type: ignore except ImportError: # Python < 3.8 - import importlib_metadata as metadata # type: ignore + import pipenv.vendor.importlib_metadata as metadata # type: ignore try: version = metadata.version(package_name) # type: ignore diff --git a/pipenv/vendor/click/types.py b/pipenv/vendor/click/types.py index 21f0e4f7..f5fc243e 100644 --- a/pipenv/vendor/click/types.py +++ b/pipenv/vendor/click/types.py @@ -309,7 +309,7 @@ class Choice(ParamType): .. versionadded:: 8.0 """ - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem str_choices = map(str, self.choices) @@ -738,7 +738,7 @@ class File(ParamType): .. versionadded:: 8.0 """ - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem return [CompletionItem(incomplete, type="file")] @@ -903,7 +903,7 @@ class Path(ParamType): .. versionadded:: 8.0 """ - from click.shell_completion import CompletionItem + from pipenv.vendor.click.shell_completion import CompletionItem type = "dir" if self.dir_okay and not self.file_okay else "file" return [CompletionItem(incomplete, type=type)] diff --git a/pipenv/vendor/click_didyoumean/__init__.py b/pipenv/vendor/click_didyoumean/__init__.py index edc5bb38..c93b083b 100644 --- a/pipenv/vendor/click_didyoumean/__init__.py +++ b/pipenv/vendor/click_didyoumean/__init__.py @@ -5,7 +5,7 @@ a group with a git-like *did-you-mean* feature. """ -import click +import pipenv.vendor.click as click import difflib __version__ = "0.0.3" diff --git a/pipenv/vendor/dateutil/parser/_parser.py b/pipenv/vendor/dateutil/parser/_parser.py index 37d1663b..e1cc0c17 100644 --- a/pipenv/vendor/dateutil/parser/_parser.py +++ b/pipenv/vendor/dateutil/parser/_parser.py @@ -39,8 +39,8 @@ import warnings from calendar import monthrange from io import StringIO -import six -from six import integer_types, text_type +import pipenv.vendor.six as six +from pipenv.vendor.six import integer_types, text_type from decimal import Decimal diff --git a/pipenv/vendor/dateutil/parser/isoparser.py b/pipenv/vendor/dateutil/parser/isoparser.py index 5d7bee38..4c84bd98 100644 --- a/pipenv/vendor/dateutil/parser/isoparser.py +++ b/pipenv/vendor/dateutil/parser/isoparser.py @@ -9,12 +9,12 @@ ISO-8601 specification. """ from datetime import datetime, timedelta, time, date import calendar -from dateutil import tz +from pipenv.vendor.dateutil import tz from functools import wraps import re -import six +import pipenv.vendor.six as six __all__ = ["isoparse", "isoparser"] diff --git a/pipenv/vendor/dateutil/relativedelta.py b/pipenv/vendor/dateutil/relativedelta.py index a9e85f7e..452884fb 100644 --- a/pipenv/vendor/dateutil/relativedelta.py +++ b/pipenv/vendor/dateutil/relativedelta.py @@ -5,7 +5,7 @@ import calendar import operator from math import copysign -from six import integer_types +from pipenv.vendor.six import integer_types from warnings import warn from ._common import weekday diff --git a/pipenv/vendor/dateutil/rrule.py b/pipenv/vendor/dateutil/rrule.py index b3203393..168e9449 100644 --- a/pipenv/vendor/dateutil/rrule.py +++ b/pipenv/vendor/dateutil/rrule.py @@ -15,9 +15,9 @@ from functools import wraps # For warning about deprecation of until and count from warnings import warn -from six import advance_iterator, integer_types +from pipenv.vendor.six import advance_iterator, integer_types -from six.moves import _thread, range +from pipenv.vendor.six.moves import _thread, range from ._common import weekday as weekdaybase @@ -541,7 +541,7 @@ class rrule(rrulebase): # byeaster if byeaster is not None: if not easter: - from dateutil import easter + from pipenv.vendor.dateutil import easter if isinstance(byeaster, integer_types): self._byeaster = (byeaster,) else: @@ -1495,7 +1495,7 @@ class _rrulestr(object): def _handle_UNTIL(self, rrkwargs, name, value, **kwargs): global parser if not parser: - from dateutil import parser + from pipenv.vendor.dateutil import parser try: rrkwargs["until"] = parser.parse(value, ignoretz=kwargs.get("ignoretz"), @@ -1564,7 +1564,7 @@ class _rrulestr(object): ignoretz, tzids, tzinfos): global parser if not parser: - from dateutil import parser + from pipenv.vendor.dateutil import parser datevals = [] value_found = False @@ -1701,7 +1701,7 @@ class _rrulestr(object): if (forceset or len(rrulevals) > 1 or rdatevals or exrulevals or exdatevals): if not parser and (rdatevals or exdatevals): - from dateutil import parser + from pipenv.vendor.dateutil import parser rset = rruleset(cache=cache) for value in rrulevals: rset.rrule(self._parse_rfc_rrule(value, dtstart=dtstart, diff --git a/pipenv/vendor/dateutil/tz/_common.py b/pipenv/vendor/dateutil/tz/_common.py index e6ac1183..393c5c9a 100644 --- a/pipenv/vendor/dateutil/tz/_common.py +++ b/pipenv/vendor/dateutil/tz/_common.py @@ -1,4 +1,4 @@ -from six import PY2 +from pipenv.vendor.six import PY2 from functools import wraps diff --git a/pipenv/vendor/dateutil/tz/_factories.py b/pipenv/vendor/dateutil/tz/_factories.py index f8a65891..c8cdf6fd 100644 --- a/pipenv/vendor/dateutil/tz/_factories.py +++ b/pipenv/vendor/dateutil/tz/_factories.py @@ -2,7 +2,7 @@ from datetime import timedelta import weakref from collections import OrderedDict -from six.moves import _thread +from pipenv.vendor.six.moves import _thread class _TzSingleton(type): diff --git a/pipenv/vendor/dateutil/tz/tz.py b/pipenv/vendor/dateutil/tz/tz.py index c67f56d4..8c934c31 100644 --- a/pipenv/vendor/dateutil/tz/tz.py +++ b/pipenv/vendor/dateutil/tz/tz.py @@ -16,9 +16,9 @@ import bisect import weakref from collections import OrderedDict -import six -from six import string_types -from six.moves import _thread +import pipenv.vendor.six as six +from pipenv.vendor.six import string_types +from pipenv.vendor.six.moves import _thread from ._common import tzname_in_python2, _tzinfo from ._common import tzrangebase, enfold from ._common import _validate_fromutc_inputs @@ -420,7 +420,7 @@ class tzfile(_tzinfo): .. testsetup:: tzfile - from dateutil.tz import gettz + from pipenv.vendor.dateutil.tz import gettz from datetime import datetime .. doctest:: tzfile @@ -928,7 +928,7 @@ class tzrange(tzrangebase): .. testsetup:: tzrange - from dateutil.tz import tzrange, tzstr + from pipenv.vendor.dateutil.tz import tzrange, tzstr .. doctest:: tzrange @@ -951,7 +951,7 @@ class tzrange(tzrangebase): start=None, end=None): global relativedelta - from dateutil import relativedelta + from pipenv.vendor.dateutil import relativedelta self._std_abbr = stdabbr self._dst_abbr = dstabbr @@ -1078,7 +1078,7 @@ class tzstr(tzrange): """ def __init__(self, s, posix_offset=False): global parser - from dateutil.parser import _parser as parser + from pipenv.vendor.dateutil.parser import _parser as parser self._s = s @@ -1109,7 +1109,7 @@ class tzstr(tzrange): self.hasdst = bool(self._start_delta) def _delta(self, x, isend=0): - from dateutil import relativedelta + from pipenv.vendor.dateutil import relativedelta kwargs = {} if x.month is not None: kwargs["month"] = x.month @@ -1263,7 +1263,7 @@ class tzical(object): """ def __init__(self, fileobj): global rrule - from dateutil import rrule + from pipenv.vendor.dateutil import rrule if isinstance(fileobj, string_types): self._s = fileobj @@ -1651,7 +1651,7 @@ def __get_gettz(): tz = None if not tz: - from dateutil.zoneinfo import get_zonefile_instance + from pipenv.vendor.dateutil.zoneinfo import get_zonefile_instance tz = get_zonefile_instance().get(name) if not tz: diff --git a/pipenv/vendor/dateutil/tz/win.py b/pipenv/vendor/dateutil/tz/win.py index cde07ba7..c366aabd 100644 --- a/pipenv/vendor/dateutil/tz/win.py +++ b/pipenv/vendor/dateutil/tz/win.py @@ -10,8 +10,8 @@ Attempting to import this module on a non-Windows platform will raise an import datetime import struct -from six.moves import winreg -from six import text_type +from pipenv.vendor.six.moves import winreg +from pipenv.vendor.six import text_type try: import ctypes diff --git a/pipenv/vendor/dateutil/zoneinfo/__init__.py b/pipenv/vendor/dateutil/zoneinfo/__init__.py index 34f11ad6..338dd94a 100644 --- a/pipenv/vendor/dateutil/zoneinfo/__init__.py +++ b/pipenv/vendor/dateutil/zoneinfo/__init__.py @@ -6,7 +6,7 @@ from tarfile import TarFile from pkgutil import get_data from io import BytesIO -from dateutil.tz import tzfile as _tzfile +from pipenv.vendor.dateutil.tz import tzfile as _tzfile __all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"] diff --git a/pipenv/vendor/dateutil/zoneinfo/rebuild.py b/pipenv/vendor/dateutil/zoneinfo/rebuild.py index 684c6586..c7282e89 100644 --- a/pipenv/vendor/dateutil/zoneinfo/rebuild.py +++ b/pipenv/vendor/dateutil/zoneinfo/rebuild.py @@ -6,7 +6,7 @@ import json from subprocess import check_call, check_output from tarfile import TarFile -from dateutil.zoneinfo import METADATA_FN, ZONEFILENAME +from pipenv.vendor.dateutil.zoneinfo import METADATA_FN, ZONEFILENAME def rebuild(filename, tag=None, format="gz", zonegroups=[], metadata=None): diff --git a/pipenv/vendor/dotenv/cli.py b/pipenv/vendor/dotenv/cli.py index b7ae24af..5c7ab4ba 100644 --- a/pipenv/vendor/dotenv/cli.py +++ b/pipenv/vendor/dotenv/cli.py @@ -4,7 +4,7 @@ from subprocess import Popen from typing import Any, Dict, List try: - import click + import pipenv.vendor.click as click except ImportError: sys.stderr.write('It seems python-dotenv is not installed with cli option. \n' 'Run pip install "python-dotenv[cli]" to fix this.') diff --git a/pipenv/vendor/dparse/parser.py b/pipenv/vendor/dparse/parser.py index c01ebab4..368a2883 100644 --- a/pipenv/vendor/dparse/parser.py +++ b/pipenv/vendor/dparse/parser.py @@ -12,10 +12,10 @@ from configparser import SafeConfigParser, NoOptionError from .regex import URL_REGEX, HASH_REGEX from .dependencies import DependencyFile, Dependency -from packaging.requirements import Requirement as PackagingRequirement, InvalidRequirement +from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement, InvalidRequirement from . import filetypes -import toml -from packaging.specifiers import SpecifierSet +import pipenv.vendor.toml as toml +from pipenv.vendor.packaging.specifiers import SpecifierSet import json diff --git a/pipenv/vendor/dparse/updater.py b/pipenv/vendor/dparse/updater.py index 77b5ae66..48117110 100644 --- a/pipenv/vendor/dparse/updater.py +++ b/pipenv/vendor/dparse/updater.py @@ -3,7 +3,7 @@ from __future__ import absolute_import, print_function, unicode_literals import re import json import tempfile -import toml +import pipenv.vendor.toml as toml import os diff --git a/pipenv/vendor/funcsigs/__init__.py b/pipenv/vendor/funcsigs/__init__.py index 5f5378b4..dec83820 100644 --- a/pipenv/vendor/funcsigs/__init__.py +++ b/pipenv/vendor/funcsigs/__init__.py @@ -15,7 +15,7 @@ try: except ImportError: from ordereddict import OrderedDict -from funcsigs.version import __version__ +from pipenv.vendor.funcsigs.version import __version__ __all__ = ['BoundArguments', 'Parameter', 'Signature', 'signature'] diff --git a/pipenv/vendor/importlib_metadata/__init__.py b/pipenv/vendor/importlib_metadata/__init__.py index 1705129d..ebdad84f 100644 --- a/pipenv/vendor/importlib_metadata/__init__.py +++ b/pipenv/vendor/importlib_metadata/__init__.py @@ -3,7 +3,7 @@ import re import abc import csv import sys -import zipp +import pipenv.vendor.zipp as zipp import email import pathlib import operator @@ -570,7 +570,7 @@ class Distribution: @classmethod def _local(cls, root='.'): - from pep517 import build, meta + from pipenv.vendor.pep517 import build, meta system = build.compat_system(root) builder = functools.partial( diff --git a/pipenv/vendor/importlib_resources/__init__.py b/pipenv/vendor/importlib_resources/__init__.py index 2468f575..c3e77741 100644 --- a/pipenv/vendor/importlib_resources/__init__.py +++ b/pipenv/vendor/importlib_resources/__init__.py @@ -17,7 +17,7 @@ from ._legacy import ( path, ) -from importlib_resources.abc import ResourceReader +from pipenv.vendor.importlib_resources.abc import ResourceReader __all__ = [ diff --git a/pipenv/vendor/importlib_resources/_compat.py b/pipenv/vendor/importlib_resources/_compat.py index 61e48d47..ce9d4374 100644 --- a/pipenv/vendor/importlib_resources/_compat.py +++ b/pipenv/vendor/importlib_resources/_compat.py @@ -8,7 +8,7 @@ from contextlib import suppress if sys.version_info >= (3, 10): from zipfile import Path as ZipPath # type: ignore else: - from zipp import Path as ZipPath # type: ignore + from pipenv.vendor.zipp import Path as ZipPath # type: ignore try: diff --git a/pipenv/vendor/importlib_resources/tests/test_compatibilty_files.py b/pipenv/vendor/importlib_resources/tests/test_compatibilty_files.py index d92c7c56..1e5a1ce2 100644 --- a/pipenv/vendor/importlib_resources/tests/test_compatibilty_files.py +++ b/pipenv/vendor/importlib_resources/tests/test_compatibilty_files.py @@ -1,9 +1,9 @@ import io import unittest -import importlib_resources as resources +import pipenv.vendor.importlib_resources as resources -from importlib_resources._adapters import ( +from pipenv.vendor.importlib_resources._adapters import ( CompatibilityFiles, wrap_spec, ) diff --git a/pipenv/vendor/importlib_resources/tests/test_contents.py b/pipenv/vendor/importlib_resources/tests/test_contents.py index 2af70607..a73c4888 100644 --- a/pipenv/vendor/importlib_resources/tests/test_contents.py +++ b/pipenv/vendor/importlib_resources/tests/test_contents.py @@ -1,5 +1,5 @@ import unittest -import importlib_resources as resources +import pipenv.vendor.importlib_resources as resources from . import data01 from . import util diff --git a/pipenv/vendor/importlib_resources/tests/test_files.py b/pipenv/vendor/importlib_resources/tests/test_files.py index 2676b49e..4826bf94 100644 --- a/pipenv/vendor/importlib_resources/tests/test_files.py +++ b/pipenv/vendor/importlib_resources/tests/test_files.py @@ -1,8 +1,8 @@ import typing import unittest -import importlib_resources as resources -from importlib_resources.abc import Traversable +import pipenv.vendor.importlib_resources as resources +from pipenv.vendor.importlib_resources.abc import Traversable from . import data01 from . import util diff --git a/pipenv/vendor/importlib_resources/tests/test_open.py b/pipenv/vendor/importlib_resources/tests/test_open.py index 919fc0db..f394f01f 100644 --- a/pipenv/vendor/importlib_resources/tests/test_open.py +++ b/pipenv/vendor/importlib_resources/tests/test_open.py @@ -1,6 +1,6 @@ import unittest -import importlib_resources as resources +import pipenv.vendor.importlib_resources as resources from . import data01 from . import util diff --git a/pipenv/vendor/importlib_resources/tests/test_path.py b/pipenv/vendor/importlib_resources/tests/test_path.py index 9180626f..964b8a6b 100644 --- a/pipenv/vendor/importlib_resources/tests/test_path.py +++ b/pipenv/vendor/importlib_resources/tests/test_path.py @@ -1,7 +1,7 @@ import io import unittest -import importlib_resources as resources +import pipenv.vendor.importlib_resources as resources from . import data01 from . import util diff --git a/pipenv/vendor/importlib_resources/tests/test_read.py b/pipenv/vendor/importlib_resources/tests/test_read.py index 2616fbf5..3ca2852d 100644 --- a/pipenv/vendor/importlib_resources/tests/test_read.py +++ b/pipenv/vendor/importlib_resources/tests/test_read.py @@ -1,5 +1,5 @@ import unittest -import importlib_resources as resources +import pipenv.vendor.importlib_resources as resources from . import data01 from . import util diff --git a/pipenv/vendor/importlib_resources/tests/test_reader.py b/pipenv/vendor/importlib_resources/tests/test_reader.py index 16841a50..409849a3 100644 --- a/pipenv/vendor/importlib_resources/tests/test_reader.py +++ b/pipenv/vendor/importlib_resources/tests/test_reader.py @@ -4,7 +4,7 @@ import pathlib import unittest from importlib import import_module -from importlib_resources.readers import MultiplexedPath, NamespaceReader +from pipenv.vendor.importlib_resources.readers import MultiplexedPath, NamespaceReader class MultiplexedPathTest(unittest.TestCase): diff --git a/pipenv/vendor/importlib_resources/tests/test_resource.py b/pipenv/vendor/importlib_resources/tests/test_resource.py index 071cb8d4..2d2d2e3f 100644 --- a/pipenv/vendor/importlib_resources/tests/test_resource.py +++ b/pipenv/vendor/importlib_resources/tests/test_resource.py @@ -1,6 +1,6 @@ import sys import unittest -import importlib_resources as resources +import pipenv.vendor.importlib_resources as resources import uuid import pathlib diff --git a/pipenv/vendor/iso8601/test_iso8601.py b/pipenv/vendor/iso8601/test_iso8601.py index 0d01ffbb..24a057f6 100644 --- a/pipenv/vendor/iso8601/test_iso8601.py +++ b/pipenv/vendor/iso8601/test_iso8601.py @@ -7,7 +7,7 @@ import pickle import pytest -from iso8601 import iso8601 +from pipenv.vendor.iso8601 import iso8601 def test_iso8601_regex(): assert iso8601.ISO8601_REGEX.match("2006-10-11T00:14:33Z") diff --git a/pipenv/vendor/orderedmultidict/itemlist.py b/pipenv/vendor/orderedmultidict/itemlist.py index 9524a560..6d31addc 100755 --- a/pipenv/vendor/orderedmultidict/itemlist.py +++ b/pipenv/vendor/orderedmultidict/itemlist.py @@ -12,7 +12,7 @@ from __future__ import absolute_import -from six.moves import zip_longest +from pipenv.vendor.six.moves import zip_longest _absent = object() # Marker that means no parameter was provided. diff --git a/pipenv/vendor/orderedmultidict/orderedmultidict.py b/pipenv/vendor/orderedmultidict/orderedmultidict.py index 6cd55c0f..fd33f4ad 100755 --- a/pipenv/vendor/orderedmultidict/orderedmultidict.py +++ b/pipenv/vendor/orderedmultidict/orderedmultidict.py @@ -15,8 +15,8 @@ from __future__ import absolute_import import sys from itertools import chain -import six -from six.moves import map, zip_longest +import pipenv.vendor.six as six +from pipenv.vendor.six.moves import map, zip_longest from .itemlist import itemlist diff --git a/pipenv/vendor/packaging/markers.py b/pipenv/vendor/packaging/markers.py index cb640e8f..86582c84 100644 --- a/pipenv/vendor/packaging/markers.py +++ b/pipenv/vendor/packaging/markers.py @@ -8,7 +8,7 @@ import platform import sys from typing import Any, Callable, Dict, List, Optional, Tuple, Union -from pyparsing import ( # noqa: N817 +from pipenv.vendor.pyparsing import ( # noqa: N817 Forward, Group, Literal as L, diff --git a/pipenv/vendor/packaging/requirements.py b/pipenv/vendor/packaging/requirements.py index 53f9a3aa..284c2e70 100644 --- a/pipenv/vendor/packaging/requirements.py +++ b/pipenv/vendor/packaging/requirements.py @@ -7,7 +7,7 @@ import string import urllib.parse from typing import List, Optional as TOptional, Set -from pyparsing import ( # noqa +from pipenv.vendor.pyparsing import ( # noqa Combine, Literal as L, Optional, diff --git a/pipenv/vendor/pep517/compat.py b/pipenv/vendor/pep517/compat.py index 907aac34..900f48a2 100644 --- a/pipenv/vendor/pep517/compat.py +++ b/pipenv/vendor/pep517/compat.py @@ -35,8 +35,8 @@ except NameError: if sys.version_info < (3, 6): - from toml import load as toml_load # noqa: F401 - from toml import TomlDecodeError as TOMLDecodeError # noqa: F401 + from pipenv.vendor.toml import load as toml_load # noqa: F401 + from pipenv.vendor.toml import TomlDecodeError as TOMLDecodeError # noqa: F401 else: - from tomli import load as toml_load # noqa: F401 - from tomli import TOMLDecodeError # noqa: F401 + from pipenv.vendor.tomli import load as toml_load # noqa: F401 + from pipenv.vendor.tomli import TOMLDecodeError # noqa: F401 diff --git a/pipenv/vendor/pep517/meta.py b/pipenv/vendor/pep517/meta.py index d525de5c..5f7d9485 100644 --- a/pipenv/vendor/pep517/meta.py +++ b/pipenv/vendor/pep517/meta.py @@ -9,12 +9,12 @@ import functools try: import importlib.metadata as imp_meta except ImportError: - import importlib_metadata as imp_meta + import pipenv.vendor.importlib_metadata as imp_meta try: from zipfile import Path except ImportError: - from zipp import Path + from pipenv.vendor.zipp import Path from .envbuild import BuildEnvironment from .wrappers import Pep517HookCaller, quiet_subprocess_runner diff --git a/pipenv/vendor/pexpect/_async.py b/pipenv/vendor/pexpect/_async.py index dfbfeef5..91a87d0e 100644 --- a/pipenv/vendor/pexpect/_async.py +++ b/pipenv/vendor/pexpect/_async.py @@ -2,7 +2,7 @@ import asyncio import errno import signal -from pexpect import EOF +from pipenv.vendor.pexpect import EOF @asyncio.coroutine def expect_async(expecter, timeout=None): diff --git a/pipenv/vendor/pexpect/pty_spawn.py b/pipenv/vendor/pexpect/pty_spawn.py index 8e28ca7c..72fd3b22 100644 --- a/pipenv/vendor/pexpect/pty_spawn.py +++ b/pipenv/vendor/pexpect/pty_spawn.py @@ -7,8 +7,8 @@ import errno import signal from contextlib import contextmanager -import ptyprocess -from ptyprocess.ptyprocess import use_native_pty_fork +import pipenv.vendor.ptyprocess as ptyprocess +from pipenv.vendor.ptyprocess.ptyprocess import use_native_pty_fork from .exceptions import ExceptionPexpect, EOF, TIMEOUT from .spawnbase import SpawnBase @@ -767,7 +767,7 @@ class spawn(SpawnBase): window size to change when the parent's window size changes then do something like the following example:: - import pexpect, struct, fcntl, termios, signal, sys + import pipenv.vendor.pexpect as pexpect, struct, fcntl, termios, signal, sys def sigwinch_passthrough (sig, data): s = struct.pack("HHHH", 0, 0, 0, 0) a = struct.unpack('hhhh', fcntl.ioctl(sys.stdout.fileno(), diff --git a/pipenv/vendor/pexpect/pxssh.py b/pipenv/vendor/pexpect/pxssh.py index 3d53bd97..de2e5d97 100644 --- a/pipenv/vendor/pexpect/pxssh.py +++ b/pipenv/vendor/pexpect/pxssh.py @@ -20,7 +20,7 @@ PEXPECT LICENSE ''' -from pexpect import ExceptionPexpect, TIMEOUT, EOF, spawn +from pipenv.vendor.pexpect import ExceptionPexpect, TIMEOUT, EOF, spawn import time import os import sys @@ -64,7 +64,7 @@ class pxssh (spawn): Example that runs a few commands on a remote server and prints the result:: - from pexpect import pxssh + from pipenv.vendor.pexpect import pxssh import getpass try: s = pxssh.pxssh() @@ -88,7 +88,7 @@ class pxssh (spawn): Example showing how to specify SSH options:: - from pexpect import pxssh + from pipenv.vendor.pexpect import pxssh s = pxssh.pxssh(options={ "StrictHostKeyChecking": "no", "UserKnownHostsFile": "/dev/null"}) diff --git a/pipenv/vendor/pexpect/replwrap.py b/pipenv/vendor/pexpect/replwrap.py index c930f1e4..d705f508 100644 --- a/pipenv/vendor/pexpect/replwrap.py +++ b/pipenv/vendor/pexpect/replwrap.py @@ -4,7 +4,7 @@ import os.path import signal import sys -import pexpect +import pipenv.vendor.pexpect as pexpect PY3 = (sys.version_info[0] >= 3) diff --git a/pipenv/vendor/pexpect/run.py b/pipenv/vendor/pexpect/run.py index ff288a12..e179cdc2 100644 --- a/pipenv/vendor/pexpect/run.py +++ b/pipenv/vendor/pexpect/run.py @@ -21,31 +21,31 @@ def run(command, timeout=30, withexitstatus=False, events=None, The run() function can often be used instead of creating a spawn instance. For example, the following code uses spawn:: - from pexpect import * + from pipenv.vendor.pexpect import * child = spawn('scp foo user@example.com:.') child.expect('(?i)password') child.sendline(mypassword) The previous code can be replace with the following:: - from pexpect import * + from pipenv.vendor.pexpect import * run('scp foo user@example.com:.', events={'(?i)password': mypassword}) **Examples** Start the apache daemon on the local machine:: - from pexpect import * + from pipenv.vendor.pexpect import * run("/usr/local/apache/bin/apachectl start") Check in a file using SVN:: - from pexpect import * + from pipenv.vendor.pexpect import * run("svn ci -m 'automatic commit' my_file.py") Run a command and capture exit status:: - from pexpect import * + from pipenv.vendor.pexpect import * (command_output, exitstatus) = run('ls -l /bin', withexitstatus=1) The following will run SSH and execute 'ls -l' on the remote machine. The @@ -57,7 +57,7 @@ def run(command, timeout=30, withexitstatus=False, events=None, This will start mencoder to rip a video from DVD. This will also display progress ticks every 5 seconds as it runs. For example:: - from pexpect import * + from pipenv.vendor.pexpect import * def print_ticks(d): print d['event_count'], run("mencoder dvd://1 -o video.avi -oac copy -ovc copy", diff --git a/pipenv/vendor/pip_shims/compat.py b/pipenv/vendor/pip_shims/compat.py index eac29930..f01f5fea 100644 --- a/pipenv/vendor/pip_shims/compat.py +++ b/pipenv/vendor/pip_shims/compat.py @@ -11,7 +11,7 @@ import re import sys import types -from packaging import specifiers +from pipenv.vendor.packaging import specifiers from .environment import MYPY_RUNNING from .utils import ( @@ -48,7 +48,7 @@ if MYPY_RUNNING: Union, ) - from requests import Session + from pipenv.vendor.requests import Session from .utils import TShim, TShimmedFunc, TShimmedPath @@ -374,7 +374,7 @@ def partial_command(shimmed_path, cmd_mapping=None): """ Maps a default set of arguments across all members of a :class:`~pip_shims.models.ShimmedPath` instance, specifically for - :class:`~pip._internal.command.Command` instances which need + :class:`~pipenv.patched.notpip._internal.command.Command` instances which need `summary` and `name` arguments. :param :class:`~pip_shims.models.ShimmedPath` shimmed_path: A @@ -500,7 +500,7 @@ def get_requirement_set( :param :class:`~pip_shims.models.ShimmedPathCollection` wheel_cache_provider: A context manager provider which resolves to a `WheelCache` instance - :param install_command: A :class:`~pip._internal.commands.install.InstallCommand` + :param install_command: A :class:`~pipenv.patched.notpip._internal.commands.install.InstallCommand` instance which is used to generate the finder. :param :class:`~pip_shims.models.ShimmedPathCollection` req_set_provider: A provider to build requirement set instances. @@ -537,7 +537,7 @@ def get_requirement_set( :param install_cmd_provider: A shim for providing new install command instances. :type install_cmd_provider: :class:`~pip_shims.models.ShimmedPathCollection` :return: A new requirement set instance - :rtype: :class:`~pip._internal.req.req_set.RequirementSet` + :rtype: :class:`~pipenv.patched.notpip._internal.req.req_set.RequirementSet` """ wheel_cache_provider = resolve_possible_shim(wheel_cache_provider) req_set_provider = resolve_possible_shim(req_set_provider) @@ -592,13 +592,13 @@ def get_package_finder( # type: (...) -> TFinder """Shim for compatibility to generate package finders. - Build and return a :class:`~pip._internal.index.package_finder.PackageFinder` - instance using the :class:`~pip._internal.commands.install.InstallCommand` helper + Build and return a :class:`~pipenv.patched.notpip._internal.index.package_finder.PackageFinder` + instance using the :class:`~pipenv.patched.notpip._internal.commands.install.InstallCommand` helper method to construct the finder, shimmed with backports as needed for compatibility. :param install_cmd_provider: A shim for providing new install command instances. :type install_cmd_provider: :class:`~pip_shims.models.ShimmedPathCollection` - :param install_cmd: A :class:`~pip._internal.commands.install.InstallCommand` + :param install_cmd: A :class:`~pipenv.patched.notpip._internal.commands.install.InstallCommand` instance which is used to generate the finder. :param optparse.Values options: An optional :class:`optparse.Values` instance generated by calling `install_cmd.parser.parse_args()` typically. @@ -609,15 +609,15 @@ def get_package_finder( :param Optional[str] abi: The target abi to support, e.g. "cp38" :param Optional[str] implementation: An optional implementation string for limiting searches to a specific implementation, e.g. "cp" or "py" - :param target_python: A :class:`~pip._internal.models.target_python.TargetPython` + :param target_python: A :class:`~pipenv.patched.notpip._internal.models.target_python.TargetPython` instance (will be translated to alternate arguments if necessary on incompatible pip versions). :param Optional[bool] ignore_requires_python: Whether to ignore `requires_python` on resulting candidates, only valid after pip version 19.3.1 :param target_python_builder: A 'TargetPython' builder (e.g. the class itself, uninstantiated) - :return: A :class:`pip._internal.index.package_finder.PackageFinder` instance - :rtype: :class:`pip._internal.index.package_finder.PackageFinder` + :return: A :class:`pipenv.patched.notpip._internal.index.package_finder.PackageFinder` instance + :rtype: :class:`pipenv.patched.notpip._internal.index.package_finder.PackageFinder` :Example: @@ -712,7 +712,7 @@ def shim_unpack( # (...) -> None """ Accepts all parameters that have been valid to pass - to :func:`pip._internal.download.unpack_url` and selects or + to :func:`pipenv.patched.notpip._internal.download.unpack_url` and selects or drops parameters as needed before invoking the provided callable. @@ -720,10 +720,10 @@ def shim_unpack( :type unpack_fn: Callable :param str download_dir: The directory to download the file to :param TShimmedFunc tempdir_manager_provider: A callable or shim referring to - `global_tempdir_manager` function from pipenv.patched.notpip or a shimmed no-op context manager - :param Optional[:class:`~pip._internal.req.req_install.InstallRequirement`] ireq: + `global_tempdir_manager` function from pip or a shimmed no-op context manager + :param Optional[:class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement`] ireq: an Install Requirement instance, defaults to None - :param Optional[:class:`~pip._internal.models.link.Link`] link: A Link instance, + :param Optional[:class:`~pipenv.patched.notpip._internal.models.link.Link`] link: A Link instance, defaults to None. :param Optional[str] location: A location or source directory if the target is a VCS url, defaults to None. @@ -856,7 +856,7 @@ def make_preparer( the finder, session, and options if needed, defaults to None :param Optional[TShimmedFunc] finder_provider: A package finder provider :yield: A new requirement preparer instance - :rtype: ContextManager[:class:`~pip._internal.operations.prepare.RequirementPreparer`] + :rtype: ContextManager[:class:`~pipenv.patched.notpip._internal.operations.prepare.RequirementPreparer`] :Example: @@ -873,7 +873,7 @@ def make_preparer( ... options=pip_options, finder=finder, session=session, install_cmd=ic ... ) as preparer: ... print(preparer) - + """ preparer_fn = resolve_possible_shim(preparer_fn) downloader_provider = resolve_possible_shim(downloader_provider) @@ -1036,7 +1036,7 @@ def get_resolver( the finder, session, and options if needed, defaults to None. :param bool use_pep517: Whether to use the pep517 build process. :return: A new resolver instance. - :rtype: :class:`~pip._internal.legacy_resolve.Resolver` + :rtype: :class:`~pipenv.patched.notpip._internal.legacy_resolve.Resolver` :Example: @@ -1185,7 +1185,7 @@ def resolve( # noqa:C901 Maps a dictionary of names to corresponding ``InstallRequirement`` values. - :param :class:`~pip._internal.req.req_install.InstallRequirement` ireq: An + :param :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` ireq: An InstallRequirement to initiate the resolution process :param :class:`~pip_shims.models.ShimmedPathCollection` reqset_provider: A provider to build requirement set instances. @@ -1209,7 +1209,7 @@ def resolve( # noqa:C901 :param Optional[Values] options: Pip options to use if needed, defaults to None :param Optional[TSession] session: Existing session to use for getting requirements, defaults to None - :param :class:`~pip._internal.legacy_resolve.Resolver` resolver: A pre-existing + :param :class:`~pipenv.patched.notpip._internal.legacy_resolve.Resolver` resolver: A pre-existing resolver instance to use for resolution :param Optional[TFinder] finder: The package finder to use during resolution, defaults to None. @@ -1242,8 +1242,8 @@ def resolve( # noqa:C901 :param bool check_supported_wheels: Whether to check support of wheels before including them in resolution. :return: A dictionary mapping requirements to corresponding - :class:`~pip._internal.req.req_install.InstallRequirement`s - :rtype: :class:`~pip._internal.req.req_install.InstallRequirement` + :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement`s + :rtype: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :Example: diff --git a/pipenv/vendor/pip_shims/models.py b/pipenv/vendor/pip_shims/models.py index 0a344c84..cbdbb75b 100644 --- a/pipenv/vendor/pip_shims/models.py +++ b/pipenv/vendor/pip_shims/models.py @@ -117,7 +117,7 @@ class PipVersion(Sequence): version, round_prereleases_up=True, base_import_path=None, - vendor_import_path="pip._vendor", + vendor_import_path="pipenv.patched.notpip._vendor", ): # type: (str, bool, Optional[str], str) -> None self.version = version diff --git a/pipenv/vendor/pip_shims/shims.py b/pipenv/vendor/pip_shims/shims.py index fb029378..48f6c432 100644 --- a/pipenv/vendor/pip_shims/shims.py +++ b/pipenv/vendor/pip_shims/shims.py @@ -7,7 +7,7 @@ from __future__ import absolute_import import sys import types -from packaging.version import parse as parse_version +from pipenv.vendor.packaging.version import parse as parse_version from .models import ( ShimmedPathCollection, diff --git a/pipenv/vendor/pip_shims/utils.py b/pipenv/vendor/pip_shims/utils.py index ec32082d..d3b5e708 100644 --- a/pipenv/vendor/pip_shims/utils.py +++ b/pipenv/vendor/pip_shims/utils.py @@ -11,7 +11,7 @@ import sys from collections.abc import Callable from functools import wraps -import packaging.version +from pipenv.vendor.packaging import version as pkg_version from .environment import MYPY_RUNNING @@ -107,10 +107,10 @@ def _parse(version): @memoize def parse_version(version): - # type: (str) -> packaging.version._BaseVersion + # type: (str) -> pkg_version._BaseVersion if not isinstance(version, STRING_TYPES): raise TypeError("Can only derive versions from string, got {!r}".format(version)) - return packaging.version.parse(version) + return pkg_version.parse(version) @memoize @@ -387,7 +387,7 @@ def get_allowed_args(fn_or_class): try: signature = inspect.signature(fn_or_class) except AttributeError: - import funcsigs + import pipenv.vendor.funcsigs as funcsigs signature = funcsigs.signature(fn_or_class) args = [] diff --git a/pipenv/vendor/pipreqs/pipreqs.py b/pipenv/vendor/pipreqs/pipreqs.py index 4b817c3c..157dd76c 100644 --- a/pipenv/vendor/pipreqs/pipreqs.py +++ b/pipenv/vendor/pipreqs/pipreqs.py @@ -42,12 +42,12 @@ import logging import codecs import ast import traceback -from docopt import docopt -import requests -from yarg import json2package -from yarg.exceptions import HTTPError +from pipenv.vendor.docopt import docopt +import pipenv.vendor.requests as requests +from pipenv.vendor.yarg import json2package +from pipenv.vendor.yarg.exceptions import HTTPError -from pipreqs import __version__ +from pipenv.vendor.pipreqs import __version__ REGEXP = [ re.compile(r'^import (.+)$'), diff --git a/pipenv/vendor/platformdirs/__main__.py b/pipenv/vendor/platformdirs/__main__.py index ad229371..bc24c1c7 100644 --- a/pipenv/vendor/platformdirs/__main__.py +++ b/pipenv/vendor/platformdirs/__main__.py @@ -1,4 +1,4 @@ -from platformdirs import PlatformDirs, __version__ +from pipenv.vendor.platformdirs import PlatformDirs, __version__ PROPS = ( "user_data_dir", diff --git a/pipenv/vendor/plette/lockfiles.py b/pipenv/vendor/plette/lockfiles.py index 10df07e1..b6148510 100644 --- a/pipenv/vendor/plette/lockfiles.py +++ b/pipenv/vendor/plette/lockfiles.py @@ -8,7 +8,7 @@ try: except ImportError: import collections as collections_abc -import six +import pipenv.vendor.six as six from .models import DataView, Meta, PackageCollection diff --git a/pipenv/vendor/plette/models/base.py b/pipenv/vendor/plette/models/base.py index 72cf372e..7932afba 100644 --- a/pipenv/vendor/plette/models/base.py +++ b/pipenv/vendor/plette/models/base.py @@ -1,5 +1,5 @@ try: - import cerberus + import pipenv.vendor.cerberus as cerberus except ImportError: cerberus = None diff --git a/pipenv/vendor/plette/models/packages.py b/pipenv/vendor/plette/models/packages.py index 5bb36215..53ee29e9 100644 --- a/pipenv/vendor/plette/models/packages.py +++ b/pipenv/vendor/plette/models/packages.py @@ -1,4 +1,4 @@ -import six +import pipenv.vendor.six as six from .base import DataView diff --git a/pipenv/vendor/plette/models/scripts.py b/pipenv/vendor/plette/models/scripts.py index 7f34d816..3b2e81e4 100644 --- a/pipenv/vendor/plette/models/scripts.py +++ b/pipenv/vendor/plette/models/scripts.py @@ -1,7 +1,7 @@ import re import shlex -import six +import pipenv.vendor.six as six from .base import DataView diff --git a/pipenv/vendor/plette/pipfiles.py b/pipenv/vendor/plette/pipfiles.py index 95f413de..f5f9ce29 100644 --- a/pipenv/vendor/plette/pipfiles.py +++ b/pipenv/vendor/plette/pipfiles.py @@ -3,8 +3,8 @@ from __future__ import unicode_literals import hashlib import json -import six -import tomlkit +import pipenv.vendor.six as six +import pipenv.vendor.tomlkit as tomlkit from .models import ( DataView, Hash, Requires, diff --git a/pipenv/vendor/pyparsing.py b/pipenv/vendor/pyparsing.py index 581d5bbb..961738f8 100644 --- a/pipenv/vendor/pyparsing.py +++ b/pipenv/vendor/pyparsing.py @@ -41,7 +41,7 @@ Here is a program to parse "Hello, World!" (or any greeting of the form (the :class:`'+'` operators create :class:`And` expressions, and the strings are auto-converted to :class:`Literal` expressions):: - from pyparsing import Word, alphas + from pipenv.vendor.pyparsing import Word, alphas # define grammar of a greeting greet = Word(alphas) + "," + Word(alphas) + "!" @@ -1887,7 +1887,7 @@ class ParserElement(object): Example:: - import pyparsing + import pipenv.vendor.pyparsing as pyparsing pyparsing.ParserElement.enablePackrat() """ if not ParserElement._packratEnabled: diff --git a/pipenv/vendor/pythonfinder/__main__.py b/pipenv/vendor/pythonfinder/__main__.py index 3083e72d..e6d7c950 100644 --- a/pipenv/vendor/pythonfinder/__main__.py +++ b/pipenv/vendor/pythonfinder/__main__.py @@ -6,7 +6,7 @@ from __future__ import absolute_import import os import sys -from pythonfinder.cli import cli +from pipenv.vendor.pythonfinder.cli import cli PYTHONFINDER_MAIN = os.path.dirname(os.path.abspath(__file__)) diff --git a/pipenv/vendor/pythonfinder/_vendor/pep514tools/__init__.py b/pipenv/vendor/pythonfinder/_vendor/pep514tools/__init__.py index e7e74408..6ca492f7 100644 --- a/pipenv/vendor/pythonfinder/_vendor/pep514tools/__init__.py +++ b/pipenv/vendor/pythonfinder/_vendor/pep514tools/__init__.py @@ -8,4 +8,4 @@ __author__ = 'Steve Dower ' __version__ = '0.1.0' -from pythonfinder._vendor.pep514tools.environment import findall, find, findone +from pipenv.vendor.pythonfinder._vendor.pep514tools.environment import findall, find, findone diff --git a/pipenv/vendor/pythonfinder/_vendor/pep514tools/environment.py b/pipenv/vendor/pythonfinder/_vendor/pep514tools/environment.py index f4104a45..9523f2d0 100644 --- a/pipenv/vendor/pythonfinder/_vendor/pep514tools/environment.py +++ b/pipenv/vendor/pythonfinder/_vendor/pep514tools/environment.py @@ -8,7 +8,7 @@ __all__ = ['Environment', 'findall', 'find', 'findone'] from itertools import count -from pythonfinder._vendor.pep514tools._registry import open_source, REGISTRY_SOURCE_LM, REGISTRY_SOURCE_LM_WOW6432, REGISTRY_SOURCE_CU +from pipenv.vendor.pythonfinder._vendor.pep514tools._registry import open_source, REGISTRY_SOURCE_LM, REGISTRY_SOURCE_LM_WOW6432, REGISTRY_SOURCE_CU import re import sys diff --git a/pipenv/vendor/pythonfinder/cli.py b/pipenv/vendor/pythonfinder/cli.py index fc86abd0..ea34ffab 100644 --- a/pipenv/vendor/pythonfinder/cli.py +++ b/pipenv/vendor/pythonfinder/cli.py @@ -1,7 +1,7 @@ # -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals -import click +import pipenv.vendor.click as click from . import __version__ from .pythonfinder import Finder diff --git a/pipenv/vendor/pythonfinder/compat.py b/pipenv/vendor/pythonfinder/compat.py index 6fb4542f..71c4b6a2 100644 --- a/pipenv/vendor/pythonfinder/compat.py +++ b/pipenv/vendor/pythonfinder/compat.py @@ -1,7 +1,7 @@ # -*- coding=utf-8 -*- import sys -import six +import pipenv.vendor.six as six if sys.version_info[:2] <= (3, 4): from pathlib2 import Path # type: ignore # noqa diff --git a/pipenv/vendor/pythonfinder/models/__init__.py b/pipenv/vendor/pythonfinder/models/__init__.py index e788c21c..3d05af63 100644 --- a/pipenv/vendor/pythonfinder/models/__init__.py +++ b/pipenv/vendor/pythonfinder/models/__init__.py @@ -6,7 +6,7 @@ import operator from itertools import chain -import six +import pipenv.vendor.six as six from ..utils import KNOWN_EXTS, unnest from .path import SystemPath diff --git a/pipenv/vendor/pythonfinder/models/mixins.py b/pipenv/vendor/pythonfinder/models/mixins.py index 5b5dc108..001b7017 100644 --- a/pipenv/vendor/pythonfinder/models/mixins.py +++ b/pipenv/vendor/pythonfinder/models/mixins.py @@ -5,8 +5,8 @@ import abc import operator from collections import defaultdict -import attr -import six +import pipenv.vendor.attr as attr +import pipenv.vendor.six as six from ..compat import fs_str from ..environment import MYPY_RUNNING diff --git a/pipenv/vendor/pythonfinder/models/path.py b/pipenv/vendor/pythonfinder/models/path.py index f4f97340..269496d6 100644 --- a/pipenv/vendor/pythonfinder/models/path.py +++ b/pipenv/vendor/pythonfinder/models/path.py @@ -7,9 +7,9 @@ import sys from collections import defaultdict from itertools import chain -import attr -import six -from cached_property import cached_property +import pipenv.vendor.attr as attr +import pipenv.vendor.six as six +from pipenv.vendor.cached_property import cached_property from ..compat import Path, fs_str from ..environment import ( diff --git a/pipenv/vendor/pythonfinder/models/python.py b/pipenv/vendor/pythonfinder/models/python.py index 3c2a13de..f1351c6f 100644 --- a/pipenv/vendor/pythonfinder/models/python.py +++ b/pipenv/vendor/pythonfinder/models/python.py @@ -8,9 +8,9 @@ import platform import sys from collections import defaultdict -import attr -import six -from packaging.version import Version +import pipenv.vendor.attr as attr +import pipenv.vendor.six as six +from pipenv.vendor.packaging.version import Version from ..compat import Path, lru_cache from ..environment import ASDF_DATA_DIR, MYPY_RUNNING, PYENV_ROOT, SYSTEM_ARCH diff --git a/pipenv/vendor/pythonfinder/models/windows.py b/pipenv/vendor/pythonfinder/models/windows.py index 794a881c..5a4d9136 100644 --- a/pipenv/vendor/pythonfinder/models/windows.py +++ b/pipenv/vendor/pythonfinder/models/windows.py @@ -4,7 +4,7 @@ from __future__ import absolute_import, print_function import operator from collections import defaultdict -import attr +import pipenv.vendor.attr as attr from ..environment import MYPY_RUNNING from ..exceptions import InvalidPythonVersion @@ -78,7 +78,7 @@ class WindowsFinder(BaseFinder): def get_versions(self): # type: () -> DefaultDict[Tuple, PathEntry] versions = defaultdict(PathEntry) # type: DefaultDict[Tuple, PathEntry] - from pythonfinder._vendor.pep514tools import environment as pep514env + from pipenv.vendor.pythonfinder._vendor.pep514tools import environment as pep514env env_versions = pep514env.findall() path = None diff --git a/pipenv/vendor/pythonfinder/pythonfinder.py b/pipenv/vendor/pythonfinder/pythonfinder.py index cf11903d..e7d9c217 100644 --- a/pipenv/vendor/pythonfinder/pythonfinder.py +++ b/pipenv/vendor/pythonfinder/pythonfinder.py @@ -5,8 +5,8 @@ import importlib import operator import os -import six -from click import secho +import pipenv.vendor.six as six +from pipenv.vendor.click import secho from . import environment from .compat import lru_cache diff --git a/pipenv/vendor/pythonfinder/utils.py b/pipenv/vendor/pythonfinder/utils.py index 0ccb3427..ee5502c5 100644 --- a/pipenv/vendor/pythonfinder/utils.py +++ b/pipenv/vendor/pythonfinder/utils.py @@ -10,9 +10,9 @@ from collections import OrderedDict from fnmatch import fnmatch from threading import Timer -import attr -import six -from packaging.version import LegacyVersion, Version +import pipenv.vendor.attr as attr +import pipenv.vendor.six as six +from pipenv.vendor.packaging.version import LegacyVersion, Version from .compat import Path, lru_cache, TimeoutError # noqa from .environment import MYPY_RUNNING, PYENV_ROOT, SUBPROCESS_TIMEOUT @@ -25,13 +25,13 @@ six.add_move( six.MovedAttribute("Sequence", "collections", "collections.abc") ) # type: ignore # noqa # fmt: off -from six.moves import Iterable # type: ignore # noqa # isort:skip -from six.moves import Sequence # type: ignore # noqa # isort:skip +from pipenv.vendor.six.moves import Iterable # type: ignore # noqa # isort:skip +from pipenv.vendor.six.moves import Sequence # type: ignore # noqa # isort:skip # fmt: on if MYPY_RUNNING: from typing import Any, Union, List, Callable, Set, Tuple, Dict, Optional, Iterator - from attr.validators import _OptionalValidator # type: ignore + from pipenv.vendor.attr.validators import _OptionalValidator # type: ignore from .models.path import PathEntry @@ -120,7 +120,7 @@ def get_python_version(path): @lru_cache(maxsize=1024) def parse_python_version(version_str): # type: (str) -> Dict[str, Union[str, int, Version]] - from packaging.version import parse as parse_version + from pipenv.vendor.packaging.version import parse as parse_version is_debug = False if version_str.endswith("-debug"): diff --git a/pipenv/vendor/requests/__init__.py b/pipenv/vendor/requests/__init__.py index 0ac7713b..d3b58866 100644 --- a/pipenv/vendor/requests/__init__.py +++ b/pipenv/vendor/requests/__init__.py @@ -40,17 +40,17 @@ is at . :license: Apache 2.0, see LICENSE for more details. """ -import urllib3 +import pipenv.vendor.urllib3 as urllib3 import warnings from .exceptions import RequestsDependencyWarning try: - from charset_normalizer import __version__ as charset_normalizer_version + from pipenv.vendor.charset_normalizer import __version__ as charset_normalizer_version except ImportError: charset_normalizer_version = None try: - from chardet import __version__ as chardet_version + from pipenv.vendor.chardet import __version__ as chardet_version except ImportError: chardet_version = None @@ -113,7 +113,7 @@ try: ssl = None if not getattr(ssl, "HAS_SNI", False): - from urllib3.contrib import pyopenssl + from pipenv.vendor.urllib3.contrib import pyopenssl pyopenssl.inject_into_urllib3() # Check cryptography version @@ -123,7 +123,7 @@ except ImportError: pass # urllib3's DependencyWarnings should be silenced. -from urllib3.exceptions import DependencyWarning +from pipenv.vendor.urllib3.exceptions import DependencyWarning warnings.simplefilter('ignore', DependencyWarning) from .__version__ import __title__, __description__, __url__, __version__ diff --git a/pipenv/vendor/requests/adapters.py b/pipenv/vendor/requests/adapters.py index fa4d9b3c..7d473a82 100644 --- a/pipenv/vendor/requests/adapters.py +++ b/pipenv/vendor/requests/adapters.py @@ -11,22 +11,22 @@ and maintain connections. import os.path import socket -from urllib3.poolmanager import PoolManager, proxy_from_url -from urllib3.response import HTTPResponse -from urllib3.util import parse_url -from urllib3.util import Timeout as TimeoutSauce -from urllib3.util.retry import Retry -from urllib3.exceptions import ClosedPoolError -from urllib3.exceptions import ConnectTimeoutError -from urllib3.exceptions import HTTPError as _HTTPError -from urllib3.exceptions import MaxRetryError -from urllib3.exceptions import NewConnectionError -from urllib3.exceptions import ProxyError as _ProxyError -from urllib3.exceptions import ProtocolError -from urllib3.exceptions import ReadTimeoutError -from urllib3.exceptions import SSLError as _SSLError -from urllib3.exceptions import ResponseError -from urllib3.exceptions import LocationValueError +from pipenv.vendor.urllib3.poolmanager import PoolManager, proxy_from_url +from pipenv.vendor.urllib3.response import HTTPResponse +from pipenv.vendor.urllib3.util import parse_url +from pipenv.vendor.urllib3.util import Timeout as TimeoutSauce +from pipenv.vendor.urllib3.util.retry import Retry +from pipenv.vendor.urllib3.exceptions import ClosedPoolError +from pipenv.vendor.urllib3.exceptions import ConnectTimeoutError +from pipenv.vendor.urllib3.exceptions import HTTPError as _HTTPError +from pipenv.vendor.urllib3.exceptions import MaxRetryError +from pipenv.vendor.urllib3.exceptions import NewConnectionError +from pipenv.vendor.urllib3.exceptions import ProxyError as _ProxyError +from pipenv.vendor.urllib3.exceptions import ProtocolError +from pipenv.vendor.urllib3.exceptions import ReadTimeoutError +from pipenv.vendor.urllib3.exceptions import SSLError as _SSLError +from pipenv.vendor.urllib3.exceptions import ResponseError +from pipenv.vendor.urllib3.exceptions import LocationValueError from .models import Response from .compat import urlparse, basestring @@ -41,7 +41,7 @@ from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError, from .auth import _basic_auth_str try: - from urllib3.contrib.socks import SOCKSProxyManager + from pipenv.vendor.urllib3.contrib.socks import SOCKSProxyManager except ImportError: def SOCKSProxyManager(*args, **kwargs): raise InvalidSchema("Missing dependencies for SOCKS support.") diff --git a/pipenv/vendor/requests/certs.py b/pipenv/vendor/requests/certs.py index d1a378d7..b685ee80 100644 --- a/pipenv/vendor/requests/certs.py +++ b/pipenv/vendor/requests/certs.py @@ -12,7 +12,7 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle. """ -from certifi import where +from pipenv.vendor.certifi import where if __name__ == '__main__': print(where()) diff --git a/pipenv/vendor/requests/compat.py b/pipenv/vendor/requests/compat.py index 0b14f501..8bc44327 100644 --- a/pipenv/vendor/requests/compat.py +++ b/pipenv/vendor/requests/compat.py @@ -9,9 +9,9 @@ Python 3. """ try: - import chardet + import pipenv.vendor.chardet as chardet except ImportError: - import charset_normalizer as chardet + import pipenv.vendor.charset_normalizer as chardet import sys diff --git a/pipenv/vendor/requests/exceptions.py b/pipenv/vendor/requests/exceptions.py index c412ec98..f5d6de81 100644 --- a/pipenv/vendor/requests/exceptions.py +++ b/pipenv/vendor/requests/exceptions.py @@ -6,7 +6,7 @@ requests.exceptions This module contains the set of Requests' exceptions. """ -from urllib3.exceptions import HTTPError as BaseHTTPError +from pipenv.vendor.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): diff --git a/pipenv/vendor/requests/help.py b/pipenv/vendor/requests/help.py index 4cd6389f..144e7eb8 100644 --- a/pipenv/vendor/requests/help.py +++ b/pipenv/vendor/requests/help.py @@ -6,23 +6,23 @@ import platform import sys import ssl -import idna -import urllib3 +import pipenv.vendor.idna as idna +import pipenv.vendor.urllib3 as urllib3 from . import __version__ as requests_version try: - import charset_normalizer + import pipenv.vendor.charset_normalizer as charset_normalizer except ImportError: charset_normalizer = None try: - import chardet + import pipenv.vendor.chardet as chardet except ImportError: chardet = None try: - from urllib3.contrib import pyopenssl + from pipenv.vendor.urllib3.contrib import pyopenssl except ImportError: pyopenssl = None OpenSSL = None diff --git a/pipenv/vendor/requests/models.py b/pipenv/vendor/requests/models.py index aa6fb86e..0de756f9 100644 --- a/pipenv/vendor/requests/models.py +++ b/pipenv/vendor/requests/models.py @@ -15,10 +15,10 @@ import sys # such as in Embedded Python. See https://github.com/psf/requests/issues/3578. import encodings.idna -from urllib3.fields import RequestField -from urllib3.filepost import encode_multipart_formdata -from urllib3.util import parse_url -from urllib3.exceptions import ( +from pipenv.vendor.urllib3.fields import RequestField +from pipenv.vendor.urllib3.filepost import encode_multipart_formdata +from pipenv.vendor.urllib3.util import parse_url +from pipenv.vendor.urllib3.exceptions import ( DecodeError, ReadTimeoutError, ProtocolError, LocationParseError) from io import UnsupportedOperation @@ -347,7 +347,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): @staticmethod def _get_idna_encoded_host(host): - import idna + import pipenv.vendor.idna as idna try: host = idna.encode(host, uts46=True).decode('utf-8') diff --git a/pipenv/vendor/requests/packages.py b/pipenv/vendor/requests/packages.py index 00196bff..b4045690 100644 --- a/pipenv/vendor/requests/packages.py +++ b/pipenv/vendor/requests/packages.py @@ -1,9 +1,9 @@ import sys try: - import chardet + import pipenv.vendor.chardet as chardet except ImportError: - import charset_normalizer as chardet + import pipenv.vendor.charset_normalizer as chardet import warnings warnings.filterwarnings('ignore', 'Trying to detect', module='charset_normalizer') diff --git a/pipenv/vendor/requests/utils.py b/pipenv/vendor/requests/utils.py index dbb02a0d..47c3ef08 100644 --- a/pipenv/vendor/requests/utils.py +++ b/pipenv/vendor/requests/utils.py @@ -20,7 +20,7 @@ import tempfile import warnings import zipfile from collections import OrderedDict -from urllib3.util import make_headers +from pipenv.vendor.urllib3.util import make_headers from .__version__ import __version__ from . import certs diff --git a/pipenv/vendor/requirementslib/environment.py b/pipenv/vendor/requirementslib/environment.py index 69d9d513..86de7286 100644 --- a/pipenv/vendor/requirementslib/environment.py +++ b/pipenv/vendor/requirementslib/environment.py @@ -3,7 +3,7 @@ from __future__ import absolute_import, print_function import os -from platformdirs import user_cache_dir +from pipenv.vendor.platformdirs import user_cache_dir def is_type_checking(): diff --git a/pipenv/vendor/requirementslib/models/cache.py b/pipenv/vendor/requirementslib/models/cache.py index 6da15d57..8dc5159f 100644 --- a/pipenv/vendor/requirementslib/models/cache.py +++ b/pipenv/vendor/requirementslib/models/cache.py @@ -9,10 +9,10 @@ import os import pathlib import sys -import vistir -from packaging.requirements import Requirement -from pip_shims.shims import FAVORITE_HASH, SafeFileCache -from platformdirs import user_cache_dir +import pipenv.vendor.vistir as vistir +from pipenv.vendor.packaging.requirements import Requirement +from pipenv.vendor.pip_shims.shims import FAVORITE_HASH, SafeFileCache +from pipenv.vendor.platformdirs import user_cache_dir from .utils import as_tuple, get_pinned_version, key_from_req, lookup_table @@ -195,7 +195,7 @@ class HashCache(SafeFileCache): def __init__(self, *args, **kwargs): session = kwargs.pop("session", None) if not session: - import requests + import pipenv.vendor.requests as requests session = requests.session() atexit.register(session.close) @@ -205,7 +205,7 @@ class HashCache(SafeFileCache): super(HashCache, self).__init__(*args, **kwargs) def get_hash(self, location): - from pip_shims import VcsSupport + from pipenv.vendor.pip_shims import VcsSupport # if there is no location hash (i.e., md5 / sha256 / etc) we on't want to store it hash_value = None diff --git a/pipenv/vendor/requirementslib/models/dependencies.py b/pipenv/vendor/requirementslib/models/dependencies.py index 21cdd3b6..19d7720a 100644 --- a/pipenv/vendor/requirementslib/models/dependencies.py +++ b/pipenv/vendor/requirementslib/models/dependencies.py @@ -8,15 +8,15 @@ import os from contextlib import ExitStack from json import JSONDecodeError -import attr +import pipenv.vendor.attr as attr import packaging.markers import packaging.version import pip_shims.shims -import requests -from packaging.utils import canonicalize_name -from vistir.compat import fs_str -from vistir.contextmanagers import cd, temp_environ -from vistir.path import create_tracked_tempdir +import pipenv.vendor.requests as requests +from pipenv.vendor.packaging.utils import canonicalize_name +from pipenv.vendor.vistir.compat import fs_str +from pipenv.vendor.vistir.contextmanagers import cd, temp_environ +from pipenv.vendor.vistir.path import create_tracked_tempdir from ..environment import MYPY_RUNNING from ..utils import _ensure_dir, prepare_pip_source_args @@ -48,9 +48,9 @@ if MYPY_RUNNING: Union, ) - from packaging.markers import Marker - from packaging.requirements import Requirement as PackagingRequirement - from pip_shims.shims import ( + from pipenv.vendor.packaging.markers import Marker + from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement + from pipenv.vendor.pip_shims.shims import ( Command, InstallationCandidate, InstallRequirement, @@ -90,11 +90,11 @@ def find_all_matches(finder, ireq, pre=False): ireq. :param finder: A package finder for discovering matching candidates. - :type finder: :class:`~pip._internal.index.PackageFinder` + :type finder: :class:`~pipenv.patched.notpip._internal.index.PackageFinder` :param ireq: An install requirement. - :type ireq: :class:`~pip._internal.req.req_install.InstallRequirement` + :type ireq: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: A list of matching candidates. - :rtype: list[:class:`~pip._internal.index.InstallationCandidate`] + :rtype: list[:class:`~pipenv.patched.notpip._internal.index.InstallationCandidate`] """ candidates = clean_requires_python(finder.find_all_candidates(ireq.name)) @@ -213,7 +213,7 @@ class AbstractDependency(object): """Get the dependencies of the supplied candidate. :param candidate: An installrequirement - :type candidate: :class:`~pip._internal.req.req_install.InstallRequirement` + :type candidate: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: A list of abstract dependencies :rtype: list[:class:`~requirementslib.models.dependency.AbstractDependency`] """ @@ -325,11 +325,11 @@ def get_dependencies(ireq, sources=None, parent=None): """Get all dependencies for a given install requirement. :param ireq: A single InstallRequirement - :type ireq: :class:`~pip._internal.req.req_install.InstallRequirement` + :type ireq: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :param sources: Pipfile-formatted sources, defaults to None :type sources: list[dict], optional :param parent: The parent of this list of dependencies, defaults to None - :type parent: :class:`~pip._internal.req.req_install.InstallRequirement` + :type parent: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: A set of dependency lines for generating new InstallRequirements. :rtype: set(str) """ @@ -362,7 +362,7 @@ def get_dependencies_from_wheel_cache(ireq): cache. :param ireq: A single InstallRequirement - :type ireq: :class:`~pip._internal.req.req_install.InstallRequirement` + :type ireq: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: A set of dependency lines for generating new InstallRequirements. :rtype: set(str) or None """ @@ -389,7 +389,7 @@ def get_dependencies_from_json(ireq): api. :param ireq: A single InstallRequirement - :type ireq: :class:`~pip._internal.req.req_install.InstallRequirement` + :type ireq: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: A set of dependency lines for generating new InstallRequirements. :rtype: set(str) or None """ @@ -439,7 +439,7 @@ def get_dependencies_from_cache(ireq): dependency cache. :param ireq: A single InstallRequirement - :type ireq: :class:`~pip._internal.req.req_install.InstallRequirement` + :type ireq: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: A set of dependency lines for generating new InstallRequirements. :rtype: set(str) or None """ @@ -481,7 +481,7 @@ def get_dependencies_from_index(dep, sources=None, pip_options=None, wheel_cache resolver. :param dep: A single InstallRequirement - :type dep: :class:`~pip._internal.req.req_install.InstallRequirement` + :type dep: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :param sources: Pipfile-formatted sources, defaults to None :type sources: list[dict], optional :return: A set of dependency lines for generating new InstallRequirements. @@ -517,9 +517,9 @@ def get_pip_options(args=None, sources=None, pip_command=None): :param sources: A list of pipfile-formatted sources, defaults to None :param sources: list[dict], optional :param pip_command: A pre-built pip command instance - :type pip_command: :class:`~pip._internal.cli.base_command.Command` + :type pip_command: :class:`~pipenv.patched.notpip._internal.cli.base_command.Command` :return: An instance of pip_options using the supplied arguments plus sane defaults - :rtype: :class:`~pip._internal.cli.cmdoptions` + :rtype: :class:`~pipenv.patched.notpip._internal.cli.cmdoptions` """ if not pip_command: @@ -541,11 +541,11 @@ def get_finder(sources=None, pip_command=None, pip_options=None): :param sources: A list of pipfile-formatted sources, defaults to None :param sources: list[dict], optional :param pip_command: A pip command instance, defaults to None - :type pip_command: :class:`~pip._internal.cli.base_command.Command` + :type pip_command: :class:`~pipenv.patched.notpip._internal.cli.base_command.Command` :param pip_options: A pip options, defaults to None - :type pip_options: :class:`~pip._internal.cli.cmdoptions` + :type pip_options: :class:`~pipenv.patched.notpip._internal.cli.cmdoptions` :return: A package finder - :rtype: :class:`~pip._internal.index.PackageFinder` + :rtype: :class:`~pipenv.patched.notpip._internal.index.PackageFinder` """ if not pip_command: @@ -567,12 +567,12 @@ def start_resolver(finder=None, session=None, wheel_cache=None): """Context manager to produce a resolver. :param finder: A package finder to use for searching the index - :type finder: :class:`~pip._internal.index.PackageFinder` + :type finder: :class:`~pipenv.patched.notpip._internal.index.PackageFinder` :param :class:`~requests.Session` session: A session instance - :param :class:`~pip._internal.cache.WheelCache` wheel_cache: A pip WheelCache instance + :param :class:`~pipenv.patched.notpip._internal.cache.WheelCache` wheel_cache: A pip WheelCache instance :return: A 3-tuple of finder, preparer, resolver - :rtype: (:class:`~pip._internal.operations.prepare.RequirementPreparer`, - :class:`~pip._internal.resolve.Resolver`) + :rtype: (:class:`~pipenv.patched.notpip._internal.operations.prepare.RequirementPreparer`, + :class:`~pipenv.patched.notpip._internal.resolve.Resolver`) """ pip_command = get_pip_command() diff --git a/pipenv/vendor/requirementslib/models/lockfile.py b/pipenv/vendor/requirementslib/models/lockfile.py index ce41c702..53f613df 100644 --- a/pipenv/vendor/requirementslib/models/lockfile.py +++ b/pipenv/vendor/requirementslib/models/lockfile.py @@ -7,7 +7,7 @@ import os from json import JSONDecodeError from pathlib import Path -import attr +import pipenv.vendor.attr as attr import plette.lockfiles from ..exceptions import LockfileCorruptException, MissingParameter, PipfileNotFound diff --git a/pipenv/vendor/requirementslib/models/markers.py b/pipenv/vendor/requirementslib/models/markers.py index 6149558d..54fb7164 100644 --- a/pipenv/vendor/requirementslib/models/markers.py +++ b/pipenv/vendor/requirementslib/models/markers.py @@ -5,12 +5,12 @@ import re from collections.abc import Mapping, Set from functools import lru_cache, reduce -import attr +import pipenv.vendor.attr as attr import distlib.markers import packaging.version -from packaging.markers import InvalidMarker, Marker -from packaging.specifiers import Specifier, SpecifierSet -from vistir.misc import dedup +from pipenv.vendor.packaging.markers import InvalidMarker, Marker +from pipenv.vendor.packaging.specifiers import Specifier, SpecifierSet +from pipenv.vendor.vistir.misc import dedup from ..environment import MYPY_RUNNING from ..exceptions import RequirementError diff --git a/pipenv/vendor/requirementslib/models/metadata.py b/pipenv/vendor/requirementslib/models/metadata.py index 28bc4b73..668189ef 100644 --- a/pipenv/vendor/requirementslib/models/metadata.py +++ b/pipenv/vendor/requirementslib/models/metadata.py @@ -11,17 +11,17 @@ from collections import defaultdict from functools import reduce from typing import Sequence -import attr +import pipenv.vendor.attr as attr import dateutil.parser import distlib.metadata import distlib.wheel import packaging.version -import requests -import vistir -from packaging.markers import Marker -from packaging.requirements import Requirement as PackagingRequirement -from packaging.specifiers import Specifier, SpecifierSet -from packaging.tags import Tag +import pipenv.vendor.requests as requests +import pipenv.vendor.vistir as vistir +from pipenv.vendor.packaging.markers import Marker +from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement +from pipenv.vendor.packaging.specifiers import Specifier, SpecifierSet +from pipenv.vendor.packaging.tags import Tag from ..environment import MYPY_RUNNING from .markers import ( @@ -60,7 +60,7 @@ if MYPY_RUNNING: Union, ) - from attr import Attribute # noqa + from pipenv.vendor.attr import Attribute # noqa from .setup_info import SetupInfo diff --git a/pipenv/vendor/requirementslib/models/pipfile.py b/pipenv/vendor/requirementslib/models/pipfile.py index a1816cd0..d949079b 100644 --- a/pipenv/vendor/requirementslib/models/pipfile.py +++ b/pipenv/vendor/requirementslib/models/pipfile.py @@ -7,10 +7,10 @@ import itertools import os from pathlib import Path -import attr +import pipenv.vendor.attr as attr import plette.models.base import plette.pipfiles -import tomlkit +import pipenv.vendor.tomlkit as tomlkit from ..environment import MYPY_RUNNING from ..exceptions import RequirementError diff --git a/pipenv/vendor/requirementslib/models/project.py b/pipenv/vendor/requirementslib/models/project.py index 8e1af95d..9211cd31 100644 --- a/pipenv/vendor/requirementslib/models/project.py +++ b/pipenv/vendor/requirementslib/models/project.py @@ -6,12 +6,12 @@ import collections import io import os -import attr +import pipenv.vendor.attr as attr import packaging.markers import packaging.utils -import plette +import pipenv.vendor.plette as plette import plette.models -import tomlkit +import pipenv.vendor.tomlkit as tomlkit SectionDifference = collections.namedtuple("SectionDifference", ["inthis", "inthat"]) FileDifference = collections.namedtuple("FileDifference", ["default", "develop"]) @@ -138,7 +138,7 @@ class Project(object): ) def add_line_to_pipfile(self, line, develop): - from requirementslib import Requirement + from pipenv.vendor.requirementslib import Requirement requirement = Requirement.from_line(line) section = self._get_pipfile_section(develop=develop) diff --git a/pipenv/vendor/requirementslib/models/requirements.py b/pipenv/vendor/requirementslib/models/requirements.py index 5c131d54..435bd2a6 100644 --- a/pipenv/vendor/requirementslib/models/requirements.py +++ b/pipenv/vendor/requirementslib/models/requirements.py @@ -13,21 +13,21 @@ from pathlib import Path from urllib import parse as urllib_parse from urllib.parse import unquote -import attr -import pip_shims -from cached_property import cached_property -from packaging.markers import Marker -from packaging.requirements import Requirement as PackagingRequirement -from packaging.specifiers import ( +import pipenv.vendor.attr as attr +import pipenv.vendor.pip_shims as pip_shims +from pipenv.vendor.cached_property import cached_property +from pipenv.vendor.packaging.markers import Marker +from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement +from pipenv.vendor.packaging.specifiers import ( InvalidSpecifier, LegacySpecifier, Specifier, SpecifierSet, ) -from packaging.utils import canonicalize_name -from vistir.contextmanagers import temp_path -from vistir.misc import dedup -from vistir.path import ( +from pipenv.vendor.packaging.utils import canonicalize_name +from pipenv.vendor.vistir.contextmanagers import temp_path +from pipenv.vendor.vistir.misc import dedup +from pipenv.vendor.vistir.path import ( create_tracked_tempdir, get_converted_relative_path, is_file_url, @@ -100,7 +100,7 @@ if MYPY_RUNNING: Union, ) - from pip_shims.shims import ( + from pipenv.vendor.pip_shims.shims import ( InstallationCandidate, InstallRequirement, Link, @@ -940,7 +940,7 @@ class Line(object): # type: () -> Optional[STRING_TYPE] if not self.is_wheel: pass - from pip_shims.shims import Wheel + from pipenv.vendor.pip_shims.shims import Wheel _wheel = Wheel(self.link.filename) name = _wheel.name @@ -1469,7 +1469,7 @@ class FileRequirement(object): forward slashes. Can be None if the line is a remote URI. - `uri` is the absolute URI to the package. Can be None if the line is not a URI. - - `link` is an instance of :class:`pip._internal.index.Link`, + - `link` is an instance of :class:`pipenv.patched.notpip._internal.index.Link`, representing a URI parse result based on the value of `uri`. This function is provided to deal with edge cases concerning URIs @@ -2998,7 +2998,7 @@ class Requirement(object): :param sources: list[dict], optional :param PackageFinder finder: A **PackageFinder** instance from pip's repository implementation :return: A list of Installation Candidates - :rtype: list[ :class:`~pip._internal.index.InstallationCandidate` ] + :rtype: list[ :class:`~pipenv.patched.notpip._internal.index.InstallationCandidate` ] """ from .dependencies import find_all_matches, get_finder diff --git a/pipenv/vendor/requirementslib/models/resolvers.py b/pipenv/vendor/requirementslib/models/resolvers.py index 8c360c45..1f6818b0 100644 --- a/pipenv/vendor/requirementslib/models/resolvers.py +++ b/pipenv/vendor/requirementslib/models/resolvers.py @@ -1,8 +1,8 @@ # -*- coding=utf-8 -*- from contextlib import contextmanager -import attr -from pip_shims.shims import Wheel +import pipenv.vendor.attr as attr +from pipenv.vendor.pip_shims.shims import Wheel from .cache import HashCache from .utils import format_requirement, is_pinned_requirement, version_from_ireq @@ -199,7 +199,7 @@ class DependencyResolver(object): if ireq.editable: return set() - from pip_shims import VcsSupport + from pipenv.vendor.pip_shims import VcsSupport vcs = VcsSupport() if ( diff --git a/pipenv/vendor/requirementslib/models/setup_info.py b/pipenv/vendor/requirementslib/models/setup_info.py index 4c74c139..772a4d81 100644 --- a/pipenv/vendor/requirementslib/models/setup_info.py +++ b/pipenv/vendor/requirementslib/models/setup_info.py @@ -16,19 +16,19 @@ from pathlib import Path from urllib.parse import urlparse, urlunparse from weakref import finalize -import attr +import pipenv.vendor.attr as attr import packaging.specifiers import packaging.utils import packaging.version import pep517.envbuild import pep517.wrappers -from distlib.wheel import Wheel -from packaging.markers import Marker -from pip_shims.utils import call_function_with_correct_args -from platformdirs import user_cache_dir -from vistir.contextmanagers import cd, temp_path -from vistir.misc import run -from vistir.path import create_tracked_tempdir, ensure_mkdir_p, mkdir_p, rmtree +from pipenv.vendor.distlib.wheel import Wheel +from pipenv.vendor.packaging.markers import Marker +from pipenv.vendor.pip_shims.utils import call_function_with_correct_args +from pipenv.vendor.platformdirs import user_cache_dir +from pipenv.vendor.vistir.contextmanagers import cd, temp_path +from pipenv.vendor.vistir.misc import run +from pipenv.vendor.vistir.path import create_tracked_tempdir, ensure_mkdir_p, mkdir_p, rmtree from ..environment import MYPY_RUNNING from ..exceptions import RequirementError @@ -71,9 +71,9 @@ if MYPY_RUNNING: Union, ) - import requests - from packaging.requirements import Requirement as PackagingRequirement - from pip_shims.shims import InstallRequirement, PackageFinder + import pipenv.vendor.requests as requests + from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement + from pipenv.vendor.pip_shims.shims import InstallRequirement, PackageFinder from pkg_resources import DistInfoDistribution, EggInfoDistribution, PathMetadata from pkg_resources import Requirement as PkgResourcesRequirement diff --git a/pipenv/vendor/requirementslib/models/url.py b/pipenv/vendor/requirementslib/models/url.py index 106d6d4c..d2e90cd1 100644 --- a/pipenv/vendor/requirementslib/models/url.py +++ b/pipenv/vendor/requirementslib/models/url.py @@ -5,11 +5,11 @@ from urllib.parse import quote from urllib.parse import unquote as url_unquote from urllib.parse import unquote_plus -import attr +import pipenv.vendor.attr as attr import pip_shims.shims -from orderedmultidict import omdict -from urllib3.util import parse_url as urllib3_parse -from urllib3.util.url import Url +from pipenv.vendor.orderedmultidict import omdict +from pipenv.vendor.urllib3.util import parse_url as urllib3_parse +from pipenv.vendor.urllib3.util.url import Url from ..environment import MYPY_RUNNING from ..utils import is_installable_file @@ -18,7 +18,7 @@ from .utils import extras_to_string, parse_extras if MYPY_RUNNING: from typing import Dict, Optional, Text, Tuple, TypeVar, Union - from pip_shims.shims import Link + from pipenv.vendor.pip_shims.shims import Link _T = TypeVar("_T") STRING_TYPE = Union[bytes, str, Text] diff --git a/pipenv/vendor/requirementslib/models/utils.py b/pipenv/vendor/requirementslib/models/utils.py index c0f4b239..5e116599 100644 --- a/pipenv/vendor/requirementslib/models/utils.py +++ b/pipenv/vendor/requirementslib/models/utils.py @@ -11,18 +11,18 @@ from functools import lru_cache from itertools import chain, groupby from pathlib import Path -import tomlkit -from attr import validators -from packaging.markers import InvalidMarker, Marker, Op, Value, Variable -from packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet -from packaging.version import parse as parse_version -from plette.models import Package, PackageCollection -from tomlkit.container import Container -from tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table -from urllib3 import util as urllib3_util -from urllib3.util import parse_url as urllib3_parse -from vistir.misc import dedup -from vistir.path import is_valid_url +import pipenv.vendor.tomlkit as tomlkit +from pipenv.vendor.attr import validators +from pipenv.vendor.packaging.markers import InvalidMarker, Marker, Op, Value, Variable +from pipenv.vendor.packaging.specifiers import InvalidSpecifier, Specifier, SpecifierSet +from pipenv.vendor.packaging.version import parse as parse_version +from pipenv.vendor.plette.models import Package, PackageCollection +from pipenv.vendor.tomlkit.container import Container +from pipenv.vendor.tomlkit.items import AoT, Array, Bool, InlineTable, Item, String, Table +from pipenv.vendor.urllib3 import util as urllib3_util +from pipenv.vendor.urllib3.util import parse_url as urllib3_parse +from pipenv.vendor.vistir.misc import dedup +from pipenv.vendor.vistir.path import is_valid_url from ..environment import MYPY_RUNNING from ..utils import SCHEME_LIST, VCS_LIST, is_star @@ -44,15 +44,15 @@ if MYPY_RUNNING: Union, ) - from attr import _ValidatorType # noqa - from packaging.markers import Marker as PkgResourcesMarker - from packaging.markers import Op as PkgResourcesOp - from packaging.markers import Value as PkgResourcesValue - from packaging.markers import Variable as PkgResourcesVariable - from packaging.requirements import Requirement as PackagingRequirement - from pip_shims.shims import Link + from pipenv.vendor.attr import _ValidatorType # noqa + from pipenv.vendor.packaging.markers import Marker as PkgResourcesMarker + from pipenv.vendor.packaging.markers import Op as PkgResourcesOp + from pipenv.vendor.packaging.markers import Value as PkgResourcesValue + from pipenv.vendor.packaging.markers import Variable as PkgResourcesVariable + from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement + from pipenv.vendor.pip_shims.shims import Link from pkg_resources import Requirement as PkgResourcesRequirement - from urllib3.util.url import Url + from pipenv.vendor.urllib3.util.url import Url _T = TypeVar("_T") TMarker = Union[Marker, PkgResourcesMarker] @@ -115,7 +115,7 @@ def create_link(link): if not isinstance(link, str): raise TypeError("must provide a string to instantiate a new link") - from pip_shims.shims import Link # noqa: F811 + from pipenv.vendor.pip_shims.shims import Link # noqa: F811 return Link(link) @@ -851,7 +851,7 @@ def name_from_req(req): def make_install_requirement( name, version=None, extras=None, markers=None, constraint=False ): - """Generates an :class:`~pip._internal.req.req_install.InstallRequirement`. + """Generates an :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement`. Create an InstallRequirement from the supplied metadata. @@ -866,11 +866,11 @@ def make_install_requirement( :param constraint: Whether to flag the requirement as a constraint, defaults to False. :param constraint: bool, optional :return: A generated InstallRequirement - :rtype: :class:`~pip._internal.req.req_install.InstallRequirement` + :rtype: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` """ # If no extras are specified, the extras string is blank - from pip_shims.shims import install_req_from_line + from pipenv.vendor.pip_shims.shims import install_req_from_line extras_string = "" requirement_string = "{0}".format(name) @@ -887,10 +887,10 @@ def make_install_requirement( def version_from_ireq(ireq): """version_from_ireq Extract the version from a supplied - :class:`~pip._internal.req.req_install.InstallRequirement` + :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :param ireq: An InstallRequirement - :type ireq: :class:`~pip._internal.req.req_install.InstallRequirement` + :type ireq: :class:`~pipenv.patched.notpip._internal.req.req_install.InstallRequirement` :return: The version of the InstallRequirement. :rtype: str """ @@ -912,7 +912,7 @@ def clean_requires_python(candidates): `requires_python` attributes.""" all_candidates = [] sys_version = ".".join(map(str, sys.version_info[:3])) - from packaging.version import parse as parse_version + from pipenv.vendor.packaging.version import parse as parse_version py_version = parse_version(os.environ.get("PIP_PYTHON_VERSION", sys_version)) for c in candidates: @@ -936,7 +936,7 @@ def clean_requires_python(candidates): def fix_requires_python_marker(requires_python): - from packaging.requirements import Requirement as PackagingRequirement + from pipenv.vendor.packaging.requirements import Requirement as PackagingRequirement marker_str = "" if any(requires_python.startswith(op) for op in Specifier._operators.keys()): @@ -986,7 +986,7 @@ def get_name_variants(pkg): if not isinstance(pkg, str): raise TypeError("must provide a string to derive package names") - from packaging.utils import canonicalize_name + from pipenv.vendor.packaging.utils import canonicalize_name from pkg_resources import safe_name pkg = pkg.lower() diff --git a/pipenv/vendor/requirementslib/models/vcs.py b/pipenv/vendor/requirementslib/models/vcs.py index 18adb085..5933623d 100644 --- a/pipenv/vendor/requirementslib/models/vcs.py +++ b/pipenv/vendor/requirementslib/models/vcs.py @@ -5,8 +5,8 @@ import importlib import os import sys -import attr -import pip_shims +import pipenv.vendor.attr as attr +import pipenv.vendor.pip_shims as pip_shims from ..environment import MYPY_RUNNING from .url import URI @@ -41,7 +41,7 @@ class VCSRepository(object): default_run_args = self.monkeypatch_pip() else: default_run_args = self.DEFAULT_RUN_ARGS - from pip_shims.shims import VcsSupport + from pipenv.vendor.pip_shims.shims import VcsSupport VCS_SUPPORT = VcsSupport() backend = VCS_SUPPORT.get_backend(self.vcs_type) @@ -111,7 +111,7 @@ class VCSRepository(object): @classmethod def monkeypatch_pip(cls): # type: () -> Tuple[Any, ...] - from pip_shims.compat import get_allowed_args + from pipenv.vendor.pip_shims.compat import get_allowed_args target_module = pip_shims.shims.VcsSupport.__module__ pip_vcs = importlib.import_module(target_module) diff --git a/pipenv/vendor/requirementslib/utils.py b/pipenv/vendor/requirementslib/utils.py index 712e8fdd..9048a8ef 100644 --- a/pipenv/vendor/requirementslib/utils.py +++ b/pipenv/vendor/requirementslib/utils.py @@ -9,10 +9,10 @@ from pathlib import Path from urllib.parse import urlparse, urlsplit, urlunparse import pip_shims.shims -import tomlkit -import vistir -from vistir.compat import fs_decode -from vistir.path import ensure_mkdir_p, is_valid_url +import pipenv.vendor.tomlkit as tomlkit +import pipenv.vendor.vistir as vistir +from pipenv.vendor.vistir.compat import fs_decode +from pipenv.vendor.vistir.path import ensure_mkdir_p, is_valid_url from .environment import MYPY_RUNNING @@ -104,7 +104,7 @@ def strip_ssh_from_git_uri(uri): def add_ssh_scheme_to_git_uri(uri): # type: (S) -> S - """Cleans VCS uris from pipenv.patched.notpip format.""" + """Cleans VCS uris from pip format.""" if isinstance(uri, str): # Add scheme for parsing purposes, this is also what pip does if uri.startswith("git+") and "://" not in uri: @@ -171,7 +171,7 @@ def convert_entry_to_path(path): def is_installable_file(path): # type: (PipfileType) -> bool """Determine if a path can potentially be installed.""" - from packaging import specifiers + from pipenv.vendor.packaging import specifiers if isinstance(path, Mapping): path = convert_entry_to_path(path) diff --git a/pipenv/vendor/shellingham/nt.py b/pipenv/vendor/shellingham/nt.py index 389551b2..4ddc91b9 100644 --- a/pipenv/vendor/shellingham/nt.py +++ b/pipenv/vendor/shellingham/nt.py @@ -14,7 +14,7 @@ from ctypes.wintypes import ( ULONG, ) -from shellingham._core import SHELL_NAMES +from pipenv.vendor.shellingham._core import SHELL_NAMES INVALID_HANDLE_VALUE = HANDLE(-1).value diff --git a/pipenv/vendor/toml/__init__.py b/pipenv/vendor/toml/__init__.py index 7719ac23..5dd5b1ce 100644 --- a/pipenv/vendor/toml/__init__.py +++ b/pipenv/vendor/toml/__init__.py @@ -3,8 +3,8 @@ Released under the MIT license. """ -from toml import encoder -from toml import decoder +from pipenv.vendor.toml import encoder +from pipenv.vendor.toml import decoder __version__ = "0.10.2" _spec_ = "0.5.0" diff --git a/pipenv/vendor/toml/decoder.py b/pipenv/vendor/toml/decoder.py index bf400e97..62719155 100644 --- a/pipenv/vendor/toml/decoder.py +++ b/pipenv/vendor/toml/decoder.py @@ -4,7 +4,7 @@ from os import linesep import re import sys -from toml.tz import TomlTz +from pipenv.vendor.toml.tz import TomlTz if sys.version_info < (3,): _range = xrange # noqa: F821 diff --git a/pipenv/vendor/toml/encoder.py b/pipenv/vendor/toml/encoder.py index bf17a72b..b04756ec 100644 --- a/pipenv/vendor/toml/encoder.py +++ b/pipenv/vendor/toml/encoder.py @@ -3,7 +3,7 @@ import re import sys from decimal import Decimal -from toml.decoder import InlineTableDict +from pipenv.vendor.toml.decoder import InlineTableDict if sys.version_info >= (3,): unicode = str @@ -286,7 +286,7 @@ class TomlNumpyEncoder(TomlEncoder): class TomlPreserveCommentEncoder(TomlEncoder): def __init__(self, _dict=dict, preserve=False): - from toml.decoder import CommentValue + from pipenv.vendor.toml.decoder import CommentValue super(TomlPreserveCommentEncoder, self).__init__(_dict, preserve) self.dump_funcs[CommentValue] = lambda v: v.dump(self.dump_value) diff --git a/pipenv/vendor/toml/ordered.py b/pipenv/vendor/toml/ordered.py index 9c20c41a..3c9a8ef2 100644 --- a/pipenv/vendor/toml/ordered.py +++ b/pipenv/vendor/toml/ordered.py @@ -1,6 +1,6 @@ from collections import OrderedDict -from toml import TomlEncoder -from toml import TomlDecoder +from pipenv.vendor.toml import TomlEncoder +from pipenv.vendor.toml import TomlDecoder class TomlOrderedDecoder(TomlDecoder): diff --git a/pipenv/vendor/tomli/__init__.py b/pipenv/vendor/tomli/__init__.py index 33b7b9dd..88e81d92 100644 --- a/pipenv/vendor/tomli/__init__.py +++ b/pipenv/vendor/tomli/__init__.py @@ -3,4 +3,4 @@ __all__ = ("loads", "load", "TOMLDecodeError") __version__ = "1.1.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT -from tomli._parser import TOMLDecodeError, load, loads +from pipenv.vendor.tomli._parser import TOMLDecodeError, load, loads diff --git a/pipenv/vendor/tomli/_parser.py b/pipenv/vendor/tomli/_parser.py index 3e46c047..5332915b 100644 --- a/pipenv/vendor/tomli/_parser.py +++ b/pipenv/vendor/tomli/_parser.py @@ -12,7 +12,7 @@ from typing import ( Tuple, ) -from tomli._re import ( +from pipenv.vendor.tomli._re import ( RE_DATETIME, RE_LOCALTIME, RE_NUMBER, diff --git a/pipenv/vendor/tomli/_re.py b/pipenv/vendor/tomli/_re.py index d1bef1ad..7d42632b 100644 --- a/pipenv/vendor/tomli/_re.py +++ b/pipenv/vendor/tomli/_re.py @@ -4,7 +4,7 @@ import re from typing import TYPE_CHECKING, Any, Optional, Union if TYPE_CHECKING: - from tomli._parser import ParseFloat + from pipenv.vendor.tomli._parser import ParseFloat # E.g. # - 00:32:00.999999 diff --git a/pipenv/vendor/urllib3/contrib/_securetransport/bindings.py b/pipenv/vendor/urllib3/contrib/_securetransport/bindings.py index 11524d40..4a1449e8 100644 --- a/pipenv/vendor/urllib3/contrib/_securetransport/bindings.py +++ b/pipenv/vendor/urllib3/contrib/_securetransport/bindings.py @@ -48,7 +48,7 @@ from ctypes import ( ) from ctypes.util import find_library -from urllib3.packages.six import raise_from +from pipenv.vendor.urllib3.packages.six import raise_from if platform.system() != "Darwin": raise ImportError("Only macOS is supported") diff --git a/pipenv/vendor/urllib3/contrib/appengine.py b/pipenv/vendor/urllib3/contrib/appengine.py index f91bdd6e..1b783c23 100644 --- a/pipenv/vendor/urllib3/contrib/appengine.py +++ b/pipenv/vendor/urllib3/contrib/appengine.py @@ -4,8 +4,8 @@ This module provides a pool manager that uses Google App Engine's Example usage:: - from urllib3 import PoolManager - from urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox + from pipenv.vendor.urllib3 import PoolManager + from pipenv.vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox if is_appengine_sandbox(): # AppEngineManager uses AppEngine's URLFetch API behind the scenes diff --git a/pipenv/vendor/urllib3/contrib/pyopenssl.py b/pipenv/vendor/urllib3/contrib/pyopenssl.py index def83afd..62c8d91b 100644 --- a/pipenv/vendor/urllib3/contrib/pyopenssl.py +++ b/pipenv/vendor/urllib3/contrib/pyopenssl.py @@ -188,7 +188,7 @@ def _dnsname_to_stdlib(name): that we can't just safely call `idna.encode`: it can explode for wildcard names. This avoids that problem. """ - import idna + import pipenv.vendor.idna as idna try: for prefix in [u"*.", u"."]: diff --git a/pipenv/vendor/urllib3/contrib/securetransport.py b/pipenv/vendor/urllib3/contrib/securetransport.py index 554c015f..aaa32e6b 100644 --- a/pipenv/vendor/urllib3/contrib/securetransport.py +++ b/pipenv/vendor/urllib3/contrib/securetransport.py @@ -64,7 +64,7 @@ import struct import threading import weakref -import six +import pipenv.vendor.six as six from .. import util from ..util.ssl_ import PROTOCOL_TLS_CLIENT diff --git a/pipenv/vendor/urllib3/util/connection.py b/pipenv/vendor/urllib3/util/connection.py index bdc240c5..9a2781ac 100644 --- a/pipenv/vendor/urllib3/util/connection.py +++ b/pipenv/vendor/urllib3/util/connection.py @@ -2,7 +2,7 @@ from __future__ import absolute_import import socket -from urllib3.exceptions import LocationParseError +from pipenv.vendor.urllib3.exceptions import LocationParseError from ..contrib import _appengine_environ from ..packages import six diff --git a/pipenv/vendor/urllib3/util/ssl_.py b/pipenv/vendor/urllib3/util/ssl_.py index 8f867812..8d424bc4 100644 --- a/pipenv/vendor/urllib3/util/ssl_.py +++ b/pipenv/vendor/urllib3/util/ssl_.py @@ -260,7 +260,7 @@ def create_urllib3_context( If you wish to enable SSLv3, you can do:: - from urllib3.util import ssl_ + from pipenv.vendor.urllib3.util import ssl_ context = ssl_.create_urllib3_context() context.options &= ~ssl_.OP_NO_SSLv3 diff --git a/pipenv/vendor/urllib3/util/ssltransport.py b/pipenv/vendor/urllib3/util/ssltransport.py index c2186bce..77bf19ec 100644 --- a/pipenv/vendor/urllib3/util/ssltransport.py +++ b/pipenv/vendor/urllib3/util/ssltransport.py @@ -2,8 +2,8 @@ import io import socket import ssl -from urllib3.exceptions import ProxySchemeUnsupported -from urllib3.packages import six +from pipenv.vendor.urllib3.exceptions import ProxySchemeUnsupported +from pipenv.vendor.urllib3.packages import six SSL_BLOCKSIZE = 16384 diff --git a/pipenv/vendor/urllib3/util/url.py b/pipenv/vendor/urllib3/util/url.py index 81a03da9..d26f8c52 100644 --- a/pipenv/vendor/urllib3/util/url.py +++ b/pipenv/vendor/urllib3/util/url.py @@ -302,7 +302,7 @@ def _normalize_host(host, scheme): def _idna_encode(name): if name and any([ord(x) > 128 for x in name]): try: - import idna + import pipenv.vendor.idna as idna except ImportError: six.raise_from( LocationParseError("Unable to parse URL without the 'idna' module"), diff --git a/pipenv/vendor/vistir/_winconsole.py b/pipenv/vendor/vistir/_winconsole.py index 24faec59..cb5e6d27 100644 --- a/pipenv/vendor/vistir/_winconsole.py +++ b/pipenv/vendor/vistir/_winconsole.py @@ -64,7 +64,7 @@ from ctypes.wintypes import HANDLE, LPCWSTR, LPWSTR from itertools import count import msvcrt -from six import PY2, text_type +from pipenv.vendor.six import PY2, text_type from .compat import IS_TYPE_CHECKING from .misc import StreamWrapper, run, to_text diff --git a/pipenv/vendor/vistir/backports/surrogateescape.py b/pipenv/vendor/vistir/backports/surrogateescape.py index c506f7b3..5897d573 100644 --- a/pipenv/vendor/vistir/backports/surrogateescape.py +++ b/pipenv/vendor/vistir/backports/surrogateescape.py @@ -9,7 +9,7 @@ Source: misc/python/surrogateescape.py in https://bitbucket.org/haypo/misc import codecs import sys -import six +import pipenv.vendor.six as six FS_ERRORS = "surrogateescape" diff --git a/pipenv/vendor/vistir/backports/tempfile.py b/pipenv/vendor/vistir/backports/tempfile.py index f5594a2d..45b8a086 100644 --- a/pipenv/vendor/vistir/backports/tempfile.py +++ b/pipenv/vendor/vistir/backports/tempfile.py @@ -7,7 +7,7 @@ import os import sys from tempfile import _bin_openflags, _mkstemp_inner, gettempdir -import six +import pipenv.vendor.six as six try: from weakref import finalize diff --git a/pipenv/vendor/vistir/cmdparse.py b/pipenv/vendor/vistir/cmdparse.py index 664ae7df..b04274a5 100644 --- a/pipenv/vendor/vistir/cmdparse.py +++ b/pipenv/vendor/vistir/cmdparse.py @@ -5,7 +5,7 @@ import itertools import re import shlex -import six +import pipenv.vendor.six as six __all__ = ["ScriptEmptyError", "Script"] diff --git a/pipenv/vendor/vistir/compat.py b/pipenv/vendor/vistir/compat.py index be1635e9..336f4f7c 100644 --- a/pipenv/vendor/vistir/compat.py +++ b/pipenv/vendor/vistir/compat.py @@ -8,7 +8,7 @@ import sys import warnings from tempfile import mkdtemp -import six +import pipenv.vendor.six as six from .backports.tempfile import NamedTemporaryFile as _NamedTemporaryFile diff --git a/pipenv/vendor/vistir/contextmanagers.py b/pipenv/vendor/vistir/contextmanagers.py index 80421a9c..251641d5 100644 --- a/pipenv/vendor/vistir/contextmanagers.py +++ b/pipenv/vendor/vistir/contextmanagers.py @@ -7,7 +7,7 @@ import stat import sys from contextlib import closing, contextmanager -import six +import pipenv.vendor.six as six from .compat import IS_TYPE_CHECKING, NamedTemporaryFile, Path from .path import is_file_url, is_valid_url, path_to_url, url_to_path @@ -28,9 +28,9 @@ if IS_TYPE_CHECKING: TypeVar, ) from types import ModuleType - from requests import Session - from six.moves.http_client import HTTPResponse as Urllib_HTTPResponse - from urllib3.response import HTTPResponse as Urllib3_HTTPResponse + from pipenv.vendor.requests import Session + from pipenv.vendor.six.moves.http_client import HTTPResponse as Urllib_HTTPResponse + from pipenv.vendor.urllib3.response import HTTPResponse as Urllib3_HTTPResponse from .spin import VistirSpinner, DummySpinner TSpinner = Union[VistirSpinner, DummySpinner] @@ -176,7 +176,7 @@ def spinner( has_yaspin = None try: - import yaspin + import pipenv.vendor.yaspin as yaspin except ImportError: has_yaspin = False if not nospin: @@ -311,7 +311,7 @@ def open_file( """ Open local or remote file for reading. - :param pip._internal.index.Link link: A link object from resolving dependencies with + :param pipenv.patched.notpip._internal.index.Link link: A link object from resolving dependencies with pip, or else a URL. :param Optional[Session] session: A :class:`~requests.Session` instance :param bool stream: Whether to stream the content if remote, default True @@ -340,7 +340,7 @@ def open_file( headers = {"Accept-Encoding": "identity"} if not session: try: - from requests import Session # noqa + from pipenv.vendor.requests import Session # noqa except ImportError: session = None else: diff --git a/pipenv/vendor/vistir/misc.py b/pipenv/vendor/vistir/misc.py index 460e142b..68b7fa17 100644 --- a/pipenv/vendor/vistir/misc.py +++ b/pipenv/vendor/vistir/misc.py @@ -16,8 +16,8 @@ from functools import partial from itertools import islice, tee from weakref import WeakKeyDictionary -import six -from six.moves.queue import Empty, Queue +import pipenv.vendor.six as six +from pipenv.vendor.six.moves.queue import Empty, Queue from .cmdparse import Script from .compat import ( @@ -1100,7 +1100,7 @@ def _isatty(stream): _wrap_for_color = None try: - import colorama + import pipenv.vendor.colorama as colorama except ImportError: colorama = None diff --git a/pipenv/vendor/vistir/path.py b/pipenv/vendor/vistir/path.py index 73ef1cb6..0b684d7c 100644 --- a/pipenv/vendor/vistir/path.py +++ b/pipenv/vendor/vistir/path.py @@ -13,9 +13,9 @@ import time import unicodedata import warnings -import six -from six.moves import urllib_parse -from six.moves.urllib import request as urllib_request +import pipenv.vendor.six as six +from pipenv.vendor.six.moves import urllib_parse +from pipenv.vendor.six.moves.urllib import request as urllib_request from .backports.tempfile import _TemporaryFileWrapper from .compat import ( diff --git a/pipenv/vendor/vistir/spin.py b/pipenv/vendor/vistir/spin.py index 43821cb1..2c7c65cf 100644 --- a/pipenv/vendor/vistir/spin.py +++ b/pipenv/vendor/vistir/spin.py @@ -9,8 +9,8 @@ import threading import time from io import StringIO -import colorama -import six +import pipenv.vendor.colorama as colorama +import pipenv.vendor.six as six from .compat import IS_TYPE_CHECKING, to_native_string from .cursor import hide_cursor, show_cursor @@ -38,7 +38,7 @@ if IS_TYPE_CHECKING: _T = TypeVar("_T", covariant=True) try: - import yaspin + import pipenv.vendor.yaspin as yaspin except ImportError: # pragma: no cover yaspin = None Spinners = None diff --git a/pipenv/vendor/vistir/termcolors.py b/pipenv/vendor/vistir/termcolors.py index 27b5ff44..68f6e03a 100644 --- a/pipenv/vendor/vistir/termcolors.py +++ b/pipenv/vendor/vistir/termcolors.py @@ -4,8 +4,8 @@ from __future__ import absolute_import, print_function, unicode_literals import os import re -import colorama -import six +import pipenv.vendor.colorama as colorama +import pipenv.vendor.six as six from .compat import to_native_string diff --git a/pipenv/vendor/wheel/cli/pack.py b/pipenv/vendor/wheel/cli/pack.py index 1e77fdbd..762da308 100644 --- a/pipenv/vendor/wheel/cli/pack.py +++ b/pipenv/vendor/wheel/cli/pack.py @@ -4,8 +4,8 @@ import os.path import re import sys -from wheel.cli import WheelError -from wheel.wheelfile import WheelFile +from pipenv.vendor.wheel.cli import WheelError +from pipenv.vendor.wheel.wheelfile import WheelFile DIST_INFO_RE = re.compile(r"^(?P(?P.+?)-(?P\d.*?))\.dist-info$") BUILD_NUM_RE = re.compile(br'Build: (\d\w*)$') diff --git a/pipenv/vendor/wheel/vendored/packaging/_typing.py b/pipenv/vendor/wheel/vendored/packaging/_typing.py index 77a8b918..480a196c 100644 --- a/pipenv/vendor/wheel/vendored/packaging/_typing.py +++ b/pipenv/vendor/wheel/vendored/packaging/_typing.py @@ -18,7 +18,7 @@ curious maintainer can reach here to read this. In packaging, all static-typing related imports should be guarded as follows: - from packaging._typing import TYPE_CHECKING + from pipenv.vendor.packaging._typing import TYPE_CHECKING if TYPE_CHECKING: from typing import ... diff --git a/pipenv/vendor/wheel/wheelfile.py b/pipenv/vendor/wheel/wheelfile.py index 3ee97ddd..d29c0823 100644 --- a/pipenv/vendor/wheel/wheelfile.py +++ b/pipenv/vendor/wheel/wheelfile.py @@ -10,8 +10,8 @@ from collections import OrderedDict from distutils import log as logger from zipfile import ZIP_DEFLATED, ZipInfo, ZipFile -from wheel.cli import WheelError -from wheel.util import urlsafe_b64decode, as_unicode, native, urlsafe_b64encode, as_bytes, StringIO +from pipenv.vendor.wheel.cli import WheelError +from pipenv.vendor.wheel.util import urlsafe_b64decode, as_unicode, native, urlsafe_b64encode, as_bytes, StringIO # Non-greedy matching of an optional build number may be too clever (more # invalid wheel filenames will match). Separate regex for .dist-info? diff --git a/pipenv/vendor/yarg/client.py b/pipenv/vendor/yarg/client.py index 829b40b7..51e7955e 100644 --- a/pipenv/vendor/yarg/client.py +++ b/pipenv/vendor/yarg/client.py @@ -23,7 +23,7 @@ # SOFTWARE. -import requests +import pipenv.vendor.requests as requests from .exceptions import HTTPError from .package import json2package diff --git a/pipenv/vendor/yarg/exceptions.py b/pipenv/vendor/yarg/exceptions.py index adfdb838..3ee517fc 100644 --- a/pipenv/vendor/yarg/exceptions.py +++ b/pipenv/vendor/yarg/exceptions.py @@ -23,7 +23,7 @@ # SOFTWARE. -from requests.exceptions import HTTPError as RHTTPError +from pipenv.vendor.requests.exceptions import HTTPError as RHTTPError class YargException(Exception): diff --git a/pipenv/vendor/yarg/parse.py b/pipenv/vendor/yarg/parse.py index 60cd90a8..28ccd6cf 100644 --- a/pipenv/vendor/yarg/parse.py +++ b/pipenv/vendor/yarg/parse.py @@ -25,7 +25,7 @@ from datetime import datetime import xml.etree.ElementTree -import requests +import pipenv.vendor.requests as requests from .exceptions import HTTPError diff --git a/pipenv/vendor/yaspin/core.py b/pipenv/vendor/yaspin/core.py index d8a0716c..3bb628c8 100644 --- a/pipenv/vendor/yaspin/core.py +++ b/pipenv/vendor/yaspin/core.py @@ -18,7 +18,7 @@ import threading import time from typing import List, Set, Union -from termcolor import colored +from pipenv.vendor.termcolor import colored from pipenv.vendor import colorama from pipenv.vendor.vistir import cursor diff --git a/tasks/vendoring/__init__.py b/tasks/vendoring/__init__.py index 298f4feb..d5d27417 100644 --- a/tasks/vendoring/__init__.py +++ b/tasks/vendoring/__init__.py @@ -80,6 +80,11 @@ LIBRARY_RENAMES = { "functools32": "pipenv.vendor.backports.functools_lru_cache", } +GLOBAL_REPLACEMENT = [ + (r"\bpip\._vendor", r"pipenv.patched.notpip._vendor"), + (r"\bpip\._internal", r"pipenv.patched.notpip._internal"), +] + LICENSE_RENAMES = {"pythonfinder/LICENSE": "pythonfinder/pep514tools.LICENSE"} @@ -126,6 +131,31 @@ def clean_vendor(ctx, vendor_dir): log("Skipping %s" % item) +def detect_all_vendored_libs(ctx): + types = ("patched", "vendor") + retval = {} + + for type_ in types: + vendor_dir = _get_vendor_dir(ctx) if type_ == "vendor" else _get_patched_dir(ctx) + + for item in vendor_dir.iterdir(): + name = None + if item.name == "__pycache__": + continue + elif item.is_dir(): + name = item.name + elif "LICENSE" in item.name or "COPYING" in item.name: + continue + elif item.name.endswith(".pyi"): + continue + elif item.name not in FILE_WHITE_LIST: + name = item.name[:-3] + if name is not None and name not in LIBRARY_RENAMES: + retval[name] = f"pipenv.{type_}.{name}" + retval.update(LIBRARY_RENAMES) + return retval + + def detect_vendored_libs(vendor_dir): retval = [] for item in vendor_dir.iterdir(): @@ -142,43 +172,30 @@ def detect_vendored_libs(vendor_dir): return retval -def rewrite_imports(package_dir, vendored_libs, vendor_dir): +def rewrite_imports(package_dir, vendored_libs): for item in package_dir.iterdir(): if item.is_dir(): - rewrite_imports(item, vendored_libs, vendor_dir) + rewrite_imports(item, vendored_libs) elif item.name.endswith(".py"): - rewrite_file_imports(item, vendored_libs, vendor_dir) + rewrite_file_imports(item, vendored_libs) -def rewrite_file_imports(item, vendored_libs, vendor_dir): +def rewrite_file_imports(item, vendored_libs): """Rewrite 'import xxx' and 'from xxx import' for vendored_libs""" # log('Reading file: %s' % item) try: text = item.read_text(encoding="utf-8") except UnicodeDecodeError: text = item.read_text(encoding="cp1252") - renames = LIBRARY_RENAMES - for k in LIBRARY_RENAMES.keys(): - if k not in vendored_libs: - vendored_libs.append(k) - for lib in vendored_libs: - if lib not in renames: - continue - to_lib = renames[lib] + + for lib, to_lib in vendored_libs.items(): text = re.sub( - r"([\n\s]*)import %s([\n\s\.]+)" % lib, r"\1import %s\2" % to_lib, text, - ) - text = re.sub(r"([\n\s]*)from %s([\s\.]+)" % lib, r"\1from %s\2" % to_lib, text,) - text = re.sub( - r"(\n\s*)__import__\((['\"])%s([\s'\.])+" % lib, - r"\1__import__(\2%s\3" % to_lib, - text, - ) - text = re.sub( - r"(\n\s*)importlib.import_module\((['\"])%s([\s'\"\.]+)" % lib, - r"\1importlib.import_module(\2%s\3" % to_lib, - text + r"^(?m)(\s*)import %s((?:\.\S*)?\s+as)" % lib, r"\1import %s\2" % to_lib, text, ) + text = re.sub(r"^(?m)(\s*)from %s([\s\.]+)" % lib, r"\1from %s\2" % to_lib, text) + text = re.sub(r"^(?m)(\s*)import %s(\s*[,\n#])" % lib, r"\1import %s as %s\2" % (to_lib, lib), text) + for pattern, sub in GLOBAL_REPLACEMENT: + text = re.sub(pattern, sub, text) item.write_text(text, encoding="utf-8") @@ -358,7 +375,7 @@ def vendor(ctx, vendor_dir, package=None, rewrite=True): log("Running post-install cleanup...") post_install_cleanup(ctx, vendor_dir) # Detect the vendored packages/modules - vendored_libs = detect_vendored_libs(_get_vendor_dir(ctx)) if not package else [package] + vendored_libs = detect_all_vendored_libs(ctx) log("Detected vendored libraries: %s" % ", ".join(vendored_libs)) # Apply pre-patches @@ -377,11 +394,11 @@ def vendor(ctx, vendor_dir, package=None, rewrite=True): if item.is_dir(): if rewrite and not package or (package and item.name.lower() in package): log("Rewriting imports for %s..." % item) - rewrite_imports(item, vendored_libs, vendor_dir) + rewrite_imports(item, vendored_libs) rename_if_needed(ctx, vendor_dir, item) elif item.name not in FILE_WHITE_LIST: if rewrite and not package or (package and item.stem.lower() in package): - rewrite_file_imports(item, vendored_libs, vendor_dir) + rewrite_file_imports(item, vendored_libs) write_backport_imports(ctx, vendor_dir) if not package: apply_patches(ctx, patched=is_patched, pre=False) @@ -401,28 +418,30 @@ def redo_imports(ctx, library, vendor_dir=None): else: vendor_dir = Path(vendor_dir).absolute() log("Using vendor dir: %s" % vendor_dir) - vendored_libs = detect_vendored_libs(vendor_dir) + vendored_libs = detect_all_vendored_libs(ctx) item = vendor_dir / library library_name = vendor_dir / f"{library}.py" log("Detected vendored libraries: %s" % ", ".join(vendored_libs)) log("Rewriting imports for %s..." % item) if item.is_dir(): - rewrite_imports(item, vendored_libs, vendor_dir) + rewrite_imports(item, vendored_libs) else: - rewrite_file_imports(library_name, vendored_libs, vendor_dir) + rewrite_file_imports(library_name, vendored_libs) + @invoke.task def rewrite_all_imports(ctx): vendor_dir = _get_vendor_dir(ctx) + patched_dir = _get_patched_dir(ctx) log("Using vendor dir: %s" % vendor_dir) - vendored_libs = detect_vendored_libs(vendor_dir) + vendored_libs = detect_all_vendored_libs(ctx) log("Detected vendored libraries: %s" % ", ".join(vendored_libs)) log("Rewriting all imports related to vendored libs") - for item in vendor_dir.iterdir(): + for item in itertools.chain(patched_dir.iterdir(), vendor_dir.iterdir()): if item.is_dir(): - rewrite_imports(item, vendored_libs, vendor_dir) + rewrite_imports(item, vendored_libs) elif item.name not in FILE_WHITE_LIST: - rewrite_file_imports(item, vendored_libs, vendor_dir) + rewrite_file_imports(item, vendored_libs) @invoke.task diff --git a/tasks/vendoring/patches/patched/_post_pip_import.patch b/tasks/vendoring/patches/patched/_post_pip_import.patch index 5071e099..4a9756ad 100644 --- a/tasks/vendoring/patches/patched/_post_pip_import.patch +++ b/tasks/vendoring/patches/patched/_post_pip_import.patch @@ -10,28 +10,6 @@ index 204a8ca2..546caab1 100644 from pipenv.patched.notpip._internal.cli.main import main as _main sys.exit(_main()) -diff --git a/pipenv/patched/notpip/_internal/cli/req_command.py b/pipenv/patched/notpip/_internal/cli/req_command.py -index cb2c8e86..17c2209f 100644 ---- a/pipenv/patched/notpip/_internal/cli/req_command.py -+++ b/pipenv/patched/notpip/_internal/cli/req_command.py -@@ -305,7 +305,7 @@ class RequirementCommand(IndexGroupCommand): - if resolver_variant == "2020-resolver": - import pipenv.patched.notpip._internal.resolution.resolvelib.resolver - -- return pip._internal.resolution.resolvelib.resolver.Resolver( -+ return pipenv.patched.notpip._internal.resolution.resolvelib.resolver.Resolver( - preparer=preparer, - finder=finder, - wheel_cache=wheel_cache, -@@ -320,7 +320,7 @@ class RequirementCommand(IndexGroupCommand): - ) - import pipenv.patched.notpip._internal.resolution.legacy.resolver - -- return pip._internal.resolution.legacy.resolver.Resolver( -+ return pipenv.patched.notpip._internal.resolution.legacy.resolver.Resolver( - preparer=preparer, - finder=finder, - wheel_cache=wheel_cache, diff --git a/pipenv/patched/notpip/_internal/resolution/resolvelib/candidates.py b/pipenv/patched/notpip/_internal/resolution/resolvelib/candidates.py index 0ba06c52..6fdb59b7 100644 --- a/pipenv/patched/notpip/_internal/resolution/resolvelib/candidates.py @@ -48,16 +26,3 @@ index 0ba06c52..6fdb59b7 100644 class LinkCandidate(_InstallRequirementBackedCandidate): -diff --git a/pipenv/patched/notpip/_vendor/certifi/core.py b/pipenv/patched/notpip/_vendor/certifi/core.py -index b8140cf1..5b06ce3f 100644 ---- a/pipenv/patched/notpip/_vendor/certifi/core.py -+++ b/pipenv/patched/notpip/_vendor/certifi/core.py -@@ -47,7 +47,7 @@ try: - # We also have to hold onto the actual context manager, because - # it will do the cleanup whenever it gets garbage collected, so - # we will also store that at the global level as well. -- _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem") -+ _CACERT_CTX = get_path("pipenv.patched.notpip._vendor.certifi", "cacert.pem") - _CACERT_PATH = str(_CACERT_CTX.__enter__()) - - return _CACERT_PATH diff --git a/tasks/vendoring/patches/vendor/pip_shims-import.patch b/tasks/vendoring/patches/vendor/pip_shims-import.patch index 79ab8972..8f2ea8b9 100644 --- a/tasks/vendoring/patches/vendor/pip_shims-import.patch +++ b/tasks/vendoring/patches/vendor/pip_shims-import.patch @@ -20,3 +20,44 @@ index c66a075a..febea8df 100644 module.shims = shims module.__dict__.update( { +diff --git a/pipenv/vendor/pip_shims/utils.py b/pipenv/vendor/pip_shims/utils.py +index 2a31a4df..d3b5e708 100644 +--- a/pipenv/vendor/pip_shims/utils.py ++++ b/pipenv/vendor/pip_shims/utils.py +@@ -11,7 +11,7 @@ import sys + from collections.abc import Callable + from functools import wraps + +-import packaging.version ++from pipenv.vendor.packaging import version as pkg_version + + from .environment import MYPY_RUNNING + +@@ -107,10 +107,10 @@ def _parse(version): + + @memoize + def parse_version(version): +- # type: (str) -> packaging.version._BaseVersion ++ # type: (str) -> pkg_version._BaseVersion + if not isinstance(version, STRING_TYPES): + raise TypeError("Can only derive versions from string, got {!r}".format(version)) +- return packaging.version.parse(version) ++ return pkg_version.parse(version) + + + @memoize +@@ -130,10 +130,10 @@ def split_package(module, subimport=None): + :Example: + + >>> from pip_shims.utils import split_package +- >>> split_package("pipenv.patched.notpip._internal.req.req_install", subimport="InstallRequirement") +- ("pipenv.patched.notpip._internal.req.req_install", "InstallRequirement") +- >>> split_package("pipenv.patched.notpip._internal.cli.base_command") +- ("pipenv.patched.notpip._internal.cli", "base_command") ++ >>> split_package("pip._internal.req.req_install", subimport="InstallRequirement") ++ ("pip._internal.req.req_install", "InstallRequirement") ++ >>> split_package("pip._internal.cli.base_command") ++ ("pip._internal.cli", "base_command") + """ + package = None + if subimport: diff --git a/tasks/vendoring/patches/vendor/yaspin-signal-handling.patch b/tasks/vendoring/patches/vendor/yaspin-signal-handling.patch index 705650c3..b74a08dc 100644 --- a/tasks/vendoring/patches/vendor/yaspin-signal-handling.patch +++ b/tasks/vendoring/patches/vendor/yaspin-signal-handling.patch @@ -5,7 +5,7 @@ index 76dc2439..d8a0716c 100644 @@ -19,11 +19,15 @@ import time from typing import List, Set, Union - from termcolor import colored + from pipenv.vendor.termcolor import colored +from pipenv.vendor import colorama +from pipenv.vendor.vistir import cursor