mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #4861 from pypa/fix/vendoring
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
Copyright (C) 2008-2011 INADA Naoki <songofacandy@gmail.com>
|
||||
|
||||
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.
|
||||
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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").
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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}},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: <https://github.com/pypa/pip/pull/7501>
|
||||
system = 'win32'
|
||||
else:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Vendored
+3
-3
@@ -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:
|
||||
|
||||
@@ -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"})
|
||||
|
||||
@@ -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():
|
||||
|
||||
Vendored
+2
-2
@@ -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')
|
||||
|
||||
Vendored
+3
-3
@@ -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,
|
||||
|
||||
+2
-2
@@ -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):
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ from copy import deepcopy
|
||||
|
||||
import pytest
|
||||
|
||||
from cerberus import Validator
|
||||
from pipenv.vendor.cerberus import Validator
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
+5
-5
@@ -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:
|
||||
|
||||
+3
-3
@@ -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():
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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,
|
||||
|
||||
+2
-2
@@ -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,
|
||||
|
||||
+3
-3
@@ -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():
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
from cerberus.utils import compare_paths_lt
|
||||
from pipenv.vendor.cerberus.utils import compare_paths_lt
|
||||
|
||||
|
||||
def test_compare_paths():
|
||||
|
||||
+3
-3
@@ -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():
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -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()
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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")
|
||||
|
||||
+3
-3
@@ -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'):
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+6
-6
@@ -20,12 +20,12 @@ at <https://github.com/Ousret/charset_normalizer>.
|
||||
: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
|
||||
|
||||
+5
-5
@@ -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)
|
||||
|
||||
+4
-4
@@ -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
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -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)
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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)
|
||||
|
||||
Vendored
+5
-5
@@ -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]
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Vendored
+3
-3
@@ -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)]
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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"]
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Vendored
+6
-6
@@ -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,
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
from six import PY2
|
||||
from pipenv.vendor.six import PY2
|
||||
|
||||
from functools import wraps
|
||||
|
||||
|
||||
+1
-1
@@ -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):
|
||||
|
||||
Vendored
+10
-10
@@ -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:
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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"]
|
||||
|
||||
|
||||
+1
-1
@@ -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):
|
||||
|
||||
Vendored
+1
-1
@@ -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.')
|
||||
|
||||
Vendored
+3
-3
@@ -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
|
||||
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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']
|
||||
|
||||
|
||||
+2
-2
@@ -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(
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ from ._legacy import (
|
||||
path,
|
||||
)
|
||||
|
||||
from importlib_resources.abc import ResourceReader
|
||||
from pipenv.vendor.importlib_resources.abc import ResourceReader
|
||||
|
||||
|
||||
__all__ = [
|
||||
|
||||
+1
-1
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import unittest
|
||||
import importlib_resources as resources
|
||||
import pipenv.vendor.importlib_resources as resources
|
||||
|
||||
from . import data01
|
||||
from . import util
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import unittest
|
||||
|
||||
import importlib_resources as resources
|
||||
import pipenv.vendor.importlib_resources as resources
|
||||
from . import data01
|
||||
from . import util
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import unittest
|
||||
import importlib_resources as resources
|
||||
import pipenv.vendor.importlib_resources as resources
|
||||
|
||||
from . import data01
|
||||
from . import util
|
||||
|
||||
+1
-1
@@ -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):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
import unittest
|
||||
import importlib_resources as resources
|
||||
import pipenv.vendor.importlib_resources as resources
|
||||
import uuid
|
||||
import pathlib
|
||||
|
||||
|
||||
+1
-1
@@ -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")
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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,
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user