From 14ea256537300d67f61369536e8f280f16edafe9 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 30 Jun 2020 17:12:29 +0100 Subject: [PATCH] Installing requirements --- .../config-0.5.0.post0.dist-info/INSTALLER | 1 + .../config-0.5.0.post0.dist-info/LICENSE | 29 + .../config-0.5.0.post0.dist-info/METADATA | 26 + .../config-0.5.0.post0.dist-info/RECORD | 12 + .../config-0.5.0.post0.dist-info/WHEEL | 6 + .../top_level.txt | 1 + venv/Lib/site-packages/config/__init__.py | 785 +++++++++++ venv/Lib/site-packages/config/parser.py | 511 +++++++ venv/Lib/site-packages/config/tokens.py | 1225 +++++++++++++++++ .../PKG-INFO | 418 ------ .../SOURCES.txt | 11 - .../dependency_links.txt | 1 - .../installed-files.txt | 7 - .../not-zip-safe | 1 - .../python_decouple-3.3.dist-info/INSTALLER | 1 + .../python_decouple-3.3.dist-info/LICENSE | 21 + .../python_decouple-3.3.dist-info/METADATA | 420 ++++++ .../python_decouple-3.3.dist-info/RECORD | 8 + .../python_decouple-3.3.dist-info/WHEEL | 5 + .../top_level.txt | 0 20 files changed, 3051 insertions(+), 438 deletions(-) create mode 100644 venv/Lib/site-packages/config-0.5.0.post0.dist-info/INSTALLER create mode 100644 venv/Lib/site-packages/config-0.5.0.post0.dist-info/LICENSE create mode 100644 venv/Lib/site-packages/config-0.5.0.post0.dist-info/METADATA create mode 100644 venv/Lib/site-packages/config-0.5.0.post0.dist-info/RECORD create mode 100644 venv/Lib/site-packages/config-0.5.0.post0.dist-info/WHEEL create mode 100644 venv/Lib/site-packages/config-0.5.0.post0.dist-info/top_level.txt create mode 100644 venv/Lib/site-packages/config/__init__.py create mode 100644 venv/Lib/site-packages/config/parser.py create mode 100644 venv/Lib/site-packages/config/tokens.py delete mode 100644 venv/Lib/site-packages/python_decouple-3.3-py3.6.egg-info/PKG-INFO delete mode 100644 venv/Lib/site-packages/python_decouple-3.3-py3.6.egg-info/SOURCES.txt delete mode 100644 venv/Lib/site-packages/python_decouple-3.3-py3.6.egg-info/dependency_links.txt delete mode 100644 venv/Lib/site-packages/python_decouple-3.3-py3.6.egg-info/installed-files.txt delete mode 100644 venv/Lib/site-packages/python_decouple-3.3-py3.6.egg-info/not-zip-safe create mode 100644 venv/Lib/site-packages/python_decouple-3.3.dist-info/INSTALLER create mode 100644 venv/Lib/site-packages/python_decouple-3.3.dist-info/LICENSE create mode 100644 venv/Lib/site-packages/python_decouple-3.3.dist-info/METADATA create mode 100644 venv/Lib/site-packages/python_decouple-3.3.dist-info/RECORD create mode 100644 venv/Lib/site-packages/python_decouple-3.3.dist-info/WHEEL rename venv/Lib/site-packages/{python_decouple-3.3-py3.6.egg-info => python_decouple-3.3.dist-info}/top_level.txt (100%) diff --git a/venv/Lib/site-packages/config-0.5.0.post0.dist-info/INSTALLER b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/INSTALLER new file mode 100644 index 00000000..a1b589e3 --- /dev/null +++ b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/venv/Lib/site-packages/config-0.5.0.post0.dist-info/LICENSE b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/LICENSE new file mode 100644 index 00000000..74da034c --- /dev/null +++ b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2004-2020, Vinay Sajip +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/venv/Lib/site-packages/config-0.5.0.post0.dist-info/METADATA b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/METADATA new file mode 100644 index 00000000..83b1c74f --- /dev/null +++ b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/METADATA @@ -0,0 +1,26 @@ +Metadata-Version: 2.1 +Name: config +Version: 0.5.0.post0 +Summary: A hierarchical, easy-to-use, powerful configuration module for Python +Home-page: http://docs.red-dove.com/cfg/python.html +Author: Vinay Sajip +Author-email: vinay_sajip@red-dove.com +Maintainer: Vinay Sajip +Maintainer-email: vinay_sajip@red-dove.com +License: Copyright (C) 2004-2020 by Vinay Sajip. All Rights Reserved. See LICENSE for license. +Platform: any +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Topic :: Software Development + +This module allows a hierarchical configuration scheme with support for mappings and sequences, cross-references between one part of the configuration and another, the ability to flexibly access real Python objects without full-blown eval(), an include facility, simple expression evaluation and the ability to change, save, cascade and merge configurations. Interfaces easily with environment variables and command-line options. + + diff --git a/venv/Lib/site-packages/config-0.5.0.post0.dist-info/RECORD b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/RECORD new file mode 100644 index 00000000..2c3b479d --- /dev/null +++ b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/RECORD @@ -0,0 +1,12 @@ +config-0.5.0.post0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +config-0.5.0.post0.dist-info/LICENSE,sha256=NpAuOJodhJmffkN3U8ThnyJHcn5SL4v4cnRc2Pg1r6w,1524 +config-0.5.0.post0.dist-info/METADATA,sha256=ckMDJLQkRBs0upCgvHbR1uWMj9o_GEQ0qaexVnRy9WQ,1384 +config-0.5.0.post0.dist-info/RECORD,, +config-0.5.0.post0.dist-info/WHEEL,sha256=h_aVn5OB2IERUjMbi2pucmR_zzWJtk303YXvhh60NJ8,110 +config-0.5.0.post0.dist-info/top_level.txt,sha256=9hK4m828QBN59kTX5IVy40cPd9zUw5QWQF2AlSrXCJ4,7 +config/__init__.py,sha256=IfOXd4eAO8BmzKm0_elrZYTFEVWpXEsQKSPrEGqtGtM,24881 +config/__pycache__/__init__.cpython-36.pyc,, +config/__pycache__/parser.cpython-36.pyc,, +config/__pycache__/tokens.cpython-36.pyc,, +config/parser.py,sha256=i4Y0GOIerLbbnWUhpCC_cQS2Os232XWk7g91xdTJJa0,14313 +config/tokens.py,sha256=O2OHc8KoWjSlhzoVKETX6HQyMjs5EQM0JnScNbAaL20,34534 diff --git a/venv/Lib/site-packages/config-0.5.0.post0.dist-info/WHEEL b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/WHEEL new file mode 100644 index 00000000..78e6f69d --- /dev/null +++ b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.33.4) +Root-Is-Purelib: true +Tag: py2-none-any +Tag: py3-none-any + diff --git a/venv/Lib/site-packages/config-0.5.0.post0.dist-info/top_level.txt b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/top_level.txt new file mode 100644 index 00000000..04204c7c --- /dev/null +++ b/venv/Lib/site-packages/config-0.5.0.post0.dist-info/top_level.txt @@ -0,0 +1 @@ +config diff --git a/venv/Lib/site-packages/config/__init__.py b/venv/Lib/site-packages/config/__init__.py new file mode 100644 index 00000000..36481768 --- /dev/null +++ b/venv/Lib/site-packages/config/__init__.py @@ -0,0 +1,785 @@ +# +# Copyright 2019-2020 by Vinay Sajip. All Rights Reserved. +# +try: + from collections.abc import Mapping +except ImportError: + from collections import Mapping +import datetime +import importlib +import io +import logging +import os +import re +import sys + +from .tokens import Token, SCALAR_TOKENS, WORD, BACKTICK, DOLLAR +from .parser import ( + Parser, + MappingBody, + ListBody, + ASTNode, + ODict, + open_file, + RecognizerError, + ParserError, +) + +__all__ = ['Config', 'ConfigFormatError', 'ConfigError'] + +logger = logging.getLogger(__name__) + + +if sys.version_info[0] < 3: + + class timezone(datetime.tzinfo): + def __init__(self, td): + self.td = td + + def utcoffset(self, dt): + return self.td + + def dst(self, dt): # pragma: no cover + return datetime.timedelta(0) + + +else: + from datetime import timezone + + basestring = str + +__version__ = '0.5.0.post0' + + +class ConfigFormatError(ParserError): + pass + + +class ConfigError(ValueError): + pass + + +# This is a marker used in get(key, defaultValue) to catch rather than KeyError +class KeyNotFoundError(ConfigError): + pass + + +def _parse_path(path): + p = Parser(io.StringIO(path)) + try: + p.advance() + if p.token.kind != WORD: + raise ConfigError('Invalid path: %s' % path) + result = p.primary() + if not p.at_end: + raise ConfigError('Invalid path: %s' % path) + except RecognizerError as e: + raise ConfigError('Invalid path: %s: %s' % (path, e)) + return result + + +def _path_iterator(path): + def visit(node): + if isinstance(node, Token): + yield node + else: + op = node['op'] + if 'operand' in node: + for val in visit(node['operand']): + yield val + else: + for val in visit(node['lhs']): + yield val + if op == '.': + yield op, node['rhs'].value + else: + assert op in ('[', ':') + yield op, node['rhs'] + + for v in visit(path): + yield v + + +def _to_source(node): + if isinstance(node, Token): + return str(node.value) + pi = _path_iterator(node) + parts = [next(pi).value] + for op, operand in pi: + if op == '.': + parts.append('.') + parts.append(operand) + elif op == ':': + parts.append('[') + start, stop, step = operand + if start is not None: + parts.append(_to_source(start)) + parts.append(':') + if stop is not None: + parts.append(_to_source(stop)) + if step is not None: + parts.append(':') + parts.append(_to_source(step)) + parts.append(']') + elif op == '[': + parts.append('[') + parts.append(_to_source(operand)) + parts.append(']') + else: # pragma: no cover + raise ConfigError('Unable to navigate: %s' % node) + return ''.join(parts) + + +def _unwrap(o): + if isinstance(o, DictWrapper): + result = o.as_dict() + elif isinstance(o, ListWrapper): + result = o.as_list() + else: + result = o + return result + + +# noinspection PyUnboundLocalVariable +_SYSTEM_TYPES = (basestring, bool, int, float, datetime.datetime, datetime.date) +# noinspection PyTypeChecker +_SCALAR_TYPES = _SYSTEM_TYPES + (Token,) + + +def _merge_dicts(target, source): + for k, v in source.items(): + if k in target and isinstance(target[k], dict) and isinstance(v, Mapping): + _merge_dicts(target[k], v) + else: + target[k] = source[k] + + +# use negative lookahead to disallow anything starting with a digit. +_IDENTIFIER_PATTERN = re.compile(r'^(?!\d)(\w+)$', re.U) + + +def is_identifier(s): + return bool(_IDENTIFIER_PATTERN.match(s)) + + +class DictWrapper(object): + def __init__(self, config, data): + self.config = config + self._data = data + + def get(self, key, default=None): + try: + return self[key] + except KeyNotFoundError: + return default + + def __getitem__(self, key): + if not isinstance(key, basestring): + raise ConfigError('string required, but found %r' % key) + data = self._data + config = self.config + if key in data or is_identifier(key): + try: + result = config._evaluated(data[key]) + except KeyError: + raise KeyNotFoundError('not found in configuration: %s' % key) + else: + path = _parse_path(key) + result = config._get_from_path(path) + # data[key] = result + return result + + def __len__(self): # pragma: no cover + return len(self._data) + + def __contains__(self, key): + return key in self._data + + def __or__(self, other): + assert isinstance(other, type(self)) + data = self.as_dict() + _merge_dicts(data, other.as_dict()) + return type(self)(self.config, data) + + __add__ = __or__ + + def __sub__(self, other): + assert isinstance(other, type(self)) + data = dict(self._data) + for k in other._data: + data.pop(k, None) + return type(self)(self.config, data) + + def as_dict(self): + result = {} + for k, v in self._data.items(): + v = self[k] + if isinstance(v, (DictWrapper, Config)): + v = v.as_dict() + elif isinstance(v, ListWrapper): + v = v.as_list() + result[k] = v + return result + + def __repr__(self): + s = str(', '.join(self._data.keys())) + if len(s) > 60: + s = s[:57] + '...' + return '%s(%s)' % (self.__class__.__name__, s) + + +class ListWrapper(object): + def __init__(self, config, data): + self.config = config + self._data = data + + def __len__(self): + return len(self._data) + + def __getitem__(self, index): + assert isinstance(index, int) # slices handled in Evaluator + result = self._data[index] + evaluated = self.config._evaluated(result) + if evaluated is not result: + self._data[index] = result = evaluated + return result + + def __add__(self, other): + assert isinstance(other, type(self)) + return type(self)(self.config, self.as_list() + other.as_list()) + + def as_list(self): + result = [] + for item in self: + if isinstance(item, (DictWrapper, Config)): + item = item.as_dict() + elif isinstance(item, ListWrapper): + item = item.as_list() + result.append(item) + return result + + def __repr__(self): + s = str(self.as_list()) + if len(s) > 60: + s = s[:57] + '...' + return '%s(%s)' % (self.__class__.__name__, s) + + +_ISO_DATETIME_PATTERN = re.compile( + r'\d{4}-\d{2}-\d{2}(([ T])' + r'((?P