🤬
Showing first 89 files as there are too many
  • vuln_analyzer/lib/python3.11/site-packages/__pycache__/_virtualenv.cpython-311.pyc
    Binary file.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/_distutils_hack/__init__.py
     1 +# don't import any costly modules
     2 +import sys
     3 +import os
     4 + 
     5 + 
     6 +is_pypy = '__pypy__' in sys.builtin_module_names
     7 + 
     8 + 
     9 +def warn_distutils_present():
     10 + if 'distutils' not in sys.modules:
     11 + return
     12 + if is_pypy and sys.version_info < (3, 7):
     13 + # PyPy for 3.6 unconditionally imports distutils, so bypass the warning
     14 + # https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250
     15 + return
     16 + import warnings
     17 + 
     18 + warnings.warn(
     19 + "Distutils was imported before Setuptools, but importing Setuptools "
     20 + "also replaces the `distutils` module in `sys.modules`. This may lead "
     21 + "to undesirable behaviors or errors. To avoid these issues, avoid "
     22 + "using distutils directly, ensure that setuptools is installed in the "
     23 + "traditional way (e.g. not an editable install), and/or make sure "
     24 + "that setuptools is always imported before distutils."
     25 + )
     26 + 
     27 + 
     28 +def clear_distutils():
     29 + if 'distutils' not in sys.modules:
     30 + return
     31 + import warnings
     32 + 
     33 + warnings.warn("Setuptools is replacing distutils.")
     34 + mods = [
     35 + name
     36 + for name in sys.modules
     37 + if name == "distutils" or name.startswith("distutils.")
     38 + ]
     39 + for name in mods:
     40 + del sys.modules[name]
     41 + 
     42 + 
     43 +def enabled():
     44 + """
     45 + Allow selection of distutils by environment variable.
     46 + """
     47 + which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
     48 + return which == 'local'
     49 + 
     50 + 
     51 +def ensure_local_distutils():
     52 + import importlib
     53 + 
     54 + clear_distutils()
     55 + 
     56 + # With the DistutilsMetaFinder in place,
     57 + # perform an import to cause distutils to be
     58 + # loaded from setuptools._distutils. Ref #2906.
     59 + with shim():
     60 + importlib.import_module('distutils')
     61 + 
     62 + # check that submodules load as expected
     63 + core = importlib.import_module('distutils.core')
     64 + assert '_distutils' in core.__file__, core.__file__
     65 + assert 'setuptools._distutils.log' not in sys.modules
     66 + 
     67 + 
     68 +def do_override():
     69 + """
     70 + Ensure that the local copy of distutils is preferred over stdlib.
     71 + 
     72 + See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
     73 + for more motivation.
     74 + """
     75 + if enabled():
     76 + warn_distutils_present()
     77 + ensure_local_distutils()
     78 + 
     79 + 
     80 +class _TrivialRe:
     81 + def __init__(self, *patterns):
     82 + self._patterns = patterns
     83 + 
     84 + def match(self, string):
     85 + return all(pat in string for pat in self._patterns)
     86 + 
     87 + 
     88 +class DistutilsMetaFinder:
     89 + def find_spec(self, fullname, path, target=None):
     90 + # optimization: only consider top level modules and those
     91 + # found in the CPython test suite.
     92 + if path is not None and not fullname.startswith('test.'):
     93 + return
     94 + 
     95 + method_name = 'spec_for_{fullname}'.format(**locals())
     96 + method = getattr(self, method_name, lambda: None)
     97 + return method()
     98 + 
     99 + def spec_for_distutils(self):
     100 + if self.is_cpython():
     101 + return
     102 + 
     103 + import importlib
     104 + import importlib.abc
     105 + import importlib.util
     106 + 
     107 + try:
     108 + mod = importlib.import_module('setuptools._distutils')
     109 + except Exception:
     110 + # There are a couple of cases where setuptools._distutils
     111 + # may not be present:
     112 + # - An older Setuptools without a local distutils is
     113 + # taking precedence. Ref #2957.
     114 + # - Path manipulation during sitecustomize removes
     115 + # setuptools from the path but only after the hook
     116 + # has been loaded. Ref #2980.
     117 + # In either case, fall back to stdlib behavior.
     118 + return
     119 + 
     120 + class DistutilsLoader(importlib.abc.Loader):
     121 + def create_module(self, spec):
     122 + mod.__name__ = 'distutils'
     123 + return mod
     124 + 
     125 + def exec_module(self, module):
     126 + pass
     127 + 
     128 + return importlib.util.spec_from_loader(
     129 + 'distutils', DistutilsLoader(), origin=mod.__file__
     130 + )
     131 + 
     132 + @staticmethod
     133 + def is_cpython():
     134 + """
     135 + Suppress supplying distutils for CPython (build and tests).
     136 + Ref #2965 and #3007.
     137 + """
     138 + return os.path.isfile('pybuilddir.txt')
     139 + 
     140 + def spec_for_pip(self):
     141 + """
     142 + Ensure stdlib distutils when running under pip.
     143 + See pypa/pip#8761 for rationale.
     144 + """
     145 + if self.pip_imported_during_build():
     146 + return
     147 + clear_distutils()
     148 + self.spec_for_distutils = lambda: None
     149 + 
     150 + @classmethod
     151 + def pip_imported_during_build(cls):
     152 + """
     153 + Detect if pip is being imported in a build script. Ref #2355.
     154 + """
     155 + import traceback
     156 + 
     157 + return any(
     158 + cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None)
     159 + )
     160 + 
     161 + @staticmethod
     162 + def frame_file_is_setup(frame):
     163 + """
     164 + Return True if the indicated frame suggests a setup.py file.
     165 + """
     166 + # some frames may not have __file__ (#2940)
     167 + return frame.f_globals.get('__file__', '').endswith('setup.py')
     168 + 
     169 + def spec_for_sensitive_tests(self):
     170 + """
     171 + Ensure stdlib distutils when running select tests under CPython.
     172 + 
     173 + python/cpython#91169
     174 + """
     175 + clear_distutils()
     176 + self.spec_for_distutils = lambda: None
     177 + 
     178 + sensitive_tests = (
     179 + [
     180 + 'test.test_distutils',
     181 + 'test.test_peg_generator',
     182 + 'test.test_importlib',
     183 + ]
     184 + if sys.version_info < (3, 10)
     185 + else [
     186 + 'test.test_distutils',
     187 + ]
     188 + )
     189 + 
     190 + 
     191 +for name in DistutilsMetaFinder.sensitive_tests:
     192 + setattr(
     193 + DistutilsMetaFinder,
     194 + f'spec_for_{name}',
     195 + DistutilsMetaFinder.spec_for_sensitive_tests,
     196 + )
     197 + 
     198 + 
     199 +DISTUTILS_FINDER = DistutilsMetaFinder()
     200 + 
     201 + 
     202 +def add_shim():
     203 + DISTUTILS_FINDER in sys.meta_path or insert_shim()
     204 + 
     205 + 
     206 +class shim:
     207 + def __enter__(self):
     208 + insert_shim()
     209 + 
     210 + def __exit__(self, exc, value, tb):
     211 + remove_shim()
     212 + 
     213 + 
     214 +def insert_shim():
     215 + sys.meta_path.insert(0, DISTUTILS_FINDER)
     216 + 
     217 + 
     218 +def remove_shim():
     219 + try:
     220 + sys.meta_path.remove(DISTUTILS_FINDER)
     221 + except ValueError:
     222 + pass
     223 + 
  • vuln_analyzer/lib/python3.11/site-packages/_distutils_hack/__pycache__/__init__.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/_distutils_hack/__pycache__/override.cpython-311.pyc
    Binary file.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/_distutils_hack/override.py
     1 +__import__('_distutils_hack').do_override()
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiohttp-3.8.4.dist-info/INSTALLER
     1 +pip
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiohttp-3.8.4.dist-info/LICENSE.txt
     1 + Copyright aio-libs contributors.
     2 + 
     3 + Licensed under the Apache License, Version 2.0 (the "License");
     4 + you may not use this file except in compliance with the License.
     5 + You may obtain a copy of the License at
     6 + 
     7 + http://www.apache.org/licenses/LICENSE-2.0
     8 + 
     9 + Unless required by applicable law or agreed to in writing, software
     10 + distributed under the License is distributed on an "AS IS" BASIS,
     11 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 + See the License for the specific language governing permissions and
     13 + limitations under the License.
     14 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiohttp-3.8.4.dist-info/METADATA
     1 +Metadata-Version: 2.1
     2 +Name: aiohttp
     3 +Version: 3.8.4
     4 +Summary: Async http client/server framework (asyncio)
     5 +Home-page: https://github.com/aio-libs/aiohttp
     6 +Maintainer: aiohttp team <[email protected]>
     7 +Maintainer-email: [email protected]
     8 +License: Apache 2
     9 +Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby
     10 +Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
     11 +Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiohttp
     12 +Project-URL: Docs: Changelog, https://docs.aiohttp.org/en/stable/changes.html
     13 +Project-URL: Docs: RTD, https://docs.aiohttp.org
     14 +Project-URL: GitHub: issues, https://github.com/aio-libs/aiohttp/issues
     15 +Project-URL: GitHub: repo, https://github.com/aio-libs/aiohttp
     16 +Classifier: Development Status :: 5 - Production/Stable
     17 +Classifier: Framework :: AsyncIO
     18 +Classifier: Intended Audience :: Developers
     19 +Classifier: License :: OSI Approved :: Apache Software License
     20 +Classifier: Operating System :: POSIX
     21 +Classifier: Operating System :: MacOS :: MacOS X
     22 +Classifier: Operating System :: Microsoft :: Windows
     23 +Classifier: Programming Language :: Python
     24 +Classifier: Programming Language :: Python :: 3
     25 +Classifier: Programming Language :: Python :: 3.6
     26 +Classifier: Programming Language :: Python :: 3.7
     27 +Classifier: Programming Language :: Python :: 3.8
     28 +Classifier: Programming Language :: Python :: 3.9
     29 +Classifier: Programming Language :: Python :: 3.10
     30 +Classifier: Topic :: Internet :: WWW/HTTP
     31 +Requires-Python: >=3.6
     32 +Description-Content-Type: text/x-rst
     33 +License-File: LICENSE.txt
     34 +Requires-Dist: attrs (>=17.3.0)
     35 +Requires-Dist: charset-normalizer (<4.0,>=2.0)
     36 +Requires-Dist: multidict (<7.0,>=4.5)
     37 +Requires-Dist: async-timeout (<5.0,>=4.0.0a3)
     38 +Requires-Dist: yarl (<2.0,>=1.0)
     39 +Requires-Dist: frozenlist (>=1.1.1)
     40 +Requires-Dist: aiosignal (>=1.1.2)
     41 +Requires-Dist: idna-ssl (>=1.0) ; python_version < "3.7"
     42 +Requires-Dist: asynctest (==0.13.0) ; python_version < "3.8"
     43 +Requires-Dist: typing-extensions (>=3.7.4) ; python_version < "3.8"
     44 +Provides-Extra: speedups
     45 +Requires-Dist: aiodns ; extra == 'speedups'
     46 +Requires-Dist: Brotli ; extra == 'speedups'
     47 +Requires-Dist: cchardet ; (python_version < "3.10") and extra == 'speedups'
     48 + 
     49 +==================================
     50 +Async http client/server framework
     51 +==================================
     52 + 
     53 +.. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/aiohttp-plain.svg
     54 + :height: 64px
     55 + :width: 64px
     56 + :alt: aiohttp logo
     57 + 
     58 +|
     59 + 
     60 +.. image:: https://github.com/aio-libs/aiohttp/workflows/CI/badge.svg
     61 + :target: https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
     62 + :alt: GitHub Actions status for master branch
     63 + 
     64 +.. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg
     65 + :target: https://codecov.io/gh/aio-libs/aiohttp
     66 + :alt: codecov.io status for master branch
     67 + 
     68 +.. image:: https://badge.fury.io/py/aiohttp.svg
     69 + :target: https://pypi.org/project/aiohttp
     70 + :alt: Latest PyPI package version
     71 + 
     72 +.. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
     73 + :target: https://docs.aiohttp.org/
     74 + :alt: Latest Read The Docs
     75 + 
     76 +.. image:: https://img.shields.io/discourse/status?server=https%3A%2F%2Faio-libs.discourse.group
     77 + :target: https://aio-libs.discourse.group
     78 + :alt: Discourse status
     79 + 
     80 +.. image:: https://badges.gitter.im/Join%20Chat.svg
     81 + :target: https://gitter.im/aio-libs/Lobby
     82 + :alt: Chat on Gitter
     83 + 
     84 + 
     85 +Key Features
     86 +============
     87 + 
     88 +- Supports both client and server side of HTTP protocol.
     89 +- Supports both client and server Web-Sockets out-of-the-box and avoids
     90 + Callback Hell.
     91 +- Provides Web-server with middlewares and plugable routing.
     92 + 
     93 + 
     94 +Getting started
     95 +===============
     96 + 
     97 +Client
     98 +------
     99 + 
     100 +To get something from the web:
     101 + 
     102 +.. code-block:: python
     103 + 
     104 + import aiohttp
     105 + import asyncio
     106 + 
     107 + async def main():
     108 + 
     109 + async with aiohttp.ClientSession() as session:
     110 + async with session.get('http://python.org') as response:
     111 + 
     112 + print("Status:", response.status)
     113 + print("Content-type:", response.headers['content-type'])
     114 + 
     115 + html = await response.text()
     116 + print("Body:", html[:15], "...")
     117 + 
     118 + asyncio.run(main())
     119 + 
     120 +This prints:
     121 + 
     122 +.. code-block::
     123 + 
     124 + Status: 200
     125 + Content-type: text/html; charset=utf-8
     126 + Body: <!doctype html> ...
     127 + 
     128 +Coming from `requests <https://requests.readthedocs.io/>`_ ? Read `why we need so many lines <https://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html>`_.
     129 + 
     130 +Server
     131 +------
     132 + 
     133 +An example using a simple server:
     134 + 
     135 +.. code-block:: python
     136 + 
     137 + # examples/server_simple.py
     138 + from aiohttp import web
     139 + 
     140 + async def handle(request):
     141 + name = request.match_info.get('name', "Anonymous")
     142 + text = "Hello, " + name
     143 + return web.Response(text=text)
     144 + 
     145 + async def wshandle(request):
     146 + ws = web.WebSocketResponse()
     147 + await ws.prepare(request)
     148 + 
     149 + async for msg in ws:
     150 + if msg.type == web.WSMsgType.text:
     151 + await ws.send_str("Hello, {}".format(msg.data))
     152 + elif msg.type == web.WSMsgType.binary:
     153 + await ws.send_bytes(msg.data)
     154 + elif msg.type == web.WSMsgType.close:
     155 + break
     156 + 
     157 + return ws
     158 + 
     159 + 
     160 + app = web.Application()
     161 + app.add_routes([web.get('/', handle),
     162 + web.get('/echo', wshandle),
     163 + web.get('/{name}', handle)])
     164 + 
     165 + if __name__ == '__main__':
     166 + web.run_app(app)
     167 + 
     168 + 
     169 +Documentation
     170 +=============
     171 + 
     172 +https://aiohttp.readthedocs.io/
     173 + 
     174 + 
     175 +Demos
     176 +=====
     177 + 
     178 +https://github.com/aio-libs/aiohttp-demos
     179 + 
     180 + 
     181 +External links
     182 +==============
     183 + 
     184 +* `Third party libraries
     185 + <http://aiohttp.readthedocs.io/en/latest/third_party.html>`_
     186 +* `Built with aiohttp
     187 + <http://aiohttp.readthedocs.io/en/latest/built_with.html>`_
     188 +* `Powered by aiohttp
     189 + <http://aiohttp.readthedocs.io/en/latest/powered_by.html>`_
     190 + 
     191 +Feel free to make a Pull Request for adding your link to these pages!
     192 + 
     193 + 
     194 +Communication channels
     195 +======================
     196 + 
     197 +*aio-libs discourse group*: https://aio-libs.discourse.group
     198 + 
     199 +*gitter chat* https://gitter.im/aio-libs/Lobby
     200 + 
     201 +We support `Stack Overflow
     202 +<https://stackoverflow.com/questions/tagged/aiohttp>`_.
     203 +Please add *aiohttp* tag to your question there.
     204 + 
     205 +Requirements
     206 +============
     207 + 
     208 +- Python >= 3.6
     209 +- async-timeout_
     210 +- attrs_
     211 +- charset-normalizer_
     212 +- multidict_
     213 +- yarl_
     214 +- frozenlist_
     215 + 
     216 +Optionally you may install the cChardet_ and aiodns_ libraries (highly
     217 +recommended for sake of speed).
     218 + 
     219 +.. _charset-normalizer: https://pypi.org/project/charset-normalizer
     220 +.. _aiodns: https://pypi.python.org/pypi/aiodns
     221 +.. _attrs: https://github.com/python-attrs/attrs
     222 +.. _multidict: https://pypi.python.org/pypi/multidict
     223 +.. _frozenlist: https://pypi.org/project/frozenlist/
     224 +.. _yarl: https://pypi.python.org/pypi/yarl
     225 +.. _async-timeout: https://pypi.python.org/pypi/async_timeout
     226 +.. _cChardet: https://pypi.python.org/pypi/cchardet
     227 + 
     228 +License
     229 +=======
     230 + 
     231 +``aiohttp`` is offered under the Apache 2 license.
     232 + 
     233 + 
     234 +Keepsafe
     235 +========
     236 + 
     237 +The aiohttp community would like to thank Keepsafe
     238 +(https://www.getkeepsafe.com) for its support in the early days of
     239 +the project.
     240 + 
     241 + 
     242 +Source code
     243 +===========
     244 + 
     245 +The latest developer version is available in a GitHub repository:
     246 +https://github.com/aio-libs/aiohttp
     247 + 
     248 +Benchmarks
     249 +==========
     250 + 
     251 +If you are interested in efficiency, the AsyncIO community maintains a
     252 +list of benchmarks on the official wiki:
     253 +https://github.com/python/asyncio/wiki/Benchmarks
     254 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiohttp-3.8.4.dist-info/RECORD
     1 +aiohttp-3.8.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
     2 +aiohttp-3.8.4.dist-info/LICENSE.txt,sha256=n4DQ2311WpQdtFchcsJw7L2PCCuiFd3QlZhZQu2Uqes,588
     3 +aiohttp-3.8.4.dist-info/METADATA,sha256=hlYJN6lSJ-2Ay9XQtsfMGgv5ACNNQMKGMLnTslTZRVM,7355
     4 +aiohttp-3.8.4.dist-info/RECORD,,
     5 +aiohttp-3.8.4.dist-info/WHEEL,sha256=zcODeksSPXfEVqloqbuxG5DqZN6qJmVdi0EN9bjsiGQ,152
     6 +aiohttp-3.8.4.dist-info/top_level.txt,sha256=iv-JIaacmTl-hSho3QmphcKnbRRYx1st47yjz_178Ro,8
     7 +aiohttp/.hash/_cparser.pxd.hash,sha256=GoFy-KArtO3unhO5IuosMnc-wwcx7yofVZp2gJi_n_Y,121
     8 +aiohttp/.hash/_find_header.pxd.hash,sha256=_mbpD6vM-CVCKq3ulUvsOAz5Wdo88wrDzfpOsMQaMNA,125
     9 +aiohttp/.hash/_helpers.pyi.hash,sha256=Ew4BZDc2LqFwszgZZUHHrJvw5P8HBhJ700n1Ntg52hE,121
     10 +aiohttp/.hash/_helpers.pyx.hash,sha256=5JQ6BlMBE4HnRaCGdkK9_wpL3ZSWpU1gyLYva0Wwx2c,121
     11 +aiohttp/.hash/_http_parser.pyx.hash,sha256=pEF-JTzd1dVYEwfuzUiTtp8aekvrhhOwiFi4vELWcsM,125
     12 +aiohttp/.hash/_http_writer.pyx.hash,sha256=3Qg3T3D-Ud73elzPHBufK0yEu9tP5jsu6g-aPKQY9gE,125
     13 +aiohttp/.hash/_websocket.pyx.hash,sha256=M97f-Yti-4vnE4GNTD1s_DzKs-fG_ww3jle6EUvixnE,123
     14 +aiohttp/.hash/hdrs.py.hash,sha256=KpTaDTcWfiQrW2QPA5glgIfw6o5JC1hsAYZHeFMuBnI,116
     15 +aiohttp/__init__.py,sha256=sGszf3xlTnDTypy5NE-MWYmTIET2IudwBZgWDV8z9Y8,6870
     16 +aiohttp/__pycache__/__init__.cpython-311.pyc,,
     17 +aiohttp/__pycache__/abc.cpython-311.pyc,,
     18 +aiohttp/__pycache__/base_protocol.cpython-311.pyc,,
     19 +aiohttp/__pycache__/client.cpython-311.pyc,,
     20 +aiohttp/__pycache__/client_exceptions.cpython-311.pyc,,
     21 +aiohttp/__pycache__/client_proto.cpython-311.pyc,,
     22 +aiohttp/__pycache__/client_reqrep.cpython-311.pyc,,
     23 +aiohttp/__pycache__/client_ws.cpython-311.pyc,,
     24 +aiohttp/__pycache__/connector.cpython-311.pyc,,
     25 +aiohttp/__pycache__/cookiejar.cpython-311.pyc,,
     26 +aiohttp/__pycache__/formdata.cpython-311.pyc,,
     27 +aiohttp/__pycache__/hdrs.cpython-311.pyc,,
     28 +aiohttp/__pycache__/helpers.cpython-311.pyc,,
     29 +aiohttp/__pycache__/http.cpython-311.pyc,,
     30 +aiohttp/__pycache__/http_exceptions.cpython-311.pyc,,
     31 +aiohttp/__pycache__/http_parser.cpython-311.pyc,,
     32 +aiohttp/__pycache__/http_websocket.cpython-311.pyc,,
     33 +aiohttp/__pycache__/http_writer.cpython-311.pyc,,
     34 +aiohttp/__pycache__/locks.cpython-311.pyc,,
     35 +aiohttp/__pycache__/log.cpython-311.pyc,,
     36 +aiohttp/__pycache__/multipart.cpython-311.pyc,,
     37 +aiohttp/__pycache__/payload.cpython-311.pyc,,
     38 +aiohttp/__pycache__/payload_streamer.cpython-311.pyc,,
     39 +aiohttp/__pycache__/pytest_plugin.cpython-311.pyc,,
     40 +aiohttp/__pycache__/resolver.cpython-311.pyc,,
     41 +aiohttp/__pycache__/streams.cpython-311.pyc,,
     42 +aiohttp/__pycache__/tcp_helpers.cpython-311.pyc,,
     43 +aiohttp/__pycache__/test_utils.cpython-311.pyc,,
     44 +aiohttp/__pycache__/tracing.cpython-311.pyc,,
     45 +aiohttp/__pycache__/typedefs.cpython-311.pyc,,
     46 +aiohttp/__pycache__/web.cpython-311.pyc,,
     47 +aiohttp/__pycache__/web_app.cpython-311.pyc,,
     48 +aiohttp/__pycache__/web_exceptions.cpython-311.pyc,,
     49 +aiohttp/__pycache__/web_fileresponse.cpython-311.pyc,,
     50 +aiohttp/__pycache__/web_log.cpython-311.pyc,,
     51 +aiohttp/__pycache__/web_middlewares.cpython-311.pyc,,
     52 +aiohttp/__pycache__/web_protocol.cpython-311.pyc,,
     53 +aiohttp/__pycache__/web_request.cpython-311.pyc,,
     54 +aiohttp/__pycache__/web_response.cpython-311.pyc,,
     55 +aiohttp/__pycache__/web_routedef.cpython-311.pyc,,
     56 +aiohttp/__pycache__/web_runner.cpython-311.pyc,,
     57 +aiohttp/__pycache__/web_server.cpython-311.pyc,,
     58 +aiohttp/__pycache__/web_urldispatcher.cpython-311.pyc,,
     59 +aiohttp/__pycache__/web_ws.cpython-311.pyc,,
     60 +aiohttp/__pycache__/worker.cpython-311.pyc,,
     61 +aiohttp/_cparser.pxd,sha256=5tE01W1fUWqytcOyldDUQKO--RH0OE1QYgQBiJWh-DM,4998
     62 +aiohttp/_find_header.pxd,sha256=0GfwFCPN2zxEKTO1_MA5sYq2UfzsG8kcV3aTqvwlz3g,68
     63 +aiohttp/_headers.pxi,sha256=n701k28dVPjwRnx5j6LpJhLTfj7dqu2vJt7f0O60Oyg,2007
     64 +aiohttp/_helpers.cpython-311-x86_64-linux-gnu.so,sha256=QT9z7C8cY5kK79fHU5X0vA8GFtbNSMi3LHMQw4H5U2w,300736
     65 +aiohttp/_helpers.pyi,sha256=ZoKiJSS51PxELhI2cmIr5737YjjZcJt7FbIRO3ym1Ss,202
     66 +aiohttp/_helpers.pyx,sha256=XeLbNft5X_4ifi8QB8i6TyrRuayijMSO3IDHeSA89uM,1049
     67 +aiohttp/_http_parser.cpython-311-x86_64-linux-gnu.so,sha256=Q5IDGaHDq2mJxiLCuYy3J6ip8am5Z05Ue6vM70dJg3c,2430128
     68 +aiohttp/_http_parser.pyx,sha256=1u38_ESw5VgSqajx1mnGdO6Hqk0ov9PxeFreHq4ktoM,27336
     69 +aiohttp/_http_writer.cpython-311-x86_64-linux-gnu.so,sha256=d-nC_isI9Jm_DIarlSBCNSGdJrIakzUSXX-29GywV6s,296240
     70 +aiohttp/_http_writer.pyx,sha256=aIHAp8g4ZV5kbGRdmZce-vXjELw2M6fGKyJuOdgYQqw,4575
     71 +aiohttp/_websocket.cpython-311-x86_64-linux-gnu.so,sha256=CssZyvH0V4Er9s9HD2XHTARI4vZ_6utIAIGTO8A-VoM,120376
     72 +aiohttp/_websocket.pyx,sha256=1XuOSNDCbyDrzF5uMA2isqausSs8l2jWTLDlNDLM9Io,1561
     73 +aiohttp/abc.py,sha256=0FhHtbb3W7wRNtJISACN1teP8LZ49553v5Xoh5zNAFQ,5505
     74 +aiohttp/base_protocol.py,sha256=5JUyuIGwKf7sFhf0YLAnk36_hkSIxBnP4hN09RdMGGk,2741
     75 +aiohttp/client.py,sha256=5dTKnaqzZvbEjd4M6yBOhDDR1uErDKu_xI3xGlzzYjs,45037
     76 +aiohttp/client_exceptions.py,sha256=tiaUIb2xy3s-O-KTPVL6L_P0rpGQT0rV1dujwwgJKoI,9270
     77 +aiohttp/client_proto.py,sha256=c4TAK8CVdycukenCJj7LtlQ3SEj04ilJ3DfmN3kPgeE,8170
     78 +aiohttp/client_reqrep.py,sha256=ULqrco544ZQgYruj1mFD6Fd3af2fOZWJqn07R8rB5J8,36973
     79 +aiohttp/client_ws.py,sha256=Sc0u3S-vZMadtEO6JpbLhVVw7KgtlsgZWHwaSYjkN0I,10516
     80 +aiohttp/connector.py,sha256=0EPxWYzIF3UudRFL77QBVico5EfSMg9mPoy75m1aBhw,51177
     81 +aiohttp/cookiejar.py,sha256=y4bBJoIkJSR9YNGsI2ZqRLdBrsb5Wrph9lljrvncBso,13655
     82 +aiohttp/formdata.py,sha256=q2gpeiM9NFsl_eSFVxHZ7Qez6RbM8_BujERMkooQkx0,6106
     83 +aiohttp/hdrs.py,sha256=owNRw0dgodeDWyobBVLkY88dLbkNoM20czE9xm40oDE,4724
     84 +aiohttp/helpers.py,sha256=vcFashughJ7i_FQuOwdbDK1nwTPYB39xtXYFomhcoLk,26398
     85 +aiohttp/http.py,sha256=_B20NZc113uNtg0jabY-x4_3RrIpTsqmbRIwMcm-Bco,1800
     86 +aiohttp/http_exceptions.py,sha256=eACQt7azwNbUi8aqXB5J2tIcc_CB4_4y4mLM9SZd4tM,2586
     87 +aiohttp/http_parser.py,sha256=_8ESr_Qo22D7tsLtmzJHK2vysqgbI06WWiGmPm5fjWc,33092
     88 +aiohttp/http_websocket.py,sha256=X6kzIgu0-wRLU9yQxP4iH-Hv_36uVjTCOmF2HgpZLlk,25299
     89 +aiohttp/http_writer.py,sha256=PGQjDjtLCluVuxao1Vef8SN9lJFO8joASSHbHipTGgQ,5933
     90 +aiohttp/locks.py,sha256=wRYFo1U82LwBBdqwU24JEPaoTAlKaaJd2FtfDKhkTb4,1136
     91 +aiohttp/log.py,sha256=BbNKx9e3VMIm0xYjZI0IcBBoS7wjdeIeSaiJE7-qK2g,325
     92 +aiohttp/multipart.py,sha256=gmqFziP4ou8ZuoAOibOjoW7OJOsURzI5gkxoLPARQy8,32313
     93 +aiohttp/payload.py,sha256=rachrZ66vC90f7swPXINaatGpPcCSVkiCCVKhrCFfuw,13634
     94 +aiohttp/payload_streamer.py,sha256=3WmZ77SQ4dc8aKU6i2ZAb8L7FPdesCSoqRonSVOd_kE,2112
     95 +aiohttp/py.typed,sha256=sow9soTwP9T_gEAQSVh7Gb8855h04Nwmhs2We-JRgZM,7
     96 +aiohttp/pytest_plugin.py,sha256=4-5LfdrnZIBP2wLp8CjE54eshOolFbBpOTufvp4tUcI,11772
     97 +aiohttp/resolver.py,sha256=CASOnXp5oZh_1sCFWzFlD-5x3V49HAXbAJw-5RYjgms,5092
     98 +aiohttp/streams.py,sha256=_OTvFQVA8-8GJ120Y95lH-hmLq1QaFNBFdaA49TECIc,20758
     99 +aiohttp/tcp_helpers.py,sha256=BSadqVWaBpMFDRWnhaaR941N9MiDZ7bdTrxgCb0CW-M,961
     100 +aiohttp/test_utils.py,sha256=MNQb4Zq6rKLLC3PABy5hIjONlsoxd-lc3OirNGHIJS4,21434
     101 +aiohttp/tracing.py,sha256=gn_O9btTDB66nQ1wJWT3N2gEsO5kYFSIynnd8cp4YgA,15177
     102 +aiohttp/typedefs.py,sha256=oLnG3fxcBEdu4kIzUi0Npcg5kjq01cRkK27VSgjNnmw,1766
     103 +aiohttp/web.py,sha256=bAhkE0oeP6eI06ohkBoPu4ZLchctpEz23cVym_JECSg,18081
     104 +aiohttp/web_app.py,sha256=QkVmy8pR_oaJ3od2fYfSfjzfZ8oGEPg9FPW_d0r2THo,17170
     105 +aiohttp/web_exceptions.py,sha256=T_ghTJB_hnPkoWa3qyeY_GtVbehYQwPCpcCRb-072N0,10098
     106 +aiohttp/web_fileresponse.py,sha256=F_xRvYFL2ox4oVNW3WSjwQ6LmVpkkYM8MPxsqiNsfUg,10784
     107 +aiohttp/web_log.py,sha256=OH-C5shv59-nXchWX8owfLfToMxVdtj0PuK3uGIGEJQ,7557
     108 +aiohttp/web_middlewares.py,sha256=nnllFgxX9GjvkG3YW43jPDH7C03iCfyMBxhYw-OkTI0,4137
     109 +aiohttp/web_protocol.py,sha256=EFr0sy29rW7ffRz-tlRlBnHogmlyt6YvaJP6X1Sg3i8,22399
     110 +aiohttp/web_request.py,sha256=t0RvF_yOJG6uq9-nZjmwXjfqc9Mvgpc3sXUxC67uGvw,28187
     111 +aiohttp/web_response.py,sha256=7WTmyeXY2DrWAhr9HWuxY1SecgxiO_QwRql86PSUS-U,27471
     112 +aiohttp/web_routedef.py,sha256=EFk3v1dcFnLimTT5z0JSBO3PShF0w9sIzfK9iJd-LNs,6152
     113 +aiohttp/web_runner.py,sha256=EzxH4v1lntydU3W-c6iLgDu5LI7kAyD7sAmkz6W5-9g,11157
     114 +aiohttp/web_server.py,sha256=EA1YUxv_4szhpaED1O_VVCUFHNhPUJhl2Cq7W1BK72s,2050
     115 +aiohttp/web_urldispatcher.py,sha256=IAvlOBqCPLjasMnYtCwSqbhj-j1JTQRRHFnNvMFd4d4,39483
     116 +aiohttp/web_ws.py,sha256=8Qmp_zH-F7t9V4NLRFwfoTBr4oWuo3cZrnYT-i-zBI0,17144
     117 +aiohttp/worker.py,sha256=Cbx1KyVligvWa6kje0hSXhdjgJ1AORLN1qu8qJ0LzSQ,8763
     118 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiohttp-3.8.4.dist-info/WHEEL
     1 +Wheel-Version: 1.0
     2 +Generator: bdist_wheel (0.38.4)
     3 +Root-Is-Purelib: false
     4 +Tag: cp311-cp311-manylinux_2_17_x86_64
     5 +Tag: cp311-cp311-manylinux2014_x86_64
     6 + 
     7 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiohttp-3.8.4.dist-info/top_level.txt
     1 +aiohttp
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal/__init__.py
     1 +from frozenlist import FrozenList
     2 + 
     3 +__version__ = "1.3.1"
     4 + 
     5 +__all__ = ("Signal",)
     6 + 
     7 + 
     8 +class Signal(FrozenList):
     9 + """Coroutine-based signal implementation.
     10 + 
     11 + To connect a callback to a signal, use any list method.
     12 + 
     13 + Signals are fired using the send() coroutine, which takes named
     14 + arguments.
     15 + """
     16 + 
     17 + __slots__ = ("_owner",)
     18 + 
     19 + def __init__(self, owner):
     20 + super().__init__()
     21 + self._owner = owner
     22 + 
     23 + def __repr__(self):
     24 + return "<Signal owner={}, frozen={}, {!r}>".format(
     25 + self._owner, self.frozen, list(self)
     26 + )
     27 + 
     28 + async def send(self, *args, **kwargs):
     29 + """
     30 + Sends data to all registered receivers.
     31 + """
     32 + if not self.frozen:
     33 + raise RuntimeError("Cannot send non-frozen signal.")
     34 + 
     35 + for receiver in self:
     36 + await receiver(*args, **kwargs) # type: ignore
     37 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal/__init__.pyi
     1 +from typing import Any, Generic, TypeVar
     2 + 
     3 +from frozenlist import FrozenList
     4 + 
     5 +__all__ = ("Signal",)
     6 + 
     7 +_T = TypeVar("_T")
     8 + 
     9 +class Signal(FrozenList[_T], Generic[_T]):
     10 + def __init__(self, owner: Any) -> None: ...
     11 + def __repr__(self) -> str: ...
     12 + async def send(self, *args: Any, **kwargs: Any) -> None: ...
     13 + 
  • vuln_analyzer/lib/python3.11/site-packages/aiosignal/__pycache__/__init__.cpython-311.pyc
    Binary file.
  • ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal/py.typed
     1 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal-1.3.1.dist-info/INSTALLER
     1 +pip
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal-1.3.1.dist-info/LICENSE
     1 +Apache License
     2 + Version 2.0, January 2004
     3 + http://www.apache.org/licenses/
     4 + 
     5 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
     6 + 
     7 + 1. Definitions.
     8 + 
     9 + "License" shall mean the terms and conditions for use, reproduction,
     10 + and distribution as defined by Sections 1 through 9 of this document.
     11 + 
     12 + "Licensor" shall mean the copyright owner or entity authorized by
     13 + the copyright owner that is granting the License.
     14 + 
     15 + "Legal Entity" shall mean the union of the acting entity and all
     16 + other entities that control, are controlled by, or are under common
     17 + control with that entity. For the purposes of this definition,
     18 + "control" means (i) the power, direct or indirect, to cause the
     19 + direction or management of such entity, whether by contract or
     20 + otherwise, or (ii) ownership of fifty percent (50%) or more of the
     21 + outstanding shares, or (iii) beneficial ownership of such entity.
     22 + 
     23 + "You" (or "Your") shall mean an individual or Legal Entity
     24 + exercising permissions granted by this License.
     25 + 
     26 + "Source" form shall mean the preferred form for making modifications,
     27 + including but not limited to software source code, documentation
     28 + source, and configuration files.
     29 + 
     30 + "Object" form shall mean any form resulting from mechanical
     31 + transformation or translation of a Source form, including but
     32 + not limited to compiled object code, generated documentation,
     33 + and conversions to other media types.
     34 + 
     35 + "Work" shall mean the work of authorship, whether in Source or
     36 + Object form, made available under the License, as indicated by a
     37 + copyright notice that is included in or attached to the work
     38 + (an example is provided in the Appendix below).
     39 + 
     40 + "Derivative Works" shall mean any work, whether in Source or Object
     41 + form, that is based on (or derived from) the Work and for which the
     42 + editorial revisions, annotations, elaborations, or other modifications
     43 + represent, as a whole, an original work of authorship. For the purposes
     44 + of this License, Derivative Works shall not include works that remain
     45 + separable from, or merely link (or bind by name) to the interfaces of,
     46 + the Work and Derivative Works thereof.
     47 + 
     48 + "Contribution" shall mean any work of authorship, including
     49 + the original version of the Work and any modifications or additions
     50 + to that Work or Derivative Works thereof, that is intentionally
     51 + submitted to Licensor for inclusion in the Work by the copyright owner
     52 + or by an individual or Legal Entity authorized to submit on behalf of
     53 + the copyright owner. For the purposes of this definition, "submitted"
     54 + means any form of electronic, verbal, or written communication sent
     55 + to the Licensor or its representatives, including but not limited to
     56 + communication on electronic mailing lists, source code control systems,
     57 + and issue tracking systems that are managed by, or on behalf of, the
     58 + Licensor for the purpose of discussing and improving the Work, but
     59 + excluding communication that is conspicuously marked or otherwise
     60 + designated in writing by the copyright owner as "Not a Contribution."
     61 + 
     62 + "Contributor" shall mean Licensor and any individual or Legal Entity
     63 + on behalf of whom a Contribution has been received by Licensor and
     64 + subsequently incorporated within the Work.
     65 + 
     66 + 2. Grant of Copyright License. Subject to the terms and conditions of
     67 + this License, each Contributor hereby grants to You a perpetual,
     68 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
     69 + copyright license to reproduce, prepare Derivative Works of,
     70 + publicly display, publicly perform, sublicense, and distribute the
     71 + Work and such Derivative Works in Source or Object form.
     72 + 
     73 + 3. Grant of Patent License. Subject to the terms and conditions of
     74 + this License, each Contributor hereby grants to You a perpetual,
     75 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
     76 + (except as stated in this section) patent license to make, have made,
     77 + use, offer to sell, sell, import, and otherwise transfer the Work,
     78 + where such license applies only to those patent claims licensable
     79 + by such Contributor that are necessarily infringed by their
     80 + Contribution(s) alone or by combination of their Contribution(s)
     81 + with the Work to which such Contribution(s) was submitted. If You
     82 + institute patent litigation against any entity (including a
     83 + cross-claim or counterclaim in a lawsuit) alleging that the Work
     84 + or a Contribution incorporated within the Work constitutes direct
     85 + or contributory patent infringement, then any patent licenses
     86 + granted to You under this License for that Work shall terminate
     87 + as of the date such litigation is filed.
     88 + 
     89 + 4. Redistribution. You may reproduce and distribute copies of the
     90 + Work or Derivative Works thereof in any medium, with or without
     91 + modifications, and in Source or Object form, provided that You
     92 + meet the following conditions:
     93 + 
     94 + (a) You must give any other recipients of the Work or
     95 + Derivative Works a copy of this License; and
     96 + 
     97 + (b) You must cause any modified files to carry prominent notices
     98 + stating that You changed the files; and
     99 + 
     100 + (c) You must retain, in the Source form of any Derivative Works
     101 + that You distribute, all copyright, patent, trademark, and
     102 + attribution notices from the Source form of the Work,
     103 + excluding those notices that do not pertain to any part of
     104 + the Derivative Works; and
     105 + 
     106 + (d) If the Work includes a "NOTICE" text file as part of its
     107 + distribution, then any Derivative Works that You distribute must
     108 + include a readable copy of the attribution notices contained
     109 + within such NOTICE file, excluding those notices that do not
     110 + pertain to any part of the Derivative Works, in at least one
     111 + of the following places: within a NOTICE text file distributed
     112 + as part of the Derivative Works; within the Source form or
     113 + documentation, if provided along with the Derivative Works; or,
     114 + within a display generated by the Derivative Works, if and
     115 + wherever such third-party notices normally appear. The contents
     116 + of the NOTICE file are for informational purposes only and
     117 + do not modify the License. You may add Your own attribution
     118 + notices within Derivative Works that You distribute, alongside
     119 + or as an addendum to the NOTICE text from the Work, provided
     120 + that such additional attribution notices cannot be construed
     121 + as modifying the License.
     122 + 
     123 + You may add Your own copyright statement to Your modifications and
     124 + may provide additional or different license terms and conditions
     125 + for use, reproduction, or distribution of Your modifications, or
     126 + for any such Derivative Works as a whole, provided Your use,
     127 + reproduction, and distribution of the Work otherwise complies with
     128 + the conditions stated in this License.
     129 + 
     130 + 5. Submission of Contributions. Unless You explicitly state otherwise,
     131 + any Contribution intentionally submitted for inclusion in the Work
     132 + by You to the Licensor shall be under the terms and conditions of
     133 + this License, without any additional terms or conditions.
     134 + Notwithstanding the above, nothing herein shall supersede or modify
     135 + the terms of any separate license agreement you may have executed
     136 + with Licensor regarding such Contributions.
     137 + 
     138 + 6. Trademarks. This License does not grant permission to use the trade
     139 + names, trademarks, service marks, or product names of the Licensor,
     140 + except as required for reasonable and customary use in describing the
     141 + origin of the Work and reproducing the content of the NOTICE file.
     142 + 
     143 + 7. Disclaimer of Warranty. Unless required by applicable law or
     144 + agreed to in writing, Licensor provides the Work (and each
     145 + Contributor provides its Contributions) on an "AS IS" BASIS,
     146 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
     147 + implied, including, without limitation, any warranties or conditions
     148 + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
     149 + PARTICULAR PURPOSE. You are solely responsible for determining the
     150 + appropriateness of using or redistributing the Work and assume any
     151 + risks associated with Your exercise of permissions under this License.
     152 + 
     153 + 8. Limitation of Liability. In no event and under no legal theory,
     154 + whether in tort (including negligence), contract, or otherwise,
     155 + unless required by applicable law (such as deliberate and grossly
     156 + negligent acts) or agreed to in writing, shall any Contributor be
     157 + liable to You for damages, including any direct, indirect, special,
     158 + incidental, or consequential damages of any character arising as a
     159 + result of this License or out of the use or inability to use the
     160 + Work (including but not limited to damages for loss of goodwill,
     161 + work stoppage, computer failure or malfunction, or any and all
     162 + other commercial damages or losses), even if such Contributor
     163 + has been advised of the possibility of such damages.
     164 + 
     165 + 9. Accepting Warranty or Additional Liability. While redistributing
     166 + the Work or Derivative Works thereof, You may choose to offer,
     167 + and charge a fee for, acceptance of support, warranty, indemnity,
     168 + or other liability obligations and/or rights consistent with this
     169 + License. However, in accepting such obligations, You may act only
     170 + on Your own behalf and on Your sole responsibility, not on behalf
     171 + of any other Contributor, and only if You agree to indemnify,
     172 + defend, and hold each Contributor harmless for any liability
     173 + incurred by, or claims asserted against, such Contributor by reason
     174 + of your accepting any such warranty or additional liability.
     175 + 
     176 + END OF TERMS AND CONDITIONS
     177 + 
     178 + APPENDIX: How to apply the Apache License to your work.
     179 + 
     180 + To apply the Apache License to your work, attach the following
     181 + boilerplate notice, with the fields enclosed by brackets "{}"
     182 + replaced with your own identifying information. (Don't include
     183 + the brackets!) The text should be enclosed in the appropriate
     184 + comment syntax for the file format. We also recommend that a
     185 + file or class name and description of purpose be included on the
     186 + same "printed page" as the copyright notice for easier
     187 + identification within third-party archives.
     188 + 
     189 + Copyright 2013-2019 Nikolay Kim and Andrew Svetlov
     190 + 
     191 + Licensed under the Apache License, Version 2.0 (the "License");
     192 + you may not use this file except in compliance with the License.
     193 + You may obtain a copy of the License at
     194 + 
     195 + http://www.apache.org/licenses/LICENSE-2.0
     196 + 
     197 + Unless required by applicable law or agreed to in writing, software
     198 + distributed under the License is distributed on an "AS IS" BASIS,
     199 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     200 + See the License for the specific language governing permissions and
     201 + limitations under the License.
     202 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal-1.3.1.dist-info/METADATA
     1 +Metadata-Version: 2.1
     2 +Name: aiosignal
     3 +Version: 1.3.1
     4 +Summary: aiosignal: a list of registered asynchronous callbacks
     5 +Home-page: https://github.com/aio-libs/aiosignal
     6 +Maintainer: aiohttp team <[email protected]>
     7 +Maintainer-email: [email protected]
     8 +License: Apache 2.0
     9 +Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby
     10 +Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiosignal/actions
     11 +Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiosignal
     12 +Project-URL: Docs: RTD, https://docs.aiosignal.org
     13 +Project-URL: GitHub: issues, https://github.com/aio-libs/aiosignal/issues
     14 +Project-URL: GitHub: repo, https://github.com/aio-libs/aiosignal
     15 +Classifier: License :: OSI Approved :: Apache Software License
     16 +Classifier: Intended Audience :: Developers
     17 +Classifier: Programming Language :: Python
     18 +Classifier: Programming Language :: Python :: 3
     19 +Classifier: Programming Language :: Python :: 3 :: Only
     20 +Classifier: Programming Language :: Python :: 3.7
     21 +Classifier: Programming Language :: Python :: 3.8
     22 +Classifier: Programming Language :: Python :: 3.9
     23 +Classifier: Programming Language :: Python :: 3.10
     24 +Classifier: Programming Language :: Python :: 3.11
     25 +Classifier: Development Status :: 5 - Production/Stable
     26 +Classifier: Operating System :: POSIX
     27 +Classifier: Operating System :: MacOS :: MacOS X
     28 +Classifier: Operating System :: Microsoft :: Windows
     29 +Classifier: Framework :: AsyncIO
     30 +Requires-Python: >=3.7
     31 +Description-Content-Type: text/x-rst
     32 +License-File: LICENSE
     33 +Requires-Dist: frozenlist (>=1.1.0)
     34 + 
     35 +=========
     36 +aiosignal
     37 +=========
     38 + 
     39 +.. image:: https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg
     40 + :target: https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI
     41 + :alt: GitHub status for master branch
     42 + 
     43 +.. image:: https://codecov.io/gh/aio-libs/aiosignal/branch/master/graph/badge.svg
     44 + :target: https://codecov.io/gh/aio-libs/aiosignal
     45 + :alt: codecov.io status for master branch
     46 + 
     47 +.. image:: https://badge.fury.io/py/aiosignal.svg
     48 + :target: https://pypi.org/project/aiosignal
     49 + :alt: Latest PyPI package version
     50 + 
     51 +.. image:: https://readthedocs.org/projects/aiosignal/badge/?version=latest
     52 + :target: https://aiosignal.readthedocs.io/
     53 + :alt: Latest Read The Docs
     54 + 
     55 +.. image:: https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F
     56 + :target: https://aio-libs.discourse.group/
     57 + :alt: Discourse group for io-libs
     58 + 
     59 +.. image:: https://badges.gitter.im/Join%20Chat.svg
     60 + :target: https://gitter.im/aio-libs/Lobby
     61 + :alt: Chat on Gitter
     62 + 
     63 +Introduction
     64 +============
     65 + 
     66 +A project to manage callbacks in `asyncio` projects.
     67 + 
     68 +``Signal`` is a list of registered asynchronous callbacks.
     69 + 
     70 +The signal's life-cycle has two stages: after creation its content
     71 +could be filled by using standard list operations: ``sig.append()``
     72 +etc.
     73 + 
     74 +After you call ``sig.freeze()`` the signal is *frozen*: adding, removing
     75 +and dropping callbacks is forbidden.
     76 + 
     77 +The only available operation is calling the previously registered
     78 +callbacks by using ``await sig.send(data)``.
     79 + 
     80 +For concrete usage examples see the `Signals
     81 +<https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-signals>
     82 +section of the `Web Server Advanced
     83 +<https://docs.aiohttp.org/en/stable/web_advanced.html>` chapter of the `aiohttp
     84 +documentation`_.
     85 + 
     86 + 
     87 +Installation
     88 +------------
     89 + 
     90 +::
     91 + 
     92 + $ pip install aiosignal
     93 + 
     94 +The library requires Python 3.6 or newer.
     95 + 
     96 + 
     97 +Documentation
     98 +=============
     99 + 
     100 +https://aiosignal.readthedocs.io/
     101 + 
     102 +Communication channels
     103 +======================
     104 + 
     105 +*gitter chat* https://gitter.im/aio-libs/Lobby
     106 + 
     107 +Requirements
     108 +============
     109 + 
     110 +- Python >= 3.6
     111 +- frozenlist >= 1.0.0
     112 + 
     113 +License
     114 +=======
     115 + 
     116 +``aiosignal`` is offered under the Apache 2 license.
     117 + 
     118 +Source code
     119 +===========
     120 + 
     121 +The project is hosted on GitHub_
     122 + 
     123 +Please file an issue in the `bug tracker
     124 +<https://github.com/aio-libs/aiosignal/issues>`_ if you have found a bug
     125 +or have some suggestions to improve the library.
     126 + 
     127 +.. _GitHub: https://github.com/aio-libs/aiosignal
     128 +.. _aiohttp documentation: https://docs.aiohttp.org/
     129 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal-1.3.1.dist-info/RECORD
     1 +aiosignal-1.3.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
     2 +aiosignal-1.3.1.dist-info/LICENSE,sha256=b9UkPpLdf5jsacesN3co50kFcJ_1J6W_mNbQJjwE9bY,11332
     3 +aiosignal-1.3.1.dist-info/METADATA,sha256=c0HRnlYzfXKztZPTFDlPfygizTherhG5WdwXlvco0Ug,4008
     4 +aiosignal-1.3.1.dist-info/RECORD,,
     5 +aiosignal-1.3.1.dist-info/WHEEL,sha256=ZL1lC_LiPDNRgDnOl2taCMc83aPEUZgHHv2h-LDgdiM,92
     6 +aiosignal-1.3.1.dist-info/top_level.txt,sha256=z45aNOKGDdrI1roqZY3BGXQ22kJFPHBmVdwtLYLtXC0,10
     7 +aiosignal/__init__.py,sha256=zQNfFYRSd84bswvpFv8ZWjEr5DeYwV3LXbMSyo2222s,867
     8 +aiosignal/__init__.pyi,sha256=xeCddYSS8fZAkz8S4HuKSR2IDe3N7RW_LKcXDPPA1Xk,311
     9 +aiosignal/__pycache__/__init__.cpython-311.pyc,,
     10 +aiosignal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
     11 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal-1.3.1.dist-info/WHEEL
     1 +Wheel-Version: 1.0
     2 +Generator: bdist_wheel (0.38.2)
     3 +Root-Is-Purelib: true
     4 +Tag: py3-none-any
     5 + 
     6 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/aiosignal-1.3.1.dist-info/top_level.txt
     1 +aiosignal
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout/__init__.py
     1 +import asyncio
     2 +import enum
     3 +import sys
     4 +import warnings
     5 +from types import TracebackType
     6 +from typing import Any, Optional, Type
     7 + 
     8 + 
     9 +if sys.version_info >= (3, 8):
     10 + from typing import final
     11 +else:
     12 + from typing_extensions import final
     13 + 
     14 + 
     15 +__version__ = "4.0.2"
     16 + 
     17 + 
     18 +__all__ = ("timeout", "timeout_at", "Timeout")
     19 + 
     20 + 
     21 +def timeout(delay: Optional[float]) -> "Timeout":
     22 + """timeout context manager.
     23 + 
     24 + Useful in cases when you want to apply timeout logic around block
     25 + of code or in cases when asyncio.wait_for is not suitable. For example:
     26 + 
     27 + >>> async with timeout(0.001):
     28 + ... async with aiohttp.get('https://github.com') as r:
     29 + ... await r.text()
     30 + 
     31 + 
     32 + delay - value in seconds or None to disable timeout logic
     33 + """
     34 + loop = _get_running_loop()
     35 + if delay is not None:
     36 + deadline = loop.time() + delay # type: Optional[float]
     37 + else:
     38 + deadline = None
     39 + return Timeout(deadline, loop)
     40 + 
     41 + 
     42 +def timeout_at(deadline: Optional[float]) -> "Timeout":
     43 + """Schedule the timeout at absolute time.
     44 + 
     45 + deadline argument points on the time in the same clock system
     46 + as loop.time().
     47 + 
     48 + Please note: it is not POSIX time but a time with
     49 + undefined starting base, e.g. the time of the system power on.
     50 + 
     51 + >>> async with timeout_at(loop.time() + 10):
     52 + ... async with aiohttp.get('https://github.com') as r:
     53 + ... await r.text()
     54 + 
     55 + 
     56 + """
     57 + loop = _get_running_loop()
     58 + return Timeout(deadline, loop)
     59 + 
     60 + 
     61 +class _State(enum.Enum):
     62 + INIT = "INIT"
     63 + ENTER = "ENTER"
     64 + TIMEOUT = "TIMEOUT"
     65 + EXIT = "EXIT"
     66 + 
     67 + 
     68 +@final
     69 +class Timeout:
     70 + # Internal class, please don't instantiate it directly
     71 + # Use timeout() and timeout_at() public factories instead.
     72 + #
     73 + # Implementation note: `async with timeout()` is preferred
     74 + # over `with timeout()`.
     75 + # While technically the Timeout class implementation
     76 + # doesn't need to be async at all,
     77 + # the `async with` statement explicitly points that
     78 + # the context manager should be used from async function context.
     79 + #
     80 + # This design allows to avoid many silly misusages.
     81 + #
     82 + # TimeoutError is raised immadiatelly when scheduled
     83 + # if the deadline is passed.
     84 + # The purpose is to time out as sson as possible
     85 + # without waiting for the next await expression.
     86 + 
     87 + __slots__ = ("_deadline", "_loop", "_state", "_timeout_handler")
     88 + 
     89 + def __init__(
     90 + self, deadline: Optional[float], loop: asyncio.AbstractEventLoop
     91 + ) -> None:
     92 + self._loop = loop
     93 + self._state = _State.INIT
     94 + 
     95 + self._timeout_handler = None # type: Optional[asyncio.Handle]
     96 + if deadline is None:
     97 + self._deadline = None # type: Optional[float]
     98 + else:
     99 + self.update(deadline)
     100 + 
     101 + def __enter__(self) -> "Timeout":
     102 + warnings.warn(
     103 + "with timeout() is deprecated, use async with timeout() instead",
     104 + DeprecationWarning,
     105 + stacklevel=2,
     106 + )
     107 + self._do_enter()
     108 + return self
     109 + 
     110 + def __exit__(
     111 + self,
     112 + exc_type: Optional[Type[BaseException]],
     113 + exc_val: Optional[BaseException],
     114 + exc_tb: Optional[TracebackType],
     115 + ) -> Optional[bool]:
     116 + self._do_exit(exc_type)
     117 + return None
     118 + 
     119 + async def __aenter__(self) -> "Timeout":
     120 + self._do_enter()
     121 + return self
     122 + 
     123 + async def __aexit__(
     124 + self,
     125 + exc_type: Optional[Type[BaseException]],
     126 + exc_val: Optional[BaseException],
     127 + exc_tb: Optional[TracebackType],
     128 + ) -> Optional[bool]:
     129 + self._do_exit(exc_type)
     130 + return None
     131 + 
     132 + @property
     133 + def expired(self) -> bool:
     134 + """Is timeout expired during execution?"""
     135 + return self._state == _State.TIMEOUT
     136 + 
     137 + @property
     138 + def deadline(self) -> Optional[float]:
     139 + return self._deadline
     140 + 
     141 + def reject(self) -> None:
     142 + """Reject scheduled timeout if any."""
     143 + # cancel is maybe better name but
     144 + # task.cancel() raises CancelledError in asyncio world.
     145 + if self._state not in (_State.INIT, _State.ENTER):
     146 + raise RuntimeError(f"invalid state {self._state.value}")
     147 + self._reject()
     148 + 
     149 + def _reject(self) -> None:
     150 + if self._timeout_handler is not None:
     151 + self._timeout_handler.cancel()
     152 + self._timeout_handler = None
     153 + 
     154 + def shift(self, delay: float) -> None:
     155 + """Advance timeout on delay seconds.
     156 + 
     157 + The delay can be negative.
     158 + 
     159 + Raise RuntimeError if shift is called when deadline is not scheduled
     160 + """
     161 + deadline = self._deadline
     162 + if deadline is None:
     163 + raise RuntimeError("cannot shift timeout if deadline is not scheduled")
     164 + self.update(deadline + delay)
     165 + 
     166 + def update(self, deadline: float) -> None:
     167 + """Set deadline to absolute value.
     168 + 
     169 + deadline argument points on the time in the same clock system
     170 + as loop.time().
     171 + 
     172 + If new deadline is in the past the timeout is raised immediatelly.
     173 + 
     174 + Please note: it is not POSIX time but a time with
     175 + undefined starting base, e.g. the time of the system power on.
     176 + """
     177 + if self._state == _State.EXIT:
     178 + raise RuntimeError("cannot reschedule after exit from context manager")
     179 + if self._state == _State.TIMEOUT:
     180 + raise RuntimeError("cannot reschedule expired timeout")
     181 + if self._timeout_handler is not None:
     182 + self._timeout_handler.cancel()
     183 + self._deadline = deadline
     184 + if self._state != _State.INIT:
     185 + self._reschedule()
     186 + 
     187 + def _reschedule(self) -> None:
     188 + assert self._state == _State.ENTER
     189 + deadline = self._deadline
     190 + if deadline is None:
     191 + return
     192 + 
     193 + now = self._loop.time()
     194 + if self._timeout_handler is not None:
     195 + self._timeout_handler.cancel()
     196 + 
     197 + task = _current_task(self._loop)
     198 + if deadline <= now:
     199 + self._timeout_handler = self._loop.call_soon(self._on_timeout, task)
     200 + else:
     201 + self._timeout_handler = self._loop.call_at(deadline, self._on_timeout, task)
     202 + 
     203 + def _do_enter(self) -> None:
     204 + if self._state != _State.INIT:
     205 + raise RuntimeError(f"invalid state {self._state.value}")
     206 + self._state = _State.ENTER
     207 + self._reschedule()
     208 + 
     209 + def _do_exit(self, exc_type: Optional[Type[BaseException]]) -> None:
     210 + if exc_type is asyncio.CancelledError and self._state == _State.TIMEOUT:
     211 + self._timeout_handler = None
     212 + raise asyncio.TimeoutError
     213 + # timeout has not expired
     214 + self._state = _State.EXIT
     215 + self._reject()
     216 + return None
     217 + 
     218 + def _on_timeout(self, task: "asyncio.Task[None]") -> None:
     219 + task.cancel()
     220 + self._state = _State.TIMEOUT
     221 + # drop the reference early
     222 + self._timeout_handler = None
     223 + 
     224 + 
     225 +if sys.version_info >= (3, 7):
     226 + 
     227 + def _current_task(loop: asyncio.AbstractEventLoop) -> "Optional[asyncio.Task[Any]]":
     228 + return asyncio.current_task(loop=loop)
     229 + 
     230 +else:
     231 + 
     232 + def _current_task(loop: asyncio.AbstractEventLoop) -> "Optional[asyncio.Task[Any]]":
     233 + return asyncio.Task.current_task(loop=loop)
     234 + 
     235 + 
     236 +if sys.version_info >= (3, 7):
     237 + 
     238 + def _get_running_loop() -> asyncio.AbstractEventLoop:
     239 + return asyncio.get_running_loop()
     240 + 
     241 +else:
     242 + 
     243 + def _get_running_loop() -> asyncio.AbstractEventLoop:
     244 + loop = asyncio.get_event_loop()
     245 + if not loop.is_running():
     246 + raise RuntimeError("no running event loop")
     247 + return loop
     248 + 
  • vuln_analyzer/lib/python3.11/site-packages/async_timeout/__pycache__/__init__.cpython-311.pyc
    Binary file.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout/py.typed
     1 +Placeholder
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/INSTALLER
     1 +pip
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/LICENSE
     1 +Copyright 2016-2020 aio-libs collaboration.
     2 + 
     3 +Licensed under the Apache License, Version 2.0 (the "License");
     4 +you may not use this file except in compliance with the License.
     5 +You may obtain a copy of the License at
     6 + 
     7 + http://www.apache.org/licenses/LICENSE-2.0
     8 + 
     9 +Unless required by applicable law or agreed to in writing, software
     10 +distributed under the License is distributed on an "AS IS" BASIS,
     11 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 +See the License for the specific language governing permissions and
     13 +limitations under the License.
     14 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/METADATA
     1 +Metadata-Version: 2.1
     2 +Name: async-timeout
     3 +Version: 4.0.2
     4 +Summary: Timeout context manager for asyncio programs
     5 +Home-page: https://github.com/aio-libs/async-timeout
     6 +Author: Andrew Svetlov <[email protected]>
     7 +Author-email: [email protected]
     8 +License: Apache 2
     9 +Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby
     10 +Project-URL: CI: GitHub Actions, https://github.com/aio-libs/async-timeout/actions
     11 +Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/async-timeout
     12 +Project-URL: GitHub: issues, https://github.com/aio-libs/async-timeout/issues
     13 +Project-URL: GitHub: repo, https://github.com/aio-libs/async-timeout
     14 +Platform: UNKNOWN
     15 +Classifier: Development Status :: 5 - Production/Stable
     16 +Classifier: Topic :: Software Development :: Libraries
     17 +Classifier: Framework :: AsyncIO
     18 +Classifier: Intended Audience :: Developers
     19 +Classifier: License :: OSI Approved :: Apache Software License
     20 +Classifier: Programming Language :: Python
     21 +Classifier: Programming Language :: Python :: 3
     22 +Classifier: Programming Language :: Python :: 3 :: Only
     23 +Classifier: Programming Language :: Python :: 3.6
     24 +Classifier: Programming Language :: Python :: 3.7
     25 +Classifier: Programming Language :: Python :: 3.8
     26 +Classifier: Programming Language :: Python :: 3.9
     27 +Classifier: Programming Language :: Python :: 3.10
     28 +Requires-Python: >=3.6
     29 +Description-Content-Type: text/x-rst
     30 +License-File: LICENSE
     31 +Requires-Dist: typing-extensions (>=3.6.5) ; python_version < "3.8"
     32 + 
     33 +async-timeout
     34 +=============
     35 +.. image:: https://travis-ci.com/aio-libs/async-timeout.svg?branch=master
     36 + :target: https://travis-ci.com/aio-libs/async-timeout
     37 +.. image:: https://codecov.io/gh/aio-libs/async-timeout/branch/master/graph/badge.svg
     38 + :target: https://codecov.io/gh/aio-libs/async-timeout
     39 +.. image:: https://img.shields.io/pypi/v/async-timeout.svg
     40 + :target: https://pypi.python.org/pypi/async-timeout
     41 +.. image:: https://badges.gitter.im/Join%20Chat.svg
     42 + :target: https://gitter.im/aio-libs/Lobby
     43 + :alt: Chat on Gitter
     44 + 
     45 +asyncio-compatible timeout context manager.
     46 + 
     47 + 
     48 +Usage example
     49 +-------------
     50 + 
     51 + 
     52 +The context manager is useful in cases when you want to apply timeout
     53 +logic around block of code or in cases when ``asyncio.wait_for()`` is
     54 +not suitable. Also it's much faster than ``asyncio.wait_for()``
     55 +because ``timeout`` doesn't create a new task.
     56 + 
     57 +The ``timeout(delay, *, loop=None)`` call returns a context manager
     58 +that cancels a block on *timeout* expiring::
     59 + 
     60 + async with timeout(1.5):
     61 + await inner()
     62 + 
     63 +1. If ``inner()`` is executed faster than in ``1.5`` seconds nothing
     64 + happens.
     65 +2. Otherwise ``inner()`` is cancelled internally by sending
     66 + ``asyncio.CancelledError`` into but ``asyncio.TimeoutError`` is
     67 + raised outside of context manager scope.
     68 + 
     69 +*timeout* parameter could be ``None`` for skipping timeout functionality.
     70 + 
     71 + 
     72 +Alternatively, ``timeout_at(when)`` can be used for scheduling
     73 +at the absolute time::
     74 + 
     75 + loop = asyncio.get_event_loop()
     76 + now = loop.time()
     77 + 
     78 + async with timeout_at(now + 1.5):
     79 + await inner()
     80 + 
     81 + 
     82 +Please note: it is not POSIX time but a time with
     83 +undefined starting base, e.g. the time of the system power on.
     84 + 
     85 + 
     86 +Context manager has ``.expired`` property for check if timeout happens
     87 +exactly in context manager::
     88 + 
     89 + async with timeout(1.5) as cm:
     90 + await inner()
     91 + print(cm.expired)
     92 + 
     93 +The property is ``True`` if ``inner()`` execution is cancelled by
     94 +timeout context manager.
     95 + 
     96 +If ``inner()`` call explicitly raises ``TimeoutError`` ``cm.expired``
     97 +is ``False``.
     98 + 
     99 +The scheduled deadline time is available as ``.deadline`` property::
     100 + 
     101 + async with timeout(1.5) as cm:
     102 + cm.deadline
     103 + 
     104 +Not finished yet timeout can be rescheduled by ``shift_by()``
     105 +or ``shift_to()`` methods::
     106 + 
     107 + async with timeout(1.5) as cm:
     108 + cm.shift(1) # add another second on waiting
     109 + cm.update(loop.time() + 5) # reschedule to now+5 seconds
     110 + 
     111 +Rescheduling is forbidden if the timeout is expired or after exit from ``async with``
     112 +code block.
     113 + 
     114 + 
     115 +Installation
     116 +------------
     117 + 
     118 +::
     119 + 
     120 + $ pip install async-timeout
     121 + 
     122 +The library is Python 3 only!
     123 + 
     124 + 
     125 + 
     126 +Authors and License
     127 +-------------------
     128 + 
     129 +The module is written by Andrew Svetlov.
     130 + 
     131 +It's *Apache 2* licensed and freely available.
     132 + 
     133 + 
     134 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/RECORD
     1 +async_timeout-4.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
     2 +async_timeout-4.0.2.dist-info/LICENSE,sha256=4Y17uPUT4sRrtYXJS1hb0wcg3TzLId2weG9y0WZY-Sw,568
     3 +async_timeout-4.0.2.dist-info/METADATA,sha256=2pfMxxBst5vQ7SfMy5TDaDU0cRgCSQa7wcD5eI-Ew-8,4193
     4 +async_timeout-4.0.2.dist-info/RECORD,,
     5 +async_timeout-4.0.2.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
     6 +async_timeout-4.0.2.dist-info/top_level.txt,sha256=9oM4e7Twq8iD_7_Q3Mz0E6GPIB6vJvRFo-UBwUQtBDU,14
     7 +async_timeout-4.0.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
     8 +async_timeout/__init__.py,sha256=N-JUI_VExhHnO0emkF_-h08dl4HBgOje16N4Ci-W-go,7487
     9 +async_timeout/__pycache__/__init__.cpython-311.pyc,,
     10 +async_timeout/py.typed,sha256=tyozzRT1fziXETDxokmuyt6jhOmtjUbnVNJdZcG7ik0,12
     11 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/WHEEL
     1 +Wheel-Version: 1.0
     2 +Generator: bdist_wheel (0.37.0)
     3 +Root-Is-Purelib: true
     4 +Tag: py3-none-any
     5 + 
     6 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/top_level.txt
     1 +async_timeout
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/async_timeout-4.0.2.dist-info/zip-safe
     1 + 
     2 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/__init__.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +import sys
     4 +import warnings
     5 + 
     6 +from functools import partial
     7 + 
     8 +from . import converters, exceptions, filters, setters, validators
     9 +from ._cmp import cmp_using
     10 +from ._config import get_run_validators, set_run_validators
     11 +from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types
     12 +from ._make import (
     13 + NOTHING,
     14 + Attribute,
     15 + Factory,
     16 + attrib,
     17 + attrs,
     18 + fields,
     19 + fields_dict,
     20 + make_class,
     21 + validate,
     22 +)
     23 +from ._next_gen import define, field, frozen, mutable
     24 +from ._version_info import VersionInfo
     25 + 
     26 + 
     27 +if sys.version_info < (3, 7): # pragma: no cover
     28 + warnings.warn(
     29 + "Running attrs on Python 3.6 is deprecated & we intend to drop "
     30 + "support soon. If that's a problem for you, please let us know why & "
     31 + "we MAY re-evaluate: <https://github.com/python-attrs/attrs/pull/993>",
     32 + DeprecationWarning,
     33 + )
     34 + 
     35 +__version__ = "22.2.0"
     36 +__version_info__ = VersionInfo._from_version_string(__version__)
     37 + 
     38 +__title__ = "attrs"
     39 +__description__ = "Classes Without Boilerplate"
     40 +__url__ = "https://www.attrs.org/"
     41 +__uri__ = __url__
     42 +__doc__ = __description__ + " <" + __uri__ + ">"
     43 + 
     44 +__author__ = "Hynek Schlawack"
     45 +__email__ = "[email protected]"
     46 + 
     47 +__license__ = "MIT"
     48 +__copyright__ = "Copyright (c) 2015 Hynek Schlawack"
     49 + 
     50 + 
     51 +s = attributes = attrs
     52 +ib = attr = attrib
     53 +dataclass = partial(attrs, auto_attribs=True) # happy Easter ;)
     54 + 
     55 + 
     56 +class AttrsInstance:
     57 + pass
     58 + 
     59 + 
     60 +__all__ = [
     61 + "Attribute",
     62 + "AttrsInstance",
     63 + "Factory",
     64 + "NOTHING",
     65 + "asdict",
     66 + "assoc",
     67 + "astuple",
     68 + "attr",
     69 + "attrib",
     70 + "attributes",
     71 + "attrs",
     72 + "cmp_using",
     73 + "converters",
     74 + "define",
     75 + "evolve",
     76 + "exceptions",
     77 + "field",
     78 + "fields",
     79 + "fields_dict",
     80 + "filters",
     81 + "frozen",
     82 + "get_run_validators",
     83 + "has",
     84 + "ib",
     85 + "make_class",
     86 + "mutable",
     87 + "resolve_types",
     88 + "s",
     89 + "set_run_validators",
     90 + "setters",
     91 + "validate",
     92 + "validators",
     93 +]
     94 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/__init__.pyi
     1 +import enum
     2 +import sys
     3 + 
     4 +from typing import (
     5 + Any,
     6 + Callable,
     7 + Dict,
     8 + Generic,
     9 + List,
     10 + Mapping,
     11 + Optional,
     12 + Protocol,
     13 + Sequence,
     14 + Tuple,
     15 + Type,
     16 + TypeVar,
     17 + Union,
     18 + overload,
     19 +)
     20 + 
     21 +# `import X as X` is required to make these public
     22 +from . import converters as converters
     23 +from . import exceptions as exceptions
     24 +from . import filters as filters
     25 +from . import setters as setters
     26 +from . import validators as validators
     27 +from ._cmp import cmp_using as cmp_using
     28 +from ._typing_compat import AttrsInstance_
     29 +from ._version_info import VersionInfo
     30 + 
     31 +if sys.version_info >= (3, 10):
     32 + from typing import TypeGuard
     33 +else:
     34 + from typing_extensions import TypeGuard
     35 + 
     36 +__version__: str
     37 +__version_info__: VersionInfo
     38 +__title__: str
     39 +__description__: str
     40 +__url__: str
     41 +__uri__: str
     42 +__author__: str
     43 +__email__: str
     44 +__license__: str
     45 +__copyright__: str
     46 + 
     47 +_T = TypeVar("_T")
     48 +_C = TypeVar("_C", bound=type)
     49 + 
     50 +_EqOrderType = Union[bool, Callable[[Any], Any]]
     51 +_ValidatorType = Callable[[Any, "Attribute[_T]", _T], Any]
     52 +_ConverterType = Callable[[Any], Any]
     53 +_FilterType = Callable[["Attribute[_T]", _T], bool]
     54 +_ReprType = Callable[[Any], str]
     55 +_ReprArgType = Union[bool, _ReprType]
     56 +_OnSetAttrType = Callable[[Any, "Attribute[Any]", Any], Any]
     57 +_OnSetAttrArgType = Union[
     58 + _OnSetAttrType, List[_OnSetAttrType], setters._NoOpType
     59 +]
     60 +_FieldTransformer = Callable[
     61 + [type, List["Attribute[Any]"]], List["Attribute[Any]"]
     62 +]
     63 +# FIXME: in reality, if multiple validators are passed they must be in a list
     64 +# or tuple, but those are invariant and so would prevent subtypes of
     65 +# _ValidatorType from working when passed in a list or tuple.
     66 +_ValidatorArgType = Union[_ValidatorType[_T], Sequence[_ValidatorType[_T]]]
     67 + 
     68 +# We subclass this here to keep the protocol's qualified name clean.
     69 +class AttrsInstance(AttrsInstance_, Protocol):
     70 + pass
     71 + 
     72 +# _make --
     73 + 
     74 +class _Nothing(enum.Enum):
     75 + NOTHING = enum.auto()
     76 + 
     77 +NOTHING = _Nothing.NOTHING
     78 + 
     79 +# NOTE: Factory lies about its return type to make this possible:
     80 +# `x: List[int] # = Factory(list)`
     81 +# Work around mypy issue #4554 in the common case by using an overload.
     82 +if sys.version_info >= (3, 8):
     83 + from typing import Literal
     84 + @overload
     85 + def Factory(factory: Callable[[], _T]) -> _T: ...
     86 + @overload
     87 + def Factory(
     88 + factory: Callable[[Any], _T],
     89 + takes_self: Literal[True],
     90 + ) -> _T: ...
     91 + @overload
     92 + def Factory(
     93 + factory: Callable[[], _T],
     94 + takes_self: Literal[False],
     95 + ) -> _T: ...
     96 + 
     97 +else:
     98 + @overload
     99 + def Factory(factory: Callable[[], _T]) -> _T: ...
     100 + @overload
     101 + def Factory(
     102 + factory: Union[Callable[[Any], _T], Callable[[], _T]],
     103 + takes_self: bool = ...,
     104 + ) -> _T: ...
     105 + 
     106 +# Static type inference support via __dataclass_transform__ implemented as per:
     107 +# https://github.com/microsoft/pyright/blob/1.1.135/specs/dataclass_transforms.md
     108 +# This annotation must be applied to all overloads of "define" and "attrs"
     109 +#
     110 +# NOTE: This is a typing construct and does not exist at runtime. Extensions
     111 +# wrapping attrs decorators should declare a separate __dataclass_transform__
     112 +# signature in the extension module using the specification linked above to
     113 +# provide pyright support.
     114 +def __dataclass_transform__(
     115 + *,
     116 + eq_default: bool = True,
     117 + order_default: bool = False,
     118 + kw_only_default: bool = False,
     119 + field_descriptors: Tuple[Union[type, Callable[..., Any]], ...] = (()),
     120 +) -> Callable[[_T], _T]: ...
     121 + 
     122 +class Attribute(Generic[_T]):
     123 + name: str
     124 + default: Optional[_T]
     125 + validator: Optional[_ValidatorType[_T]]
     126 + repr: _ReprArgType
     127 + cmp: _EqOrderType
     128 + eq: _EqOrderType
     129 + order: _EqOrderType
     130 + hash: Optional[bool]
     131 + init: bool
     132 + converter: Optional[_ConverterType]
     133 + metadata: Dict[Any, Any]
     134 + type: Optional[Type[_T]]
     135 + kw_only: bool
     136 + on_setattr: _OnSetAttrType
     137 + alias: Optional[str]
     138 + 
     139 + def evolve(self, **changes: Any) -> "Attribute[Any]": ...
     140 + 
     141 +# NOTE: We had several choices for the annotation to use for type arg:
     142 +# 1) Type[_T]
     143 +# - Pros: Handles simple cases correctly
     144 +# - Cons: Might produce less informative errors in the case of conflicting
     145 +# TypeVars e.g. `attr.ib(default='bad', type=int)`
     146 +# 2) Callable[..., _T]
     147 +# - Pros: Better error messages than #1 for conflicting TypeVars
     148 +# - Cons: Terrible error messages for validator checks.
     149 +# e.g. attr.ib(type=int, validator=validate_str)
     150 +# -> error: Cannot infer function type argument
     151 +# 3) type (and do all of the work in the mypy plugin)
     152 +# - Pros: Simple here, and we could customize the plugin with our own errors.
     153 +# - Cons: Would need to write mypy plugin code to handle all the cases.
     154 +# We chose option #1.
     155 + 
     156 +# `attr` lies about its return type to make the following possible:
     157 +# attr() -> Any
     158 +# attr(8) -> int
     159 +# attr(validator=<some callable>) -> Whatever the callable expects.
     160 +# This makes this type of assignments possible:
     161 +# x: int = attr(8)
     162 +#
     163 +# This form catches explicit None or no default but with no other arguments
     164 +# returns Any.
     165 +@overload
     166 +def attrib(
     167 + default: None = ...,
     168 + validator: None = ...,
     169 + repr: _ReprArgType = ...,
     170 + cmp: Optional[_EqOrderType] = ...,
     171 + hash: Optional[bool] = ...,
     172 + init: bool = ...,
     173 + metadata: Optional[Mapping[Any, Any]] = ...,
     174 + type: None = ...,
     175 + converter: None = ...,
     176 + factory: None = ...,
     177 + kw_only: bool = ...,
     178 + eq: Optional[_EqOrderType] = ...,
     179 + order: Optional[_EqOrderType] = ...,
     180 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     181 + alias: Optional[str] = ...,
     182 +) -> Any: ...
     183 + 
     184 +# This form catches an explicit None or no default and infers the type from the
     185 +# other arguments.
     186 +@overload
     187 +def attrib(
     188 + default: None = ...,
     189 + validator: Optional[_ValidatorArgType[_T]] = ...,
     190 + repr: _ReprArgType = ...,
     191 + cmp: Optional[_EqOrderType] = ...,
     192 + hash: Optional[bool] = ...,
     193 + init: bool = ...,
     194 + metadata: Optional[Mapping[Any, Any]] = ...,
     195 + type: Optional[Type[_T]] = ...,
     196 + converter: Optional[_ConverterType] = ...,
     197 + factory: Optional[Callable[[], _T]] = ...,
     198 + kw_only: bool = ...,
     199 + eq: Optional[_EqOrderType] = ...,
     200 + order: Optional[_EqOrderType] = ...,
     201 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     202 + alias: Optional[str] = ...,
     203 +) -> _T: ...
     204 + 
     205 +# This form catches an explicit default argument.
     206 +@overload
     207 +def attrib(
     208 + default: _T,
     209 + validator: Optional[_ValidatorArgType[_T]] = ...,
     210 + repr: _ReprArgType = ...,
     211 + cmp: Optional[_EqOrderType] = ...,
     212 + hash: Optional[bool] = ...,
     213 + init: bool = ...,
     214 + metadata: Optional[Mapping[Any, Any]] = ...,
     215 + type: Optional[Type[_T]] = ...,
     216 + converter: Optional[_ConverterType] = ...,
     217 + factory: Optional[Callable[[], _T]] = ...,
     218 + kw_only: bool = ...,
     219 + eq: Optional[_EqOrderType] = ...,
     220 + order: Optional[_EqOrderType] = ...,
     221 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     222 + alias: Optional[str] = ...,
     223 +) -> _T: ...
     224 + 
     225 +# This form covers type=non-Type: e.g. forward references (str), Any
     226 +@overload
     227 +def attrib(
     228 + default: Optional[_T] = ...,
     229 + validator: Optional[_ValidatorArgType[_T]] = ...,
     230 + repr: _ReprArgType = ...,
     231 + cmp: Optional[_EqOrderType] = ...,
     232 + hash: Optional[bool] = ...,
     233 + init: bool = ...,
     234 + metadata: Optional[Mapping[Any, Any]] = ...,
     235 + type: object = ...,
     236 + converter: Optional[_ConverterType] = ...,
     237 + factory: Optional[Callable[[], _T]] = ...,
     238 + kw_only: bool = ...,
     239 + eq: Optional[_EqOrderType] = ...,
     240 + order: Optional[_EqOrderType] = ...,
     241 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     242 + alias: Optional[str] = ...,
     243 +) -> Any: ...
     244 +@overload
     245 +def field(
     246 + *,
     247 + default: None = ...,
     248 + validator: None = ...,
     249 + repr: _ReprArgType = ...,
     250 + hash: Optional[bool] = ...,
     251 + init: bool = ...,
     252 + metadata: Optional[Mapping[Any, Any]] = ...,
     253 + converter: None = ...,
     254 + factory: None = ...,
     255 + kw_only: bool = ...,
     256 + eq: Optional[bool] = ...,
     257 + order: Optional[bool] = ...,
     258 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     259 + alias: Optional[str] = ...,
     260 +) -> Any: ...
     261 + 
     262 +# This form catches an explicit None or no default and infers the type from the
     263 +# other arguments.
     264 +@overload
     265 +def field(
     266 + *,
     267 + default: None = ...,
     268 + validator: Optional[_ValidatorArgType[_T]] = ...,
     269 + repr: _ReprArgType = ...,
     270 + hash: Optional[bool] = ...,
     271 + init: bool = ...,
     272 + metadata: Optional[Mapping[Any, Any]] = ...,
     273 + converter: Optional[_ConverterType] = ...,
     274 + factory: Optional[Callable[[], _T]] = ...,
     275 + kw_only: bool = ...,
     276 + eq: Optional[_EqOrderType] = ...,
     277 + order: Optional[_EqOrderType] = ...,
     278 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     279 + alias: Optional[str] = ...,
     280 +) -> _T: ...
     281 + 
     282 +# This form catches an explicit default argument.
     283 +@overload
     284 +def field(
     285 + *,
     286 + default: _T,
     287 + validator: Optional[_ValidatorArgType[_T]] = ...,
     288 + repr: _ReprArgType = ...,
     289 + hash: Optional[bool] = ...,
     290 + init: bool = ...,
     291 + metadata: Optional[Mapping[Any, Any]] = ...,
     292 + converter: Optional[_ConverterType] = ...,
     293 + factory: Optional[Callable[[], _T]] = ...,
     294 + kw_only: bool = ...,
     295 + eq: Optional[_EqOrderType] = ...,
     296 + order: Optional[_EqOrderType] = ...,
     297 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     298 + alias: Optional[str] = ...,
     299 +) -> _T: ...
     300 + 
     301 +# This form covers type=non-Type: e.g. forward references (str), Any
     302 +@overload
     303 +def field(
     304 + *,
     305 + default: Optional[_T] = ...,
     306 + validator: Optional[_ValidatorArgType[_T]] = ...,
     307 + repr: _ReprArgType = ...,
     308 + hash: Optional[bool] = ...,
     309 + init: bool = ...,
     310 + metadata: Optional[Mapping[Any, Any]] = ...,
     311 + converter: Optional[_ConverterType] = ...,
     312 + factory: Optional[Callable[[], _T]] = ...,
     313 + kw_only: bool = ...,
     314 + eq: Optional[_EqOrderType] = ...,
     315 + order: Optional[_EqOrderType] = ...,
     316 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     317 + alias: Optional[str] = ...,
     318 +) -> Any: ...
     319 +@overload
     320 +@__dataclass_transform__(order_default=True, field_descriptors=(attrib, field))
     321 +def attrs(
     322 + maybe_cls: _C,
     323 + these: Optional[Dict[str, Any]] = ...,
     324 + repr_ns: Optional[str] = ...,
     325 + repr: bool = ...,
     326 + cmp: Optional[_EqOrderType] = ...,
     327 + hash: Optional[bool] = ...,
     328 + init: bool = ...,
     329 + slots: bool = ...,
     330 + frozen: bool = ...,
     331 + weakref_slot: bool = ...,
     332 + str: bool = ...,
     333 + auto_attribs: bool = ...,
     334 + kw_only: bool = ...,
     335 + cache_hash: bool = ...,
     336 + auto_exc: bool = ...,
     337 + eq: Optional[_EqOrderType] = ...,
     338 + order: Optional[_EqOrderType] = ...,
     339 + auto_detect: bool = ...,
     340 + collect_by_mro: bool = ...,
     341 + getstate_setstate: Optional[bool] = ...,
     342 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     343 + field_transformer: Optional[_FieldTransformer] = ...,
     344 + match_args: bool = ...,
     345 + unsafe_hash: Optional[bool] = ...,
     346 +) -> _C: ...
     347 +@overload
     348 +@__dataclass_transform__(order_default=True, field_descriptors=(attrib, field))
     349 +def attrs(
     350 + maybe_cls: None = ...,
     351 + these: Optional[Dict[str, Any]] = ...,
     352 + repr_ns: Optional[str] = ...,
     353 + repr: bool = ...,
     354 + cmp: Optional[_EqOrderType] = ...,
     355 + hash: Optional[bool] = ...,
     356 + init: bool = ...,
     357 + slots: bool = ...,
     358 + frozen: bool = ...,
     359 + weakref_slot: bool = ...,
     360 + str: bool = ...,
     361 + auto_attribs: bool = ...,
     362 + kw_only: bool = ...,
     363 + cache_hash: bool = ...,
     364 + auto_exc: bool = ...,
     365 + eq: Optional[_EqOrderType] = ...,
     366 + order: Optional[_EqOrderType] = ...,
     367 + auto_detect: bool = ...,
     368 + collect_by_mro: bool = ...,
     369 + getstate_setstate: Optional[bool] = ...,
     370 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     371 + field_transformer: Optional[_FieldTransformer] = ...,
     372 + match_args: bool = ...,
     373 + unsafe_hash: Optional[bool] = ...,
     374 +) -> Callable[[_C], _C]: ...
     375 +@overload
     376 +@__dataclass_transform__(field_descriptors=(attrib, field))
     377 +def define(
     378 + maybe_cls: _C,
     379 + *,
     380 + these: Optional[Dict[str, Any]] = ...,
     381 + repr: bool = ...,
     382 + unsafe_hash: Optional[bool] = ...,
     383 + hash: Optional[bool] = ...,
     384 + init: bool = ...,
     385 + slots: bool = ...,
     386 + frozen: bool = ...,
     387 + weakref_slot: bool = ...,
     388 + str: bool = ...,
     389 + auto_attribs: bool = ...,
     390 + kw_only: bool = ...,
     391 + cache_hash: bool = ...,
     392 + auto_exc: bool = ...,
     393 + eq: Optional[bool] = ...,
     394 + order: Optional[bool] = ...,
     395 + auto_detect: bool = ...,
     396 + getstate_setstate: Optional[bool] = ...,
     397 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     398 + field_transformer: Optional[_FieldTransformer] = ...,
     399 + match_args: bool = ...,
     400 +) -> _C: ...
     401 +@overload
     402 +@__dataclass_transform__(field_descriptors=(attrib, field))
     403 +def define(
     404 + maybe_cls: None = ...,
     405 + *,
     406 + these: Optional[Dict[str, Any]] = ...,
     407 + repr: bool = ...,
     408 + unsafe_hash: Optional[bool] = ...,
     409 + hash: Optional[bool] = ...,
     410 + init: bool = ...,
     411 + slots: bool = ...,
     412 + frozen: bool = ...,
     413 + weakref_slot: bool = ...,
     414 + str: bool = ...,
     415 + auto_attribs: bool = ...,
     416 + kw_only: bool = ...,
     417 + cache_hash: bool = ...,
     418 + auto_exc: bool = ...,
     419 + eq: Optional[bool] = ...,
     420 + order: Optional[bool] = ...,
     421 + auto_detect: bool = ...,
     422 + getstate_setstate: Optional[bool] = ...,
     423 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     424 + field_transformer: Optional[_FieldTransformer] = ...,
     425 + match_args: bool = ...,
     426 +) -> Callable[[_C], _C]: ...
     427 + 
     428 +mutable = define
     429 +frozen = define # they differ only in their defaults
     430 + 
     431 +def fields(cls: Type[AttrsInstance]) -> Any: ...
     432 +def fields_dict(cls: Type[AttrsInstance]) -> Dict[str, Attribute[Any]]: ...
     433 +def validate(inst: AttrsInstance) -> None: ...
     434 +def resolve_types(
     435 + cls: _C,
     436 + globalns: Optional[Dict[str, Any]] = ...,
     437 + localns: Optional[Dict[str, Any]] = ...,
     438 + attribs: Optional[List[Attribute[Any]]] = ...,
     439 +) -> _C: ...
     440 + 
     441 +# TODO: add support for returning a proper attrs class from the mypy plugin
     442 +# we use Any instead of _CountingAttr so that e.g. `make_class('Foo',
     443 +# [attr.ib()])` is valid
     444 +def make_class(
     445 + name: str,
     446 + attrs: Union[List[str], Tuple[str, ...], Dict[str, Any]],
     447 + bases: Tuple[type, ...] = ...,
     448 + repr_ns: Optional[str] = ...,
     449 + repr: bool = ...,
     450 + cmp: Optional[_EqOrderType] = ...,
     451 + hash: Optional[bool] = ...,
     452 + init: bool = ...,
     453 + slots: bool = ...,
     454 + frozen: bool = ...,
     455 + weakref_slot: bool = ...,
     456 + str: bool = ...,
     457 + auto_attribs: bool = ...,
     458 + kw_only: bool = ...,
     459 + cache_hash: bool = ...,
     460 + auto_exc: bool = ...,
     461 + eq: Optional[_EqOrderType] = ...,
     462 + order: Optional[_EqOrderType] = ...,
     463 + collect_by_mro: bool = ...,
     464 + on_setattr: Optional[_OnSetAttrArgType] = ...,
     465 + field_transformer: Optional[_FieldTransformer] = ...,
     466 +) -> type: ...
     467 + 
     468 +# _funcs --
     469 + 
     470 +# TODO: add support for returning TypedDict from the mypy plugin
     471 +# FIXME: asdict/astuple do not honor their factory args. Waiting on one of
     472 +# these:
     473 +# https://github.com/python/mypy/issues/4236
     474 +# https://github.com/python/typing/issues/253
     475 +# XXX: remember to fix attrs.asdict/astuple too!
     476 +def asdict(
     477 + inst: AttrsInstance,
     478 + recurse: bool = ...,
     479 + filter: Optional[_FilterType[Any]] = ...,
     480 + dict_factory: Type[Mapping[Any, Any]] = ...,
     481 + retain_collection_types: bool = ...,
     482 + value_serializer: Optional[
     483 + Callable[[type, Attribute[Any], Any], Any]
     484 + ] = ...,
     485 + tuple_keys: Optional[bool] = ...,
     486 +) -> Dict[str, Any]: ...
     487 + 
     488 +# TODO: add support for returning NamedTuple from the mypy plugin
     489 +def astuple(
     490 + inst: AttrsInstance,
     491 + recurse: bool = ...,
     492 + filter: Optional[_FilterType[Any]] = ...,
     493 + tuple_factory: Type[Sequence[Any]] = ...,
     494 + retain_collection_types: bool = ...,
     495 +) -> Tuple[Any, ...]: ...
     496 +def has(cls: type) -> TypeGuard[Type[AttrsInstance]]: ...
     497 +def assoc(inst: _T, **changes: Any) -> _T: ...
     498 +def evolve(inst: _T, **changes: Any) -> _T: ...
     499 + 
     500 +# _config --
     501 + 
     502 +def set_run_validators(run: bool) -> None: ...
     503 +def get_run_validators() -> bool: ...
     504 + 
     505 +# aliases --
     506 + 
     507 +s = attributes = attrs
     508 +ib = attr = attrib
     509 +dataclass = attrs # Technically, partial(attrs, auto_attribs=True) ;)
     510 + 
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/__init__.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_cmp.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_compat.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_config.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_funcs.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_make.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_next_gen.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/_version_info.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/converters.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/exceptions.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/filters.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/setters.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attr/__pycache__/validators.cpython-311.pyc
    Binary file.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_cmp.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 + 
     4 +import functools
     5 +import types
     6 + 
     7 +from ._make import _make_ne
     8 + 
     9 + 
     10 +_operation_names = {"eq": "==", "lt": "<", "le": "<=", "gt": ">", "ge": ">="}
     11 + 
     12 + 
     13 +def cmp_using(
     14 + eq=None,
     15 + lt=None,
     16 + le=None,
     17 + gt=None,
     18 + ge=None,
     19 + require_same_type=True,
     20 + class_name="Comparable",
     21 +):
     22 + """
     23 + Create a class that can be passed into `attr.ib`'s ``eq``, ``order``, and
     24 + ``cmp`` arguments to customize field comparison.
     25 + 
     26 + The resulting class will have a full set of ordering methods if
     27 + at least one of ``{lt, le, gt, ge}`` and ``eq`` are provided.
     28 + 
     29 + :param Optional[callable] eq: `callable` used to evaluate equality
     30 + of two objects.
     31 + :param Optional[callable] lt: `callable` used to evaluate whether
     32 + one object is less than another object.
     33 + :param Optional[callable] le: `callable` used to evaluate whether
     34 + one object is less than or equal to another object.
     35 + :param Optional[callable] gt: `callable` used to evaluate whether
     36 + one object is greater than another object.
     37 + :param Optional[callable] ge: `callable` used to evaluate whether
     38 + one object is greater than or equal to another object.
     39 + 
     40 + :param bool require_same_type: When `True`, equality and ordering methods
     41 + will return `NotImplemented` if objects are not of the same type.
     42 + 
     43 + :param Optional[str] class_name: Name of class. Defaults to 'Comparable'.
     44 + 
     45 + See `comparison` for more details.
     46 + 
     47 + .. versionadded:: 21.1.0
     48 + """
     49 + 
     50 + body = {
     51 + "__slots__": ["value"],
     52 + "__init__": _make_init(),
     53 + "_requirements": [],
     54 + "_is_comparable_to": _is_comparable_to,
     55 + }
     56 + 
     57 + # Add operations.
     58 + num_order_functions = 0
     59 + has_eq_function = False
     60 + 
     61 + if eq is not None:
     62 + has_eq_function = True
     63 + body["__eq__"] = _make_operator("eq", eq)
     64 + body["__ne__"] = _make_ne()
     65 + 
     66 + if lt is not None:
     67 + num_order_functions += 1
     68 + body["__lt__"] = _make_operator("lt", lt)
     69 + 
     70 + if le is not None:
     71 + num_order_functions += 1
     72 + body["__le__"] = _make_operator("le", le)
     73 + 
     74 + if gt is not None:
     75 + num_order_functions += 1
     76 + body["__gt__"] = _make_operator("gt", gt)
     77 + 
     78 + if ge is not None:
     79 + num_order_functions += 1
     80 + body["__ge__"] = _make_operator("ge", ge)
     81 + 
     82 + type_ = types.new_class(
     83 + class_name, (object,), {}, lambda ns: ns.update(body)
     84 + )
     85 + 
     86 + # Add same type requirement.
     87 + if require_same_type:
     88 + type_._requirements.append(_check_same_type)
     89 + 
     90 + # Add total ordering if at least one operation was defined.
     91 + if 0 < num_order_functions < 4:
     92 + if not has_eq_function:
     93 + # functools.total_ordering requires __eq__ to be defined,
     94 + # so raise early error here to keep a nice stack.
     95 + raise ValueError(
     96 + "eq must be define is order to complete ordering from "
     97 + "lt, le, gt, ge."
     98 + )
     99 + type_ = functools.total_ordering(type_)
     100 + 
     101 + return type_
     102 + 
     103 + 
     104 +def _make_init():
     105 + """
     106 + Create __init__ method.
     107 + """
     108 + 
     109 + def __init__(self, value):
     110 + """
     111 + Initialize object with *value*.
     112 + """
     113 + self.value = value
     114 + 
     115 + return __init__
     116 + 
     117 + 
     118 +def _make_operator(name, func):
     119 + """
     120 + Create operator method.
     121 + """
     122 + 
     123 + def method(self, other):
     124 + if not self._is_comparable_to(other):
     125 + return NotImplemented
     126 + 
     127 + result = func(self.value, other.value)
     128 + if result is NotImplemented:
     129 + return NotImplemented
     130 + 
     131 + return result
     132 + 
     133 + method.__name__ = f"__{name}__"
     134 + method.__doc__ = (
     135 + f"Return a {_operation_names[name]} b. Computed by attrs."
     136 + )
     137 + 
     138 + return method
     139 + 
     140 + 
     141 +def _is_comparable_to(self, other):
     142 + """
     143 + Check whether `other` is comparable to `self`.
     144 + """
     145 + for func in self._requirements:
     146 + if not func(self, other):
     147 + return False
     148 + return True
     149 + 
     150 + 
     151 +def _check_same_type(self, other):
     152 + """
     153 + Return True if *self* and *other* are of the same type, False otherwise.
     154 + """
     155 + return other.value.__class__ is self.value.__class__
     156 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_cmp.pyi
     1 +from typing import Any, Callable, Optional, Type
     2 + 
     3 +_CompareWithType = Callable[[Any, Any], bool]
     4 + 
     5 +def cmp_using(
     6 + eq: Optional[_CompareWithType] = ...,
     7 + lt: Optional[_CompareWithType] = ...,
     8 + le: Optional[_CompareWithType] = ...,
     9 + gt: Optional[_CompareWithType] = ...,
     10 + ge: Optional[_CompareWithType] = ...,
     11 + require_same_type: bool = ...,
     12 + class_name: str = ...,
     13 +) -> Type: ...
     14 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_compat.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 + 
     4 +import inspect
     5 +import platform
     6 +import sys
     7 +import threading
     8 +import types
     9 +import warnings
     10 + 
     11 +from collections.abc import Mapping, Sequence # noqa
     12 + 
     13 + 
     14 +PYPY = platform.python_implementation() == "PyPy"
     15 +PY310 = sys.version_info[:2] >= (3, 10)
     16 +PY_3_12_PLUS = sys.version_info[:2] >= (3, 12)
     17 + 
     18 + 
     19 +def just_warn(*args, **kw):
     20 + warnings.warn(
     21 + "Running interpreter doesn't sufficiently support code object "
     22 + "introspection. Some features like bare super() or accessing "
     23 + "__class__ will not work with slotted classes.",
     24 + RuntimeWarning,
     25 + stacklevel=2,
     26 + )
     27 + 
     28 + 
     29 +class _AnnotationExtractor:
     30 + """
     31 + Extract type annotations from a callable, returning None whenever there
     32 + is none.
     33 + """
     34 + 
     35 + __slots__ = ["sig"]
     36 + 
     37 + def __init__(self, callable):
     38 + try:
     39 + self.sig = inspect.signature(callable)
     40 + except (ValueError, TypeError): # inspect failed
     41 + self.sig = None
     42 + 
     43 + def get_first_param_type(self):
     44 + """
     45 + Return the type annotation of the first argument if it's not empty.
     46 + """
     47 + if not self.sig:
     48 + return None
     49 + 
     50 + params = list(self.sig.parameters.values())
     51 + if params and params[0].annotation is not inspect.Parameter.empty:
     52 + return params[0].annotation
     53 + 
     54 + return None
     55 + 
     56 + def get_return_type(self):
     57 + """
     58 + Return the return type if it's not empty.
     59 + """
     60 + if (
     61 + self.sig
     62 + and self.sig.return_annotation is not inspect.Signature.empty
     63 + ):
     64 + return self.sig.return_annotation
     65 + 
     66 + return None
     67 + 
     68 + 
     69 +def make_set_closure_cell():
     70 + """Return a function of two arguments (cell, value) which sets
     71 + the value stored in the closure cell `cell` to `value`.
     72 + """
     73 + # pypy makes this easy. (It also supports the logic below, but
     74 + # why not do the easy/fast thing?)
     75 + if PYPY:
     76 + 
     77 + def set_closure_cell(cell, value):
     78 + cell.__setstate__((value,))
     79 + 
     80 + return set_closure_cell
     81 + 
     82 + # Otherwise gotta do it the hard way.
     83 + 
     84 + # Create a function that will set its first cellvar to `value`.
     85 + def set_first_cellvar_to(value):
     86 + x = value
     87 + return
     88 + 
     89 + # This function will be eliminated as dead code, but
     90 + # not before its reference to `x` forces `x` to be
     91 + # represented as a closure cell rather than a local.
     92 + def force_x_to_be_a_cell(): # pragma: no cover
     93 + return x
     94 + 
     95 + try:
     96 + # Extract the code object and make sure our assumptions about
     97 + # the closure behavior are correct.
     98 + co = set_first_cellvar_to.__code__
     99 + if co.co_cellvars != ("x",) or co.co_freevars != ():
     100 + raise AssertionError # pragma: no cover
     101 + 
     102 + # Convert this code object to a code object that sets the
     103 + # function's first _freevar_ (not cellvar) to the argument.
     104 + if sys.version_info >= (3, 8):
     105 + 
     106 + def set_closure_cell(cell, value):
     107 + cell.cell_contents = value
     108 + 
     109 + else:
     110 + args = [co.co_argcount]
     111 + args.append(co.co_kwonlyargcount)
     112 + args.extend(
     113 + [
     114 + co.co_nlocals,
     115 + co.co_stacksize,
     116 + co.co_flags,
     117 + co.co_code,
     118 + co.co_consts,
     119 + co.co_names,
     120 + co.co_varnames,
     121 + co.co_filename,
     122 + co.co_name,
     123 + co.co_firstlineno,
     124 + co.co_lnotab,
     125 + # These two arguments are reversed:
     126 + co.co_cellvars,
     127 + co.co_freevars,
     128 + ]
     129 + )
     130 + set_first_freevar_code = types.CodeType(*args)
     131 + 
     132 + def set_closure_cell(cell, value):
     133 + # Create a function using the set_first_freevar_code,
     134 + # whose first closure cell is `cell`. Calling it will
     135 + # change the value of that cell.
     136 + setter = types.FunctionType(
     137 + set_first_freevar_code, {}, "setter", (), (cell,)
     138 + )
     139 + # And call it to set the cell.
     140 + setter(value)
     141 + 
     142 + # Make sure it works on this interpreter:
     143 + def make_func_with_cell():
     144 + x = None
     145 + 
     146 + def func():
     147 + return x # pragma: no cover
     148 + 
     149 + return func
     150 + 
     151 + cell = make_func_with_cell().__closure__[0]
     152 + set_closure_cell(cell, 100)
     153 + if cell.cell_contents != 100:
     154 + raise AssertionError # pragma: no cover
     155 + 
     156 + except Exception:
     157 + return just_warn
     158 + else:
     159 + return set_closure_cell
     160 + 
     161 + 
     162 +set_closure_cell = make_set_closure_cell()
     163 + 
     164 +# Thread-local global to track attrs instances which are already being repr'd.
     165 +# This is needed because there is no other (thread-safe) way to pass info
     166 +# about the instances that are already being repr'd through the call stack
     167 +# in order to ensure we don't perform infinite recursion.
     168 +#
     169 +# For instance, if an instance contains a dict which contains that instance,
     170 +# we need to know that we're already repr'ing the outside instance from within
     171 +# the dict's repr() call.
     172 +#
     173 +# This lives here rather than in _make.py so that the functions in _make.py
     174 +# don't have a direct reference to the thread-local in their globals dict.
     175 +# If they have such a reference, it breaks cloudpickle.
     176 +repr_context = threading.local()
     177 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_config.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 + 
     4 +__all__ = ["set_run_validators", "get_run_validators"]
     5 + 
     6 +_run_validators = True
     7 + 
     8 + 
     9 +def set_run_validators(run):
     10 + """
     11 + Set whether or not validators are run. By default, they are run.
     12 + 
     13 + .. deprecated:: 21.3.0 It will not be removed, but it also will not be
     14 + moved to new ``attrs`` namespace. Use `attrs.validators.set_disabled()`
     15 + instead.
     16 + """
     17 + if not isinstance(run, bool):
     18 + raise TypeError("'run' must be bool.")
     19 + global _run_validators
     20 + _run_validators = run
     21 + 
     22 + 
     23 +def get_run_validators():
     24 + """
     25 + Return whether or not validators are run.
     26 + 
     27 + .. deprecated:: 21.3.0 It will not be removed, but it also will not be
     28 + moved to new ``attrs`` namespace. Use `attrs.validators.get_disabled()`
     29 + instead.
     30 + """
     31 + return _run_validators
     32 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_funcs.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 + 
     4 +import copy
     5 + 
     6 +from ._make import NOTHING, _obj_setattr, fields
     7 +from .exceptions import AttrsAttributeNotFoundError
     8 + 
     9 + 
     10 +def asdict(
     11 + inst,
     12 + recurse=True,
     13 + filter=None,
     14 + dict_factory=dict,
     15 + retain_collection_types=False,
     16 + value_serializer=None,
     17 +):
     18 + """
     19 + Return the ``attrs`` attribute values of *inst* as a dict.
     20 + 
     21 + Optionally recurse into other ``attrs``-decorated classes.
     22 + 
     23 + :param inst: Instance of an ``attrs``-decorated class.
     24 + :param bool recurse: Recurse into classes that are also
     25 + ``attrs``-decorated.
     26 + :param callable filter: A callable whose return code determines whether an
     27 + attribute or element is included (``True``) or dropped (``False``). Is
     28 + called with the `attrs.Attribute` as the first argument and the
     29 + value as the second argument.
     30 + :param callable dict_factory: A callable to produce dictionaries from. For
     31 + example, to produce ordered dictionaries instead of normal Python
     32 + dictionaries, pass in ``collections.OrderedDict``.
     33 + :param bool retain_collection_types: Do not convert to ``list`` when
     34 + encountering an attribute whose type is ``tuple`` or ``set``. Only
     35 + meaningful if ``recurse`` is ``True``.
     36 + :param Optional[callable] value_serializer: A hook that is called for every
     37 + attribute or dict key/value. It receives the current instance, field
     38 + and value and must return the (updated) value. The hook is run *after*
     39 + the optional *filter* has been applied.
     40 + 
     41 + :rtype: return type of *dict_factory*
     42 + 
     43 + :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
     44 + class.
     45 + 
     46 + .. versionadded:: 16.0.0 *dict_factory*
     47 + .. versionadded:: 16.1.0 *retain_collection_types*
     48 + .. versionadded:: 20.3.0 *value_serializer*
     49 + .. versionadded:: 21.3.0 If a dict has a collection for a key, it is
     50 + serialized as a tuple.
     51 + """
     52 + attrs = fields(inst.__class__)
     53 + rv = dict_factory()
     54 + for a in attrs:
     55 + v = getattr(inst, a.name)
     56 + if filter is not None and not filter(a, v):
     57 + continue
     58 + 
     59 + if value_serializer is not None:
     60 + v = value_serializer(inst, a, v)
     61 + 
     62 + if recurse is True:
     63 + if has(v.__class__):
     64 + rv[a.name] = asdict(
     65 + v,
     66 + recurse=True,
     67 + filter=filter,
     68 + dict_factory=dict_factory,
     69 + retain_collection_types=retain_collection_types,
     70 + value_serializer=value_serializer,
     71 + )
     72 + elif isinstance(v, (tuple, list, set, frozenset)):
     73 + cf = v.__class__ if retain_collection_types is True else list
     74 + rv[a.name] = cf(
     75 + [
     76 + _asdict_anything(
     77 + i,
     78 + is_key=False,
     79 + filter=filter,
     80 + dict_factory=dict_factory,
     81 + retain_collection_types=retain_collection_types,
     82 + value_serializer=value_serializer,
     83 + )
     84 + for i in v
     85 + ]
     86 + )
     87 + elif isinstance(v, dict):
     88 + df = dict_factory
     89 + rv[a.name] = df(
     90 + (
     91 + _asdict_anything(
     92 + kk,
     93 + is_key=True,
     94 + filter=filter,
     95 + dict_factory=df,
     96 + retain_collection_types=retain_collection_types,
     97 + value_serializer=value_serializer,
     98 + ),
     99 + _asdict_anything(
     100 + vv,
     101 + is_key=False,
     102 + filter=filter,
     103 + dict_factory=df,
     104 + retain_collection_types=retain_collection_types,
     105 + value_serializer=value_serializer,
     106 + ),
     107 + )
     108 + for kk, vv in v.items()
     109 + )
     110 + else:
     111 + rv[a.name] = v
     112 + else:
     113 + rv[a.name] = v
     114 + return rv
     115 + 
     116 + 
     117 +def _asdict_anything(
     118 + val,
     119 + is_key,
     120 + filter,
     121 + dict_factory,
     122 + retain_collection_types,
     123 + value_serializer,
     124 +):
     125 + """
     126 + ``asdict`` only works on attrs instances, this works on anything.
     127 + """
     128 + if getattr(val.__class__, "__attrs_attrs__", None) is not None:
     129 + # Attrs class.
     130 + rv = asdict(
     131 + val,
     132 + recurse=True,
     133 + filter=filter,
     134 + dict_factory=dict_factory,
     135 + retain_collection_types=retain_collection_types,
     136 + value_serializer=value_serializer,
     137 + )
     138 + elif isinstance(val, (tuple, list, set, frozenset)):
     139 + if retain_collection_types is True:
     140 + cf = val.__class__
     141 + elif is_key:
     142 + cf = tuple
     143 + else:
     144 + cf = list
     145 + 
     146 + rv = cf(
     147 + [
     148 + _asdict_anything(
     149 + i,
     150 + is_key=False,
     151 + filter=filter,
     152 + dict_factory=dict_factory,
     153 + retain_collection_types=retain_collection_types,
     154 + value_serializer=value_serializer,
     155 + )
     156 + for i in val
     157 + ]
     158 + )
     159 + elif isinstance(val, dict):
     160 + df = dict_factory
     161 + rv = df(
     162 + (
     163 + _asdict_anything(
     164 + kk,
     165 + is_key=True,
     166 + filter=filter,
     167 + dict_factory=df,
     168 + retain_collection_types=retain_collection_types,
     169 + value_serializer=value_serializer,
     170 + ),
     171 + _asdict_anything(
     172 + vv,
     173 + is_key=False,
     174 + filter=filter,
     175 + dict_factory=df,
     176 + retain_collection_types=retain_collection_types,
     177 + value_serializer=value_serializer,
     178 + ),
     179 + )
     180 + for kk, vv in val.items()
     181 + )
     182 + else:
     183 + rv = val
     184 + if value_serializer is not None:
     185 + rv = value_serializer(None, None, rv)
     186 + 
     187 + return rv
     188 + 
     189 + 
     190 +def astuple(
     191 + inst,
     192 + recurse=True,
     193 + filter=None,
     194 + tuple_factory=tuple,
     195 + retain_collection_types=False,
     196 +):
     197 + """
     198 + Return the ``attrs`` attribute values of *inst* as a tuple.
     199 + 
     200 + Optionally recurse into other ``attrs``-decorated classes.
     201 + 
     202 + :param inst: Instance of an ``attrs``-decorated class.
     203 + :param bool recurse: Recurse into classes that are also
     204 + ``attrs``-decorated.
     205 + :param callable filter: A callable whose return code determines whether an
     206 + attribute or element is included (``True``) or dropped (``False``). Is
     207 + called with the `attrs.Attribute` as the first argument and the
     208 + value as the second argument.
     209 + :param callable tuple_factory: A callable to produce tuples from. For
     210 + example, to produce lists instead of tuples.
     211 + :param bool retain_collection_types: Do not convert to ``list``
     212 + or ``dict`` when encountering an attribute which type is
     213 + ``tuple``, ``dict`` or ``set``. Only meaningful if ``recurse`` is
     214 + ``True``.
     215 + 
     216 + :rtype: return type of *tuple_factory*
     217 + 
     218 + :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
     219 + class.
     220 + 
     221 + .. versionadded:: 16.2.0
     222 + """
     223 + attrs = fields(inst.__class__)
     224 + rv = []
     225 + retain = retain_collection_types # Very long. :/
     226 + for a in attrs:
     227 + v = getattr(inst, a.name)
     228 + if filter is not None and not filter(a, v):
     229 + continue
     230 + if recurse is True:
     231 + if has(v.__class__):
     232 + rv.append(
     233 + astuple(
     234 + v,
     235 + recurse=True,
     236 + filter=filter,
     237 + tuple_factory=tuple_factory,
     238 + retain_collection_types=retain,
     239 + )
     240 + )
     241 + elif isinstance(v, (tuple, list, set, frozenset)):
     242 + cf = v.__class__ if retain is True else list
     243 + rv.append(
     244 + cf(
     245 + [
     246 + astuple(
     247 + j,
     248 + recurse=True,
     249 + filter=filter,
     250 + tuple_factory=tuple_factory,
     251 + retain_collection_types=retain,
     252 + )
     253 + if has(j.__class__)
     254 + else j
     255 + for j in v
     256 + ]
     257 + )
     258 + )
     259 + elif isinstance(v, dict):
     260 + df = v.__class__ if retain is True else dict
     261 + rv.append(
     262 + df(
     263 + (
     264 + astuple(
     265 + kk,
     266 + tuple_factory=tuple_factory,
     267 + retain_collection_types=retain,
     268 + )
     269 + if has(kk.__class__)
     270 + else kk,
     271 + astuple(
     272 + vv,
     273 + tuple_factory=tuple_factory,
     274 + retain_collection_types=retain,
     275 + )
     276 + if has(vv.__class__)
     277 + else vv,
     278 + )
     279 + for kk, vv in v.items()
     280 + )
     281 + )
     282 + else:
     283 + rv.append(v)
     284 + else:
     285 + rv.append(v)
     286 + 
     287 + return rv if tuple_factory is list else tuple_factory(rv)
     288 + 
     289 + 
     290 +def has(cls):
     291 + """
     292 + Check whether *cls* is a class with ``attrs`` attributes.
     293 + 
     294 + :param type cls: Class to introspect.
     295 + :raise TypeError: If *cls* is not a class.
     296 + 
     297 + :rtype: bool
     298 + """
     299 + return getattr(cls, "__attrs_attrs__", None) is not None
     300 + 
     301 + 
     302 +def assoc(inst, **changes):
     303 + """
     304 + Copy *inst* and apply *changes*.
     305 + 
     306 + :param inst: Instance of a class with ``attrs`` attributes.
     307 + :param changes: Keyword changes in the new copy.
     308 + 
     309 + :return: A copy of inst with *changes* incorporated.
     310 + 
     311 + :raise attr.exceptions.AttrsAttributeNotFoundError: If *attr_name* couldn't
     312 + be found on *cls*.
     313 + :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
     314 + class.
     315 + 
     316 + .. deprecated:: 17.1.0
     317 + Use `attrs.evolve` instead if you can.
     318 + This function will not be removed du to the slightly different approach
     319 + compared to `attrs.evolve`.
     320 + """
     321 + import warnings
     322 + 
     323 + warnings.warn(
     324 + "assoc is deprecated and will be removed after 2018/01.",
     325 + DeprecationWarning,
     326 + stacklevel=2,
     327 + )
     328 + new = copy.copy(inst)
     329 + attrs = fields(inst.__class__)
     330 + for k, v in changes.items():
     331 + a = getattr(attrs, k, NOTHING)
     332 + if a is NOTHING:
     333 + raise AttrsAttributeNotFoundError(
     334 + f"{k} is not an attrs attribute on {new.__class__}."
     335 + )
     336 + _obj_setattr(new, k, v)
     337 + return new
     338 + 
     339 + 
     340 +def evolve(inst, **changes):
     341 + """
     342 + Create a new instance, based on *inst* with *changes* applied.
     343 + 
     344 + :param inst: Instance of a class with ``attrs`` attributes.
     345 + :param changes: Keyword changes in the new copy.
     346 + 
     347 + :return: A copy of inst with *changes* incorporated.
     348 + 
     349 + :raise TypeError: If *attr_name* couldn't be found in the class
     350 + ``__init__``.
     351 + :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
     352 + class.
     353 + 
     354 + .. versionadded:: 17.1.0
     355 + """
     356 + cls = inst.__class__
     357 + attrs = fields(cls)
     358 + for a in attrs:
     359 + if not a.init:
     360 + continue
     361 + attr_name = a.name # To deal with private attributes.
     362 + init_name = a.alias
     363 + if init_name not in changes:
     364 + changes[init_name] = getattr(inst, attr_name)
     365 + 
     366 + return cls(**changes)
     367 + 
     368 + 
     369 +def resolve_types(cls, globalns=None, localns=None, attribs=None):
     370 + """
     371 + Resolve any strings and forward annotations in type annotations.
     372 + 
     373 + This is only required if you need concrete types in `Attribute`'s *type*
     374 + field. In other words, you don't need to resolve your types if you only
     375 + use them for static type checking.
     376 + 
     377 + With no arguments, names will be looked up in the module in which the class
     378 + was created. If this is not what you want, e.g. if the name only exists
     379 + inside a method, you may pass *globalns* or *localns* to specify other
     380 + dictionaries in which to look up these names. See the docs of
     381 + `typing.get_type_hints` for more details.
     382 + 
     383 + :param type cls: Class to resolve.
     384 + :param Optional[dict] globalns: Dictionary containing global variables.
     385 + :param Optional[dict] localns: Dictionary containing local variables.
     386 + :param Optional[list] attribs: List of attribs for the given class.
     387 + This is necessary when calling from inside a ``field_transformer``
     388 + since *cls* is not an ``attrs`` class yet.
     389 + 
     390 + :raise TypeError: If *cls* is not a class.
     391 + :raise attr.exceptions.NotAnAttrsClassError: If *cls* is not an ``attrs``
     392 + class and you didn't pass any attribs.
     393 + :raise NameError: If types cannot be resolved because of missing variables.
     394 + 
     395 + :returns: *cls* so you can use this function also as a class decorator.
     396 + Please note that you have to apply it **after** `attrs.define`. That
     397 + means the decorator has to come in the line **before** `attrs.define`.
     398 + 
     399 + .. versionadded:: 20.1.0
     400 + .. versionadded:: 21.1.0 *attribs*
     401 + 
     402 + """
     403 + # Since calling get_type_hints is expensive we cache whether we've
     404 + # done it already.
     405 + if getattr(cls, "__attrs_types_resolved__", None) != cls:
     406 + import typing
     407 + 
     408 + hints = typing.get_type_hints(cls, globalns=globalns, localns=localns)
     409 + for field in fields(cls) if attribs is None else attribs:
     410 + if field.name in hints:
     411 + # Since fields have been frozen we must work around it.
     412 + _obj_setattr(field, "type", hints[field.name])
     413 + # We store the class we resolved so that subclasses know they haven't
     414 + # been resolved.
     415 + cls.__attrs_types_resolved__ = cls
     416 + 
     417 + # Return the class so you can use it as a decorator too.
     418 + return cls
     419 + 
  • vuln_analyzer/lib/python3.11/site-packages/attr/_make.py
    Diff is too large to be displayed.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_next_gen.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +"""
     4 +These are keyword-only APIs that call `attr.s` and `attr.ib` with different
     5 +default values.
     6 +"""
     7 + 
     8 + 
     9 +from functools import partial
     10 + 
     11 +from . import setters
     12 +from ._funcs import asdict as _asdict
     13 +from ._funcs import astuple as _astuple
     14 +from ._make import (
     15 + NOTHING,
     16 + _frozen_setattrs,
     17 + _ng_default_on_setattr,
     18 + attrib,
     19 + attrs,
     20 +)
     21 +from .exceptions import UnannotatedAttributeError
     22 + 
     23 + 
     24 +def define(
     25 + maybe_cls=None,
     26 + *,
     27 + these=None,
     28 + repr=None,
     29 + unsafe_hash=None,
     30 + hash=None,
     31 + init=None,
     32 + slots=True,
     33 + frozen=False,
     34 + weakref_slot=True,
     35 + str=False,
     36 + auto_attribs=None,
     37 + kw_only=False,
     38 + cache_hash=False,
     39 + auto_exc=True,
     40 + eq=None,
     41 + order=False,
     42 + auto_detect=True,
     43 + getstate_setstate=None,
     44 + on_setattr=None,
     45 + field_transformer=None,
     46 + match_args=True,
     47 +):
     48 + r"""
     49 + Define an ``attrs`` class.
     50 + 
     51 + Differences to the classic `attr.s` that it uses underneath:
     52 + 
     53 + - Automatically detect whether or not *auto_attribs* should be `True` (c.f.
     54 + *auto_attribs* parameter).
     55 + - If *frozen* is `False`, run converters and validators when setting an
     56 + attribute by default.
     57 + - *slots=True*
     58 + 
     59 + .. caution::
     60 + 
     61 + Usually this has only upsides and few visible effects in everyday
     62 + programming. But it *can* lead to some suprising behaviors, so please
     63 + make sure to read :term:`slotted classes`.
     64 + - *auto_exc=True*
     65 + - *auto_detect=True*
     66 + - *order=False*
     67 + - Some options that were only relevant on Python 2 or were kept around for
     68 + backwards-compatibility have been removed.
     69 + 
     70 + Please note that these are all defaults and you can change them as you
     71 + wish.
     72 + 
     73 + :param Optional[bool] auto_attribs: If set to `True` or `False`, it behaves
     74 + exactly like `attr.s`. If left `None`, `attr.s` will try to guess:
     75 + 
     76 + 1. If any attributes are annotated and no unannotated `attrs.fields`\ s
     77 + are found, it assumes *auto_attribs=True*.
     78 + 2. Otherwise it assumes *auto_attribs=False* and tries to collect
     79 + `attrs.fields`\ s.
     80 + 
     81 + For now, please refer to `attr.s` for the rest of the parameters.
     82 + 
     83 + .. versionadded:: 20.1.0
     84 + .. versionchanged:: 21.3.0 Converters are also run ``on_setattr``.
     85 + .. versionadded:: 22.2.0
     86 + *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance).
     87 + """
     88 + 
     89 + def do_it(cls, auto_attribs):
     90 + return attrs(
     91 + maybe_cls=cls,
     92 + these=these,
     93 + repr=repr,
     94 + hash=hash,
     95 + unsafe_hash=unsafe_hash,
     96 + init=init,
     97 + slots=slots,
     98 + frozen=frozen,
     99 + weakref_slot=weakref_slot,
     100 + str=str,
     101 + auto_attribs=auto_attribs,
     102 + kw_only=kw_only,
     103 + cache_hash=cache_hash,
     104 + auto_exc=auto_exc,
     105 + eq=eq,
     106 + order=order,
     107 + auto_detect=auto_detect,
     108 + collect_by_mro=True,
     109 + getstate_setstate=getstate_setstate,
     110 + on_setattr=on_setattr,
     111 + field_transformer=field_transformer,
     112 + match_args=match_args,
     113 + )
     114 + 
     115 + def wrap(cls):
     116 + """
     117 + Making this a wrapper ensures this code runs during class creation.
     118 + 
     119 + We also ensure that frozen-ness of classes is inherited.
     120 + """
     121 + nonlocal frozen, on_setattr
     122 + 
     123 + had_on_setattr = on_setattr not in (None, setters.NO_OP)
     124 + 
     125 + # By default, mutable classes convert & validate on setattr.
     126 + if frozen is False and on_setattr is None:
     127 + on_setattr = _ng_default_on_setattr
     128 + 
     129 + # However, if we subclass a frozen class, we inherit the immutability
     130 + # and disable on_setattr.
     131 + for base_cls in cls.__bases__:
     132 + if base_cls.__setattr__ is _frozen_setattrs:
     133 + if had_on_setattr:
     134 + raise ValueError(
     135 + "Frozen classes can't use on_setattr "
     136 + "(frozen-ness was inherited)."
     137 + )
     138 + 
     139 + on_setattr = setters.NO_OP
     140 + break
     141 + 
     142 + if auto_attribs is not None:
     143 + return do_it(cls, auto_attribs)
     144 + 
     145 + try:
     146 + return do_it(cls, True)
     147 + except UnannotatedAttributeError:
     148 + return do_it(cls, False)
     149 + 
     150 + # maybe_cls's type depends on the usage of the decorator. It's a class
     151 + # if it's used as `@attrs` but ``None`` if used as `@attrs()`.
     152 + if maybe_cls is None:
     153 + return wrap
     154 + else:
     155 + return wrap(maybe_cls)
     156 + 
     157 + 
     158 +mutable = define
     159 +frozen = partial(define, frozen=True, on_setattr=None)
     160 + 
     161 + 
     162 +def field(
     163 + *,
     164 + default=NOTHING,
     165 + validator=None,
     166 + repr=True,
     167 + hash=None,
     168 + init=True,
     169 + metadata=None,
     170 + converter=None,
     171 + factory=None,
     172 + kw_only=False,
     173 + eq=None,
     174 + order=None,
     175 + on_setattr=None,
     176 + alias=None,
     177 +):
     178 + """
     179 + Identical to `attr.ib`, except keyword-only and with some arguments
     180 + removed.
     181 + 
     182 + .. versionadded:: 20.1.0
     183 + """
     184 + return attrib(
     185 + default=default,
     186 + validator=validator,
     187 + repr=repr,
     188 + hash=hash,
     189 + init=init,
     190 + metadata=metadata,
     191 + converter=converter,
     192 + factory=factory,
     193 + kw_only=kw_only,
     194 + eq=eq,
     195 + order=order,
     196 + on_setattr=on_setattr,
     197 + alias=alias,
     198 + )
     199 + 
     200 + 
     201 +def asdict(inst, *, recurse=True, filter=None, value_serializer=None):
     202 + """
     203 + Same as `attr.asdict`, except that collections types are always retained
     204 + and dict is always used as *dict_factory*.
     205 + 
     206 + .. versionadded:: 21.3.0
     207 + """
     208 + return _asdict(
     209 + inst=inst,
     210 + recurse=recurse,
     211 + filter=filter,
     212 + value_serializer=value_serializer,
     213 + retain_collection_types=True,
     214 + )
     215 + 
     216 + 
     217 +def astuple(inst, *, recurse=True, filter=None):
     218 + """
     219 + Same as `attr.astuple`, except that collections types are always retained
     220 + and `tuple` is always used as the *tuple_factory*.
     221 + 
     222 + .. versionadded:: 21.3.0
     223 + """
     224 + return _astuple(
     225 + inst=inst, recurse=recurse, filter=filter, retain_collection_types=True
     226 + )
     227 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_typing_compat.pyi
     1 +from typing import Any, ClassVar, Protocol
     2 + 
     3 +# MYPY is a special constant in mypy which works the same way as `TYPE_CHECKING`.
     4 +MYPY = False
     5 + 
     6 +if MYPY:
     7 + # A protocol to be able to statically accept an attrs class.
     8 + class AttrsInstance_(Protocol):
     9 + __attrs_attrs__: ClassVar[Any]
     10 + 
     11 +else:
     12 + # For type checkers without plug-in support use an empty protocol that
     13 + # will (hopefully) be combined into a union.
     14 + class AttrsInstance_(Protocol):
     15 + pass
     16 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_version_info.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 + 
     4 +from functools import total_ordering
     5 + 
     6 +from ._funcs import astuple
     7 +from ._make import attrib, attrs
     8 + 
     9 + 
     10 +@total_ordering
     11 +@attrs(eq=False, order=False, slots=True, frozen=True)
     12 +class VersionInfo:
     13 + """
     14 + A version object that can be compared to tuple of length 1--4:
     15 + 
     16 + >>> attr.VersionInfo(19, 1, 0, "final") <= (19, 2)
     17 + True
     18 + >>> attr.VersionInfo(19, 1, 0, "final") < (19, 1, 1)
     19 + True
     20 + >>> vi = attr.VersionInfo(19, 2, 0, "final")
     21 + >>> vi < (19, 1, 1)
     22 + False
     23 + >>> vi < (19,)
     24 + False
     25 + >>> vi == (19, 2,)
     26 + True
     27 + >>> vi == (19, 2, 1)
     28 + False
     29 + 
     30 + .. versionadded:: 19.2
     31 + """
     32 + 
     33 + year = attrib(type=int)
     34 + minor = attrib(type=int)
     35 + micro = attrib(type=int)
     36 + releaselevel = attrib(type=str)
     37 + 
     38 + @classmethod
     39 + def _from_version_string(cls, s):
     40 + """
     41 + Parse *s* and return a _VersionInfo.
     42 + """
     43 + v = s.split(".")
     44 + if len(v) == 3:
     45 + v.append("final")
     46 + 
     47 + return cls(
     48 + year=int(v[0]), minor=int(v[1]), micro=int(v[2]), releaselevel=v[3]
     49 + )
     50 + 
     51 + def _ensure_tuple(self, other):
     52 + """
     53 + Ensure *other* is a tuple of a valid length.
     54 + 
     55 + Returns a possibly transformed *other* and ourselves as a tuple of
     56 + the same length as *other*.
     57 + """
     58 + 
     59 + if self.__class__ is other.__class__:
     60 + other = astuple(other)
     61 + 
     62 + if not isinstance(other, tuple):
     63 + raise NotImplementedError
     64 + 
     65 + if not (1 <= len(other) <= 4):
     66 + raise NotImplementedError
     67 + 
     68 + return astuple(self)[: len(other)], other
     69 + 
     70 + def __eq__(self, other):
     71 + try:
     72 + us, them = self._ensure_tuple(other)
     73 + except NotImplementedError:
     74 + return NotImplemented
     75 + 
     76 + return us == them
     77 + 
     78 + def __lt__(self, other):
     79 + try:
     80 + us, them = self._ensure_tuple(other)
     81 + except NotImplementedError:
     82 + return NotImplemented
     83 + 
     84 + # Since alphabetically "dev0" < "final" < "post1" < "post2", we don't
     85 + # have to do anything special with releaselevel for now.
     86 + return us < them
     87 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/_version_info.pyi
     1 +class VersionInfo:
     2 + @property
     3 + def year(self) -> int: ...
     4 + @property
     5 + def minor(self) -> int: ...
     6 + @property
     7 + def micro(self) -> int: ...
     8 + @property
     9 + def releaselevel(self) -> str: ...
     10 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/converters.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +"""
     4 +Commonly useful converters.
     5 +"""
     6 + 
     7 + 
     8 +import typing
     9 + 
     10 +from ._compat import _AnnotationExtractor
     11 +from ._make import NOTHING, Factory, pipe
     12 + 
     13 + 
     14 +__all__ = [
     15 + "default_if_none",
     16 + "optional",
     17 + "pipe",
     18 + "to_bool",
     19 +]
     20 + 
     21 + 
     22 +def optional(converter):
     23 + """
     24 + A converter that allows an attribute to be optional. An optional attribute
     25 + is one which can be set to ``None``.
     26 + 
     27 + Type annotations will be inferred from the wrapped converter's, if it
     28 + has any.
     29 + 
     30 + :param callable converter: the converter that is used for non-``None``
     31 + values.
     32 + 
     33 + .. versionadded:: 17.1.0
     34 + """
     35 + 
     36 + def optional_converter(val):
     37 + if val is None:
     38 + return None
     39 + return converter(val)
     40 + 
     41 + xtr = _AnnotationExtractor(converter)
     42 + 
     43 + t = xtr.get_first_param_type()
     44 + if t:
     45 + optional_converter.__annotations__["val"] = typing.Optional[t]
     46 + 
     47 + rt = xtr.get_return_type()
     48 + if rt:
     49 + optional_converter.__annotations__["return"] = typing.Optional[rt]
     50 + 
     51 + return optional_converter
     52 + 
     53 + 
     54 +def default_if_none(default=NOTHING, factory=None):
     55 + """
     56 + A converter that allows to replace ``None`` values by *default* or the
     57 + result of *factory*.
     58 + 
     59 + :param default: Value to be used if ``None`` is passed. Passing an instance
     60 + of `attrs.Factory` is supported, however the ``takes_self`` option
     61 + is *not*.
     62 + :param callable factory: A callable that takes no parameters whose result
     63 + is used if ``None`` is passed.
     64 + 
     65 + :raises TypeError: If **neither** *default* or *factory* is passed.
     66 + :raises TypeError: If **both** *default* and *factory* are passed.
     67 + :raises ValueError: If an instance of `attrs.Factory` is passed with
     68 + ``takes_self=True``.
     69 + 
     70 + .. versionadded:: 18.2.0
     71 + """
     72 + if default is NOTHING and factory is None:
     73 + raise TypeError("Must pass either `default` or `factory`.")
     74 + 
     75 + if default is not NOTHING and factory is not None:
     76 + raise TypeError(
     77 + "Must pass either `default` or `factory` but not both."
     78 + )
     79 + 
     80 + if factory is not None:
     81 + default = Factory(factory)
     82 + 
     83 + if isinstance(default, Factory):
     84 + if default.takes_self:
     85 + raise ValueError(
     86 + "`takes_self` is not supported by default_if_none."
     87 + )
     88 + 
     89 + def default_if_none_converter(val):
     90 + if val is not None:
     91 + return val
     92 + 
     93 + return default.factory()
     94 + 
     95 + else:
     96 + 
     97 + def default_if_none_converter(val):
     98 + if val is not None:
     99 + return val
     100 + 
     101 + return default
     102 + 
     103 + return default_if_none_converter
     104 + 
     105 + 
     106 +def to_bool(val):
     107 + """
     108 + Convert "boolean" strings (e.g., from env. vars.) to real booleans.
     109 + 
     110 + Values mapping to :code:`True`:
     111 + 
     112 + - :code:`True`
     113 + - :code:`"true"` / :code:`"t"`
     114 + - :code:`"yes"` / :code:`"y"`
     115 + - :code:`"on"`
     116 + - :code:`"1"`
     117 + - :code:`1`
     118 + 
     119 + Values mapping to :code:`False`:
     120 + 
     121 + - :code:`False`
     122 + - :code:`"false"` / :code:`"f"`
     123 + - :code:`"no"` / :code:`"n"`
     124 + - :code:`"off"`
     125 + - :code:`"0"`
     126 + - :code:`0`
     127 + 
     128 + :raises ValueError: for any other value.
     129 + 
     130 + .. versionadded:: 21.3.0
     131 + """
     132 + if isinstance(val, str):
     133 + val = val.lower()
     134 + truthy = {True, "true", "t", "yes", "y", "on", "1", 1}
     135 + falsy = {False, "false", "f", "no", "n", "off", "0", 0}
     136 + try:
     137 + if val in truthy:
     138 + return True
     139 + if val in falsy:
     140 + return False
     141 + except TypeError:
     142 + # Raised when "val" is not hashable (e.g., lists)
     143 + pass
     144 + raise ValueError(f"Cannot convert value to bool: {val}")
     145 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/converters.pyi
     1 +from typing import Callable, TypeVar, overload
     2 + 
     3 +from . import _ConverterType
     4 + 
     5 +_T = TypeVar("_T")
     6 + 
     7 +def pipe(*validators: _ConverterType) -> _ConverterType: ...
     8 +def optional(converter: _ConverterType) -> _ConverterType: ...
     9 +@overload
     10 +def default_if_none(default: _T) -> _ConverterType: ...
     11 +@overload
     12 +def default_if_none(*, factory: Callable[[], _T]) -> _ConverterType: ...
     13 +def to_bool(val: str) -> bool: ...
     14 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/exceptions.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 + 
     4 +class FrozenError(AttributeError):
     5 + """
     6 + A frozen/immutable instance or attribute have been attempted to be
     7 + modified.
     8 + 
     9 + It mirrors the behavior of ``namedtuples`` by using the same error message
     10 + and subclassing `AttributeError`.
     11 + 
     12 + .. versionadded:: 20.1.0
     13 + """
     14 + 
     15 + msg = "can't set attribute"
     16 + args = [msg]
     17 + 
     18 + 
     19 +class FrozenInstanceError(FrozenError):
     20 + """
     21 + A frozen instance has been attempted to be modified.
     22 + 
     23 + .. versionadded:: 16.1.0
     24 + """
     25 + 
     26 + 
     27 +class FrozenAttributeError(FrozenError):
     28 + """
     29 + A frozen attribute has been attempted to be modified.
     30 + 
     31 + .. versionadded:: 20.1.0
     32 + """
     33 + 
     34 + 
     35 +class AttrsAttributeNotFoundError(ValueError):
     36 + """
     37 + An ``attrs`` function couldn't find an attribute that the user asked for.
     38 + 
     39 + .. versionadded:: 16.2.0
     40 + """
     41 + 
     42 + 
     43 +class NotAnAttrsClassError(ValueError):
     44 + """
     45 + A non-``attrs`` class has been passed into an ``attrs`` function.
     46 + 
     47 + .. versionadded:: 16.2.0
     48 + """
     49 + 
     50 + 
     51 +class DefaultAlreadySetError(RuntimeError):
     52 + """
     53 + A default has been set using ``attr.ib()`` and is attempted to be reset
     54 + using the decorator.
     55 + 
     56 + .. versionadded:: 17.1.0
     57 + """
     58 + 
     59 + 
     60 +class UnannotatedAttributeError(RuntimeError):
     61 + """
     62 + A class with ``auto_attribs=True`` has an ``attr.ib()`` without a type
     63 + annotation.
     64 + 
     65 + .. versionadded:: 17.3.0
     66 + """
     67 + 
     68 + 
     69 +class PythonTooOldError(RuntimeError):
     70 + """
     71 + It was attempted to use an ``attrs`` feature that requires a newer Python
     72 + version.
     73 + 
     74 + .. versionadded:: 18.2.0
     75 + """
     76 + 
     77 + 
     78 +class NotCallableError(TypeError):
     79 + """
     80 + A ``attr.ib()`` requiring a callable has been set with a value
     81 + that is not callable.
     82 + 
     83 + .. versionadded:: 19.2.0
     84 + """
     85 + 
     86 + def __init__(self, msg, value):
     87 + super(TypeError, self).__init__(msg, value)
     88 + self.msg = msg
     89 + self.value = value
     90 + 
     91 + def __str__(self):
     92 + return str(self.msg)
     93 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/exceptions.pyi
     1 +from typing import Any
     2 + 
     3 +class FrozenError(AttributeError):
     4 + msg: str = ...
     5 + 
     6 +class FrozenInstanceError(FrozenError): ...
     7 +class FrozenAttributeError(FrozenError): ...
     8 +class AttrsAttributeNotFoundError(ValueError): ...
     9 +class NotAnAttrsClassError(ValueError): ...
     10 +class DefaultAlreadySetError(RuntimeError): ...
     11 +class UnannotatedAttributeError(RuntimeError): ...
     12 +class PythonTooOldError(RuntimeError): ...
     13 + 
     14 +class NotCallableError(TypeError):
     15 + msg: str = ...
     16 + value: Any = ...
     17 + def __init__(self, msg: str, value: Any) -> None: ...
     18 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/filters.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +"""
     4 +Commonly useful filters for `attr.asdict`.
     5 +"""
     6 + 
     7 +from ._make import Attribute
     8 + 
     9 + 
     10 +def _split_what(what):
     11 + """
     12 + Returns a tuple of `frozenset`s of classes and attributes.
     13 + """
     14 + return (
     15 + frozenset(cls for cls in what if isinstance(cls, type)),
     16 + frozenset(cls for cls in what if isinstance(cls, Attribute)),
     17 + )
     18 + 
     19 + 
     20 +def include(*what):
     21 + """
     22 + Include *what*.
     23 + 
     24 + :param what: What to include.
     25 + :type what: `list` of `type` or `attrs.Attribute`\\ s
     26 + 
     27 + :rtype: `callable`
     28 + """
     29 + cls, attrs = _split_what(what)
     30 + 
     31 + def include_(attribute, value):
     32 + return value.__class__ in cls or attribute in attrs
     33 + 
     34 + return include_
     35 + 
     36 + 
     37 +def exclude(*what):
     38 + """
     39 + Exclude *what*.
     40 + 
     41 + :param what: What to exclude.
     42 + :type what: `list` of classes or `attrs.Attribute`\\ s.
     43 + 
     44 + :rtype: `callable`
     45 + """
     46 + cls, attrs = _split_what(what)
     47 + 
     48 + def exclude_(attribute, value):
     49 + return value.__class__ not in cls and attribute not in attrs
     50 + 
     51 + return exclude_
     52 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/filters.pyi
     1 +from typing import Any, Union
     2 + 
     3 +from . import Attribute, _FilterType
     4 + 
     5 +def include(*what: Union[type, Attribute[Any]]) -> _FilterType[Any]: ...
     6 +def exclude(*what: Union[type, Attribute[Any]]) -> _FilterType[Any]: ...
     7 + 
  • ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/py.typed
     1 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/setters.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +"""
     4 +Commonly used hooks for on_setattr.
     5 +"""
     6 + 
     7 + 
     8 +from . import _config
     9 +from .exceptions import FrozenAttributeError
     10 + 
     11 + 
     12 +def pipe(*setters):
     13 + """
     14 + Run all *setters* and return the return value of the last one.
     15 + 
     16 + .. versionadded:: 20.1.0
     17 + """
     18 + 
     19 + def wrapped_pipe(instance, attrib, new_value):
     20 + rv = new_value
     21 + 
     22 + for setter in setters:
     23 + rv = setter(instance, attrib, rv)
     24 + 
     25 + return rv
     26 + 
     27 + return wrapped_pipe
     28 + 
     29 + 
     30 +def frozen(_, __, ___):
     31 + """
     32 + Prevent an attribute to be modified.
     33 + 
     34 + .. versionadded:: 20.1.0
     35 + """
     36 + raise FrozenAttributeError()
     37 + 
     38 + 
     39 +def validate(instance, attrib, new_value):
     40 + """
     41 + Run *attrib*'s validator on *new_value* if it has one.
     42 + 
     43 + .. versionadded:: 20.1.0
     44 + """
     45 + if _config._run_validators is False:
     46 + return new_value
     47 + 
     48 + v = attrib.validator
     49 + if not v:
     50 + return new_value
     51 + 
     52 + v(instance, attrib, new_value)
     53 + 
     54 + return new_value
     55 + 
     56 + 
     57 +def convert(instance, attrib, new_value):
     58 + """
     59 + Run *attrib*'s converter -- if it has one -- on *new_value* and return the
     60 + result.
     61 + 
     62 + .. versionadded:: 20.1.0
     63 + """
     64 + c = attrib.converter
     65 + if c:
     66 + return c(new_value)
     67 + 
     68 + return new_value
     69 + 
     70 + 
     71 +# Sentinel for disabling class-wide *on_setattr* hooks for certain attributes.
     72 +# autodata stopped working, so the docstring is inlined in the API docs.
     73 +NO_OP = object()
     74 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/setters.pyi
     1 +from typing import Any, NewType, NoReturn, TypeVar
     2 + 
     3 +from . import Attribute, _OnSetAttrType
     4 + 
     5 +_T = TypeVar("_T")
     6 + 
     7 +def frozen(
     8 + instance: Any, attribute: Attribute[Any], new_value: Any
     9 +) -> NoReturn: ...
     10 +def pipe(*setters: _OnSetAttrType) -> _OnSetAttrType: ...
     11 +def validate(instance: Any, attribute: Attribute[_T], new_value: _T) -> _T: ...
     12 + 
     13 +# convert is allowed to return Any, because they can be chained using pipe.
     14 +def convert(
     15 + instance: Any, attribute: Attribute[Any], new_value: Any
     16 +) -> Any: ...
     17 + 
     18 +_NoOpType = NewType("_NoOpType", object)
     19 +NO_OP: _NoOpType
     20 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/validators.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +"""
     4 +Commonly useful validators.
     5 +"""
     6 + 
     7 + 
     8 +import operator
     9 +import re
     10 + 
     11 +from contextlib import contextmanager
     12 + 
     13 +from ._config import get_run_validators, set_run_validators
     14 +from ._make import _AndValidator, and_, attrib, attrs
     15 +from .converters import default_if_none
     16 +from .exceptions import NotCallableError
     17 + 
     18 + 
     19 +try:
     20 + Pattern = re.Pattern
     21 +except AttributeError: # Python <3.7 lacks a Pattern type.
     22 + Pattern = type(re.compile(""))
     23 + 
     24 + 
     25 +__all__ = [
     26 + "and_",
     27 + "deep_iterable",
     28 + "deep_mapping",
     29 + "disabled",
     30 + "ge",
     31 + "get_disabled",
     32 + "gt",
     33 + "in_",
     34 + "instance_of",
     35 + "is_callable",
     36 + "le",
     37 + "lt",
     38 + "matches_re",
     39 + "max_len",
     40 + "min_len",
     41 + "not_",
     42 + "optional",
     43 + "provides",
     44 + "set_disabled",
     45 +]
     46 + 
     47 + 
     48 +def set_disabled(disabled):
     49 + """
     50 + Globally disable or enable running validators.
     51 + 
     52 + By default, they are run.
     53 + 
     54 + :param disabled: If ``True``, disable running all validators.
     55 + :type disabled: bool
     56 + 
     57 + .. warning::
     58 + 
     59 + This function is not thread-safe!
     60 + 
     61 + .. versionadded:: 21.3.0
     62 + """
     63 + set_run_validators(not disabled)
     64 + 
     65 + 
     66 +def get_disabled():
     67 + """
     68 + Return a bool indicating whether validators are currently disabled or not.
     69 + 
     70 + :return: ``True`` if validators are currently disabled.
     71 + :rtype: bool
     72 + 
     73 + .. versionadded:: 21.3.0
     74 + """
     75 + return not get_run_validators()
     76 + 
     77 + 
     78 +@contextmanager
     79 +def disabled():
     80 + """
     81 + Context manager that disables running validators within its context.
     82 + 
     83 + .. warning::
     84 + 
     85 + This context manager is not thread-safe!
     86 + 
     87 + .. versionadded:: 21.3.0
     88 + """
     89 + set_run_validators(False)
     90 + try:
     91 + yield
     92 + finally:
     93 + set_run_validators(True)
     94 + 
     95 + 
     96 +@attrs(repr=False, slots=True, hash=True)
     97 +class _InstanceOfValidator:
     98 + type = attrib()
     99 + 
     100 + def __call__(self, inst, attr, value):
     101 + """
     102 + We use a callable class to be able to change the ``__repr__``.
     103 + """
     104 + if not isinstance(value, self.type):
     105 + raise TypeError(
     106 + "'{name}' must be {type!r} (got {value!r} that is a "
     107 + "{actual!r}).".format(
     108 + name=attr.name,
     109 + type=self.type,
     110 + actual=value.__class__,
     111 + value=value,
     112 + ),
     113 + attr,
     114 + self.type,
     115 + value,
     116 + )
     117 + 
     118 + def __repr__(self):
     119 + return "<instance_of validator for type {type!r}>".format(
     120 + type=self.type
     121 + )
     122 + 
     123 + 
     124 +def instance_of(type):
     125 + """
     126 + A validator that raises a `TypeError` if the initializer is called
     127 + with a wrong type for this particular attribute (checks are performed using
     128 + `isinstance` therefore it's also valid to pass a tuple of types).
     129 + 
     130 + :param type: The type to check for.
     131 + :type type: type or tuple of type
     132 + 
     133 + :raises TypeError: With a human readable error message, the attribute
     134 + (of type `attrs.Attribute`), the expected type, and the value it
     135 + got.
     136 + """
     137 + return _InstanceOfValidator(type)
     138 + 
     139 + 
     140 +@attrs(repr=False, frozen=True, slots=True)
     141 +class _MatchesReValidator:
     142 + pattern = attrib()
     143 + match_func = attrib()
     144 + 
     145 + def __call__(self, inst, attr, value):
     146 + """
     147 + We use a callable class to be able to change the ``__repr__``.
     148 + """
     149 + if not self.match_func(value):
     150 + raise ValueError(
     151 + "'{name}' must match regex {pattern!r}"
     152 + " ({value!r} doesn't)".format(
     153 + name=attr.name, pattern=self.pattern.pattern, value=value
     154 + ),
     155 + attr,
     156 + self.pattern,
     157 + value,
     158 + )
     159 + 
     160 + def __repr__(self):
     161 + return "<matches_re validator for pattern {pattern!r}>".format(
     162 + pattern=self.pattern
     163 + )
     164 + 
     165 + 
     166 +def matches_re(regex, flags=0, func=None):
     167 + r"""
     168 + A validator that raises `ValueError` if the initializer is called
     169 + with a string that doesn't match *regex*.
     170 + 
     171 + :param regex: a regex string or precompiled pattern to match against
     172 + :param int flags: flags that will be passed to the underlying re function
     173 + (default 0)
     174 + :param callable func: which underlying `re` function to call. Valid options
     175 + are `re.fullmatch`, `re.search`, and `re.match`; the default ``None``
     176 + means `re.fullmatch`. For performance reasons, the pattern is always
     177 + precompiled using `re.compile`.
     178 + 
     179 + .. versionadded:: 19.2.0
     180 + .. versionchanged:: 21.3.0 *regex* can be a pre-compiled pattern.
     181 + """
     182 + valid_funcs = (re.fullmatch, None, re.search, re.match)
     183 + if func not in valid_funcs:
     184 + raise ValueError(
     185 + "'func' must be one of {}.".format(
     186 + ", ".join(
     187 + sorted(
     188 + e and e.__name__ or "None" for e in set(valid_funcs)
     189 + )
     190 + )
     191 + )
     192 + )
     193 + 
     194 + if isinstance(regex, Pattern):
     195 + if flags:
     196 + raise TypeError(
     197 + "'flags' can only be used with a string pattern; "
     198 + "pass flags to re.compile() instead"
     199 + )
     200 + pattern = regex
     201 + else:
     202 + pattern = re.compile(regex, flags)
     203 + 
     204 + if func is re.match:
     205 + match_func = pattern.match
     206 + elif func is re.search:
     207 + match_func = pattern.search
     208 + else:
     209 + match_func = pattern.fullmatch
     210 + 
     211 + return _MatchesReValidator(pattern, match_func)
     212 + 
     213 + 
     214 +@attrs(repr=False, slots=True, hash=True)
     215 +class _ProvidesValidator:
     216 + interface = attrib()
     217 + 
     218 + def __call__(self, inst, attr, value):
     219 + """
     220 + We use a callable class to be able to change the ``__repr__``.
     221 + """
     222 + if not self.interface.providedBy(value):
     223 + raise TypeError(
     224 + "'{name}' must provide {interface!r} which {value!r} "
     225 + "doesn't.".format(
     226 + name=attr.name, interface=self.interface, value=value
     227 + ),
     228 + attr,
     229 + self.interface,
     230 + value,
     231 + )
     232 + 
     233 + def __repr__(self):
     234 + return "<provides validator for interface {interface!r}>".format(
     235 + interface=self.interface
     236 + )
     237 + 
     238 + 
     239 +def provides(interface):
     240 + """
     241 + A validator that raises a `TypeError` if the initializer is called
     242 + with an object that does not provide the requested *interface* (checks are
     243 + performed using ``interface.providedBy(value)`` (see `zope.interface
     244 + <https://zopeinterface.readthedocs.io/en/latest/>`_).
     245 + 
     246 + :param interface: The interface to check for.
     247 + :type interface: ``zope.interface.Interface``
     248 + 
     249 + :raises TypeError: With a human readable error message, the attribute
     250 + (of type `attrs.Attribute`), the expected interface, and the
     251 + value it got.
     252 + """
     253 + return _ProvidesValidator(interface)
     254 + 
     255 + 
     256 +@attrs(repr=False, slots=True, hash=True)
     257 +class _OptionalValidator:
     258 + validator = attrib()
     259 + 
     260 + def __call__(self, inst, attr, value):
     261 + if value is None:
     262 + return
     263 + 
     264 + self.validator(inst, attr, value)
     265 + 
     266 + def __repr__(self):
     267 + return "<optional validator for {what} or None>".format(
     268 + what=repr(self.validator)
     269 + )
     270 + 
     271 + 
     272 +def optional(validator):
     273 + """
     274 + A validator that makes an attribute optional. An optional attribute is one
     275 + which can be set to ``None`` in addition to satisfying the requirements of
     276 + the sub-validator.
     277 + 
     278 + :param validator: A validator (or a list of validators) that is used for
     279 + non-``None`` values.
     280 + :type validator: callable or `list` of callables.
     281 + 
     282 + .. versionadded:: 15.1.0
     283 + .. versionchanged:: 17.1.0 *validator* can be a list of validators.
     284 + """
     285 + if isinstance(validator, list):
     286 + return _OptionalValidator(_AndValidator(validator))
     287 + return _OptionalValidator(validator)
     288 + 
     289 + 
     290 +@attrs(repr=False, slots=True, hash=True)
     291 +class _InValidator:
     292 + options = attrib()
     293 + 
     294 + def __call__(self, inst, attr, value):
     295 + try:
     296 + in_options = value in self.options
     297 + except TypeError: # e.g. `1 in "abc"`
     298 + in_options = False
     299 + 
     300 + if not in_options:
     301 + raise ValueError(
     302 + "'{name}' must be in {options!r} (got {value!r})".format(
     303 + name=attr.name, options=self.options, value=value
     304 + ),
     305 + attr,
     306 + self.options,
     307 + value,
     308 + )
     309 + 
     310 + def __repr__(self):
     311 + return "<in_ validator with options {options!r}>".format(
     312 + options=self.options
     313 + )
     314 + 
     315 + 
     316 +def in_(options):
     317 + """
     318 + A validator that raises a `ValueError` if the initializer is called
     319 + with a value that does not belong in the options provided. The check is
     320 + performed using ``value in options``.
     321 + 
     322 + :param options: Allowed options.
     323 + :type options: list, tuple, `enum.Enum`, ...
     324 + 
     325 + :raises ValueError: With a human readable error message, the attribute (of
     326 + type `attrs.Attribute`), the expected options, and the value it
     327 + got.
     328 + 
     329 + .. versionadded:: 17.1.0
     330 + .. versionchanged:: 22.1.0
     331 + The ValueError was incomplete until now and only contained the human
     332 + readable error message. Now it contains all the information that has
     333 + been promised since 17.1.0.
     334 + """
     335 + return _InValidator(options)
     336 + 
     337 + 
     338 +@attrs(repr=False, slots=False, hash=True)
     339 +class _IsCallableValidator:
     340 + def __call__(self, inst, attr, value):
     341 + """
     342 + We use a callable class to be able to change the ``__repr__``.
     343 + """
     344 + if not callable(value):
     345 + message = (
     346 + "'{name}' must be callable "
     347 + "(got {value!r} that is a {actual!r})."
     348 + )
     349 + raise NotCallableError(
     350 + msg=message.format(
     351 + name=attr.name, value=value, actual=value.__class__
     352 + ),
     353 + value=value,
     354 + )
     355 + 
     356 + def __repr__(self):
     357 + return "<is_callable validator>"
     358 + 
     359 + 
     360 +def is_callable():
     361 + """
     362 + A validator that raises a `attr.exceptions.NotCallableError` if the
     363 + initializer is called with a value for this particular attribute
     364 + that is not callable.
     365 + 
     366 + .. versionadded:: 19.1.0
     367 + 
     368 + :raises `attr.exceptions.NotCallableError`: With a human readable error
     369 + message containing the attribute (`attrs.Attribute`) name,
     370 + and the value it got.
     371 + """
     372 + return _IsCallableValidator()
     373 + 
     374 + 
     375 +@attrs(repr=False, slots=True, hash=True)
     376 +class _DeepIterable:
     377 + member_validator = attrib(validator=is_callable())
     378 + iterable_validator = attrib(
     379 + default=None, validator=optional(is_callable())
     380 + )
     381 + 
     382 + def __call__(self, inst, attr, value):
     383 + """
     384 + We use a callable class to be able to change the ``__repr__``.
     385 + """
     386 + if self.iterable_validator is not None:
     387 + self.iterable_validator(inst, attr, value)
     388 + 
     389 + for member in value:
     390 + self.member_validator(inst, attr, member)
     391 + 
     392 + def __repr__(self):
     393 + iterable_identifier = (
     394 + ""
     395 + if self.iterable_validator is None
     396 + else f" {self.iterable_validator!r}"
     397 + )
     398 + return (
     399 + "<deep_iterable validator for{iterable_identifier}"
     400 + " iterables of {member!r}>"
     401 + ).format(
     402 + iterable_identifier=iterable_identifier,
     403 + member=self.member_validator,
     404 + )
     405 + 
     406 + 
     407 +def deep_iterable(member_validator, iterable_validator=None):
     408 + """
     409 + A validator that performs deep validation of an iterable.
     410 + 
     411 + :param member_validator: Validator(s) to apply to iterable members
     412 + :param iterable_validator: Validator to apply to iterable itself
     413 + (optional)
     414 + 
     415 + .. versionadded:: 19.1.0
     416 + 
     417 + :raises TypeError: if any sub-validators fail
     418 + """
     419 + if isinstance(member_validator, (list, tuple)):
     420 + member_validator = and_(*member_validator)
     421 + return _DeepIterable(member_validator, iterable_validator)
     422 + 
     423 + 
     424 +@attrs(repr=False, slots=True, hash=True)
     425 +class _DeepMapping:
     426 + key_validator = attrib(validator=is_callable())
     427 + value_validator = attrib(validator=is_callable())
     428 + mapping_validator = attrib(default=None, validator=optional(is_callable()))
     429 + 
     430 + def __call__(self, inst, attr, value):
     431 + """
     432 + We use a callable class to be able to change the ``__repr__``.
     433 + """
     434 + if self.mapping_validator is not None:
     435 + self.mapping_validator(inst, attr, value)
     436 + 
     437 + for key in value:
     438 + self.key_validator(inst, attr, key)
     439 + self.value_validator(inst, attr, value[key])
     440 + 
     441 + def __repr__(self):
     442 + return (
     443 + "<deep_mapping validator for objects mapping {key!r} to {value!r}>"
     444 + ).format(key=self.key_validator, value=self.value_validator)
     445 + 
     446 + 
     447 +def deep_mapping(key_validator, value_validator, mapping_validator=None):
     448 + """
     449 + A validator that performs deep validation of a dictionary.
     450 + 
     451 + :param key_validator: Validator to apply to dictionary keys
     452 + :param value_validator: Validator to apply to dictionary values
     453 + :param mapping_validator: Validator to apply to top-level mapping
     454 + attribute (optional)
     455 + 
     456 + .. versionadded:: 19.1.0
     457 + 
     458 + :raises TypeError: if any sub-validators fail
     459 + """
     460 + return _DeepMapping(key_validator, value_validator, mapping_validator)
     461 + 
     462 + 
     463 +@attrs(repr=False, frozen=True, slots=True)
     464 +class _NumberValidator:
     465 + bound = attrib()
     466 + compare_op = attrib()
     467 + compare_func = attrib()
     468 + 
     469 + def __call__(self, inst, attr, value):
     470 + """
     471 + We use a callable class to be able to change the ``__repr__``.
     472 + """
     473 + if not self.compare_func(value, self.bound):
     474 + raise ValueError(
     475 + "'{name}' must be {op} {bound}: {value}".format(
     476 + name=attr.name,
     477 + op=self.compare_op,
     478 + bound=self.bound,
     479 + value=value,
     480 + )
     481 + )
     482 + 
     483 + def __repr__(self):
     484 + return "<Validator for x {op} {bound}>".format(
     485 + op=self.compare_op, bound=self.bound
     486 + )
     487 + 
     488 + 
     489 +def lt(val):
     490 + """
     491 + A validator that raises `ValueError` if the initializer is called
     492 + with a number larger or equal to *val*.
     493 + 
     494 + :param val: Exclusive upper bound for values
     495 + 
     496 + .. versionadded:: 21.3.0
     497 + """
     498 + return _NumberValidator(val, "<", operator.lt)
     499 + 
     500 + 
     501 +def le(val):
     502 + """
     503 + A validator that raises `ValueError` if the initializer is called
     504 + with a number greater than *val*.
     505 + 
     506 + :param val: Inclusive upper bound for values
     507 + 
     508 + .. versionadded:: 21.3.0
     509 + """
     510 + return _NumberValidator(val, "<=", operator.le)
     511 + 
     512 + 
     513 +def ge(val):
     514 + """
     515 + A validator that raises `ValueError` if the initializer is called
     516 + with a number smaller than *val*.
     517 + 
     518 + :param val: Inclusive lower bound for values
     519 + 
     520 + .. versionadded:: 21.3.0
     521 + """
     522 + return _NumberValidator(val, ">=", operator.ge)
     523 + 
     524 + 
     525 +def gt(val):
     526 + """
     527 + A validator that raises `ValueError` if the initializer is called
     528 + with a number smaller or equal to *val*.
     529 + 
     530 + :param val: Exclusive lower bound for values
     531 + 
     532 + .. versionadded:: 21.3.0
     533 + """
     534 + return _NumberValidator(val, ">", operator.gt)
     535 + 
     536 + 
     537 +@attrs(repr=False, frozen=True, slots=True)
     538 +class _MaxLengthValidator:
     539 + max_length = attrib()
     540 + 
     541 + def __call__(self, inst, attr, value):
     542 + """
     543 + We use a callable class to be able to change the ``__repr__``.
     544 + """
     545 + if len(value) > self.max_length:
     546 + raise ValueError(
     547 + "Length of '{name}' must be <= {max}: {len}".format(
     548 + name=attr.name, max=self.max_length, len=len(value)
     549 + )
     550 + )
     551 + 
     552 + def __repr__(self):
     553 + return f"<max_len validator for {self.max_length}>"
     554 + 
     555 + 
     556 +def max_len(length):
     557 + """
     558 + A validator that raises `ValueError` if the initializer is called
     559 + with a string or iterable that is longer than *length*.
     560 + 
     561 + :param int length: Maximum length of the string or iterable
     562 + 
     563 + .. versionadded:: 21.3.0
     564 + """
     565 + return _MaxLengthValidator(length)
     566 + 
     567 + 
     568 +@attrs(repr=False, frozen=True, slots=True)
     569 +class _MinLengthValidator:
     570 + min_length = attrib()
     571 + 
     572 + def __call__(self, inst, attr, value):
     573 + """
     574 + We use a callable class to be able to change the ``__repr__``.
     575 + """
     576 + if len(value) < self.min_length:
     577 + raise ValueError(
     578 + "Length of '{name}' must be => {min}: {len}".format(
     579 + name=attr.name, min=self.min_length, len=len(value)
     580 + )
     581 + )
     582 + 
     583 + def __repr__(self):
     584 + return f"<min_len validator for {self.min_length}>"
     585 + 
     586 + 
     587 +def min_len(length):
     588 + """
     589 + A validator that raises `ValueError` if the initializer is called
     590 + with a string or iterable that is shorter than *length*.
     591 + 
     592 + :param int length: Minimum length of the string or iterable
     593 + 
     594 + .. versionadded:: 22.1.0
     595 + """
     596 + return _MinLengthValidator(length)
     597 + 
     598 + 
     599 +@attrs(repr=False, slots=True, hash=True)
     600 +class _SubclassOfValidator:
     601 + type = attrib()
     602 + 
     603 + def __call__(self, inst, attr, value):
     604 + """
     605 + We use a callable class to be able to change the ``__repr__``.
     606 + """
     607 + if not issubclass(value, self.type):
     608 + raise TypeError(
     609 + "'{name}' must be a subclass of {type!r} "
     610 + "(got {value!r}).".format(
     611 + name=attr.name,
     612 + type=self.type,
     613 + value=value,
     614 + ),
     615 + attr,
     616 + self.type,
     617 + value,
     618 + )
     619 + 
     620 + def __repr__(self):
     621 + return "<subclass_of validator for type {type!r}>".format(
     622 + type=self.type
     623 + )
     624 + 
     625 + 
     626 +def _subclass_of(type):
     627 + """
     628 + A validator that raises a `TypeError` if the initializer is called
     629 + with a wrong type for this particular attribute (checks are performed using
     630 + `issubclass` therefore it's also valid to pass a tuple of types).
     631 + 
     632 + :param type: The type to check for.
     633 + :type type: type or tuple of types
     634 + 
     635 + :raises TypeError: With a human readable error message, the attribute
     636 + (of type `attrs.Attribute`), the expected type, and the value it
     637 + got.
     638 + """
     639 + return _SubclassOfValidator(type)
     640 + 
     641 + 
     642 +@attrs(repr=False, slots=True, hash=True)
     643 +class _NotValidator:
     644 + validator = attrib()
     645 + msg = attrib(
     646 + converter=default_if_none(
     647 + "not_ validator child '{validator!r}' "
     648 + "did not raise a captured error"
     649 + )
     650 + )
     651 + exc_types = attrib(
     652 + validator=deep_iterable(
     653 + member_validator=_subclass_of(Exception),
     654 + iterable_validator=instance_of(tuple),
     655 + ),
     656 + )
     657 + 
     658 + def __call__(self, inst, attr, value):
     659 + try:
     660 + self.validator(inst, attr, value)
     661 + except self.exc_types:
     662 + pass # suppress error to invert validity
     663 + else:
     664 + raise ValueError(
     665 + self.msg.format(
     666 + validator=self.validator,
     667 + exc_types=self.exc_types,
     668 + ),
     669 + attr,
     670 + self.validator,
     671 + value,
     672 + self.exc_types,
     673 + )
     674 + 
     675 + def __repr__(self):
     676 + return (
     677 + "<not_ validator wrapping {what!r}, " "capturing {exc_types!r}>"
     678 + ).format(
     679 + what=self.validator,
     680 + exc_types=self.exc_types,
     681 + )
     682 + 
     683 + 
     684 +def not_(validator, *, msg=None, exc_types=(ValueError, TypeError)):
     685 + """
     686 + A validator that wraps and logically 'inverts' the validator passed to it.
     687 + It will raise a `ValueError` if the provided validator *doesn't* raise a
     688 + `ValueError` or `TypeError` (by default), and will suppress the exception
     689 + if the provided validator *does*.
     690 + 
     691 + Intended to be used with existing validators to compose logic without
     692 + needing to create inverted variants, for example, ``not_(in_(...))``.
     693 + 
     694 + :param validator: A validator to be logically inverted.
     695 + :param msg: Message to raise if validator fails.
     696 + Formatted with keys ``exc_types`` and ``validator``.
     697 + :type msg: str
     698 + :param exc_types: Exception type(s) to capture.
     699 + Other types raised by child validators will not be intercepted and
     700 + pass through.
     701 + 
     702 + :raises ValueError: With a human readable error message,
     703 + the attribute (of type `attrs.Attribute`),
     704 + the validator that failed to raise an exception,
     705 + the value it got,
     706 + and the expected exception types.
     707 + 
     708 + .. versionadded:: 22.2.0
     709 + """
     710 + try:
     711 + exc_types = tuple(exc_types)
     712 + except TypeError:
     713 + exc_types = (exc_types,)
     714 + return _NotValidator(validator, msg, exc_types)
     715 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attr/validators.pyi
     1 +from typing import (
     2 + Any,
     3 + AnyStr,
     4 + Callable,
     5 + Container,
     6 + ContextManager,
     7 + Iterable,
     8 + List,
     9 + Mapping,
     10 + Match,
     11 + Optional,
     12 + Pattern,
     13 + Tuple,
     14 + Type,
     15 + TypeVar,
     16 + Union,
     17 + overload,
     18 +)
     19 + 
     20 +from . import _ValidatorType
     21 +from . import _ValidatorArgType
     22 + 
     23 +_T = TypeVar("_T")
     24 +_T1 = TypeVar("_T1")
     25 +_T2 = TypeVar("_T2")
     26 +_T3 = TypeVar("_T3")
     27 +_I = TypeVar("_I", bound=Iterable)
     28 +_K = TypeVar("_K")
     29 +_V = TypeVar("_V")
     30 +_M = TypeVar("_M", bound=Mapping)
     31 + 
     32 +def set_disabled(run: bool) -> None: ...
     33 +def get_disabled() -> bool: ...
     34 +def disabled() -> ContextManager[None]: ...
     35 + 
     36 +# To be more precise on instance_of use some overloads.
     37 +# If there are more than 3 items in the tuple then we fall back to Any
     38 +@overload
     39 +def instance_of(type: Type[_T]) -> _ValidatorType[_T]: ...
     40 +@overload
     41 +def instance_of(type: Tuple[Type[_T]]) -> _ValidatorType[_T]: ...
     42 +@overload
     43 +def instance_of(
     44 + type: Tuple[Type[_T1], Type[_T2]]
     45 +) -> _ValidatorType[Union[_T1, _T2]]: ...
     46 +@overload
     47 +def instance_of(
     48 + type: Tuple[Type[_T1], Type[_T2], Type[_T3]]
     49 +) -> _ValidatorType[Union[_T1, _T2, _T3]]: ...
     50 +@overload
     51 +def instance_of(type: Tuple[type, ...]) -> _ValidatorType[Any]: ...
     52 +def provides(interface: Any) -> _ValidatorType[Any]: ...
     53 +def optional(
     54 + validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]]
     55 +) -> _ValidatorType[Optional[_T]]: ...
     56 +def in_(options: Container[_T]) -> _ValidatorType[_T]: ...
     57 +def and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ...
     58 +def matches_re(
     59 + regex: Union[Pattern[AnyStr], AnyStr],
     60 + flags: int = ...,
     61 + func: Optional[
     62 + Callable[[AnyStr, AnyStr, int], Optional[Match[AnyStr]]]
     63 + ] = ...,
     64 +) -> _ValidatorType[AnyStr]: ...
     65 +def deep_iterable(
     66 + member_validator: _ValidatorArgType[_T],
     67 + iterable_validator: Optional[_ValidatorType[_I]] = ...,
     68 +) -> _ValidatorType[_I]: ...
     69 +def deep_mapping(
     70 + key_validator: _ValidatorType[_K],
     71 + value_validator: _ValidatorType[_V],
     72 + mapping_validator: Optional[_ValidatorType[_M]] = ...,
     73 +) -> _ValidatorType[_M]: ...
     74 +def is_callable() -> _ValidatorType[_T]: ...
     75 +def lt(val: _T) -> _ValidatorType[_T]: ...
     76 +def le(val: _T) -> _ValidatorType[_T]: ...
     77 +def ge(val: _T) -> _ValidatorType[_T]: ...
     78 +def gt(val: _T) -> _ValidatorType[_T]: ...
     79 +def max_len(length: int) -> _ValidatorType[_T]: ...
     80 +def min_len(length: int) -> _ValidatorType[_T]: ...
     81 +def not_(
     82 + validator: _ValidatorType[_T],
     83 + *,
     84 + msg: Optional[str] = None,
     85 + exc_types: Union[Type[Exception], Iterable[Type[Exception]]] = ...
     86 +) -> _ValidatorType[_T]: ...
     87 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/__init__.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +from attr import (
     4 + NOTHING,
     5 + Attribute,
     6 + AttrsInstance,
     7 + Factory,
     8 + __author__,
     9 + __copyright__,
     10 + __description__,
     11 + __doc__,
     12 + __email__,
     13 + __license__,
     14 + __title__,
     15 + __url__,
     16 + __version__,
     17 + __version_info__,
     18 + assoc,
     19 + cmp_using,
     20 + define,
     21 + evolve,
     22 + field,
     23 + fields,
     24 + fields_dict,
     25 + frozen,
     26 + has,
     27 + make_class,
     28 + mutable,
     29 + resolve_types,
     30 + validate,
     31 +)
     32 +from attr._next_gen import asdict, astuple
     33 + 
     34 +from . import converters, exceptions, filters, setters, validators
     35 + 
     36 + 
     37 +__all__ = [
     38 + "__author__",
     39 + "__copyright__",
     40 + "__description__",
     41 + "__doc__",
     42 + "__email__",
     43 + "__license__",
     44 + "__title__",
     45 + "__url__",
     46 + "__version__",
     47 + "__version_info__",
     48 + "asdict",
     49 + "assoc",
     50 + "astuple",
     51 + "Attribute",
     52 + "AttrsInstance",
     53 + "cmp_using",
     54 + "converters",
     55 + "define",
     56 + "evolve",
     57 + "exceptions",
     58 + "Factory",
     59 + "field",
     60 + "fields_dict",
     61 + "fields",
     62 + "filters",
     63 + "frozen",
     64 + "has",
     65 + "make_class",
     66 + "mutable",
     67 + "NOTHING",
     68 + "resolve_types",
     69 + "setters",
     70 + "validate",
     71 + "validators",
     72 +]
     73 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/__init__.pyi
     1 +from typing import (
     2 + Any,
     3 + Callable,
     4 + Dict,
     5 + Mapping,
     6 + Optional,
     7 + Sequence,
     8 + Tuple,
     9 + Type,
     10 +)
     11 + 
     12 +# Because we need to type our own stuff, we have to make everything from
     13 +# attr explicitly public too.
     14 +from attr import __author__ as __author__
     15 +from attr import __copyright__ as __copyright__
     16 +from attr import __description__ as __description__
     17 +from attr import __email__ as __email__
     18 +from attr import __license__ as __license__
     19 +from attr import __title__ as __title__
     20 +from attr import __url__ as __url__
     21 +from attr import __version__ as __version__
     22 +from attr import __version_info__ as __version_info__
     23 +from attr import _FilterType
     24 +from attr import assoc as assoc
     25 +from attr import Attribute as Attribute
     26 +from attr import AttrsInstance as AttrsInstance
     27 +from attr import cmp_using as cmp_using
     28 +from attr import converters as converters
     29 +from attr import define as define
     30 +from attr import evolve as evolve
     31 +from attr import exceptions as exceptions
     32 +from attr import Factory as Factory
     33 +from attr import field as field
     34 +from attr import fields as fields
     35 +from attr import fields_dict as fields_dict
     36 +from attr import filters as filters
     37 +from attr import frozen as frozen
     38 +from attr import has as has
     39 +from attr import make_class as make_class
     40 +from attr import mutable as mutable
     41 +from attr import NOTHING as NOTHING
     42 +from attr import resolve_types as resolve_types
     43 +from attr import setters as setters
     44 +from attr import validate as validate
     45 +from attr import validators as validators
     46 + 
     47 +# TODO: see definition of attr.asdict/astuple
     48 +def asdict(
     49 + inst: Any,
     50 + recurse: bool = ...,
     51 + filter: Optional[_FilterType[Any]] = ...,
     52 + dict_factory: Type[Mapping[Any, Any]] = ...,
     53 + retain_collection_types: bool = ...,
     54 + value_serializer: Optional[
     55 + Callable[[type, Attribute[Any], Any], Any]
     56 + ] = ...,
     57 + tuple_keys: bool = ...,
     58 +) -> Dict[str, Any]: ...
     59 + 
     60 +# TODO: add support for returning NamedTuple from the mypy plugin
     61 +def astuple(
     62 + inst: Any,
     63 + recurse: bool = ...,
     64 + filter: Optional[_FilterType[Any]] = ...,
     65 + tuple_factory: Type[Sequence[Any]] = ...,
     66 + retain_collection_types: bool = ...,
     67 +) -> Tuple[Any, ...]: ...
     68 + 
  • vuln_analyzer/lib/python3.11/site-packages/attrs/__pycache__/__init__.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attrs/__pycache__/converters.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attrs/__pycache__/exceptions.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attrs/__pycache__/filters.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attrs/__pycache__/setters.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/attrs/__pycache__/validators.cpython-311.pyc
    Binary file.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/converters.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +from attr.converters import * # noqa
     4 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/exceptions.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +from attr.exceptions import * # noqa
     4 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/filters.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +from attr.filters import * # noqa
     4 + 
  • ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/py.typed
     1 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/setters.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +from attr.setters import * # noqa
     4 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/attrs/validators.py
     1 +# SPDX-License-Identifier: MIT
     2 + 
     3 +from attr.validators import * # noqa
     4 + 
  • ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/certifi/__init__.py
     1 +from .core import contents, where
     2 + 
     3 +__all__ = ["contents", "where"]
     4 +__version__ = "2022.12.07"
     5 + 
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/certifi/__main__.py
     1 +import argparse
     2 + 
     3 +from certifi import contents, where
     4 + 
     5 +parser = argparse.ArgumentParser()
     6 +parser.add_argument("-c", "--contents", action="store_true")
     7 +args = parser.parse_args()
     8 + 
     9 +if args.contents:
     10 + print(contents())
     11 +else:
     12 + print(where())
     13 + 
  • vuln_analyzer/lib/python3.11/site-packages/certifi/__pycache__/__init__.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/certifi/__pycache__/__main__.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/certifi/__pycache__/core.cpython-311.pyc
    Binary file.
  • vuln_analyzer/lib/python3.11/site-packages/certifi/cacert.pem
    Diff is too large to be displayed.
  • ■ ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/certifi/core.py
     1 +"""
     2 +certifi.py
     3 +~~~~~~~~~~
     4 + 
     5 +This module returns the installation location of cacert.pem or its contents.
     6 +"""
     7 +import sys
     8 + 
     9 + 
     10 +if sys.version_info >= (3, 11):
     11 + 
     12 + from importlib.resources import as_file, files
     13 + 
     14 + _CACERT_CTX = None
     15 + _CACERT_PATH = None
     16 + 
     17 + def where() -> str:
     18 + # This is slightly terrible, but we want to delay extracting the file
     19 + # in cases where we're inside of a zipimport situation until someone
     20 + # actually calls where(), but we don't want to re-extract the file
     21 + # on every call of where(), so we'll do it once then store it in a
     22 + # global variable.
     23 + global _CACERT_CTX
     24 + global _CACERT_PATH
     25 + if _CACERT_PATH is None:
     26 + # This is slightly janky, the importlib.resources API wants you to
     27 + # manage the cleanup of this file, so it doesn't actually return a
     28 + # path, it returns a context manager that will give you the path
     29 + # when you enter it and will do any cleanup when you leave it. In
     30 + # the common case of not needing a temporary file, it will just
     31 + # return the file system location and the __exit__() is a no-op.
     32 + #
     33 + # We also have to hold onto the actual context manager, because
     34 + # it will do the cleanup whenever it gets garbage collected, so
     35 + # we will also store that at the global level as well.
     36 + _CACERT_CTX = as_file(files("certifi").joinpath("cacert.pem"))
     37 + _CACERT_PATH = str(_CACERT_CTX.__enter__())
     38 + 
     39 + return _CACERT_PATH
     40 + 
     41 + def contents() -> str:
     42 + return files("certifi").joinpath("cacert.pem").read_text(encoding="ascii")
     43 + 
     44 +elif sys.version_info >= (3, 7):
     45 + 
     46 + from importlib.resources import path as get_path, read_text
     47 + 
     48 + _CACERT_CTX = None
     49 + _CACERT_PATH = None
     50 + 
     51 + def where() -> str:
     52 + # This is slightly terrible, but we want to delay extracting the
     53 + # file in cases where we're inside of a zipimport situation until
     54 + # someone actually calls where(), but we don't want to re-extract
     55 + # the file on every call of where(), so we'll do it once then store
     56 + # it in a global variable.
     57 + global _CACERT_CTX
     58 + global _CACERT_PATH
     59 + if _CACERT_PATH is None:
     60 + # This is slightly janky, the importlib.resources API wants you
     61 + # to manage the cleanup of this file, so it doesn't actually
     62 + # return a path, it returns a context manager that will give
     63 + # you the path when you enter it and will do any cleanup when
     64 + # you leave it. In the common case of not needing a temporary
     65 + # file, it will just return the file system location and the
     66 + # __exit__() is a no-op.
     67 + #
     68 + # We also have to hold onto the actual context manager, because
     69 + # it will do the cleanup whenever it gets garbage collected, so
     70 + # we will also store that at the global level as well.
     71 + _CACERT_CTX = get_path("certifi", "cacert.pem")
     72 + _CACERT_PATH = str(_CACERT_CTX.__enter__())
     73 + 
     74 + return _CACERT_PATH
     75 + 
     76 + def contents() -> str:
     77 + return read_text("certifi", "cacert.pem", encoding="ascii")
     78 + 
     79 +else:
     80 + import os
     81 + import types
     82 + from typing import Union
     83 + 
     84 + Package = Union[types.ModuleType, str]
     85 + Resource = Union[str, "os.PathLike"]
     86 + 
     87 + # This fallback will work for Python versions prior to 3.7 that lack the
     88 + # importlib.resources module but relies on the existing `where` function
     89 + # so won't address issues with environments like PyOxidizer that don't set
     90 + # __file__ on modules.
     91 + def read_text(
     92 + package: Package,
     93 + resource: Resource,
     94 + encoding: str = 'utf-8',
     95 + errors: str = 'strict'
     96 + ) -> str:
     97 + with open(where(), encoding=encoding) as data:
     98 + return data.read()
     99 + 
     100 + # If we don't have importlib.resources, then we will just do the old logic
     101 + # of assuming we're on the filesystem and munge the path directly.
     102 + def where() -> str:
     103 + f = os.path.dirname(__file__)
     104 + 
     105 + return os.path.join(f, "cacert.pem")
     106 + 
     107 + def contents() -> str:
     108 + return read_text("certifi", "cacert.pem", encoding="ascii")
     109 + 
  • ■ ■ ■ ■ ■
    vuln_analyzer/lib/python3.11/site-packages/certifi/py.typed
     1 + 
Please wait...
Page is in error, reload to recover