Upload 634 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +25 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/INSTALLER +1 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/LICENSE +20 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/METADATA +135 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/RECORD +26 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/WHEEL +5 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/top_level.txt +1 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__init__.py +596 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/__init__.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/cache.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/fifo.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/func.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/keys.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/lfu.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/lru.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/mru.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/rr.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/ttl.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/cache.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/fifo.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/func.py +171 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/keys.py +52 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/lfu.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/lru.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/mru.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/rr.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/ttl.py +7 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/INSTALLER +1 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/LICENSE +20 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/METADATA +68 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/RECORD +14 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/WHEEL +5 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/top_level.txt +1 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__init__.py +4 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__main__.py +12 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__pycache__/__init__.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__pycache__/__main__.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__pycache__/core.cpython-37.pyc +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/cacert.pem +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/core.py +114 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/py.typed +0 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/INSTALLER +1 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/LICENSE +21 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/METADATA +721 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/RECORD +33 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/WHEEL +5 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/entry_points.txt +2 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/top_level.txt +1 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer/__init__.py +48 -0
- protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer/__main__.py +6 -0
.gitattributes
CHANGED
|
@@ -43,3 +43,28 @@ protege/deep-pantilt/venv/share/python-wheels/pip-18.1-py2.py3-none-any.whl filt
|
|
| 43 |
protege/deep-pantilt/venv/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 44 |
protege/deep-pantilt/venv/share/python-wheels/setuptools-40.8.0-py2.py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 45 |
protege/deep-pantilt/venv/share/python-wheels/urllib3-1.24.1-py2.py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
protege/deep-pantilt/venv/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 44 |
protege/deep-pantilt/venv/share/python-wheels/setuptools-40.8.0-py2.py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 45 |
protege/deep-pantilt/venv/share/python-wheels/urllib3-1.24.1-py2.py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/_conv.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/_errors.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/_objects.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/_proxy.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/_selector.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/defs.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5a.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5ac.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5d.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5ds.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5f.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5fd.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5g.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5i.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5l.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5o.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5p.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5r.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5s.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5t.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/h5z.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/h5py/utils.cpython-37m-arm-linux-gnueabihf.so filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
protege/deep-pantilt/venv/lib/python3.7/site-packages/idna/__pycache__/uts46data.cpython-37.pyc filter=lfs diff=lfs merge=lfs -text
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The MIT License (MIT)
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2014-2021 Thomas Kemmer
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 6 |
+
this software and associated documentation files (the "Software"), to deal in
|
| 7 |
+
the Software without restriction, including without limitation the rights to
|
| 8 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
| 9 |
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
| 10 |
+
subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 17 |
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
| 18 |
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 19 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 20 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/METADATA
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: cachetools
|
| 3 |
+
Version: 4.2.4
|
| 4 |
+
Summary: Extensible memoizing collections and decorators
|
| 5 |
+
Home-page: https://github.com/tkem/cachetools/
|
| 6 |
+
Author: Thomas Kemmer
|
| 7 |
+
Author-email: tkemmer@computer.org
|
| 8 |
+
License: MIT
|
| 9 |
+
Platform: UNKNOWN
|
| 10 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 11 |
+
Classifier: Environment :: Other Environment
|
| 12 |
+
Classifier: Intended Audience :: Developers
|
| 13 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 14 |
+
Classifier: Operating System :: OS Independent
|
| 15 |
+
Classifier: Programming Language :: Python
|
| 16 |
+
Classifier: Programming Language :: Python :: 3
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.5
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.6
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 22 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 23 |
+
Requires-Python: ~=3.5
|
| 24 |
+
|
| 25 |
+
cachetools
|
| 26 |
+
========================================================================
|
| 27 |
+
|
| 28 |
+
.. image:: https://img.shields.io/pypi/v/cachetools
|
| 29 |
+
:target: https://pypi.org/project/cachetools/
|
| 30 |
+
:alt: Latest PyPI version
|
| 31 |
+
|
| 32 |
+
.. image:: https://img.shields.io/readthedocs/cachetools
|
| 33 |
+
:target: https://cachetools.readthedocs.io/
|
| 34 |
+
:alt: Documentation build status
|
| 35 |
+
|
| 36 |
+
.. image:: https://img.shields.io/github/workflow/status/tkem/cachetools/CI
|
| 37 |
+
:target: https://github.com/tkem/cachetools/actions/workflows/ci.yml
|
| 38 |
+
:alt: CI build status
|
| 39 |
+
|
| 40 |
+
.. image:: https://img.shields.io/codecov/c/github/tkem/cachetools/master.svg
|
| 41 |
+
:target: https://codecov.io/gh/tkem/cachetools
|
| 42 |
+
:alt: Test coverage
|
| 43 |
+
|
| 44 |
+
.. image:: https://img.shields.io/github/license/tkem/cachetools
|
| 45 |
+
:target: https://raw.github.com/tkem/cachetools/master/LICENSE
|
| 46 |
+
:alt: License
|
| 47 |
+
|
| 48 |
+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
| 49 |
+
:target: https://github.com/psf/black
|
| 50 |
+
:alt: Code style: black
|
| 51 |
+
|
| 52 |
+
This module provides various memoizing collections and decorators,
|
| 53 |
+
including variants of the Python Standard Library's `@lru_cache`_
|
| 54 |
+
function decorator.
|
| 55 |
+
|
| 56 |
+
.. code-block:: python
|
| 57 |
+
|
| 58 |
+
from cachetools import cached, LRUCache, TTLCache
|
| 59 |
+
|
| 60 |
+
# speed up calculating Fibonacci numbers with dynamic programming
|
| 61 |
+
@cached(cache={})
|
| 62 |
+
def fib(n):
|
| 63 |
+
return n if n < 2 else fib(n - 1) + fib(n - 2)
|
| 64 |
+
|
| 65 |
+
# cache least recently used Python Enhancement Proposals
|
| 66 |
+
@cached(cache=LRUCache(maxsize=32))
|
| 67 |
+
def get_pep(num):
|
| 68 |
+
url = 'http://www.python.org/dev/peps/pep-%04d/' % num
|
| 69 |
+
with urllib.request.urlopen(url) as s:
|
| 70 |
+
return s.read()
|
| 71 |
+
|
| 72 |
+
# cache weather data for no longer than ten minutes
|
| 73 |
+
@cached(cache=TTLCache(maxsize=1024, ttl=600))
|
| 74 |
+
def get_weather(place):
|
| 75 |
+
return owm.weather_at_place(place).get_weather()
|
| 76 |
+
|
| 77 |
+
For the purpose of this module, a *cache* is a mutable_ mapping_ of a
|
| 78 |
+
fixed maximum size. When the cache is full, i.e. by adding another
|
| 79 |
+
item the cache would exceed its maximum size, the cache must choose
|
| 80 |
+
which item(s) to discard based on a suitable `cache algorithm`_. In
|
| 81 |
+
general, a cache's size is the total size of its items, and an item's
|
| 82 |
+
size is a property or function of its value, e.g. the result of
|
| 83 |
+
``sys.getsizeof(value)``. For the trivial but common case that each
|
| 84 |
+
item counts as ``1``, a cache's size is equal to the number of its
|
| 85 |
+
items, or ``len(cache)``.
|
| 86 |
+
|
| 87 |
+
Multiple cache classes based on different caching algorithms are
|
| 88 |
+
implemented, and decorators for easily memoizing function and method
|
| 89 |
+
calls are provided, too.
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
Installation
|
| 93 |
+
------------------------------------------------------------------------
|
| 94 |
+
|
| 95 |
+
cachetools is available from PyPI_ and can be installed by running::
|
| 96 |
+
|
| 97 |
+
pip install cachetools
|
| 98 |
+
|
| 99 |
+
Typing stubs for this package are provided by typeshed_ and can be
|
| 100 |
+
installed by running::
|
| 101 |
+
|
| 102 |
+
pip install types-cachetools
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
Project Resources
|
| 106 |
+
------------------------------------------------------------------------
|
| 107 |
+
|
| 108 |
+
- `Documentation`_
|
| 109 |
+
- `Issue tracker`_
|
| 110 |
+
- `Source code`_
|
| 111 |
+
- `Change log`_
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
License
|
| 115 |
+
------------------------------------------------------------------------
|
| 116 |
+
|
| 117 |
+
Copyright (c) 2014-2021 Thomas Kemmer.
|
| 118 |
+
|
| 119 |
+
Licensed under the `MIT License`_.
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
.. _@lru_cache: https://docs.python.org/3/library/functools.html#functools.lru_cache
|
| 123 |
+
.. _mutable: https://docs.python.org/dev/glossary.html#term-mutable
|
| 124 |
+
.. _mapping: https://docs.python.org/dev/glossary.html#term-mapping
|
| 125 |
+
.. _cache algorithm: https://en.wikipedia.org/wiki/Cache_algorithms
|
| 126 |
+
|
| 127 |
+
.. _PyPI: https://pypi.org/project/cachetools/
|
| 128 |
+
.. _typeshed: https://github.com/python/typeshed/
|
| 129 |
+
.. _Documentation: https://cachetools.readthedocs.io/
|
| 130 |
+
.. _Issue tracker: https://github.com/tkem/cachetools/issues/
|
| 131 |
+
.. _Source code: https://github.com/tkem/cachetools/
|
| 132 |
+
.. _Change log: https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst
|
| 133 |
+
.. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
|
| 134 |
+
|
| 135 |
+
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/RECORD
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cachetools-4.2.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
cachetools-4.2.4.dist-info/LICENSE,sha256=cJEEfa2G-tF5p3smluByDLAX4PRo1HT_PvXKLpe1qQY,1085
|
| 3 |
+
cachetools-4.2.4.dist-info/METADATA,sha256=_aiz0OsIkcIshjN3J-2W9xBtkx25ZSUgcw5hLI9ns5s,4805
|
| 4 |
+
cachetools-4.2.4.dist-info/RECORD,,
|
| 5 |
+
cachetools-4.2.4.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
| 6 |
+
cachetools-4.2.4.dist-info/top_level.txt,sha256=ai2FH78TGwoBcCgVfoqbzk5IQCtnDukdSs4zKuVPvDs,11
|
| 7 |
+
cachetools/__init__.py,sha256=sgSnzGmjze6qg38nISmsVN5DRv7wY07X4E7JtZqA-nI,16837
|
| 8 |
+
cachetools/__pycache__/__init__.cpython-37.pyc,,
|
| 9 |
+
cachetools/__pycache__/cache.cpython-37.pyc,,
|
| 10 |
+
cachetools/__pycache__/fifo.cpython-37.pyc,,
|
| 11 |
+
cachetools/__pycache__/func.cpython-37.pyc,,
|
| 12 |
+
cachetools/__pycache__/keys.cpython-37.pyc,,
|
| 13 |
+
cachetools/__pycache__/lfu.cpython-37.pyc,,
|
| 14 |
+
cachetools/__pycache__/lru.cpython-37.pyc,,
|
| 15 |
+
cachetools/__pycache__/mru.cpython-37.pyc,,
|
| 16 |
+
cachetools/__pycache__/rr.cpython-37.pyc,,
|
| 17 |
+
cachetools/__pycache__/ttl.cpython-37.pyc,,
|
| 18 |
+
cachetools/cache.py,sha256=_DGN7oODkIIC0PrOZecutp9AzE1934_6X9OsyzgwW6M,141
|
| 19 |
+
cachetools/fifo.py,sha256=6VPRGQjrfr6OlBnL6GnB6ANWFioXxG3lqR_sRaZoZWU,148
|
| 20 |
+
cachetools/func.py,sha256=VuGyCt7cOllN1FUuEjBiU1qQgsWzrfCHuajeTufQwkA,4906
|
| 21 |
+
cachetools/keys.py,sha256=SfGPnF5Goo1b8V-lrhB9Jxgqd3vm80R9h50k0hsAAjM,1466
|
| 22 |
+
cachetools/lfu.py,sha256=pbu4V4dnyQL3eH4Kz4a5_QY-RHdVV1Rklqr9Onk95yo,145
|
| 23 |
+
cachetools/lru.py,sha256=HfWFXBSQuAw_h2gT5Sk4TJjENUVZ5AYE9tU2lxaR9ho,145
|
| 24 |
+
cachetools/mru.py,sha256=gVC_kOyqGlrSayVxrs1rb23WYWI02TejIQIPcuYqahQ,145
|
| 25 |
+
cachetools/rr.py,sha256=4zUXdSViOQ0OZFHsaAhTO_RZfiL9B_wRMzzYuh3qmpQ,142
|
| 26 |
+
cachetools/ttl.py,sha256=aTbhX3-igXvCxKNZPyvVN60Lx9cWctu-Yn_dlk481UI,145
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: bdist_wheel (0.37.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools-4.2.4.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
cachetools
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__init__.py
ADDED
|
@@ -0,0 +1,596 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Extensible memoizing collections and decorators."""
|
| 2 |
+
|
| 3 |
+
__all__ = (
|
| 4 |
+
"Cache",
|
| 5 |
+
"FIFOCache",
|
| 6 |
+
"LFUCache",
|
| 7 |
+
"LRUCache",
|
| 8 |
+
"MRUCache",
|
| 9 |
+
"RRCache",
|
| 10 |
+
"TTLCache",
|
| 11 |
+
"cached",
|
| 12 |
+
"cachedmethod",
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
__version__ = "4.2.4"
|
| 16 |
+
|
| 17 |
+
import collections
|
| 18 |
+
import collections.abc
|
| 19 |
+
import functools
|
| 20 |
+
import random
|
| 21 |
+
import time
|
| 22 |
+
|
| 23 |
+
from .keys import hashkey
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class _DefaultSize:
|
| 27 |
+
|
| 28 |
+
__slots__ = ()
|
| 29 |
+
|
| 30 |
+
def __getitem__(self, _):
|
| 31 |
+
return 1
|
| 32 |
+
|
| 33 |
+
def __setitem__(self, _, value):
|
| 34 |
+
assert value == 1
|
| 35 |
+
|
| 36 |
+
def pop(self, _):
|
| 37 |
+
return 1
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
class Cache(collections.abc.MutableMapping):
|
| 41 |
+
"""Mutable mapping to serve as a simple cache or cache base class."""
|
| 42 |
+
|
| 43 |
+
__marker = object()
|
| 44 |
+
|
| 45 |
+
__size = _DefaultSize()
|
| 46 |
+
|
| 47 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 48 |
+
if getsizeof:
|
| 49 |
+
self.getsizeof = getsizeof
|
| 50 |
+
if self.getsizeof is not Cache.getsizeof:
|
| 51 |
+
self.__size = dict()
|
| 52 |
+
self.__data = dict()
|
| 53 |
+
self.__currsize = 0
|
| 54 |
+
self.__maxsize = maxsize
|
| 55 |
+
|
| 56 |
+
def __repr__(self):
|
| 57 |
+
return "%s(%r, maxsize=%r, currsize=%r)" % (
|
| 58 |
+
self.__class__.__name__,
|
| 59 |
+
list(self.__data.items()),
|
| 60 |
+
self.__maxsize,
|
| 61 |
+
self.__currsize,
|
| 62 |
+
)
|
| 63 |
+
|
| 64 |
+
def __getitem__(self, key):
|
| 65 |
+
try:
|
| 66 |
+
return self.__data[key]
|
| 67 |
+
except KeyError:
|
| 68 |
+
return self.__missing__(key)
|
| 69 |
+
|
| 70 |
+
def __setitem__(self, key, value):
|
| 71 |
+
maxsize = self.__maxsize
|
| 72 |
+
size = self.getsizeof(value)
|
| 73 |
+
if size > maxsize:
|
| 74 |
+
raise ValueError("value too large")
|
| 75 |
+
if key not in self.__data or self.__size[key] < size:
|
| 76 |
+
while self.__currsize + size > maxsize:
|
| 77 |
+
self.popitem()
|
| 78 |
+
if key in self.__data:
|
| 79 |
+
diffsize = size - self.__size[key]
|
| 80 |
+
else:
|
| 81 |
+
diffsize = size
|
| 82 |
+
self.__data[key] = value
|
| 83 |
+
self.__size[key] = size
|
| 84 |
+
self.__currsize += diffsize
|
| 85 |
+
|
| 86 |
+
def __delitem__(self, key):
|
| 87 |
+
size = self.__size.pop(key)
|
| 88 |
+
del self.__data[key]
|
| 89 |
+
self.__currsize -= size
|
| 90 |
+
|
| 91 |
+
def __contains__(self, key):
|
| 92 |
+
return key in self.__data
|
| 93 |
+
|
| 94 |
+
def __missing__(self, key):
|
| 95 |
+
raise KeyError(key)
|
| 96 |
+
|
| 97 |
+
def __iter__(self):
|
| 98 |
+
return iter(self.__data)
|
| 99 |
+
|
| 100 |
+
def __len__(self):
|
| 101 |
+
return len(self.__data)
|
| 102 |
+
|
| 103 |
+
def get(self, key, default=None):
|
| 104 |
+
if key in self:
|
| 105 |
+
return self[key]
|
| 106 |
+
else:
|
| 107 |
+
return default
|
| 108 |
+
|
| 109 |
+
def pop(self, key, default=__marker):
|
| 110 |
+
if key in self:
|
| 111 |
+
value = self[key]
|
| 112 |
+
del self[key]
|
| 113 |
+
elif default is self.__marker:
|
| 114 |
+
raise KeyError(key)
|
| 115 |
+
else:
|
| 116 |
+
value = default
|
| 117 |
+
return value
|
| 118 |
+
|
| 119 |
+
def setdefault(self, key, default=None):
|
| 120 |
+
if key in self:
|
| 121 |
+
value = self[key]
|
| 122 |
+
else:
|
| 123 |
+
self[key] = value = default
|
| 124 |
+
return value
|
| 125 |
+
|
| 126 |
+
@property
|
| 127 |
+
def maxsize(self):
|
| 128 |
+
"""The maximum size of the cache."""
|
| 129 |
+
return self.__maxsize
|
| 130 |
+
|
| 131 |
+
@property
|
| 132 |
+
def currsize(self):
|
| 133 |
+
"""The current size of the cache."""
|
| 134 |
+
return self.__currsize
|
| 135 |
+
|
| 136 |
+
@staticmethod
|
| 137 |
+
def getsizeof(value):
|
| 138 |
+
"""Return the size of a cache element's value."""
|
| 139 |
+
return 1
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
class FIFOCache(Cache):
|
| 143 |
+
"""First In First Out (FIFO) cache implementation."""
|
| 144 |
+
|
| 145 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 146 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 147 |
+
self.__order = collections.OrderedDict()
|
| 148 |
+
|
| 149 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 150 |
+
cache_setitem(self, key, value)
|
| 151 |
+
try:
|
| 152 |
+
self.__order.move_to_end(key)
|
| 153 |
+
except KeyError:
|
| 154 |
+
self.__order[key] = None
|
| 155 |
+
|
| 156 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 157 |
+
cache_delitem(self, key)
|
| 158 |
+
del self.__order[key]
|
| 159 |
+
|
| 160 |
+
def popitem(self):
|
| 161 |
+
"""Remove and return the `(key, value)` pair first inserted."""
|
| 162 |
+
try:
|
| 163 |
+
key = next(iter(self.__order))
|
| 164 |
+
except StopIteration:
|
| 165 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 166 |
+
else:
|
| 167 |
+
return (key, self.pop(key))
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
class LFUCache(Cache):
|
| 171 |
+
"""Least Frequently Used (LFU) cache implementation."""
|
| 172 |
+
|
| 173 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 174 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 175 |
+
self.__counter = collections.Counter()
|
| 176 |
+
|
| 177 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 178 |
+
value = cache_getitem(self, key)
|
| 179 |
+
if key in self: # __missing__ may not store item
|
| 180 |
+
self.__counter[key] -= 1
|
| 181 |
+
return value
|
| 182 |
+
|
| 183 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 184 |
+
cache_setitem(self, key, value)
|
| 185 |
+
self.__counter[key] -= 1
|
| 186 |
+
|
| 187 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 188 |
+
cache_delitem(self, key)
|
| 189 |
+
del self.__counter[key]
|
| 190 |
+
|
| 191 |
+
def popitem(self):
|
| 192 |
+
"""Remove and return the `(key, value)` pair least frequently used."""
|
| 193 |
+
try:
|
| 194 |
+
((key, _),) = self.__counter.most_common(1)
|
| 195 |
+
except ValueError:
|
| 196 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 197 |
+
else:
|
| 198 |
+
return (key, self.pop(key))
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
class LRUCache(Cache):
|
| 202 |
+
"""Least Recently Used (LRU) cache implementation."""
|
| 203 |
+
|
| 204 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 205 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 206 |
+
self.__order = collections.OrderedDict()
|
| 207 |
+
|
| 208 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 209 |
+
value = cache_getitem(self, key)
|
| 210 |
+
if key in self: # __missing__ may not store item
|
| 211 |
+
self.__update(key)
|
| 212 |
+
return value
|
| 213 |
+
|
| 214 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 215 |
+
cache_setitem(self, key, value)
|
| 216 |
+
self.__update(key)
|
| 217 |
+
|
| 218 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 219 |
+
cache_delitem(self, key)
|
| 220 |
+
del self.__order[key]
|
| 221 |
+
|
| 222 |
+
def popitem(self):
|
| 223 |
+
"""Remove and return the `(key, value)` pair least recently used."""
|
| 224 |
+
try:
|
| 225 |
+
key = next(iter(self.__order))
|
| 226 |
+
except StopIteration:
|
| 227 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 228 |
+
else:
|
| 229 |
+
return (key, self.pop(key))
|
| 230 |
+
|
| 231 |
+
def __update(self, key):
|
| 232 |
+
try:
|
| 233 |
+
self.__order.move_to_end(key)
|
| 234 |
+
except KeyError:
|
| 235 |
+
self.__order[key] = None
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
class MRUCache(Cache):
|
| 239 |
+
"""Most Recently Used (MRU) cache implementation."""
|
| 240 |
+
|
| 241 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 242 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 243 |
+
self.__order = collections.OrderedDict()
|
| 244 |
+
|
| 245 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 246 |
+
value = cache_getitem(self, key)
|
| 247 |
+
if key in self: # __missing__ may not store item
|
| 248 |
+
self.__update(key)
|
| 249 |
+
return value
|
| 250 |
+
|
| 251 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 252 |
+
cache_setitem(self, key, value)
|
| 253 |
+
self.__update(key)
|
| 254 |
+
|
| 255 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 256 |
+
cache_delitem(self, key)
|
| 257 |
+
del self.__order[key]
|
| 258 |
+
|
| 259 |
+
def popitem(self):
|
| 260 |
+
"""Remove and return the `(key, value)` pair most recently used."""
|
| 261 |
+
try:
|
| 262 |
+
key = next(iter(self.__order))
|
| 263 |
+
except StopIteration:
|
| 264 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 265 |
+
else:
|
| 266 |
+
return (key, self.pop(key))
|
| 267 |
+
|
| 268 |
+
def __update(self, key):
|
| 269 |
+
try:
|
| 270 |
+
self.__order.move_to_end(key, last=False)
|
| 271 |
+
except KeyError:
|
| 272 |
+
self.__order[key] = None
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
class RRCache(Cache):
|
| 276 |
+
"""Random Replacement (RR) cache implementation."""
|
| 277 |
+
|
| 278 |
+
def __init__(self, maxsize, choice=random.choice, getsizeof=None):
|
| 279 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 280 |
+
self.__choice = choice
|
| 281 |
+
|
| 282 |
+
@property
|
| 283 |
+
def choice(self):
|
| 284 |
+
"""The `choice` function used by the cache."""
|
| 285 |
+
return self.__choice
|
| 286 |
+
|
| 287 |
+
def popitem(self):
|
| 288 |
+
"""Remove and return a random `(key, value)` pair."""
|
| 289 |
+
try:
|
| 290 |
+
key = self.__choice(list(self))
|
| 291 |
+
except IndexError:
|
| 292 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 293 |
+
else:
|
| 294 |
+
return (key, self.pop(key))
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
class _Timer:
|
| 298 |
+
def __init__(self, timer):
|
| 299 |
+
self.__timer = timer
|
| 300 |
+
self.__nesting = 0
|
| 301 |
+
|
| 302 |
+
def __call__(self):
|
| 303 |
+
if self.__nesting == 0:
|
| 304 |
+
return self.__timer()
|
| 305 |
+
else:
|
| 306 |
+
return self.__time
|
| 307 |
+
|
| 308 |
+
def __enter__(self):
|
| 309 |
+
if self.__nesting == 0:
|
| 310 |
+
self.__time = time = self.__timer()
|
| 311 |
+
else:
|
| 312 |
+
time = self.__time
|
| 313 |
+
self.__nesting += 1
|
| 314 |
+
return time
|
| 315 |
+
|
| 316 |
+
def __exit__(self, *exc):
|
| 317 |
+
self.__nesting -= 1
|
| 318 |
+
|
| 319 |
+
def __reduce__(self):
|
| 320 |
+
return _Timer, (self.__timer,)
|
| 321 |
+
|
| 322 |
+
def __getattr__(self, name):
|
| 323 |
+
return getattr(self.__timer, name)
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
class _Link:
|
| 327 |
+
|
| 328 |
+
__slots__ = ("key", "expire", "next", "prev")
|
| 329 |
+
|
| 330 |
+
def __init__(self, key=None, expire=None):
|
| 331 |
+
self.key = key
|
| 332 |
+
self.expire = expire
|
| 333 |
+
|
| 334 |
+
def __reduce__(self):
|
| 335 |
+
return _Link, (self.key, self.expire)
|
| 336 |
+
|
| 337 |
+
def unlink(self):
|
| 338 |
+
next = self.next
|
| 339 |
+
prev = self.prev
|
| 340 |
+
prev.next = next
|
| 341 |
+
next.prev = prev
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
class TTLCache(Cache):
|
| 345 |
+
"""LRU Cache implementation with per-item time-to-live (TTL) value."""
|
| 346 |
+
|
| 347 |
+
def __init__(self, maxsize, ttl, timer=time.monotonic, getsizeof=None):
|
| 348 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 349 |
+
self.__root = root = _Link()
|
| 350 |
+
root.prev = root.next = root
|
| 351 |
+
self.__links = collections.OrderedDict()
|
| 352 |
+
self.__timer = _Timer(timer)
|
| 353 |
+
self.__ttl = ttl
|
| 354 |
+
|
| 355 |
+
def __contains__(self, key):
|
| 356 |
+
try:
|
| 357 |
+
link = self.__links[key] # no reordering
|
| 358 |
+
except KeyError:
|
| 359 |
+
return False
|
| 360 |
+
else:
|
| 361 |
+
return not (link.expire < self.__timer())
|
| 362 |
+
|
| 363 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 364 |
+
try:
|
| 365 |
+
link = self.__getlink(key)
|
| 366 |
+
except KeyError:
|
| 367 |
+
expired = False
|
| 368 |
+
else:
|
| 369 |
+
expired = link.expire < self.__timer()
|
| 370 |
+
if expired:
|
| 371 |
+
return self.__missing__(key)
|
| 372 |
+
else:
|
| 373 |
+
return cache_getitem(self, key)
|
| 374 |
+
|
| 375 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 376 |
+
with self.__timer as time:
|
| 377 |
+
self.expire(time)
|
| 378 |
+
cache_setitem(self, key, value)
|
| 379 |
+
try:
|
| 380 |
+
link = self.__getlink(key)
|
| 381 |
+
except KeyError:
|
| 382 |
+
self.__links[key] = link = _Link(key)
|
| 383 |
+
else:
|
| 384 |
+
link.unlink()
|
| 385 |
+
link.expire = time + self.__ttl
|
| 386 |
+
link.next = root = self.__root
|
| 387 |
+
link.prev = prev = root.prev
|
| 388 |
+
prev.next = root.prev = link
|
| 389 |
+
|
| 390 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 391 |
+
cache_delitem(self, key)
|
| 392 |
+
link = self.__links.pop(key)
|
| 393 |
+
link.unlink()
|
| 394 |
+
if link.expire < self.__timer():
|
| 395 |
+
raise KeyError(key)
|
| 396 |
+
|
| 397 |
+
def __iter__(self):
|
| 398 |
+
root = self.__root
|
| 399 |
+
curr = root.next
|
| 400 |
+
while curr is not root:
|
| 401 |
+
# "freeze" time for iterator access
|
| 402 |
+
with self.__timer as time:
|
| 403 |
+
if not (curr.expire < time):
|
| 404 |
+
yield curr.key
|
| 405 |
+
curr = curr.next
|
| 406 |
+
|
| 407 |
+
def __len__(self):
|
| 408 |
+
root = self.__root
|
| 409 |
+
curr = root.next
|
| 410 |
+
time = self.__timer()
|
| 411 |
+
count = len(self.__links)
|
| 412 |
+
while curr is not root and curr.expire < time:
|
| 413 |
+
count -= 1
|
| 414 |
+
curr = curr.next
|
| 415 |
+
return count
|
| 416 |
+
|
| 417 |
+
def __setstate__(self, state):
|
| 418 |
+
self.__dict__.update(state)
|
| 419 |
+
root = self.__root
|
| 420 |
+
root.prev = root.next = root
|
| 421 |
+
for link in sorted(self.__links.values(), key=lambda obj: obj.expire):
|
| 422 |
+
link.next = root
|
| 423 |
+
link.prev = prev = root.prev
|
| 424 |
+
prev.next = root.prev = link
|
| 425 |
+
self.expire(self.__timer())
|
| 426 |
+
|
| 427 |
+
def __repr__(self, cache_repr=Cache.__repr__):
|
| 428 |
+
with self.__timer as time:
|
| 429 |
+
self.expire(time)
|
| 430 |
+
return cache_repr(self)
|
| 431 |
+
|
| 432 |
+
@property
|
| 433 |
+
def currsize(self):
|
| 434 |
+
with self.__timer as time:
|
| 435 |
+
self.expire(time)
|
| 436 |
+
return super().currsize
|
| 437 |
+
|
| 438 |
+
@property
|
| 439 |
+
def timer(self):
|
| 440 |
+
"""The timer function used by the cache."""
|
| 441 |
+
return self.__timer
|
| 442 |
+
|
| 443 |
+
@property
|
| 444 |
+
def ttl(self):
|
| 445 |
+
"""The time-to-live value of the cache's items."""
|
| 446 |
+
return self.__ttl
|
| 447 |
+
|
| 448 |
+
def expire(self, time=None):
|
| 449 |
+
"""Remove expired items from the cache."""
|
| 450 |
+
if time is None:
|
| 451 |
+
time = self.__timer()
|
| 452 |
+
root = self.__root
|
| 453 |
+
curr = root.next
|
| 454 |
+
links = self.__links
|
| 455 |
+
cache_delitem = Cache.__delitem__
|
| 456 |
+
while curr is not root and curr.expire < time:
|
| 457 |
+
cache_delitem(self, curr.key)
|
| 458 |
+
del links[curr.key]
|
| 459 |
+
next = curr.next
|
| 460 |
+
curr.unlink()
|
| 461 |
+
curr = next
|
| 462 |
+
|
| 463 |
+
def clear(self):
|
| 464 |
+
with self.__timer as time:
|
| 465 |
+
self.expire(time)
|
| 466 |
+
Cache.clear(self)
|
| 467 |
+
|
| 468 |
+
def get(self, *args, **kwargs):
|
| 469 |
+
with self.__timer:
|
| 470 |
+
return Cache.get(self, *args, **kwargs)
|
| 471 |
+
|
| 472 |
+
def pop(self, *args, **kwargs):
|
| 473 |
+
with self.__timer:
|
| 474 |
+
return Cache.pop(self, *args, **kwargs)
|
| 475 |
+
|
| 476 |
+
def setdefault(self, *args, **kwargs):
|
| 477 |
+
with self.__timer:
|
| 478 |
+
return Cache.setdefault(self, *args, **kwargs)
|
| 479 |
+
|
| 480 |
+
def popitem(self):
|
| 481 |
+
"""Remove and return the `(key, value)` pair least recently used that
|
| 482 |
+
has not already expired.
|
| 483 |
+
|
| 484 |
+
"""
|
| 485 |
+
with self.__timer as time:
|
| 486 |
+
self.expire(time)
|
| 487 |
+
try:
|
| 488 |
+
key = next(iter(self.__links))
|
| 489 |
+
except StopIteration:
|
| 490 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 491 |
+
else:
|
| 492 |
+
return (key, self.pop(key))
|
| 493 |
+
|
| 494 |
+
def __getlink(self, key):
|
| 495 |
+
value = self.__links[key]
|
| 496 |
+
self.__links.move_to_end(key)
|
| 497 |
+
return value
|
| 498 |
+
|
| 499 |
+
|
| 500 |
+
def cached(cache, key=hashkey, lock=None):
|
| 501 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 502 |
+
results in a cache.
|
| 503 |
+
|
| 504 |
+
"""
|
| 505 |
+
|
| 506 |
+
def decorator(func):
|
| 507 |
+
if cache is None:
|
| 508 |
+
|
| 509 |
+
def wrapper(*args, **kwargs):
|
| 510 |
+
return func(*args, **kwargs)
|
| 511 |
+
|
| 512 |
+
elif lock is None:
|
| 513 |
+
|
| 514 |
+
def wrapper(*args, **kwargs):
|
| 515 |
+
k = key(*args, **kwargs)
|
| 516 |
+
try:
|
| 517 |
+
return cache[k]
|
| 518 |
+
except KeyError:
|
| 519 |
+
pass # key not found
|
| 520 |
+
v = func(*args, **kwargs)
|
| 521 |
+
try:
|
| 522 |
+
cache[k] = v
|
| 523 |
+
except ValueError:
|
| 524 |
+
pass # value too large
|
| 525 |
+
return v
|
| 526 |
+
|
| 527 |
+
else:
|
| 528 |
+
|
| 529 |
+
def wrapper(*args, **kwargs):
|
| 530 |
+
k = key(*args, **kwargs)
|
| 531 |
+
try:
|
| 532 |
+
with lock:
|
| 533 |
+
return cache[k]
|
| 534 |
+
except KeyError:
|
| 535 |
+
pass # key not found
|
| 536 |
+
v = func(*args, **kwargs)
|
| 537 |
+
# in case of a race, prefer the item already in the cache
|
| 538 |
+
try:
|
| 539 |
+
with lock:
|
| 540 |
+
return cache.setdefault(k, v)
|
| 541 |
+
except ValueError:
|
| 542 |
+
return v # value too large
|
| 543 |
+
|
| 544 |
+
return functools.update_wrapper(wrapper, func)
|
| 545 |
+
|
| 546 |
+
return decorator
|
| 547 |
+
|
| 548 |
+
|
| 549 |
+
def cachedmethod(cache, key=hashkey, lock=None):
|
| 550 |
+
"""Decorator to wrap a class or instance method with a memoizing
|
| 551 |
+
callable that saves results in a cache.
|
| 552 |
+
|
| 553 |
+
"""
|
| 554 |
+
|
| 555 |
+
def decorator(method):
|
| 556 |
+
if lock is None:
|
| 557 |
+
|
| 558 |
+
def wrapper(self, *args, **kwargs):
|
| 559 |
+
c = cache(self)
|
| 560 |
+
if c is None:
|
| 561 |
+
return method(self, *args, **kwargs)
|
| 562 |
+
k = key(*args, **kwargs)
|
| 563 |
+
try:
|
| 564 |
+
return c[k]
|
| 565 |
+
except KeyError:
|
| 566 |
+
pass # key not found
|
| 567 |
+
v = method(self, *args, **kwargs)
|
| 568 |
+
try:
|
| 569 |
+
c[k] = v
|
| 570 |
+
except ValueError:
|
| 571 |
+
pass # value too large
|
| 572 |
+
return v
|
| 573 |
+
|
| 574 |
+
else:
|
| 575 |
+
|
| 576 |
+
def wrapper(self, *args, **kwargs):
|
| 577 |
+
c = cache(self)
|
| 578 |
+
if c is None:
|
| 579 |
+
return method(self, *args, **kwargs)
|
| 580 |
+
k = key(*args, **kwargs)
|
| 581 |
+
try:
|
| 582 |
+
with lock(self):
|
| 583 |
+
return c[k]
|
| 584 |
+
except KeyError:
|
| 585 |
+
pass # key not found
|
| 586 |
+
v = method(self, *args, **kwargs)
|
| 587 |
+
# in case of a race, prefer the item already in the cache
|
| 588 |
+
try:
|
| 589 |
+
with lock(self):
|
| 590 |
+
return c.setdefault(k, v)
|
| 591 |
+
except ValueError:
|
| 592 |
+
return v # value too large
|
| 593 |
+
|
| 594 |
+
return functools.update_wrapper(wrapper, method)
|
| 595 |
+
|
| 596 |
+
return decorator
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/__init__.cpython-37.pyc
ADDED
|
Binary file (18.7 kB). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/cache.cpython-37.pyc
ADDED
|
Binary file (331 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/fifo.cpython-37.pyc
ADDED
|
Binary file (337 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/func.cpython-37.pyc
ADDED
|
Binary file (5.36 kB). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/keys.cpython-37.pyc
ADDED
|
Binary file (2.06 kB). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/lfu.cpython-37.pyc
ADDED
|
Binary file (333 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/lru.cpython-37.pyc
ADDED
|
Binary file (333 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/mru.cpython-37.pyc
ADDED
|
Binary file (333 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/rr.cpython-37.pyc
ADDED
|
Binary file (329 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/__pycache__/ttl.cpython-37.pyc
ADDED
|
Binary file (333 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/cache.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import Cache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.cache is deprecated, please use cachetools.Cache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/fifo.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import FIFOCache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.fifo is deprecated, please use cachetools.FIFOCache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/func.py
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""`functools.lru_cache` compatible memoizing function decorators."""
|
| 2 |
+
|
| 3 |
+
__all__ = ("fifo_cache", "lfu_cache", "lru_cache", "mru_cache", "rr_cache", "ttl_cache")
|
| 4 |
+
|
| 5 |
+
import collections
|
| 6 |
+
import functools
|
| 7 |
+
import math
|
| 8 |
+
import random
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
try:
|
| 12 |
+
from threading import RLock
|
| 13 |
+
except ImportError: # pragma: no cover
|
| 14 |
+
from dummy_threading import RLock
|
| 15 |
+
|
| 16 |
+
from . import FIFOCache, LFUCache, LRUCache, MRUCache, RRCache, TTLCache
|
| 17 |
+
from . import keys
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
_CacheInfo = collections.namedtuple(
|
| 21 |
+
"CacheInfo", ["hits", "misses", "maxsize", "currsize"]
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class _UnboundCache(dict):
|
| 26 |
+
@property
|
| 27 |
+
def maxsize(self):
|
| 28 |
+
return None
|
| 29 |
+
|
| 30 |
+
@property
|
| 31 |
+
def currsize(self):
|
| 32 |
+
return len(self)
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
class _UnboundTTLCache(TTLCache):
|
| 36 |
+
def __init__(self, ttl, timer):
|
| 37 |
+
TTLCache.__init__(self, math.inf, ttl, timer)
|
| 38 |
+
|
| 39 |
+
@property
|
| 40 |
+
def maxsize(self):
|
| 41 |
+
return None
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
def _cache(cache, typed):
|
| 45 |
+
maxsize = cache.maxsize
|
| 46 |
+
|
| 47 |
+
def decorator(func):
|
| 48 |
+
key = keys.typedkey if typed else keys.hashkey
|
| 49 |
+
lock = RLock()
|
| 50 |
+
stats = [0, 0]
|
| 51 |
+
|
| 52 |
+
def wrapper(*args, **kwargs):
|
| 53 |
+
k = key(*args, **kwargs)
|
| 54 |
+
with lock:
|
| 55 |
+
try:
|
| 56 |
+
v = cache[k]
|
| 57 |
+
stats[0] += 1
|
| 58 |
+
return v
|
| 59 |
+
except KeyError:
|
| 60 |
+
stats[1] += 1
|
| 61 |
+
v = func(*args, **kwargs)
|
| 62 |
+
# in case of a race, prefer the item already in the cache
|
| 63 |
+
try:
|
| 64 |
+
with lock:
|
| 65 |
+
return cache.setdefault(k, v)
|
| 66 |
+
except ValueError:
|
| 67 |
+
return v # value too large
|
| 68 |
+
|
| 69 |
+
def cache_info():
|
| 70 |
+
with lock:
|
| 71 |
+
hits, misses = stats
|
| 72 |
+
maxsize = cache.maxsize
|
| 73 |
+
currsize = cache.currsize
|
| 74 |
+
return _CacheInfo(hits, misses, maxsize, currsize)
|
| 75 |
+
|
| 76 |
+
def cache_clear():
|
| 77 |
+
with lock:
|
| 78 |
+
try:
|
| 79 |
+
cache.clear()
|
| 80 |
+
finally:
|
| 81 |
+
stats[:] = [0, 0]
|
| 82 |
+
|
| 83 |
+
wrapper.cache_info = cache_info
|
| 84 |
+
wrapper.cache_clear = cache_clear
|
| 85 |
+
wrapper.cache_parameters = lambda: {"maxsize": maxsize, "typed": typed}
|
| 86 |
+
functools.update_wrapper(wrapper, func)
|
| 87 |
+
return wrapper
|
| 88 |
+
|
| 89 |
+
return decorator
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
def fifo_cache(maxsize=128, typed=False):
|
| 93 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 94 |
+
up to `maxsize` results based on a First In First Out (FIFO)
|
| 95 |
+
algorithm.
|
| 96 |
+
|
| 97 |
+
"""
|
| 98 |
+
if maxsize is None:
|
| 99 |
+
return _cache(_UnboundCache(), typed)
|
| 100 |
+
elif callable(maxsize):
|
| 101 |
+
return _cache(FIFOCache(128), typed)(maxsize)
|
| 102 |
+
else:
|
| 103 |
+
return _cache(FIFOCache(maxsize), typed)
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
def lfu_cache(maxsize=128, typed=False):
|
| 107 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 108 |
+
up to `maxsize` results based on a Least Frequently Used (LFU)
|
| 109 |
+
algorithm.
|
| 110 |
+
|
| 111 |
+
"""
|
| 112 |
+
if maxsize is None:
|
| 113 |
+
return _cache(_UnboundCache(), typed)
|
| 114 |
+
elif callable(maxsize):
|
| 115 |
+
return _cache(LFUCache(128), typed)(maxsize)
|
| 116 |
+
else:
|
| 117 |
+
return _cache(LFUCache(maxsize), typed)
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def lru_cache(maxsize=128, typed=False):
|
| 121 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 122 |
+
up to `maxsize` results based on a Least Recently Used (LRU)
|
| 123 |
+
algorithm.
|
| 124 |
+
|
| 125 |
+
"""
|
| 126 |
+
if maxsize is None:
|
| 127 |
+
return _cache(_UnboundCache(), typed)
|
| 128 |
+
elif callable(maxsize):
|
| 129 |
+
return _cache(LRUCache(128), typed)(maxsize)
|
| 130 |
+
else:
|
| 131 |
+
return _cache(LRUCache(maxsize), typed)
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
def mru_cache(maxsize=128, typed=False):
|
| 135 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 136 |
+
up to `maxsize` results based on a Most Recently Used (MRU)
|
| 137 |
+
algorithm.
|
| 138 |
+
"""
|
| 139 |
+
if maxsize is None:
|
| 140 |
+
return _cache(_UnboundCache(), typed)
|
| 141 |
+
elif callable(maxsize):
|
| 142 |
+
return _cache(MRUCache(128), typed)(maxsize)
|
| 143 |
+
else:
|
| 144 |
+
return _cache(MRUCache(maxsize), typed)
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
def rr_cache(maxsize=128, choice=random.choice, typed=False):
|
| 148 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 149 |
+
up to `maxsize` results based on a Random Replacement (RR)
|
| 150 |
+
algorithm.
|
| 151 |
+
|
| 152 |
+
"""
|
| 153 |
+
if maxsize is None:
|
| 154 |
+
return _cache(_UnboundCache(), typed)
|
| 155 |
+
elif callable(maxsize):
|
| 156 |
+
return _cache(RRCache(128, choice), typed)(maxsize)
|
| 157 |
+
else:
|
| 158 |
+
return _cache(RRCache(maxsize, choice), typed)
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
def ttl_cache(maxsize=128, ttl=600, timer=time.monotonic, typed=False):
|
| 162 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 163 |
+
up to `maxsize` results based on a Least Recently Used (LRU)
|
| 164 |
+
algorithm with a per-item time-to-live (TTL) value.
|
| 165 |
+
"""
|
| 166 |
+
if maxsize is None:
|
| 167 |
+
return _cache(_UnboundTTLCache(ttl, timer), typed)
|
| 168 |
+
elif callable(maxsize):
|
| 169 |
+
return _cache(TTLCache(128, ttl, timer), typed)(maxsize)
|
| 170 |
+
else:
|
| 171 |
+
return _cache(TTLCache(maxsize, ttl, timer), typed)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/keys.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Key functions for memoizing decorators."""
|
| 2 |
+
|
| 3 |
+
__all__ = ("hashkey", "typedkey")
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class _HashedTuple(tuple):
|
| 7 |
+
"""A tuple that ensures that hash() will be called no more than once
|
| 8 |
+
per element, since cache decorators will hash the key multiple
|
| 9 |
+
times on a cache miss. See also _HashedSeq in the standard
|
| 10 |
+
library functools implementation.
|
| 11 |
+
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
__hashvalue = None
|
| 15 |
+
|
| 16 |
+
def __hash__(self, hash=tuple.__hash__):
|
| 17 |
+
hashvalue = self.__hashvalue
|
| 18 |
+
if hashvalue is None:
|
| 19 |
+
self.__hashvalue = hashvalue = hash(self)
|
| 20 |
+
return hashvalue
|
| 21 |
+
|
| 22 |
+
def __add__(self, other, add=tuple.__add__):
|
| 23 |
+
return _HashedTuple(add(self, other))
|
| 24 |
+
|
| 25 |
+
def __radd__(self, other, add=tuple.__add__):
|
| 26 |
+
return _HashedTuple(add(other, self))
|
| 27 |
+
|
| 28 |
+
def __getstate__(self):
|
| 29 |
+
return {}
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
# used for separating keyword arguments; we do not use an object
|
| 33 |
+
# instance here so identity is preserved when pickling/unpickling
|
| 34 |
+
_kwmark = (_HashedTuple,)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def hashkey(*args, **kwargs):
|
| 38 |
+
"""Return a cache key for the specified hashable arguments."""
|
| 39 |
+
|
| 40 |
+
if kwargs:
|
| 41 |
+
return _HashedTuple(args + sum(sorted(kwargs.items()), _kwmark))
|
| 42 |
+
else:
|
| 43 |
+
return _HashedTuple(args)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def typedkey(*args, **kwargs):
|
| 47 |
+
"""Return a typed cache key for the specified hashable arguments."""
|
| 48 |
+
|
| 49 |
+
key = hashkey(*args, **kwargs)
|
| 50 |
+
key += tuple(type(v) for v in args)
|
| 51 |
+
key += tuple(type(v) for _, v in sorted(kwargs.items()))
|
| 52 |
+
return key
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/lfu.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import LFUCache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.lfu is deprecated, please use cachetools.LFUCache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/lru.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import LRUCache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.lru is deprecated, please use cachetools.LRUCache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/mru.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import MRUCache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.mru is deprecated, please use cachetools.MRUCache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/rr.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import RRCache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.rr is deprecated, please use cachetools.RRCache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/cachetools/ttl.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import warnings
|
| 2 |
+
|
| 3 |
+
from . import TTLCache
|
| 4 |
+
|
| 5 |
+
warnings.warn(
|
| 6 |
+
"cachetools.ttl is deprecated, please use cachetools.TTLCache", DeprecationWarning
|
| 7 |
+
)
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This package contains a modified version of ca-bundle.crt:
|
| 2 |
+
|
| 3 |
+
ca-bundle.crt -- Bundle of CA Root Certificates
|
| 4 |
+
|
| 5 |
+
This is a bundle of X.509 certificates of public Certificate Authorities
|
| 6 |
+
(CA). These were automatically extracted from Mozilla's root certificates
|
| 7 |
+
file (certdata.txt). This file can be found in the mozilla source tree:
|
| 8 |
+
https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
|
| 9 |
+
It contains the certificates in PEM format and therefore
|
| 10 |
+
can be directly used with curl / libcurl / php_curl, or with
|
| 11 |
+
an Apache+mod_ssl webserver for SSL client authentication.
|
| 12 |
+
Just configure this file as the SSLCACertificateFile.#
|
| 13 |
+
|
| 14 |
+
***** BEGIN LICENSE BLOCK *****
|
| 15 |
+
This Source Code Form is subject to the terms of the Mozilla Public License,
|
| 16 |
+
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
|
| 17 |
+
one at http://mozilla.org/MPL/2.0/.
|
| 18 |
+
|
| 19 |
+
***** END LICENSE BLOCK *****
|
| 20 |
+
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/METADATA
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: certifi
|
| 3 |
+
Version: 2025.1.31
|
| 4 |
+
Summary: Python package for providing Mozilla's CA Bundle.
|
| 5 |
+
Home-page: https://github.com/certifi/python-certifi
|
| 6 |
+
Author: Kenneth Reitz
|
| 7 |
+
Author-email: me@kennethreitz.com
|
| 8 |
+
License: MPL-2.0
|
| 9 |
+
Project-URL: Source, https://github.com/certifi/python-certifi
|
| 10 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 11 |
+
Classifier: Intended Audience :: Developers
|
| 12 |
+
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
| 13 |
+
Classifier: Natural Language :: English
|
| 14 |
+
Classifier: Programming Language :: Python
|
| 15 |
+
Classifier: Programming Language :: Python :: 3
|
| 16 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.6
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 25 |
+
Requires-Python: >=3.6
|
| 26 |
+
License-File: LICENSE
|
| 27 |
+
|
| 28 |
+
Certifi: Python SSL Certificates
|
| 29 |
+
================================
|
| 30 |
+
|
| 31 |
+
Certifi provides Mozilla's carefully curated collection of Root Certificates for
|
| 32 |
+
validating the trustworthiness of SSL certificates while verifying the identity
|
| 33 |
+
of TLS hosts. It has been extracted from the `Requests`_ project.
|
| 34 |
+
|
| 35 |
+
Installation
|
| 36 |
+
------------
|
| 37 |
+
|
| 38 |
+
``certifi`` is available on PyPI. Simply install it with ``pip``::
|
| 39 |
+
|
| 40 |
+
$ pip install certifi
|
| 41 |
+
|
| 42 |
+
Usage
|
| 43 |
+
-----
|
| 44 |
+
|
| 45 |
+
To reference the installed certificate authority (CA) bundle, you can use the
|
| 46 |
+
built-in function::
|
| 47 |
+
|
| 48 |
+
>>> import certifi
|
| 49 |
+
|
| 50 |
+
>>> certifi.where()
|
| 51 |
+
'/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'
|
| 52 |
+
|
| 53 |
+
Or from the command line::
|
| 54 |
+
|
| 55 |
+
$ python -m certifi
|
| 56 |
+
/usr/local/lib/python3.7/site-packages/certifi/cacert.pem
|
| 57 |
+
|
| 58 |
+
Enjoy!
|
| 59 |
+
|
| 60 |
+
.. _`Requests`: https://requests.readthedocs.io/en/master/
|
| 61 |
+
|
| 62 |
+
Addition/Removal of Certificates
|
| 63 |
+
--------------------------------
|
| 64 |
+
|
| 65 |
+
Certifi does not support any addition/removal or other modification of the
|
| 66 |
+
CA trust store content. This project is intended to provide a reliable and
|
| 67 |
+
highly portable root of trust to python deployments. Look to upstream projects
|
| 68 |
+
for methods to use alternate trust.
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/RECORD
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
certifi-2025.1.31.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
certifi-2025.1.31.dist-info/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
|
| 3 |
+
certifi-2025.1.31.dist-info/METADATA,sha256=l9pPyH8X-gORo4Wgl72vZd2uifJ_kLcnDwKakddIWPM,2273
|
| 4 |
+
certifi-2025.1.31.dist-info/RECORD,,
|
| 5 |
+
certifi-2025.1.31.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
| 6 |
+
certifi-2025.1.31.dist-info/top_level.txt,sha256=KMu4vUCfsjLrkPbSNdgdekS-pVJzBAJFO__nI8NF6-U,8
|
| 7 |
+
certifi/__init__.py,sha256=neIaAf7BM36ygmQCmy-ZsSyjnvjWghFeu13wwEAnjj0,94
|
| 8 |
+
certifi/__main__.py,sha256=xBBoj905TUWBLRGANOcf7oi6e-3dMP4cEoG9OyMs11g,243
|
| 9 |
+
certifi/__pycache__/__init__.cpython-37.pyc,,
|
| 10 |
+
certifi/__pycache__/__main__.cpython-37.pyc,,
|
| 11 |
+
certifi/__pycache__/core.cpython-37.pyc,,
|
| 12 |
+
certifi/cacert.pem,sha256=xVsh-Qf3-G1IrdCTVS-1ZRdJ_1-GBQjMu0I9bB-9gMc,297255
|
| 13 |
+
certifi/core.py,sha256=qRDDFyXVJwTB_EmoGppaXU_R9qCZvhl-EzxPMuV3nTA,4426
|
| 14 |
+
certifi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (75.3.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi-2025.1.31.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
certifi
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__init__.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from .core import contents, where
|
| 2 |
+
|
| 3 |
+
__all__ = ["contents", "where"]
|
| 4 |
+
__version__ = "2025.01.31"
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__main__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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())
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__pycache__/__init__.cpython-37.pyc
ADDED
|
Binary file (286 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__pycache__/__main__.cpython-37.pyc
ADDED
|
Binary file (422 Bytes). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/__pycache__/core.cpython-37.pyc
ADDED
|
Binary file (2.13 kB). View file
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/cacert.pem
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/core.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
certifi.py
|
| 3 |
+
~~~~~~~~~~
|
| 4 |
+
|
| 5 |
+
This module returns the installation location of cacert.pem or its contents.
|
| 6 |
+
"""
|
| 7 |
+
import sys
|
| 8 |
+
import atexit
|
| 9 |
+
|
| 10 |
+
def exit_cacert_ctx() -> None:
|
| 11 |
+
_CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
if sys.version_info >= (3, 11):
|
| 15 |
+
|
| 16 |
+
from importlib.resources import as_file, files
|
| 17 |
+
|
| 18 |
+
_CACERT_CTX = None
|
| 19 |
+
_CACERT_PATH = None
|
| 20 |
+
|
| 21 |
+
def where() -> str:
|
| 22 |
+
# This is slightly terrible, but we want to delay extracting the file
|
| 23 |
+
# in cases where we're inside of a zipimport situation until someone
|
| 24 |
+
# actually calls where(), but we don't want to re-extract the file
|
| 25 |
+
# on every call of where(), so we'll do it once then store it in a
|
| 26 |
+
# global variable.
|
| 27 |
+
global _CACERT_CTX
|
| 28 |
+
global _CACERT_PATH
|
| 29 |
+
if _CACERT_PATH is None:
|
| 30 |
+
# This is slightly janky, the importlib.resources API wants you to
|
| 31 |
+
# manage the cleanup of this file, so it doesn't actually return a
|
| 32 |
+
# path, it returns a context manager that will give you the path
|
| 33 |
+
# when you enter it and will do any cleanup when you leave it. In
|
| 34 |
+
# the common case of not needing a temporary file, it will just
|
| 35 |
+
# return the file system location and the __exit__() is a no-op.
|
| 36 |
+
#
|
| 37 |
+
# We also have to hold onto the actual context manager, because
|
| 38 |
+
# it will do the cleanup whenever it gets garbage collected, so
|
| 39 |
+
# we will also store that at the global level as well.
|
| 40 |
+
_CACERT_CTX = as_file(files("certifi").joinpath("cacert.pem"))
|
| 41 |
+
_CACERT_PATH = str(_CACERT_CTX.__enter__())
|
| 42 |
+
atexit.register(exit_cacert_ctx)
|
| 43 |
+
|
| 44 |
+
return _CACERT_PATH
|
| 45 |
+
|
| 46 |
+
def contents() -> str:
|
| 47 |
+
return files("certifi").joinpath("cacert.pem").read_text(encoding="ascii")
|
| 48 |
+
|
| 49 |
+
elif sys.version_info >= (3, 7):
|
| 50 |
+
|
| 51 |
+
from importlib.resources import path as get_path, read_text
|
| 52 |
+
|
| 53 |
+
_CACERT_CTX = None
|
| 54 |
+
_CACERT_PATH = None
|
| 55 |
+
|
| 56 |
+
def where() -> str:
|
| 57 |
+
# This is slightly terrible, but we want to delay extracting the
|
| 58 |
+
# file in cases where we're inside of a zipimport situation until
|
| 59 |
+
# someone actually calls where(), but we don't want to re-extract
|
| 60 |
+
# the file on every call of where(), so we'll do it once then store
|
| 61 |
+
# it in a global variable.
|
| 62 |
+
global _CACERT_CTX
|
| 63 |
+
global _CACERT_PATH
|
| 64 |
+
if _CACERT_PATH is None:
|
| 65 |
+
# This is slightly janky, the importlib.resources API wants you
|
| 66 |
+
# to manage the cleanup of this file, so it doesn't actually
|
| 67 |
+
# return a path, it returns a context manager that will give
|
| 68 |
+
# you the path when you enter it and will do any cleanup when
|
| 69 |
+
# you leave it. In the common case of not needing a temporary
|
| 70 |
+
# file, it will just return the file system location and the
|
| 71 |
+
# __exit__() is a no-op.
|
| 72 |
+
#
|
| 73 |
+
# We also have to hold onto the actual context manager, because
|
| 74 |
+
# it will do the cleanup whenever it gets garbage collected, so
|
| 75 |
+
# we will also store that at the global level as well.
|
| 76 |
+
_CACERT_CTX = get_path("certifi", "cacert.pem")
|
| 77 |
+
_CACERT_PATH = str(_CACERT_CTX.__enter__())
|
| 78 |
+
atexit.register(exit_cacert_ctx)
|
| 79 |
+
|
| 80 |
+
return _CACERT_PATH
|
| 81 |
+
|
| 82 |
+
def contents() -> str:
|
| 83 |
+
return read_text("certifi", "cacert.pem", encoding="ascii")
|
| 84 |
+
|
| 85 |
+
else:
|
| 86 |
+
import os
|
| 87 |
+
import types
|
| 88 |
+
from typing import Union
|
| 89 |
+
|
| 90 |
+
Package = Union[types.ModuleType, str]
|
| 91 |
+
Resource = Union[str, "os.PathLike"]
|
| 92 |
+
|
| 93 |
+
# This fallback will work for Python versions prior to 3.7 that lack the
|
| 94 |
+
# importlib.resources module but relies on the existing `where` function
|
| 95 |
+
# so won't address issues with environments like PyOxidizer that don't set
|
| 96 |
+
# __file__ on modules.
|
| 97 |
+
def read_text(
|
| 98 |
+
package: Package,
|
| 99 |
+
resource: Resource,
|
| 100 |
+
encoding: str = 'utf-8',
|
| 101 |
+
errors: str = 'strict'
|
| 102 |
+
) -> str:
|
| 103 |
+
with open(where(), encoding=encoding) as data:
|
| 104 |
+
return data.read()
|
| 105 |
+
|
| 106 |
+
# If we don't have importlib.resources, then we will just do the old logic
|
| 107 |
+
# of assuming we're on the filesystem and munge the path directly.
|
| 108 |
+
def where() -> str:
|
| 109 |
+
f = os.path.dirname(__file__)
|
| 110 |
+
|
| 111 |
+
return os.path.join(f, "cacert.pem")
|
| 112 |
+
|
| 113 |
+
def contents() -> str:
|
| 114 |
+
return read_text("certifi", "cacert.pem", encoding="ascii")
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/certifi/py.typed
ADDED
|
File without changes
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2025 TAHRI Ahmed R.
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/METADATA
ADDED
|
@@ -0,0 +1,721 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: charset-normalizer
|
| 3 |
+
Version: 3.4.1
|
| 4 |
+
Summary: The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
|
| 5 |
+
Author-email: "Ahmed R. TAHRI" <tahri.ahmed@proton.me>
|
| 6 |
+
Maintainer-email: "Ahmed R. TAHRI" <tahri.ahmed@proton.me>
|
| 7 |
+
License: MIT
|
| 8 |
+
Project-URL: Changelog, https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md
|
| 9 |
+
Project-URL: Documentation, https://charset-normalizer.readthedocs.io/
|
| 10 |
+
Project-URL: Code, https://github.com/jawah/charset_normalizer
|
| 11 |
+
Project-URL: Issue tracker, https://github.com/jawah/charset_normalizer/issues
|
| 12 |
+
Keywords: encoding,charset,charset-detector,detector,normalization,unicode,chardet,detect
|
| 13 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 14 |
+
Classifier: Intended Audience :: Developers
|
| 15 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 16 |
+
Classifier: Operating System :: OS Independent
|
| 17 |
+
Classifier: Programming Language :: Python
|
| 18 |
+
Classifier: Programming Language :: Python :: 3
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 25 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 26 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 27 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 28 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 29 |
+
Classifier: Topic :: Text Processing :: Linguistic
|
| 30 |
+
Classifier: Topic :: Utilities
|
| 31 |
+
Classifier: Typing :: Typed
|
| 32 |
+
Requires-Python: >=3.7
|
| 33 |
+
Description-Content-Type: text/markdown
|
| 34 |
+
License-File: LICENSE
|
| 35 |
+
Provides-Extra: unicode-backport
|
| 36 |
+
|
| 37 |
+
<h1 align="center">Charset Detection, for Everyone 👋</h1>
|
| 38 |
+
|
| 39 |
+
<p align="center">
|
| 40 |
+
<sup>The Real First Universal Charset Detector</sup><br>
|
| 41 |
+
<a href="https://pypi.org/project/charset-normalizer">
|
| 42 |
+
<img src="https://img.shields.io/pypi/pyversions/charset_normalizer.svg?orange=blue" />
|
| 43 |
+
</a>
|
| 44 |
+
<a href="https://pepy.tech/project/charset-normalizer/">
|
| 45 |
+
<img alt="Download Count Total" src="https://static.pepy.tech/badge/charset-normalizer/month" />
|
| 46 |
+
</a>
|
| 47 |
+
<a href="https://bestpractices.coreinfrastructure.org/projects/7297">
|
| 48 |
+
<img src="https://bestpractices.coreinfrastructure.org/projects/7297/badge">
|
| 49 |
+
</a>
|
| 50 |
+
</p>
|
| 51 |
+
<p align="center">
|
| 52 |
+
<sup><i>Featured Packages</i></sup><br>
|
| 53 |
+
<a href="https://github.com/jawah/niquests">
|
| 54 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Niquests-Best_HTTP_Client-cyan">
|
| 55 |
+
</a>
|
| 56 |
+
<a href="https://github.com/jawah/wassima">
|
| 57 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Wassima-Certifi_Killer-cyan">
|
| 58 |
+
</a>
|
| 59 |
+
</p>
|
| 60 |
+
<p align="center">
|
| 61 |
+
<sup><i>In other language (unofficial port - by the community)</i></sup><br>
|
| 62 |
+
<a href="https://github.com/nickspring/charset-normalizer-rs">
|
| 63 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/Rust-red">
|
| 64 |
+
</a>
|
| 65 |
+
</p>
|
| 66 |
+
|
| 67 |
+
> A library that helps you read text from an unknown charset encoding.<br /> Motivated by `chardet`,
|
| 68 |
+
> I'm trying to resolve the issue by taking a new approach.
|
| 69 |
+
> All IANA character set names for which the Python core library provides codecs are supported.
|
| 70 |
+
|
| 71 |
+
<p align="center">
|
| 72 |
+
>>>>> <a href="https://charsetnormalizerweb.ousret.now.sh" target="_blank">👉 Try Me Online Now, Then Adopt Me 👈 </a> <<<<<
|
| 73 |
+
</p>
|
| 74 |
+
|
| 75 |
+
This project offers you an alternative to **Universal Charset Encoding Detector**, also known as **Chardet**.
|
| 76 |
+
|
| 77 |
+
| Feature | [Chardet](https://github.com/chardet/chardet) | Charset Normalizer | [cChardet](https://github.com/PyYoshi/cChardet) |
|
| 78 |
+
|--------------------------------------------------|:---------------------------------------------:|:--------------------------------------------------------------------------------------------------:|:-----------------------------------------------:|
|
| 79 |
+
| `Fast` | ❌ | ✅ | ✅ |
|
| 80 |
+
| `Universal**` | ❌ | ✅ | ❌ |
|
| 81 |
+
| `Reliable` **without** distinguishable standards | ❌ | ✅ | ✅ |
|
| 82 |
+
| `Reliable` **with** distinguishable standards | ✅ | ✅ | ✅ |
|
| 83 |
+
| `License` | LGPL-2.1<br>_restrictive_ | MIT | MPL-1.1<br>_restrictive_ |
|
| 84 |
+
| `Native Python` | ✅ | ✅ | ❌ |
|
| 85 |
+
| `Detect spoken language` | ❌ | ✅ | N/A |
|
| 86 |
+
| `UnicodeDecodeError Safety` | ❌ | ✅ | ❌ |
|
| 87 |
+
| `Whl Size (min)` | 193.6 kB | 42 kB | ~200 kB |
|
| 88 |
+
| `Supported Encoding` | 33 | 🎉 [99](https://charset-normalizer.readthedocs.io/en/latest/user/support.html#supported-encodings) | 40 |
|
| 89 |
+
|
| 90 |
+
<p align="center">
|
| 91 |
+
<img src="https://i.imgflip.com/373iay.gif" alt="Reading Normalized Text" width="226"/><img src="https://media.tenor.com/images/c0180f70732a18b4965448d33adba3d0/tenor.gif" alt="Cat Reading Text" width="200"/>
|
| 92 |
+
</p>
|
| 93 |
+
|
| 94 |
+
*\*\* : They are clearly using specific code for a specific encoding even if covering most of used one*<br>
|
| 95 |
+
|
| 96 |
+
## ⚡ Performance
|
| 97 |
+
|
| 98 |
+
This package offer better performance than its counterpart Chardet. Here are some numbers.
|
| 99 |
+
|
| 100 |
+
| Package | Accuracy | Mean per file (ms) | File per sec (est) |
|
| 101 |
+
|-----------------------------------------------|:--------:|:------------------:|:------------------:|
|
| 102 |
+
| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |
|
| 103 |
+
| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |
|
| 104 |
+
|
| 105 |
+
| Package | 99th percentile | 95th percentile | 50th percentile |
|
| 106 |
+
|-----------------------------------------------|:---------------:|:---------------:|:---------------:|
|
| 107 |
+
| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |
|
| 108 |
+
| charset-normalizer | 100 ms | 50 ms | 5 ms |
|
| 109 |
+
|
| 110 |
+
_updated as of december 2024 using CPython 3.12_
|
| 111 |
+
|
| 112 |
+
Chardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.
|
| 113 |
+
|
| 114 |
+
> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.
|
| 115 |
+
> And yes, these results might change at any time. The dataset can be updated to include more files.
|
| 116 |
+
> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.
|
| 117 |
+
> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability
|
| 118 |
+
> (e.g. Supported Encoding) Challenge-them if you want.
|
| 119 |
+
|
| 120 |
+
## ✨ Installation
|
| 121 |
+
|
| 122 |
+
Using pip:
|
| 123 |
+
|
| 124 |
+
```sh
|
| 125 |
+
pip install charset-normalizer -U
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
## 🚀 Basic Usage
|
| 129 |
+
|
| 130 |
+
### CLI
|
| 131 |
+
This package comes with a CLI.
|
| 132 |
+
|
| 133 |
+
```
|
| 134 |
+
usage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]
|
| 135 |
+
file [file ...]
|
| 136 |
+
|
| 137 |
+
The Real First Universal Charset Detector. Discover originating encoding used
|
| 138 |
+
on text file. Normalize text to unicode.
|
| 139 |
+
|
| 140 |
+
positional arguments:
|
| 141 |
+
files File(s) to be analysed
|
| 142 |
+
|
| 143 |
+
optional arguments:
|
| 144 |
+
-h, --help show this help message and exit
|
| 145 |
+
-v, --verbose Display complementary information about file if any.
|
| 146 |
+
Stdout will contain logs about the detection process.
|
| 147 |
+
-a, --with-alternative
|
| 148 |
+
Output complementary possibilities if any. Top-level
|
| 149 |
+
JSON WILL be a list.
|
| 150 |
+
-n, --normalize Permit to normalize input file. If not set, program
|
| 151 |
+
does not write anything.
|
| 152 |
+
-m, --minimal Only output the charset detected to STDOUT. Disabling
|
| 153 |
+
JSON output.
|
| 154 |
+
-r, --replace Replace file when trying to normalize it instead of
|
| 155 |
+
creating a new one.
|
| 156 |
+
-f, --force Replace file without asking if you are sure, use this
|
| 157 |
+
flag with caution.
|
| 158 |
+
-t THRESHOLD, --threshold THRESHOLD
|
| 159 |
+
Define a custom maximum amount of chaos allowed in
|
| 160 |
+
decoded content. 0. <= chaos <= 1.
|
| 161 |
+
--version Show version information and exit.
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
```bash
|
| 165 |
+
normalizer ./data/sample.1.fr.srt
|
| 166 |
+
```
|
| 167 |
+
|
| 168 |
+
or
|
| 169 |
+
|
| 170 |
+
```bash
|
| 171 |
+
python -m charset_normalizer ./data/sample.1.fr.srt
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
🎉 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.
|
| 175 |
+
|
| 176 |
+
```json
|
| 177 |
+
{
|
| 178 |
+
"path": "/home/default/projects/charset_normalizer/data/sample.1.fr.srt",
|
| 179 |
+
"encoding": "cp1252",
|
| 180 |
+
"encoding_aliases": [
|
| 181 |
+
"1252",
|
| 182 |
+
"windows_1252"
|
| 183 |
+
],
|
| 184 |
+
"alternative_encodings": [
|
| 185 |
+
"cp1254",
|
| 186 |
+
"cp1256",
|
| 187 |
+
"cp1258",
|
| 188 |
+
"iso8859_14",
|
| 189 |
+
"iso8859_15",
|
| 190 |
+
"iso8859_16",
|
| 191 |
+
"iso8859_3",
|
| 192 |
+
"iso8859_9",
|
| 193 |
+
"latin_1",
|
| 194 |
+
"mbcs"
|
| 195 |
+
],
|
| 196 |
+
"language": "French",
|
| 197 |
+
"alphabets": [
|
| 198 |
+
"Basic Latin",
|
| 199 |
+
"Latin-1 Supplement"
|
| 200 |
+
],
|
| 201 |
+
"has_sig_or_bom": false,
|
| 202 |
+
"chaos": 0.149,
|
| 203 |
+
"coherence": 97.152,
|
| 204 |
+
"unicode_path": null,
|
| 205 |
+
"is_preferred": true
|
| 206 |
+
}
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
### Python
|
| 210 |
+
*Just print out normalized text*
|
| 211 |
+
```python
|
| 212 |
+
from charset_normalizer import from_path
|
| 213 |
+
|
| 214 |
+
results = from_path('./my_subtitle.srt')
|
| 215 |
+
|
| 216 |
+
print(str(results.best()))
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
*Upgrade your code without effort*
|
| 220 |
+
```python
|
| 221 |
+
from charset_normalizer import detect
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
The above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.
|
| 225 |
+
|
| 226 |
+
See the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)
|
| 227 |
+
|
| 228 |
+
## 😇 Why
|
| 229 |
+
|
| 230 |
+
When I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a
|
| 231 |
+
reliable alternative using a completely different method. Also! I never back down on a good challenge!
|
| 232 |
+
|
| 233 |
+
I **don't care** about the **originating charset** encoding, because **two different tables** can
|
| 234 |
+
produce **two identical rendered string.**
|
| 235 |
+
What I want is to get readable text, the best I can.
|
| 236 |
+
|
| 237 |
+
In a way, **I'm brute forcing text decoding.** How cool is that ? 😎
|
| 238 |
+
|
| 239 |
+
Don't confuse package **ftfy** with charset-normalizer or chardet. ftfy goal is to repair Unicode string whereas charset-normalizer to convert raw file in unknown encoding to unicode.
|
| 240 |
+
|
| 241 |
+
## 🍰 How
|
| 242 |
+
|
| 243 |
+
- Discard all charset encoding table that could not fit the binary content.
|
| 244 |
+
- Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.
|
| 245 |
+
- Extract matches with the lowest mess detected.
|
| 246 |
+
- Additionally, we measure coherence / probe for a language.
|
| 247 |
+
|
| 248 |
+
**Wait a minute**, what is noise/mess and coherence according to **YOU ?**
|
| 249 |
+
|
| 250 |
+
*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then
|
| 251 |
+
**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).
|
| 252 |
+
I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to
|
| 253 |
+
improve or rewrite it.
|
| 254 |
+
|
| 255 |
+
*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought
|
| 256 |
+
that intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.
|
| 257 |
+
|
| 258 |
+
## ⚡ Known limitations
|
| 259 |
+
|
| 260 |
+
- Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))
|
| 261 |
+
- Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.
|
| 262 |
+
|
| 263 |
+
## ⚠️ About Python EOLs
|
| 264 |
+
|
| 265 |
+
**If you are running:**
|
| 266 |
+
|
| 267 |
+
- Python >=2.7,<3.5: Unsupported
|
| 268 |
+
- Python 3.5: charset-normalizer < 2.1
|
| 269 |
+
- Python 3.6: charset-normalizer < 3.1
|
| 270 |
+
- Python 3.7: charset-normalizer < 4.0
|
| 271 |
+
|
| 272 |
+
Upgrade your Python interpreter as soon as possible.
|
| 273 |
+
|
| 274 |
+
## 👤 Contributing
|
| 275 |
+
|
| 276 |
+
Contributions, issues and feature requests are very much welcome.<br />
|
| 277 |
+
Feel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.
|
| 278 |
+
|
| 279 |
+
## 📝 License
|
| 280 |
+
|
| 281 |
+
Copyright © [Ahmed TAHRI @Ousret](https://github.com/Ousret).<br />
|
| 282 |
+
This project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.
|
| 283 |
+
|
| 284 |
+
Characters frequencies used in this project © 2012 [Denny Vrandečić](http://simia.net/letters/)
|
| 285 |
+
|
| 286 |
+
## 💼 For Enterprise
|
| 287 |
+
|
| 288 |
+
Professional support for charset-normalizer is available as part of the [Tidelift
|
| 289 |
+
Subscription][1]. Tidelift gives software development teams a single source for
|
| 290 |
+
purchasing and maintaining their software, with professional grade assurances
|
| 291 |
+
from the experts who know it best, while seamlessly integrating with existing
|
| 292 |
+
tools.
|
| 293 |
+
|
| 294 |
+
[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme
|
| 295 |
+
|
| 296 |
+
[](https://www.bestpractices.dev/projects/7297)
|
| 297 |
+
|
| 298 |
+
# Changelog
|
| 299 |
+
All notable changes to charset-normalizer will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
| 300 |
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
| 301 |
+
|
| 302 |
+
## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)
|
| 303 |
+
|
| 304 |
+
### Changed
|
| 305 |
+
- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.
|
| 306 |
+
- Enforce annotation delayed loading for a simpler and consistent types in the project.
|
| 307 |
+
- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8
|
| 308 |
+
|
| 309 |
+
### Added
|
| 310 |
+
- pre-commit configuration.
|
| 311 |
+
- noxfile.
|
| 312 |
+
|
| 313 |
+
### Removed
|
| 314 |
+
- `build-requirements.txt` as per using `pyproject.toml` native build configuration.
|
| 315 |
+
- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).
|
| 316 |
+
- `setup.cfg` in favor of `pyproject.toml` metadata configuration.
|
| 317 |
+
- Unused `utils.range_scan` function.
|
| 318 |
+
|
| 319 |
+
### Fixed
|
| 320 |
+
- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)
|
| 321 |
+
- Deprecation warning "'count' is passed as positional argument" when converting to Unicode bytes on Python 3.13+
|
| 322 |
+
|
| 323 |
+
## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)
|
| 324 |
+
|
| 325 |
+
### Added
|
| 326 |
+
- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.
|
| 327 |
+
- Support for Python 3.13 (#512)
|
| 328 |
+
|
| 329 |
+
### Fixed
|
| 330 |
+
- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.
|
| 331 |
+
- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)
|
| 332 |
+
- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)
|
| 333 |
+
|
| 334 |
+
## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)
|
| 335 |
+
|
| 336 |
+
### Fixed
|
| 337 |
+
- Unintentional memory usage regression when using large payload that match several encoding (#376)
|
| 338 |
+
- Regression on some detection case showcased in the documentation (#371)
|
| 339 |
+
|
| 340 |
+
### Added
|
| 341 |
+
- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)
|
| 342 |
+
|
| 343 |
+
## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)
|
| 344 |
+
|
| 345 |
+
### Changed
|
| 346 |
+
- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8
|
| 347 |
+
- Improved the general detection reliability based on reports from the community
|
| 348 |
+
|
| 349 |
+
## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)
|
| 350 |
+
|
| 351 |
+
### Added
|
| 352 |
+
- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`
|
| 353 |
+
- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)
|
| 354 |
+
|
| 355 |
+
### Removed
|
| 356 |
+
- (internal) Redundant utils.is_ascii function and unused function is_private_use_only
|
| 357 |
+
- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant
|
| 358 |
+
|
| 359 |
+
### Changed
|
| 360 |
+
- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection
|
| 361 |
+
- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8
|
| 362 |
+
|
| 363 |
+
### Fixed
|
| 364 |
+
- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \_\_lt\_\_ (#350)
|
| 365 |
+
|
| 366 |
+
## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)
|
| 367 |
+
|
| 368 |
+
### Changed
|
| 369 |
+
- Typehint for function `from_path` no longer enforce `PathLike` as its first argument
|
| 370 |
+
- Minor improvement over the global detection reliability
|
| 371 |
+
|
| 372 |
+
### Added
|
| 373 |
+
- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries
|
| 374 |
+
- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)
|
| 375 |
+
- Explicit support for Python 3.12
|
| 376 |
+
|
| 377 |
+
### Fixed
|
| 378 |
+
- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)
|
| 379 |
+
|
| 380 |
+
## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)
|
| 381 |
+
|
| 382 |
+
### Added
|
| 383 |
+
- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)
|
| 384 |
+
|
| 385 |
+
### Removed
|
| 386 |
+
- Support for Python 3.6 (PR #260)
|
| 387 |
+
|
| 388 |
+
### Changed
|
| 389 |
+
- Optional speedup provided by mypy/c 1.0.1
|
| 390 |
+
|
| 391 |
+
## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)
|
| 392 |
+
|
| 393 |
+
### Fixed
|
| 394 |
+
- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)
|
| 395 |
+
|
| 396 |
+
### Changed
|
| 397 |
+
- Speedup provided by mypy/c 0.990 on Python >= 3.7
|
| 398 |
+
|
| 399 |
+
## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)
|
| 400 |
+
|
| 401 |
+
### Added
|
| 402 |
+
- Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
|
| 403 |
+
- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
|
| 404 |
+
- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio
|
| 405 |
+
- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)
|
| 406 |
+
|
| 407 |
+
### Changed
|
| 408 |
+
- Build with static metadata using 'build' frontend
|
| 409 |
+
- Make the language detection stricter
|
| 410 |
+
- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1
|
| 411 |
+
|
| 412 |
+
### Fixed
|
| 413 |
+
- CLI with opt --normalize fail when using full path for files
|
| 414 |
+
- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it
|
| 415 |
+
- Sphinx warnings when generating the documentation
|
| 416 |
+
|
| 417 |
+
### Removed
|
| 418 |
+
- Coherence detector no longer return 'Simple English' instead return 'English'
|
| 419 |
+
- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'
|
| 420 |
+
- Breaking: Method `first()` and `best()` from CharsetMatch
|
| 421 |
+
- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)
|
| 422 |
+
- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches
|
| 423 |
+
- Breaking: Top-level function `normalize`
|
| 424 |
+
- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch
|
| 425 |
+
- Support for the backport `unicodedata2`
|
| 426 |
+
|
| 427 |
+
## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)
|
| 428 |
+
|
| 429 |
+
### Added
|
| 430 |
+
- Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
|
| 431 |
+
- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
|
| 432 |
+
- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio
|
| 433 |
+
|
| 434 |
+
### Changed
|
| 435 |
+
- Build with static metadata using 'build' frontend
|
| 436 |
+
- Make the language detection stricter
|
| 437 |
+
|
| 438 |
+
### Fixed
|
| 439 |
+
- CLI with opt --normalize fail when using full path for files
|
| 440 |
+
- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it
|
| 441 |
+
|
| 442 |
+
### Removed
|
| 443 |
+
- Coherence detector no longer return 'Simple English' instead return 'English'
|
| 444 |
+
- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'
|
| 445 |
+
|
| 446 |
+
## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)
|
| 447 |
+
|
| 448 |
+
### Added
|
| 449 |
+
- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)
|
| 450 |
+
|
| 451 |
+
### Removed
|
| 452 |
+
- Breaking: Method `first()` and `best()` from CharsetMatch
|
| 453 |
+
- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)
|
| 454 |
+
|
| 455 |
+
### Fixed
|
| 456 |
+
- Sphinx warnings when generating the documentation
|
| 457 |
+
|
| 458 |
+
## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)
|
| 459 |
+
|
| 460 |
+
### Changed
|
| 461 |
+
- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1
|
| 462 |
+
|
| 463 |
+
### Removed
|
| 464 |
+
- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches
|
| 465 |
+
- Breaking: Top-level function `normalize`
|
| 466 |
+
- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch
|
| 467 |
+
- Support for the backport `unicodedata2`
|
| 468 |
+
|
| 469 |
+
## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)
|
| 470 |
+
|
| 471 |
+
### Deprecated
|
| 472 |
+
- Function `normalize` scheduled for removal in 3.0
|
| 473 |
+
|
| 474 |
+
### Changed
|
| 475 |
+
- Removed useless call to decode in fn is_unprintable (#206)
|
| 476 |
+
|
| 477 |
+
### Fixed
|
| 478 |
+
- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)
|
| 479 |
+
|
| 480 |
+
## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)
|
| 481 |
+
|
| 482 |
+
### Added
|
| 483 |
+
- Output the Unicode table version when running the CLI with `--version` (PR #194)
|
| 484 |
+
|
| 485 |
+
### Changed
|
| 486 |
+
- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)
|
| 487 |
+
- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)
|
| 488 |
+
|
| 489 |
+
### Fixed
|
| 490 |
+
- Workaround potential bug in cpython with Zero Width No-Break Space located in Arabic Presentation Forms-B, Unicode 1.1 not acknowledged as space (PR #175)
|
| 491 |
+
- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)
|
| 492 |
+
|
| 493 |
+
### Removed
|
| 494 |
+
- Support for Python 3.5 (PR #192)
|
| 495 |
+
|
| 496 |
+
### Deprecated
|
| 497 |
+
- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)
|
| 498 |
+
|
| 499 |
+
## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)
|
| 500 |
+
|
| 501 |
+
### Fixed
|
| 502 |
+
- ASCII miss-detection on rare cases (PR #170)
|
| 503 |
+
|
| 504 |
+
## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)
|
| 505 |
+
|
| 506 |
+
### Added
|
| 507 |
+
- Explicit support for Python 3.11 (PR #164)
|
| 508 |
+
|
| 509 |
+
### Changed
|
| 510 |
+
- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)
|
| 511 |
+
|
| 512 |
+
## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)
|
| 513 |
+
|
| 514 |
+
### Fixed
|
| 515 |
+
- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)
|
| 516 |
+
|
| 517 |
+
### Changed
|
| 518 |
+
- Skipping the language-detection (CD) on ASCII (PR #155)
|
| 519 |
+
|
| 520 |
+
## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)
|
| 521 |
+
|
| 522 |
+
### Changed
|
| 523 |
+
- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)
|
| 524 |
+
|
| 525 |
+
### Fixed
|
| 526 |
+
- Wrong logging level applied when setting kwarg `explain` to True (PR #146)
|
| 527 |
+
|
| 528 |
+
## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)
|
| 529 |
+
### Changed
|
| 530 |
+
- Improvement over Vietnamese detection (PR #126)
|
| 531 |
+
- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)
|
| 532 |
+
- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)
|
| 533 |
+
- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)
|
| 534 |
+
- Code style as refactored by Sourcery-AI (PR #131)
|
| 535 |
+
- Minor adjustment on the MD around european words (PR #133)
|
| 536 |
+
- Remove and replace SRTs from assets / tests (PR #139)
|
| 537 |
+
- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)
|
| 538 |
+
- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)
|
| 539 |
+
|
| 540 |
+
### Fixed
|
| 541 |
+
- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)
|
| 542 |
+
- Avoid using too insignificant chunk (PR #137)
|
| 543 |
+
|
| 544 |
+
### Added
|
| 545 |
+
- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)
|
| 546 |
+
- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)
|
| 547 |
+
|
| 548 |
+
## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)
|
| 549 |
+
### Added
|
| 550 |
+
- Add support for Kazakh (Cyrillic) language detection (PR #109)
|
| 551 |
+
|
| 552 |
+
### Changed
|
| 553 |
+
- Further, improve inferring the language from a given single-byte code page (PR #112)
|
| 554 |
+
- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)
|
| 555 |
+
- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)
|
| 556 |
+
- Various detection improvement (MD+CD) (PR #117)
|
| 557 |
+
|
| 558 |
+
### Removed
|
| 559 |
+
- Remove redundant logging entry about detected language(s) (PR #115)
|
| 560 |
+
|
| 561 |
+
### Fixed
|
| 562 |
+
- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)
|
| 563 |
+
|
| 564 |
+
## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)
|
| 565 |
+
### Fixed
|
| 566 |
+
- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)
|
| 567 |
+
- Fix CLI crash when using --minimal output in certain cases (PR #103)
|
| 568 |
+
|
| 569 |
+
### Changed
|
| 570 |
+
- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)
|
| 571 |
+
|
| 572 |
+
## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)
|
| 573 |
+
### Changed
|
| 574 |
+
- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)
|
| 575 |
+
- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)
|
| 576 |
+
- The Unicode detection is slightly improved (PR #93)
|
| 577 |
+
- Add syntax sugar \_\_bool\_\_ for results CharsetMatches list-container (PR #91)
|
| 578 |
+
|
| 579 |
+
### Removed
|
| 580 |
+
- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)
|
| 581 |
+
|
| 582 |
+
### Fixed
|
| 583 |
+
- In some rare case, the chunks extractor could cut in the middle of a multi-byte character and could mislead the mess detection (PR #95)
|
| 584 |
+
- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)
|
| 585 |
+
- The MANIFEST.in was not exhaustive (PR #78)
|
| 586 |
+
|
| 587 |
+
## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)
|
| 588 |
+
### Fixed
|
| 589 |
+
- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)
|
| 590 |
+
- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)
|
| 591 |
+
- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)
|
| 592 |
+
- Submatch factoring could be wrong in rare edge cases (PR #72)
|
| 593 |
+
- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)
|
| 594 |
+
- Fix line endings from CRLF to LF for certain project files (PR #67)
|
| 595 |
+
|
| 596 |
+
### Changed
|
| 597 |
+
- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)
|
| 598 |
+
- Allow fallback on specified encoding if any (PR #71)
|
| 599 |
+
|
| 600 |
+
## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)
|
| 601 |
+
### Changed
|
| 602 |
+
- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)
|
| 603 |
+
- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)
|
| 604 |
+
|
| 605 |
+
## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)
|
| 606 |
+
### Fixed
|
| 607 |
+
- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)
|
| 608 |
+
|
| 609 |
+
### Changed
|
| 610 |
+
- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)
|
| 611 |
+
|
| 612 |
+
## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)
|
| 613 |
+
### Fixed
|
| 614 |
+
- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)
|
| 615 |
+
- Using explain=False permanently disable the verbose output in the current runtime (PR #47)
|
| 616 |
+
- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)
|
| 617 |
+
- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)
|
| 618 |
+
|
| 619 |
+
### Changed
|
| 620 |
+
- Public function normalize default args values were not aligned with from_bytes (PR #53)
|
| 621 |
+
|
| 622 |
+
### Added
|
| 623 |
+
- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)
|
| 624 |
+
|
| 625 |
+
## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)
|
| 626 |
+
### Changed
|
| 627 |
+
- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.
|
| 628 |
+
- Accent has been made on UTF-8 detection, should perform rather instantaneous.
|
| 629 |
+
- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.
|
| 630 |
+
- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)
|
| 631 |
+
- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+
|
| 632 |
+
- utf_7 detection has been reinstated.
|
| 633 |
+
|
| 634 |
+
### Removed
|
| 635 |
+
- This package no longer require anything when used with Python 3.5 (Dropped cached_property)
|
| 636 |
+
- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volapük, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.
|
| 637 |
+
- The exception hook on UnicodeDecodeError has been removed.
|
| 638 |
+
|
| 639 |
+
### Deprecated
|
| 640 |
+
- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0
|
| 641 |
+
|
| 642 |
+
### Fixed
|
| 643 |
+
- The CLI output used the relative path of the file(s). Should be absolute.
|
| 644 |
+
|
| 645 |
+
## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)
|
| 646 |
+
### Fixed
|
| 647 |
+
- Logger configuration/usage no longer conflict with others (PR #44)
|
| 648 |
+
|
| 649 |
+
## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)
|
| 650 |
+
### Removed
|
| 651 |
+
- Using standard logging instead of using the package loguru.
|
| 652 |
+
- Dropping nose test framework in favor of the maintained pytest.
|
| 653 |
+
- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.
|
| 654 |
+
- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.
|
| 655 |
+
- Stop support for UTF-7 that does not contain a SIG.
|
| 656 |
+
- Dropping PrettyTable, replaced with pure JSON output in CLI.
|
| 657 |
+
|
| 658 |
+
### Fixed
|
| 659 |
+
- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.
|
| 660 |
+
- Not searching properly for the BOM when trying utf32/16 parent codec.
|
| 661 |
+
|
| 662 |
+
### Changed
|
| 663 |
+
- Improving the package final size by compressing frequencies.json.
|
| 664 |
+
- Huge improvement over the larges payload.
|
| 665 |
+
|
| 666 |
+
### Added
|
| 667 |
+
- CLI now produces JSON consumable output.
|
| 668 |
+
- Return ASCII if given sequences fit. Given reasonable confidence.
|
| 669 |
+
|
| 670 |
+
## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)
|
| 671 |
+
|
| 672 |
+
### Fixed
|
| 673 |
+
- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)
|
| 674 |
+
|
| 675 |
+
## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)
|
| 676 |
+
|
| 677 |
+
### Fixed
|
| 678 |
+
- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)
|
| 679 |
+
|
| 680 |
+
## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)
|
| 681 |
+
|
| 682 |
+
### Fixed
|
| 683 |
+
- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)
|
| 684 |
+
|
| 685 |
+
## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)
|
| 686 |
+
|
| 687 |
+
### Changed
|
| 688 |
+
- Amend the previous release to allow prettytable 2.0 (PR #35)
|
| 689 |
+
|
| 690 |
+
## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)
|
| 691 |
+
|
| 692 |
+
### Fixed
|
| 693 |
+
- Fix error while using the package with a python pre-release interpreter (PR #33)
|
| 694 |
+
|
| 695 |
+
### Changed
|
| 696 |
+
- Dependencies refactoring, constraints revised.
|
| 697 |
+
|
| 698 |
+
### Added
|
| 699 |
+
- Add python 3.9 and 3.10 to the supported interpreters
|
| 700 |
+
|
| 701 |
+
MIT License
|
| 702 |
+
|
| 703 |
+
Copyright (c) 2025 TAHRI Ahmed R.
|
| 704 |
+
|
| 705 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 706 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 707 |
+
in the Software without restriction, including without limitation the rights
|
| 708 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 709 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 710 |
+
furnished to do so, subject to the following conditions:
|
| 711 |
+
|
| 712 |
+
The above copyright notice and this permission notice shall be included in all
|
| 713 |
+
copies or substantial portions of the Software.
|
| 714 |
+
|
| 715 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 716 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 717 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 718 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 719 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 720 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 721 |
+
SOFTWARE.
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/RECORD
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
../../../bin/normalizer,sha256=8j_BRtBv9fnkX-Ggpvtf7uJlYcYwc-coVgnZR-9saQ4,260
|
| 2 |
+
charset_normalizer-3.4.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 3 |
+
charset_normalizer-3.4.1.dist-info/LICENSE,sha256=bQ1Bv-FwrGx9wkjJpj4lTQ-0WmDVCoJX0K-SxuJJuIc,1071
|
| 4 |
+
charset_normalizer-3.4.1.dist-info/METADATA,sha256=JbyHzhmqZh_ugEn1Y7TY7CDYZA9FoU6BP25hrCNDf50,35313
|
| 5 |
+
charset_normalizer-3.4.1.dist-info/RECORD,,
|
| 6 |
+
charset_normalizer-3.4.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
| 7 |
+
charset_normalizer-3.4.1.dist-info/entry_points.txt,sha256=8C-Y3iXIfyXQ83Tpir2B8t-XLJYpxF5xbb38d_js-h4,65
|
| 8 |
+
charset_normalizer-3.4.1.dist-info/top_level.txt,sha256=7ASyzePr8_xuZWJsnqJjIBtyV8vhEo0wBCv1MPRRi3Q,19
|
| 9 |
+
charset_normalizer/__init__.py,sha256=OKRxRv2Zhnqk00tqkN0c1BtJjm165fWXLydE52IKuHc,1590
|
| 10 |
+
charset_normalizer/__main__.py,sha256=yzYxMR-IhKRHYwcSlavEv8oGdwxsR89mr2X09qXGdps,109
|
| 11 |
+
charset_normalizer/__pycache__/__init__.cpython-37.pyc,,
|
| 12 |
+
charset_normalizer/__pycache__/__main__.cpython-37.pyc,,
|
| 13 |
+
charset_normalizer/__pycache__/api.cpython-37.pyc,,
|
| 14 |
+
charset_normalizer/__pycache__/cd.cpython-37.pyc,,
|
| 15 |
+
charset_normalizer/__pycache__/constant.cpython-37.pyc,,
|
| 16 |
+
charset_normalizer/__pycache__/legacy.cpython-37.pyc,,
|
| 17 |
+
charset_normalizer/__pycache__/md.cpython-37.pyc,,
|
| 18 |
+
charset_normalizer/__pycache__/models.cpython-37.pyc,,
|
| 19 |
+
charset_normalizer/__pycache__/utils.cpython-37.pyc,,
|
| 20 |
+
charset_normalizer/__pycache__/version.cpython-37.pyc,,
|
| 21 |
+
charset_normalizer/api.py,sha256=qBRz8mJ_R5E713R6TOyqHEdnmyxbEDnCSHvx32ubDGg,22617
|
| 22 |
+
charset_normalizer/cd.py,sha256=WKTo1HDb-H9HfCDc3Bfwq5jzS25Ziy9SE2a74SgTq88,12522
|
| 23 |
+
charset_normalizer/cli/__init__.py,sha256=D8I86lFk2-py45JvqxniTirSj_sFyE6sjaY_0-G1shc,136
|
| 24 |
+
charset_normalizer/cli/__main__.py,sha256=VGC9klOoi6_R2z8rmyrc936kv7u2A1udjjHtlmNPDTM,10410
|
| 25 |
+
charset_normalizer/cli/__pycache__/__init__.cpython-37.pyc,,
|
| 26 |
+
charset_normalizer/cli/__pycache__/__main__.cpython-37.pyc,,
|
| 27 |
+
charset_normalizer/constant.py,sha256=4VuTcZNLew1j_8ixA-Rt_VVqNWD4pwgHOHMCMlr0964,40477
|
| 28 |
+
charset_normalizer/legacy.py,sha256=yhNXsPHkBfqPXKRb-sPXNj3Bscp9-mFGcYOkJ62tg9c,2328
|
| 29 |
+
charset_normalizer/md.py,sha256=iyXXQGWl54nnLQLueMWTmUtlivO0-rTBgVkmJxIIAGU,20036
|
| 30 |
+
charset_normalizer/models.py,sha256=lKXhOnIPtiakbK3i__J9wpOfzx3JDTKj7Dn3Rg0VaRI,12394
|
| 31 |
+
charset_normalizer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 32 |
+
charset_normalizer/utils.py,sha256=T5UHo8AS7NVMmgruWoZyqEf0WrZVcQpgUNetRoborSk,12002
|
| 33 |
+
charset_normalizer/version.py,sha256=Ambcj3O8FfvdLfDLc8dkaxZx97O1IM_R4_aKGD_TDdE,115
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (75.6.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/entry_points.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[console_scripts]
|
| 2 |
+
normalizer = charset_normalizer:cli.cli_detect
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer-3.4.1.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
charset_normalizer
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer/__init__.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Charset-Normalizer
|
| 3 |
+
~~~~~~~~~~~~~~
|
| 4 |
+
The Real First Universal Charset Detector.
|
| 5 |
+
A library that helps you read text from an unknown charset encoding.
|
| 6 |
+
Motivated by chardet, This package is trying to resolve the issue by taking a new approach.
|
| 7 |
+
All IANA character set names for which the Python core library provides codecs are supported.
|
| 8 |
+
|
| 9 |
+
Basic usage:
|
| 10 |
+
>>> from charset_normalizer import from_bytes
|
| 11 |
+
>>> results = from_bytes('Bсеки човек има право на образование. Oбразованието!'.encode('utf_8'))
|
| 12 |
+
>>> best_guess = results.best()
|
| 13 |
+
>>> str(best_guess)
|
| 14 |
+
'Bсеки човек има право на образование. Oбразованието!'
|
| 15 |
+
|
| 16 |
+
Others methods and usages are available - see the full documentation
|
| 17 |
+
at <https://github.com/Ousret/charset_normalizer>.
|
| 18 |
+
:copyright: (c) 2021 by Ahmed TAHRI
|
| 19 |
+
:license: MIT, see LICENSE for more details.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
from __future__ import annotations
|
| 23 |
+
|
| 24 |
+
import logging
|
| 25 |
+
|
| 26 |
+
from .api import from_bytes, from_fp, from_path, is_binary
|
| 27 |
+
from .legacy import detect
|
| 28 |
+
from .models import CharsetMatch, CharsetMatches
|
| 29 |
+
from .utils import set_logging_handler
|
| 30 |
+
from .version import VERSION, __version__
|
| 31 |
+
|
| 32 |
+
__all__ = (
|
| 33 |
+
"from_fp",
|
| 34 |
+
"from_path",
|
| 35 |
+
"from_bytes",
|
| 36 |
+
"is_binary",
|
| 37 |
+
"detect",
|
| 38 |
+
"CharsetMatch",
|
| 39 |
+
"CharsetMatches",
|
| 40 |
+
"__version__",
|
| 41 |
+
"VERSION",
|
| 42 |
+
"set_logging_handler",
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
# Attach a NullHandler to the top level logger by default
|
| 46 |
+
# https://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library
|
| 47 |
+
|
| 48 |
+
logging.getLogger("charset_normalizer").addHandler(logging.NullHandler())
|
protege/deep-pantilt/venv/lib/python3.7/site-packages/charset_normalizer/__main__.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from .cli import cli_detect
|
| 4 |
+
|
| 5 |
+
if __name__ == "__main__":
|
| 6 |
+
cli_detect()
|