summaryrefslogtreecommitdiff
path: root/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models
diff options
context:
space:
mode:
authorbrenda-br2023-02-23 22:14:39 +0530
committerbrenda-br2023-02-23 22:14:39 +0530
commitd476d2e053f937c0060f696312f301591e4f43ea (patch)
tree5d1643ba487082f986d8cc1868fba482293f1e37 /venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models
parentc5f533673ea9ab4315e76940f6d014e349f97884 (diff)
downloadChemical-Simulator-GUI-d476d2e053f937c0060f696312f301591e4f43ea.tar.gz
Chemical-Simulator-GUI-d476d2e053f937c0060f696312f301591e4f43ea.tar.bz2
Chemical-Simulator-GUI-d476d2e053f937c0060f696312f301591e4f43ea.zip
Restructure Code -1
Diffstat (limited to 'venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models')
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__init__.py2
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/__init__.cpython-37.pycbin278 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/candidate.cpython-37.pycbin1327 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/format_control.cpython-37.pycbin2281 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/index.cpython-37.pycbin1182 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/link.cpython-37.pycbin5016 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/candidate.py31
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/format_control.py73
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/index.py31
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/link.py163
10 files changed, 0 insertions, 300 deletions
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__init__.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__init__.py
deleted file mode 100644
index 7855226..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""A package that contains models that represent entities.
-"""
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/__init__.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/__init__.cpython-37.pyc
deleted file mode 100644
index 8b92b6b..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/__init__.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/candidate.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/candidate.cpython-37.pyc
deleted file mode 100644
index 445bffe..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/candidate.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/format_control.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/format_control.cpython-37.pyc
deleted file mode 100644
index 304897a..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/format_control.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/index.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/index.cpython-37.pyc
deleted file mode 100644
index cad3ad0..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/index.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/link.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/link.cpython-37.pyc
deleted file mode 100644
index e74697d..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/__pycache__/link.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/candidate.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/candidate.py
deleted file mode 100644
index 4475458..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/candidate.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from pip._vendor.packaging.version import parse as parse_version
-
-from pip._internal.utils.models import KeyBasedCompareMixin
-from pip._internal.utils.typing import MYPY_CHECK_RUNNING
-
-if MYPY_CHECK_RUNNING:
- from pip._vendor.packaging.version import _BaseVersion # noqa: F401
- from pip._internal.models.link import Link # noqa: F401
- from typing import Any, Union # noqa: F401
-
-
-class InstallationCandidate(KeyBasedCompareMixin):
- """Represents a potential "candidate" for installation.
- """
-
- def __init__(self, project, version, location):
- # type: (Any, str, Link) -> None
- self.project = project
- self.version = parse_version(version) # type: _BaseVersion
- self.location = location
-
- super(InstallationCandidate, self).__init__(
- key=(self.project, self.version, self.location),
- defining_class=InstallationCandidate
- )
-
- def __repr__(self):
- # type: () -> str
- return "<InstallationCandidate({!r}, {!r}, {!r})>".format(
- self.project, self.version, self.location,
- )
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/format_control.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/format_control.py
deleted file mode 100644
index 971a391..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/format_control.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from pip._vendor.packaging.utils import canonicalize_name
-
-from pip._internal.utils.typing import MYPY_CHECK_RUNNING
-
-if MYPY_CHECK_RUNNING:
- from typing import Optional, Set, FrozenSet # noqa: F401
-
-
-class FormatControl(object):
- """Helper for managing formats from which a package can be installed.
- """
-
- def __init__(self, no_binary=None, only_binary=None):
- # type: (Optional[Set], Optional[Set]) -> None
- if no_binary is None:
- no_binary = set()
- if only_binary is None:
- only_binary = set()
-
- self.no_binary = no_binary
- self.only_binary = only_binary
-
- def __eq__(self, other):
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not self.__eq__(other)
-
- def __repr__(self):
- return "{}({}, {})".format(
- self.__class__.__name__,
- self.no_binary,
- self.only_binary
- )
-
- @staticmethod
- def handle_mutual_excludes(value, target, other):
- # type: (str, Optional[Set], Optional[Set]) -> None
- new = value.split(',')
- while ':all:' in new:
- other.clear()
- target.clear()
- target.add(':all:')
- del new[:new.index(':all:') + 1]
- # Without a none, we want to discard everything as :all: covers it
- if ':none:' not in new:
- return
- for name in new:
- if name == ':none:':
- target.clear()
- continue
- name = canonicalize_name(name)
- other.discard(name)
- target.add(name)
-
- def get_allowed_formats(self, canonical_name):
- # type: (str) -> FrozenSet
- result = {"binary", "source"}
- if canonical_name in self.only_binary:
- result.discard('source')
- elif canonical_name in self.no_binary:
- result.discard('binary')
- elif ':all:' in self.only_binary:
- result.discard('source')
- elif ':all:' in self.no_binary:
- result.discard('binary')
- return frozenset(result)
-
- def disallow_binaries(self):
- # type: () -> None
- self.handle_mutual_excludes(
- ':all:', self.no_binary, self.only_binary,
- )
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/index.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/index.py
deleted file mode 100644
index ead1efb..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/index.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from pip._vendor.six.moves.urllib import parse as urllib_parse
-
-
-class PackageIndex(object):
- """Represents a Package Index and provides easier access to endpoints
- """
-
- def __init__(self, url, file_storage_domain):
- # type: (str, str) -> None
- super(PackageIndex, self).__init__()
- self.url = url
- self.netloc = urllib_parse.urlsplit(url).netloc
- self.simple_url = self._url_for_path('simple')
- self.pypi_url = self._url_for_path('pypi')
-
- # This is part of a temporary hack used to block installs of PyPI
- # packages which depend on external urls only necessary until PyPI can
- # block such packages themselves
- self.file_storage_domain = file_storage_domain
-
- def _url_for_path(self, path):
- # type: (str) -> str
- return urllib_parse.urljoin(self.url, path)
-
-
-PyPI = PackageIndex(
- 'https://pypi.org/', file_storage_domain='files.pythonhosted.org'
-)
-TestPyPI = PackageIndex(
- 'https://test.pypi.org/', file_storage_domain='test-files.pythonhosted.org'
-)
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/link.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/link.py
deleted file mode 100644
index ad2f93e..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_internal/models/link.py
+++ /dev/null
@@ -1,163 +0,0 @@
-import posixpath
-import re
-
-from pip._vendor.six.moves.urllib import parse as urllib_parse
-
-from pip._internal.download import path_to_url
-from pip._internal.utils.misc import (
- WHEEL_EXTENSION, redact_password_from_url, splitext,
-)
-from pip._internal.utils.models import KeyBasedCompareMixin
-from pip._internal.utils.typing import MYPY_CHECK_RUNNING
-
-if MYPY_CHECK_RUNNING:
- from typing import Optional, Tuple, Union, Text # noqa: F401
- from pip._internal.index import HTMLPage # noqa: F401
-
-
-class Link(KeyBasedCompareMixin):
- """Represents a parsed link from a Package Index's simple URL
- """
-
- def __init__(self, url, comes_from=None, requires_python=None):
- # type: (str, Optional[Union[str, HTMLPage]], Optional[str]) -> None
- """
- url:
- url of the resource pointed to (href of the link)
- comes_from:
- instance of HTMLPage where the link was found, or string.
- requires_python:
- String containing the `Requires-Python` metadata field, specified
- in PEP 345. This may be specified by a data-requires-python
- attribute in the HTML link tag, as described in PEP 503.
- """
-
- # url can be a UNC windows share
- if url.startswith('\\\\'):
- url = path_to_url(url)
-
- self.url = url
- self.comes_from = comes_from
- self.requires_python = requires_python if requires_python else None
-
- super(Link, self).__init__(
- key=(self.url),
- defining_class=Link
- )
-
- def __str__(self):
- if self.requires_python:
- rp = ' (requires-python:%s)' % self.requires_python
- else:
- rp = ''
- if self.comes_from:
- return '%s (from %s)%s' % (redact_password_from_url(self.url),
- self.comes_from, rp)
- else:
- return redact_password_from_url(str(self.url))
-
- def __repr__(self):
- return '<Link %s>' % self
-
- @property
- def filename(self):
- # type: () -> str
- _, netloc, path, _, _ = urllib_parse.urlsplit(self.url)
- name = posixpath.basename(path.rstrip('/')) or netloc
- name = urllib_parse.unquote(name)
- assert name, ('URL %r produced no filename' % self.url)
- return name
-
- @property
- def scheme(self):
- # type: () -> str
- return urllib_parse.urlsplit(self.url)[0]
-
- @property
- def netloc(self):
- # type: () -> str
- return urllib_parse.urlsplit(self.url)[1]
-
- @property
- def path(self):
- # type: () -> str
- return urllib_parse.unquote(urllib_parse.urlsplit(self.url)[2])
-
- def splitext(self):
- # type: () -> Tuple[str, str]
- return splitext(posixpath.basename(self.path.rstrip('/')))
-
- @property
- def ext(self):
- # type: () -> str
- return self.splitext()[1]
-
- @property
- def url_without_fragment(self):
- # type: () -> str
- scheme, netloc, path, query, fragment = urllib_parse.urlsplit(self.url)
- return urllib_parse.urlunsplit((scheme, netloc, path, query, None))
-
- _egg_fragment_re = re.compile(r'[#&]egg=([^&]*)')
-
- @property
- def egg_fragment(self):
- # type: () -> Optional[str]
- match = self._egg_fragment_re.search(self.url)
- if not match:
- return None
- return match.group(1)
-
- _subdirectory_fragment_re = re.compile(r'[#&]subdirectory=([^&]*)')
-
- @property
- def subdirectory_fragment(self):
- # type: () -> Optional[str]
- match = self._subdirectory_fragment_re.search(self.url)
- if not match:
- return None
- return match.group(1)
-
- _hash_re = re.compile(
- r'(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)'
- )
-
- @property
- def hash(self):
- # type: () -> Optional[str]
- match = self._hash_re.search(self.url)
- if match:
- return match.group(2)
- return None
-
- @property
- def hash_name(self):
- # type: () -> Optional[str]
- match = self._hash_re.search(self.url)
- if match:
- return match.group(1)
- return None
-
- @property
- def show_url(self):
- # type: () -> Optional[str]
- return posixpath.basename(self.url.split('#', 1)[0].split('?', 1)[0])
-
- @property
- def is_wheel(self):
- # type: () -> bool
- return self.ext == WHEEL_EXTENSION
-
- @property
- def is_artifact(self):
- # type: () -> bool
- """
- Determines if this points to an actual artifact (e.g. a tarball) or if
- it points to an "abstract" thing like a path or a VCS location.
- """
- from pip._internal.vcs import vcs
-
- if self.scheme in vcs.all_schemes:
- return False
-
- return True