From c3d70604d84f8d6f33a56570dbc7274bc32d35c6 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Sun, 17 Mar 2024 16:18:43 +0000 Subject: [PATCH] stop using the json API at pypi --- .gitattributes | 2 + .pre-commit-config.yaml | 3 +- src/poetry/repositories/http_repository.py | 44 +- src/poetry/repositories/legacy_repository.py | 33 - src/poetry/repositories/link_sources/json.py | 7 +- src/poetry/repositories/pypi_repository.py | 79 - .../fixtures/with-pypi-repository.test | 32 +- tests/installation/test_executor.py | 1 - tests/installation/test_installer.py | 13 +- tests/puzzle/test_solver.py | 26 +- .../fixtures/distribution_hashes.py | 4 +- ...attrs-17.4.0-py2.py3-none-any.whl.metadata | 284 + .../cachy-0.2.0-py2.py3-none-any.whl.metadata | 44 + ...fi-2021.10.8-py2.py3-none-any.whl.metadata | 83 + ...ertifi-2022.12.7-py3-none-any.whl.metadata | 83 + ...tifi-2022.5.18.1-py3-none-any.whl.metadata | 81 + ...ertifi-2022.6.15-py3-none-any.whl.metadata | 81 + ...tifi-2022.6.15.1-py3-none-any.whl.metadata | 83 + ...tifi-2022.6.15.2-py3-none-any.whl.metadata | 83 + ...ertifi-2022.9.14-py3-none-any.whl.metadata | 83 + ...ertifi-2022.9.24-py3-none-any.whl.metadata | 83 + ...rtifi-2023.11.17-py3-none-any.whl.metadata | 66 + ...certifi-2023.5.7-py3-none-any.whl.metadata | 69 + ...ertifi-2023.7.22-py3-none-any.whl.metadata | 69 + ...certifi-2024.2.2-py3-none-any.whl.metadata | 66 + ...hardet-3.0.4-py2.py3-none-any.whl.metadata | 96 + ...normalizer-3.3.2-py3-none-any.whl.metadata | 683 + .../cleo-0.6.8-py2.py3-none-any.whl.metadata | 537 + ...lorama-0.3.9-py2.py3-none-any.whl.metadata | 375 + ...discord.py-2.0.0-py3-none-any.whl.metadata | 166 + ...html5lib-1.1-py2.py3-none-any.whl.metadata | 552 + .../idna-2.8-py2.py3-none-any.whl.metadata | 239 + .../idna-3.6-py3-none-any.whl.metadata | 243 + ...schema-3.2.0-py2.py3-none-any.whl.metadata | 224 + ...kfile-0.12.2-py2.py3-none-any.whl.metadata | 58 + ..._itertools-4.1.0-py2-none-any.whl.metadata | 307 + ..._itertools-4.1.0-py3-none-any.whl.metadata | 307 + ...-cp310-macosx_10_9_universal2.whl.metadata | 290 + .../pastel-0.1.0-py3-none-any.whl.metadata | 63 + .../pkginfo-1.10.0-py3-none-any.whl.metadata | 424 + ...oetry-0.12.4-py2.py3-none-any.whl.metadata | 839 + .../py-1.5.3-py2.py3-none-any.whl.metadata | 69 + .../pylev-1.4.0-py2.py3-none-any.whl.metadata | 106 + ...arsing-2.4.7-py2.py3-none-any.whl.metadata | 104 + ...pytest-3.5.1-py2.py3-none-any.whl.metadata | 155 + ...uests-2.18.4-py2.py3-none-any.whl.metadata | 1680 ++ ...uests-2.21.0-py2.py3-none-any.whl.metadata | 146 + ...uests-2.22.0-py2.py3-none-any.whl.metadata | 145 + ...uests-2.23.0-py2.py3-none-any.whl.metadata | 165 + ...uests-2.24.0-py2.py3-none-any.whl.metadata | 177 + ...uests-2.25.0-py2.py3-none-any.whl.metadata | 103 + ...uests-2.25.1-py2.py3-none-any.whl.metadata | 103 + ...uests-2.26.0-py2.py3-none-any.whl.metadata | 120 + ...uests-2.27.0-py2.py3-none-any.whl.metadata | 125 + ...uests-2.27.1-py2.py3-none-any.whl.metadata | 125 + .../requests-2.28.0-py3-none-any.whl.metadata | 122 + .../requests-2.28.1-py3-none-any.whl.metadata | 122 + .../requests-2.28.2-py3-none-any.whl.metadata | 121 + .../requests-2.29.0-py3-none-any.whl.metadata | 121 + .../requests-2.30.0-py3-none-any.whl.metadata | 121 + .../requests-2.31.0-py3-none-any.whl.metadata | 122 + ...olbelt-0.8.0-py2.py3-none-any.whl.metadata | 437 + ...etuptools-67.6.1-py3-none-any.whl.metadata | 137 + ...ingham-1.5.4-py2.py3-none-any.whl.metadata | 106 + .../six-1.11.0-py2.py3-none-any.whl.metadata | 43 + ...omlkit-0.4.6-py2.py3-none-any.whl.metadata | 175 + ...mlkit-0.5.11-py2.py3-none-any.whl.metadata | 194 + ...urllib3-1.22-py2.py3-none-any.whl.metadata | 1031 ++ ...urllib3-1.23-py2.py3-none-any.whl.metadata | 1077 ++ ...urllib3-1.24-py2.py3-none-any.whl.metadata | 1103 ++ ...llib3-1.24.1-py2.py3-none-any.whl.metadata | 1111 ++ ...llib3-1.24.2-py2.py3-none-any.whl.metadata | 1120 ++ ...llib3-1.24.3-py2.py3-none-any.whl.metadata | 1150 ++ .../urllib3-2.2.1-py3-none-any.whl.metadata | 154 + ...odings-0.5.1-py2.py3-none-any.whl.metadata | 52 + .../wheel-0.40.0-py3-none-any.whl.metadata | 59 + .../pypi.org/dists/CacheControl-0.12.5.tar.gz | Bin 0 -> 14383 bytes .../dists/attrs-17.4.0-py2.py3-none-any.whl | Bin 0 -> 31658 bytes .../colorama-0.3.9-py2.py3-none-any.whl | Bin 12902 -> 20181 bytes .../pypi.org/dists/hbmqtt-0.9.6.tar.gz | Bin 0 -> 74727 bytes .../more_itertools-4.1.0-py3-none-any.whl | Bin 0 -> 47988 bytes .../pypi.org/dists/pluggy-0.6.0.tar.gz | Bin 0 -> 19678 bytes .../dists/py-1.5.3-py2.py3-none-any.whl | Bin 0 -> 84903 bytes .../pypi.org/dists/pyrsistent-0.14.11.tar.gz | Bin 0 -> 104498 bytes .../dists/pytest-3.5.1-py2.py3-none-any.whl | Bin 0 -> 192143 bytes .../dists/six-1.11.0-py2.py3-none-any.whl | Bin 0 -> 10702 bytes .../fixtures/pypi.org/json/attrs.json | 41 +- .../fixtures/pypi.org/json/attrs/17.4.0.json | 98 - .../fixtures/pypi.org/json/black/19.10b0.json | 103 - .../fixtures/pypi.org/json/black/21.11b0.json | 155 - .../fixtures/pypi.org/json/cachecontrol.json | 93 +- .../pypi.org/json/cachecontrol/0.12.5.json | 68 - .../fixtures/pypi.org/json/cachy.json | 211 + .../fixtures/pypi.org/json/certifi.json | 1608 ++ .../fixtures/pypi.org/json/chardet.json | 434 + .../pypi.org/json/charset-normalizer.json | 15067 ++++++++++++++++ .../fixtures/pypi.org/json/cleo.json | 932 +- .../fixtures/pypi.org/json/cleo/1.0.0a5.json | 90 - .../fixtures/pypi.org/json/clikit/0.2.4.json | 95 - .../fixtures/pypi.org/json/colorama.json | 41 +- .../pypi.org/json/colorama/0.3.9.json | 82 - .../fixtures/pypi.org/json/discord-py.json | 1506 +- .../pypi.org/json/discord-py/2.0.0.json | 113 - .../pypi.org/json/funcsigs/1.0.2.json | 81 - .../fixtures/pypi.org/json/futures/3.2.0.json | 89 - .../fixtures/pypi.org/json/hbmqtt.json | 578 +- .../fixtures/pypi.org/json/hbmqtt/0.9.6.json | 112 - .../fixtures/pypi.org/json/html5lib.json | 457 + .../fixtures/pypi.org/json/idna.json | 726 + .../json/importlib-metadata/1.7.0.json | 140 - .../pypi.org/json/ipython/4.1.0rc1.json | 123 - .../fixtures/pypi.org/json/ipython/5.7.0.json | 154 - .../fixtures/pypi.org/json/ipython/7.5.0.json | 137 - .../pypi.org/json/isort-metadata.json | 35 - .../pypi.org/json/isort-metadata/4.3.4.json | 117 - .../fixtures/pypi.org/json/isort/4.3.4.json | 117 - .../fixtures/pypi.org/json/jsonschema.json | 3135 ++++ .../fixtures/pypi.org/json/jupyter/1.0.0.json | 112 - .../fixtures/pypi.org/json/lockfile.json | 41 +- .../pypi.org/json/lockfile/0.12.2.json | 84 - .../pypi.org/json/more-itertools.json | 64 +- .../pypi.org/json/more-itertools/4.1.0.json | 96 - .../fixtures/pypi.org/json/msgpack.json | 1079 ++ .../fixtures/pypi.org/json/pastel.json | 6 +- .../fixtures/pypi.org/json/pastel/0.1.0.json | 93 - .../fixtures/pypi.org/json/pkginfo.json | 1018 ++ .../fixtures/pypi.org/json/pluggy.json | 24 +- .../fixtures/pypi.org/json/pluggy/0.6.0.json | 67 - .../fixtures/pypi.org/json/poetry-core.json | 33 +- .../pypi.org/json/poetry-core/1.5.0.json | 94 - .../fixtures/pypi.org/json/poetry.json | 163 +- .../fixtures/pypi.org/json/poetry/0.12.4.json | 86 - .../fixtures/pypi.org/json/py.json | 41 +- .../fixtures/pypi.org/json/py/1.5.3.json | 84 - .../fixtures/pypi.org/json/pylev.json | 157 +- .../fixtures/pypi.org/json/pylev/1.3.0.json | 88 - .../fixtures/pypi.org/json/pyparsing.json | 3957 ++++ .../fixtures/pypi.org/json/pyrsistent.json | 3764 ++++ .../fixtures/pypi.org/json/pytest.json | 70 +- .../fixtures/pypi.org/json/pytest/3.5.0.json | 91 - .../fixtures/pypi.org/json/pytest/3.5.1.json | 108 - .../json/python-language-server/0.21.2.json | 62 - .../fixtures/pypi.org/json/pyyaml.json | 6655 ++++++- .../fixtures/pypi.org/json/pyyaml/3.13.0.json | 340 - .../pypi.org/json/requests-toolbelt.json | 631 + .../fixtures/pypi.org/json/requests.json | 3595 +++- .../pypi.org/json/requests/2.18.4.json | 87 - .../fixtures/pypi.org/json/setuptools.json | 56 +- .../pypi.org/json/setuptools/39.2.0.json | 100 - .../pypi.org/json/setuptools/67.6.1.json | 138 - .../fixtures/pypi.org/json/shellingham.json | 724 + .../fixtures/pypi.org/json/six.json | 41 +- .../fixtures/pypi.org/json/six/1.11.0.json | 72 - .../pypi.org/json/sqlalchemy/1.2.12.json | 70 - .../fixtures/pypi.org/json/tomlkit.json | 1492 +- .../fixtures/pypi.org/json/tomlkit/0.5.2.json | 96 - .../fixtures/pypi.org/json/tomlkit/0.5.3.json | 94 - .../fixtures/pypi.org/json/trackpy.json | 17 - .../fixtures/pypi.org/json/trackpy/0.4.1.json | 60 - .../pypi.org/json/twisted/18.9.0.json | 67 - .../fixtures/pypi.org/json/urllib3.json | 2557 +++ .../fixtures/pypi.org/json/webencodings.json | 112 + .../fixtures/pypi.org/json/wheel.json | 24 +- .../fixtures/pypi.org/json/wheel/0.40.0.json | 96 - .../fixtures/pypi.org/json/zipp/3.5.0.json | 142 - .../stubbed/attrs-17.4.0-py2.py3-none-any.whl | Bin 12358 -> 0 bytes .../more_itertools-4.1.0-py3-none-any.whl | Bin 10089 -> 0 bytes .../stubbed/py-1.5.3-py2.py3-none-any.whl | Bin 9838 -> 0 bytes .../stubbed/pytest-3.5.1-py2.py3-none-any.whl | Bin 11782 -> 0 bytes tests/repositories/fixtures/pypi.py | 16 +- tests/repositories/fixtures/python_hosted.py | 2 +- tests/repositories/test_pypi_repository.py | 34 +- 172 files changed, 68776 insertions(+), 5668 deletions(-) create mode 100644 .gitattributes create mode 100644 tests/repositories/fixtures/metadata/attrs-17.4.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/cachy-0.2.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2021.10.8-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.12.7-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.5.18.1-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.6.15-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.6.15.1-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.6.15.2-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.9.14-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2022.9.24-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2023.11.17-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2023.5.7-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2023.7.22-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/certifi-2024.2.2-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/chardet-3.0.4-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/charset_normalizer-3.3.2-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/cleo-0.6.8-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/colorama-0.3.9-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/discord.py-2.0.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/html5lib-1.1-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/idna-2.8-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/idna-3.6-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/jsonschema-3.2.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/lockfile-0.12.2-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/more_itertools-4.1.0-py2-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/more_itertools-4.1.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/msgpack-1.0.5-cp310-cp310-macosx_10_9_universal2.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/pastel-0.1.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/pkginfo-1.10.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/poetry-0.12.4-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/py-1.5.3-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/pylev-1.4.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/pyparsing-2.4.7-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/pytest-3.5.1-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.18.4-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.21.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.22.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.23.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.24.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.25.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.25.1-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.26.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.27.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.27.1-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.28.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.28.1-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.28.2-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.29.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.30.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests-2.31.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/requests_toolbelt-0.8.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/setuptools-67.6.1-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/shellingham-1.5.4-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/six-1.11.0-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/tomlkit-0.4.6-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/tomlkit-0.5.11-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-1.22-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-1.23-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-1.24-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-1.24.1-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-1.24.2-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-1.24.3-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/urllib3-2.2.1-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/webencodings-0.5.1-py2.py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/metadata/wheel-0.40.0-py3-none-any.whl.metadata create mode 100644 tests/repositories/fixtures/pypi.org/dists/CacheControl-0.12.5.tar.gz create mode 100644 tests/repositories/fixtures/pypi.org/dists/attrs-17.4.0-py2.py3-none-any.whl rename tests/repositories/fixtures/pypi.org/{stubbed => dists}/colorama-0.3.9-py2.py3-none-any.whl (55%) create mode 100644 tests/repositories/fixtures/pypi.org/dists/hbmqtt-0.9.6.tar.gz create mode 100644 tests/repositories/fixtures/pypi.org/dists/more_itertools-4.1.0-py3-none-any.whl create mode 100644 tests/repositories/fixtures/pypi.org/dists/pluggy-0.6.0.tar.gz create mode 100644 tests/repositories/fixtures/pypi.org/dists/py-1.5.3-py2.py3-none-any.whl create mode 100644 tests/repositories/fixtures/pypi.org/dists/pyrsistent-0.14.11.tar.gz create mode 100644 tests/repositories/fixtures/pypi.org/dists/pytest-3.5.1-py2.py3-none-any.whl create mode 100644 tests/repositories/fixtures/pypi.org/dists/six-1.11.0-py2.py3-none-any.whl delete mode 100644 tests/repositories/fixtures/pypi.org/json/attrs/17.4.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/black/19.10b0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/black/21.11b0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/cachecontrol/0.12.5.json create mode 100644 tests/repositories/fixtures/pypi.org/json/cachy.json create mode 100644 tests/repositories/fixtures/pypi.org/json/certifi.json create mode 100644 tests/repositories/fixtures/pypi.org/json/chardet.json create mode 100644 tests/repositories/fixtures/pypi.org/json/charset-normalizer.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/cleo/1.0.0a5.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/clikit/0.2.4.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/colorama/0.3.9.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/discord-py/2.0.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/funcsigs/1.0.2.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/futures/3.2.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/hbmqtt/0.9.6.json create mode 100644 tests/repositories/fixtures/pypi.org/json/html5lib.json create mode 100644 tests/repositories/fixtures/pypi.org/json/idna.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/importlib-metadata/1.7.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/ipython/4.1.0rc1.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/ipython/5.7.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/ipython/7.5.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/isort-metadata.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/isort-metadata/4.3.4.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/isort/4.3.4.json create mode 100644 tests/repositories/fixtures/pypi.org/json/jsonschema.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/jupyter/1.0.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/lockfile/0.12.2.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/more-itertools/4.1.0.json create mode 100644 tests/repositories/fixtures/pypi.org/json/msgpack.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/pastel/0.1.0.json create mode 100644 tests/repositories/fixtures/pypi.org/json/pkginfo.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/pluggy/0.6.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/poetry-core/1.5.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/poetry/0.12.4.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/py/1.5.3.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/pylev/1.3.0.json create mode 100644 tests/repositories/fixtures/pypi.org/json/pyparsing.json create mode 100644 tests/repositories/fixtures/pypi.org/json/pyrsistent.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/pytest/3.5.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/pytest/3.5.1.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/python-language-server/0.21.2.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/pyyaml/3.13.0.json create mode 100644 tests/repositories/fixtures/pypi.org/json/requests-toolbelt.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/requests/2.18.4.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/setuptools/39.2.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/setuptools/67.6.1.json create mode 100644 tests/repositories/fixtures/pypi.org/json/shellingham.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/six/1.11.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/sqlalchemy/1.2.12.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/tomlkit/0.5.2.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/tomlkit/0.5.3.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/trackpy.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/trackpy/0.4.1.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/twisted/18.9.0.json create mode 100644 tests/repositories/fixtures/pypi.org/json/urllib3.json create mode 100644 tests/repositories/fixtures/pypi.org/json/webencodings.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/wheel/0.40.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/json/zipp/3.5.0.json delete mode 100644 tests/repositories/fixtures/pypi.org/stubbed/attrs-17.4.0-py2.py3-none-any.whl delete mode 100644 tests/repositories/fixtures/pypi.org/stubbed/more_itertools-4.1.0-py3-none-any.whl delete mode 100644 tests/repositories/fixtures/pypi.org/stubbed/py-1.5.3-py2.py3-none-any.whl delete mode 100644 tests/repositories/fixtures/pypi.org/stubbed/pytest-3.5.1-py2.py3-none-any.whl diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..ff6bee3eee9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Do not mess with line endings in metadata files or the hash will be wrong. +*.metadata binary diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09727f4c637..441535dfc74 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,8 +6,9 @@ repos: rev: v4.5.0 hooks: - id: trailing-whitespace + exclude: tests/repositories/fixtures/pypi\.org/metadata/.*\.metadata - id: end-of-file-fixer - exclude: ^.*\.egg-info/ + exclude: ^.*\.egg-info/|tests/repositories/fixtures/pypi\.org/metadata/.*\.metadata - id: check-merge-conflict - id: check-case-conflict - id: check-json diff --git a/src/poetry/repositories/http_repository.py b/src/poetry/repositories/http_repository.py index 515907e72e5..b7e5a504b80 100644 --- a/src/poetry/repositories/http_repository.py +++ b/src/poetry/repositories/http_repository.py @@ -36,6 +36,8 @@ if TYPE_CHECKING: from packaging.utils import NormalizedName + from poetry.core.constraints.version import Version + from poetry.core.packages.package import Package from poetry.core.packages.utils.link import Link from poetry.repositories.link_sources.base import LinkSource @@ -90,6 +92,36 @@ def certificates(self) -> RepositoryCertificateConfig: def authenticated_url(self) -> str: return self._authenticator.authenticated_url(url=self.url) + def find_links_for_package(self, package: Package) -> list[Link]: + try: + page = self.get_page(package.name) + except PackageNotFound: + return [] + + return list(page.links_for_version(package.name, package.version)) + + def _get_release_info( + self, name: NormalizedName, version: Version + ) -> dict[str, Any]: + page = self.get_page(name) + + links = list(page.links_for_version(name, version)) + yanked = page.yanked(name, version) + + return self._links_to_data( + links, + PackageInfo( + name=name, + version=version.text, + summary="", + requires_dist=[], + requires_python=None, + files=[], + yanked=yanked, + cache_version=str(self.CACHE_VERSION), + ), + ) + def _download( self, url: str, dest: Path, *, raise_accepts_ranges: bool = False ) -> None: @@ -158,19 +190,21 @@ def _get_info_from_sdist(self, link: Link) -> PackageInfo: with self._cached_or_downloaded_file(link) as filepath: return PackageInfo.from_sdist(filepath) + def _get_metadata(self, metadata_url: str) -> bytes: + response = self.session.get(metadata_url) + return response.content + def _get_info_from_metadata(self, link: Link) -> PackageInfo | None: if link.has_metadata: try: assert link.metadata_url is not None - response = self.session.get(link.metadata_url) + data = self._get_metadata(link.metadata_url) if link.metadata_hashes and ( hash_name := get_highest_priority_hash_type( set(link.metadata_hashes.keys()), f"{link.filename}.metadata" ) ): - metadata_hash = getattr(hashlib, hash_name)( - response.content - ).hexdigest() + metadata_hash = getattr(hashlib, hash_name)(data).hexdigest() if metadata_hash != link.metadata_hashes[hash_name]: self._log( f"Metadata file hash ({metadata_hash}) does not match" @@ -180,7 +214,7 @@ def _get_info_from_metadata(self, link: Link) -> PackageInfo | None: ) return None - metadata, _ = parse_email(response.content) + metadata, _ = parse_email(data) return PackageInfo.from_metadata(metadata) except requests.HTTPError: diff --git a/src/poetry/repositories/legacy_repository.py b/src/poetry/repositories/legacy_repository.py index a6edf66729c..eb9d50c85ab 100644 --- a/src/poetry/repositories/legacy_repository.py +++ b/src/poetry/repositories/legacy_repository.py @@ -3,13 +3,11 @@ from contextlib import suppress from functools import cached_property from typing import TYPE_CHECKING -from typing import Any import requests.adapters from poetry.core.packages.package import Package -from poetry.inspection.info import PackageInfo from poetry.repositories.exceptions import PackageNotFound from poetry.repositories.http_repository import HTTPRepository from poetry.repositories.link_sources.html import SimpleRepositoryPage @@ -20,7 +18,6 @@ from packaging.utils import NormalizedName from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionConstraint - from poetry.core.packages.utils.link import Link from poetry.config.config import Config @@ -65,14 +62,6 @@ def package( return package - def find_links_for_package(self, package: Package) -> list[Link]: - try: - page = self.get_page(package.name) - except PackageNotFound: - return [] - - return list(page.links_for_version(package.name, package.version)) - def _find_packages( self, name: NormalizedName, constraint: VersionConstraint ) -> list[Package]: @@ -103,28 +92,6 @@ def _find_packages( for version, yanked in versions ] - def _get_release_info( - self, name: NormalizedName, version: Version - ) -> dict[str, Any]: - page = self.get_page(name) - - links = list(page.links_for_version(name, version)) - yanked = page.yanked(name, version) - - return self._links_to_data( - links, - PackageInfo( - name=name, - version=version.text, - summary="", - requires_dist=[], - requires_python=None, - files=[], - yanked=yanked, - cache_version=str(self.CACHE_VERSION), - ), - ) - def _get_page(self, name: NormalizedName) -> SimpleRepositoryPage: if not (response := self._get_response(f"/{name}/")): raise PackageNotFound(f"Package [{name}] not found.") diff --git a/src/poetry/repositories/link_sources/json.py b/src/poetry/repositories/link_sources/json.py index f33a679ab28..ad3ff36263b 100644 --- a/src/poetry/repositories/link_sources/json.py +++ b/src/poetry/repositories/link_sources/json.py @@ -41,8 +41,13 @@ def _link_cache(self) -> LinkCache: metadata = bool(metadata_value) break + hashes = file.get("hashes") link = Link( - url, requires_python=requires_python, yanked=yanked, metadata=metadata + url, + requires_python=requires_python, + hashes=hashes, + yanked=yanked, + metadata=metadata, ) if link.ext not in self.SUPPORTED_FORMATS: diff --git a/src/poetry/repositories/pypi_repository.py b/src/poetry/repositories/pypi_repository.py index 43d6c512324..6893c29c61b 100644 --- a/src/poetry/repositories/pypi_repository.py +++ b/src/poetry/repositories/pypi_repository.py @@ -10,7 +10,6 @@ from cachecontrol.controller import logger as cache_control_logger from poetry.core.packages.package import Package -from poetry.core.packages.utils.link import Link from poetry.core.version.exceptions import InvalidVersion from poetry.repositories.exceptions import PackageNotFound @@ -26,18 +25,14 @@ if TYPE_CHECKING: from packaging.utils import NormalizedName - from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionConstraint -SUPPORTED_PACKAGE_TYPES = {"sdist", "bdist_wheel"} - class PyPiRepository(HTTPRepository): def __init__( self, url: str = "https://pypi.org/", disable_cache: bool = False, - fallback: bool = True, pool_size: int = requests.adapters.DEFAULT_POOLSIZE, ) -> None: super().__init__( @@ -48,7 +43,6 @@ def __init__( ) self._base_url = url - self._fallback = fallback def search(self, query: str) -> list[Package]: results = [] @@ -110,79 +104,6 @@ def _get_package_info(self, name: NormalizedName) -> dict[str, Any]: return info - def find_links_for_package(self, package: Package) -> list[Link]: - json_data = self._get(f"pypi/{package.name}/{package.version}/json") - if json_data is None: - return [] - - links = [] - for url in json_data["urls"]: - if url["packagetype"] in SUPPORTED_PACKAGE_TYPES: - h = f"sha256={url['digests']['sha256']}" - links.append(Link(url["url"] + "#" + h, yanked=self._get_yanked(url))) - - return links - - def _get_release_info( - self, name: NormalizedName, version: Version - ) -> dict[str, Any]: - from poetry.inspection.info import PackageInfo - - self._log(f"Getting info for {name} ({version}) from PyPI", "debug") - - json_data = self._get(f"pypi/{name}/{version}/json") - if json_data is None: - raise PackageNotFound(f"Package [{name}] not found.") - - info = json_data["info"] - - data = PackageInfo( - name=info["name"], - version=info["version"], - summary=info["summary"], - requires_dist=info["requires_dist"], - requires_python=info["requires_python"], - yanked=self._get_yanked(info), - cache_version=str(self.CACHE_VERSION), - ) - - try: - version_info = json_data["urls"] - except KeyError: - version_info = [] - - files = info.get("files", []) - for file_info in version_info: - if file_info["packagetype"] in SUPPORTED_PACKAGE_TYPES: - files.append( - { - "file": file_info["filename"], - "hash": "sha256:" + file_info["digests"]["sha256"], - } - ) - data.files = files - - if self._fallback and data.requires_dist is None: - self._log( - "No dependencies found, downloading metadata and/or archives", - level="debug", - ) - # No dependencies set (along with other information) - # This might be due to actually no dependencies - # or badly set metadata when uploading. - # So, we need to make sure there is actually no - # dependencies by introspecting packages. - page = self.get_page(name) - links = list(page.links_for_version(name, version)) - info = self._get_info_from_links(links) - - data.requires_dist = info.requires_dist - - if not data.requires_python: - data.requires_python = info.requires_python - - return data.asdict() - def _get_page(self, name: NormalizedName) -> SimpleJsonPage: source = self._base_url + f"simple/{name}/" info = self.get_package_info(name) diff --git a/tests/installation/fixtures/with-pypi-repository.test b/tests/installation/fixtures/with-pypi-repository.test index 2309188b551..966d955c1dd 100644 --- a/tests/installation/fixtures/with-pypi-repository.test +++ b/tests/installation/fixtures/with-pypi-repository.test @@ -7,8 +7,8 @@ description = "Classes Without Boilerplate" optional = false python-versions = "*" files = [ - {file = "attrs-17.4.0-py2.py3-none-any.whl", hash = "sha256:d38e57f381e891928357c68e300d28d3d4dcddc50486d5f8dfaf743d40477619"}, - {file = "attrs-17.4.0.tar.gz", hash = "sha256:eb7536a1e6928190b3008c5b350bdf9850d619fff212341cd096f87a27a5e564"}, + {file = "attrs-17.4.0-py2.py3-none-any.whl", hash = "sha256:a17a9573a6f475c99b551c0e0a812707ddda1ec9653bed04c13841404ed6f450"}, + {file = "attrs-17.4.0.tar.gz", hash = "sha256:1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9"}, ] [package.extras] @@ -23,8 +23,8 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "*" files = [ - {file = "colorama-0.3.9-py2.py3-none-any.whl", hash = "sha256:5b632359f1ed2b7676a869812ba0edaacb99be04679b29eb56c07a5e137ab5a2"}, - {file = "colorama-0.3.9.tar.gz", hash = "sha256:4c5a15209723ce1330a5c193465fe221098f761e9640d823a2ce7c03f983137f"}, + {file = "colorama-0.3.9-py2.py3-none-any.whl", hash = "sha256:463f8483208e921368c9f306094eb6f725c6ca42b0f97e313cb5d5512459feda"}, + {file = "colorama-0.3.9.tar.gz", hash = "sha256:48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1"}, ] [[package]] @@ -34,9 +34,9 @@ description = "More routines for operating on iterables, beyond itertools" optional = false python-versions = "*" files = [ - {file = "more-itertools-4.1.0.tar.gz", hash = "sha256:bab2dc6f4be8f9a4a72177842c5283e2dff57c167439a03e3d8d901e854f0f2e"}, - {file = "more_itertools-4.1.0-py2-none-any.whl", hash = "sha256:5dd7dfd88d2fdaea446da478ffef8d7151fdf26ee92ac7ed7b14e8d71efe4b62"}, - {file = "more_itertools-4.1.0-py3-none-any.whl", hash = "sha256:29b1e1661aaa56875ce090fa219fa84dfc13daecb52cd4fae321f6f57b419ec4"}, + {file = "more-itertools-4.1.0.tar.gz", hash = "sha256:c9ce7eccdcb901a2c75d326ea134e0886abfbea5f93e91cc95de9507c0816c44"}, + {file = "more_itertools-4.1.0-py2-none-any.whl", hash = "sha256:11a625025954c20145b37ff6309cd54e39ca94f72f6bb9576d1195db6fa2442e"}, + {file = "more_itertools-4.1.0-py3-none-any.whl", hash = "sha256:0dd8f72eeab0d2c3bd489025bb2f6a1b8342f9b198f6fc37b52d15cfa4531fea"}, ] [package.dependencies] @@ -49,7 +49,7 @@ description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "pluggy-0.6.0.tar.gz", hash = "sha256:a982e208d054867661d27c6d2a86b17ba05fbb6b1bdc01f42660732dd107f865"}, + {file = "pluggy-0.6.0.tar.gz", hash = "sha256:7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff"}, ] [[package]] @@ -59,19 +59,19 @@ description = "library with cross-python path, ini-parsing, io, code, log facili optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "py-1.5.3-py2.py3-none-any.whl", hash = "sha256:43ee6c7f95e0ec6a906de49906b79d138d89728fff17109d49f086abc2fdd985"}, - {file = "py-1.5.3.tar.gz", hash = "sha256:2df2c513c3af11de15f58189ba5539ddc4768c6f33816dc5c03950c8bd6180fa"}, + {file = "py-1.5.3-py2.py3-none-any.whl", hash = "sha256:983f77f3331356039fdd792e9220b7b8ee1aa6bd2b25f567a963ff1de5a64f6a"}, + {file = "py-1.5.3.tar.gz", hash = "sha256:29c9fab495d7528e80ba1e343b958684f4ace687327e6f789a94bf3d1915f881"}, ] [[package]] name = "pytest" -version = "3.5.0" +version = "3.5.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "pytest-3.5.0-py2.py3-none-any.whl", hash = "sha256:28e4d9c2ae3196d74805c2eba24f350ae4c791a5b9b397c79b41506a48dc64ca"}, - {file = "pytest-3.5.0.tar.gz", hash = "sha256:677b1d6decd29c041fe64276f29f79fbe66e40c59e445eb251366b4a8ab8bf68"}, + {file = "pytest-3.5.1-py2.py3-none-any.whl", hash = "sha256:829230122facf05a5f81a6d4dfe6454a04978ea3746853b2b84567ecf8e5c526"}, + {file = "pytest-3.5.1.tar.gz", hash = "sha256:54713b26c97538db6ff0703a12b19aeaeb60b5e599de542e7fca0ec83b9038e8"}, ] [package.dependencies] @@ -91,7 +91,7 @@ optional = false python-versions = ">=3.7" files = [ {file = "setuptools-67.6.1-py3-none-any.whl", hash = "sha256:e728ca814a823bf7bf60162daf9db95b93d532948c4c0bea762ce62f60189078"}, - {file = "setuptools-67.6.1.tar.gz", hash = "sha256:a737d365c957dd3fced9ddd246118e95dce7a62c3dc49f37e7fdd9e93475d785"}, + {file = "setuptools-67.6.1.tar.gz", hash = "sha256:257de92a9d50a60b8e22abfcbb771571fde0dbf3ec234463212027a4eeecbe9a"}, ] [package.extras] @@ -106,8 +106,8 @@ description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "*" files = [ - {file = "six-1.11.0-py2.py3-none-any.whl", hash = "sha256:112f5b46e6aa106db3e4e2494a03694c938f41c4c4535edbdfc816c2e0cb50f2"}, - {file = "six-1.11.0.tar.gz", hash = "sha256:268a4ccb159c1a2d2c79336b02e75058387b0cdbb4cea2f07846a758f48a356d"}, + {file = "six-1.11.0-py2.py3-none-any.whl", hash = "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"}, + {file = "six-1.11.0.tar.gz", hash = "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"}, ] [metadata] diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index b862d3f5141..89ad0e9c383 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -126,7 +126,6 @@ def io_not_decorated() -> BufferedIO: def pool(pypi_repository: PyPiRepository) -> RepositoryPool: pool = RepositoryPool() - pypi_repository._fallback = True pool.add_repository(pypi_repository) return pool diff --git a/tests/installation/test_installer.py b/tests/installation/test_installer.py index 0e526b741b2..8a1664926d0 100644 --- a/tests/installation/test_installer.py +++ b/tests/installation/test_installer.py @@ -28,6 +28,7 @@ from poetry.repositories import RepositoryPool from poetry.repositories.installed_repository import InstalledRepository from poetry.toml.file import TOMLFile +from poetry.utils._compat import WINDOWS from poetry.utils.env import MockEnv from poetry.utils.env import NullEnv from tests.helpers import MOCK_DEFAULT_GIT_REVISION @@ -1900,8 +1901,6 @@ def test_installer_required_extras_should_not_be_removed_when_updating_single_de config: Config, pypi_repository: PyPiRepository, ) -> None: - mocker.patch("sys.platform", "darwin") - pool = RepositoryPool() pool.add_repository(pypi_repository) @@ -1916,13 +1915,14 @@ def test_installer_required_extras_should_not_be_removed_when_updating_single_de executor=Executor(env, pool, config, NullIO()), ) + package.python_versions = "^3.8" package.add_dependency(Factory.create_dependency("poetry", {"version": "^0.12.0"})) installer.update(True) result = installer.run() assert result == 0 - assert installer.executor.installations_count == 3 + assert installer.executor.installations_count == 25 assert installer.executor.updates_count == 0 assert installer.executor.removals_count == 0 @@ -1950,7 +1950,8 @@ def test_installer_required_extras_should_not_be_removed_when_updating_single_de result = installer.run() assert result == 0 - assert installer.executor.installations_count == 7 + installations = 5 if WINDOWS else 4 + assert installer.executor.installations_count == installations assert installer.executor.updates_count == 0 assert installer.executor.removals_count == 0 @@ -1987,7 +1988,7 @@ def test_installer_required_extras_should_be_installed( result = installer.run() assert result == 0 - assert installer.executor.installations_count == 2 + assert installer.executor.installations_count == 8 assert installer.executor.updates_count == 0 assert installer.executor.removals_count == 0 @@ -2008,7 +2009,7 @@ def test_installer_required_extras_should_be_installed( result = installer.run() assert result == 0 - assert installer.executor.installations_count == 2 + assert installer.executor.installations_count == 8 assert installer.executor.updates_count == 0 assert installer.executor.removals_count == 0 diff --git a/tests/puzzle/test_solver.py b/tests/puzzle/test_solver.py index 7495ad29a1e..326c172a251 100644 --- a/tests/puzzle/test_solver.py +++ b/tests/puzzle/test_solver.py @@ -3016,24 +3016,6 @@ def test_solver_can_solve_with_legacy_repository_using_proper_python_compatible_ ) -def test_solver_skips_invalid_versions( - package: ProjectPackage, io: NullIO, pypi_repository: PyPiRepository -) -> None: - package.python_versions = "^3.7" - - pool = RepositoryPool([pypi_repository]) - - solver = Solver(package, pool, [], [], io) - - package.add_dependency(Factory.create_dependency("trackpy", "^0.4")) - - transaction = solver.solve() - - check_solver_result( - transaction, [{"job": "install", "package": get_package("trackpy", "0.4.1")}] - ) - - def test_multiple_constraints_on_root( package: ProjectPackage, solver: Solver, repo: Repository ) -> None: @@ -3074,7 +3056,7 @@ def test_solver_chooses_most_recent_version_amongst_repositories( transaction = solver.solve() ops = check_solver_result( - transaction, [{"job": "install", "package": get_package("tomlkit", "0.5.3")}] + transaction, [{"job": "install", "package": get_package("tomlkit", "0.5.11")}] ) assert ops[0].package.source_type is None @@ -3193,7 +3175,7 @@ def test_solver_does_not_choose_from_secondary_repository_by_default( source_reference="legacy", ), }, - {"job": "install", "package": get_package("pylev", "1.3.0")}, + {"job": "install", "package": get_package("pylev", "1.4.0")}, { "job": "install", "package": Package( @@ -3245,7 +3227,7 @@ def test_solver_chooses_from_secondary_if_explicit( source_reference="legacy", ), }, - {"job": "install", "package": get_package("pylev", "1.3.0")}, + {"job": "install", "package": get_package("pylev", "1.4.0")}, {"job": "install", "package": get_package("clikit", "0.2.4")}, ], ) @@ -3298,7 +3280,7 @@ def test_solver_chooses_direct_dependency_from_explicit_if_explicit( ops = check_solver_result( transaction, [ - {"job": "install", "package": get_package("pylev", "1.3.0")}, + {"job": "install", "package": get_package("pylev", "1.4.0")}, ], ) diff --git a/tests/repositories/fixtures/distribution_hashes.py b/tests/repositories/fixtures/distribution_hashes.py index 6c20ed308bf..6a77c224d9a 100644 --- a/tests/repositories/fixtures/distribution_hashes.py +++ b/tests/repositories/fixtures/distribution_hashes.py @@ -236,11 +236,11 @@ class DistributionHash: "677602ec38bc1c7b72de6128d90d846b", ), "requests-2.18.4-py2.py3-none-any.whl": DistributionHash( - "ce91d39dc2857eeb19fc8bf765df6c14874bcdc724d3ce9c6cd89915618e7023", + "6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b", "f392c0ab49bf677c6240ef2b1890b079", ), "requests-2.18.4.tar.gz": DistributionHash( - "ec62f7e0e9d4814656b0172dbd592fea06127c6556ff5651eb5d2c8768671fd4", + "9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e", "942a6a383dc94da90cf58f5adcf028a4", ), "setuptools-67.6.1-py3-none-any.whl": DistributionHash( diff --git a/tests/repositories/fixtures/metadata/attrs-17.4.0-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/attrs-17.4.0-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..51341cd44b6 --- /dev/null +++ b/tests/repositories/fixtures/metadata/attrs-17.4.0-py2.py3-none-any.whl.metadata @@ -0,0 +1,284 @@ +Metadata-Version: 2.0 +Name: attrs +Version: 17.4.0 +Summary: Classes Without Boilerplate +Home-page: http://www.attrs.org/ +Author: Hynek Schlawack +Author-email: hs@ox.cx +License: MIT +Description-Content-Type: UNKNOWN +Keywords: class,attribute,boilerplate +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Natural Language :: English +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Provides-Extra: dev +Requires-Dist: coverage; extra == 'dev' +Requires-Dist: hypothesis; extra == 'dev' +Requires-Dist: pympler; extra == 'dev' +Requires-Dist: pytest; extra == 'dev' +Requires-Dist: six; extra == 'dev' +Requires-Dist: zope.interface; extra == 'dev' +Requires-Dist: sphinx; extra == 'dev' +Requires-Dist: zope.interface; extra == 'dev' +Provides-Extra: docs +Requires-Dist: sphinx; extra == 'docs' +Requires-Dist: zope.interface; extra == 'docs' +Provides-Extra: tests +Requires-Dist: coverage; extra == 'tests' +Requires-Dist: hypothesis; extra == 'tests' +Requires-Dist: pympler; extra == 'tests' +Requires-Dist: pytest; extra == 'tests' +Requires-Dist: six; extra == 'tests' +Requires-Dist: zope.interface; extra == 'tests' + +.. image:: http://www.attrs.org/en/latest/_static/attrs_logo.png + :alt: attrs Logo + +====================================== +``attrs``: Classes Without Boilerplate +====================================== + +.. image:: https://readthedocs.org/projects/attrs/badge/?version=stable + :target: http://www.attrs.org/en/stable/?badge=stable + :alt: Documentation Status + +.. image:: https://travis-ci.org/python-attrs/attrs.svg?branch=master + :target: https://travis-ci.org/python-attrs/attrs + :alt: CI Status + +.. image:: https://codecov.io/github/python-attrs/attrs/branch/master/graph/badge.svg + :target: https://codecov.io/github/python-attrs/attrs + :alt: Test Coverage + +.. teaser-begin + +``attrs`` is the Python package that will bring back the **joy** of **writing classes** by relieving you from the drudgery of implementing object protocols (aka `dunder `_ methods). + +Its main goal is to help you to write **concise** and **correct** software without slowing down your code. + +.. -spiel-end- + +For that, it gives you a class decorator and a way to declaratively define the attributes on that class: + +.. -code-begin- + +.. code-block:: pycon + + >>> import attr + + >>> @attr.s + ... class SomeClass(object): + ... a_number = attr.ib(default=42) + ... list_of_numbers = attr.ib(default=attr.Factory(list)) + ... + ... def hard_math(self, another_number): + ... return self.a_number + sum(self.list_of_numbers) * another_number + + + >>> sc = SomeClass(1, [1, 2, 3]) + >>> sc + SomeClass(a_number=1, list_of_numbers=[1, 2, 3]) + + >>> sc.hard_math(3) + 19 + >>> sc == SomeClass(1, [1, 2, 3]) + True + >>> sc != SomeClass(2, [3, 2, 1]) + True + + >>> attr.asdict(sc) + {'a_number': 1, 'list_of_numbers': [1, 2, 3]} + + >>> SomeClass() + SomeClass(a_number=42, list_of_numbers=[]) + + >>> C = attr.make_class("C", ["a", "b"]) + >>> C("foo", "bar") + C(a='foo', b='bar') + + +After *declaring* your attributes ``attrs`` gives you: + +- a concise and explicit overview of the class's attributes, +- a nice human-readable ``__repr__``, +- a complete set of comparison methods, +- an initializer, +- and much more, + +*without* writing dull boilerplate code again and again and *without* runtime performance penalties. + +This gives you the power to use actual classes with actual types in your code instead of confusing ``tuple``\ s or `confusingly behaving `_ ``namedtuple``\ s. +Which in turn encourages you to write *small classes* that do `one thing well `_. +Never again violate the `single responsibility principle `_ just because implementing ``__init__`` et al is a painful drag. + + +.. -testimonials- + +Testimonials +============ + +**Amber Hawkie Brown**, Twisted Release Manager and Computer Owl: + + Writing a fully-functional class using attrs takes me less time than writing this testimonial. + + +**Glyph Lefkowitz**, creator of `Twisted `_, `Automat `_, and other open source software, in `The One Python Library Everyone Needs `_: + + I’m looking forward to is being able to program in Python-with-attrs everywhere. + It exerts a subtle, but positive, design influence in all the codebases I’ve see it used in. + + +**Kenneth Reitz**, author of `requests `_, Python Overlord at Heroku, `on paper no less `_: + + attrs—classes for humans. I like it. + + +**Łukasz Langa**, prolific CPython core developer and Production Engineer at Facebook: + + I'm increasingly digging your attr.ocity. Good job! + + +.. -end- + +.. -project-information- + +Getting Help +============ + +Please use the ``python-attrs`` tag on `StackOverflow `_ to get help. + +Answering questions of your fellow developers is also great way to help the project! + + +Project Information +=================== + +``attrs`` is released under the `MIT `_ license, +its documentation lives at `Read the Docs `_, +the code on `GitHub `_, +and the latest release on `PyPI `_. +It’s rigorously tested on Python 2.7, 3.4+, and PyPy. + +If you'd like to contribute you're most welcome and we've written `a little guide `_ to get you started! + + +Release Information +=================== + +17.4.0 (2017-12-30) +------------------- + +Backward-incompatible Changes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- The traversal of MROs when using multiple inheritance was backward: + If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, ``attrs`` would have collected the attributes from ``B`` *before* those of ``A``. + + This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes. + Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible. + + Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies. + + `#298 `_, + `#299 `_, + `#304 `_ +- The ``__repr__`` set by ``attrs`` + no longer produces an ``AttributeError`` + when the instance is missing some of the specified attributes + (either through deleting + or after using ``init=False`` on some attributes). + + This can break code + that relied on ``repr(attr_cls_instance)`` raising ``AttributeError`` + to check if any attr-specified members were unset. + + If you were using this, + you can implement a custom method for checking this:: + + def has_unset_members(self): + for field in attr.fields(type(self)): + try: + getattr(self, field.name) + except AttributeError: + return True + return False + + `#308 `_ + + +Deprecations +^^^^^^^^^^^^ + +- The ``attr.ib(convert=callable)`` option is now deprecated in favor of ``attr.ib(converter=callable)``. + + This is done to achieve consistency with other noun-based arguments like *validator*. + + *convert* will keep working until at least January 2019 while raising a ``DeprecationWarning``. + + `#307 `_ + + +Changes +^^^^^^^ + +- Generated ``__hash__`` methods now hash the class type along with the attribute values. + Until now the hashes of two classes with the same values were identical which was a bug. + + The generated method is also *much* faster now. + + `#261 `_, + `#295 `_, + `#296 `_ +- ``attr.ib``\ ’s ``metadata`` argument now defaults to a unique empty ``dict`` instance instead of sharing a common empty ``dict`` for all. + The singleton empty ``dict`` is still enforced. + + `#280 `_ +- ``ctypes`` is optional now however if it's missing, a bare ``super()`` will not work in slots classes. + This should only happen in special environments like Google App Engine. + + `#284 `_, + `#286 `_ +- The attribute redefinition feature introduced in 17.3.0 now takes into account if an attribute is redefined via multiple inheritance. + In that case, the definition that is closer to the base of the class hierarchy wins. + + `#285 `_, + `#287 `_ +- Subclasses of ``auto_attribs=True`` can be empty now. + + `#291 `_, + `#292 `_ +- Equality tests are *much* faster now. + + `#306 `_ +- All generated methods now have correct ``__module__``, ``__name__``, and (on Python 3) ``__qualname__`` attributes. + + `#309 `_ + +`Full changelog `_. + +Credits +======= + +``attrs`` is written and maintained by `Hynek Schlawack `_. + +The development is kindly supported by `Variomedia AG `_. + +A full list of contributors can be found in `GitHub's overview `_. + +It’s the spiritual successor of `characteristic `_ and aspires to fix some of it clunkiness and unfortunate decisions. +Both were inspired by Twisted’s `FancyEqMixin `_ but both are implemented using class decorators because `sub-classing is bad for you `_, m’kay? + + diff --git a/tests/repositories/fixtures/metadata/cachy-0.2.0-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/cachy-0.2.0-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..92f57784ab4 --- /dev/null +++ b/tests/repositories/fixtures/metadata/cachy-0.2.0-py2.py3-none-any.whl.metadata @@ -0,0 +1,44 @@ +Metadata-Version: 2.1 +Name: cachy +Version: 0.2.0 +Summary: Cachy provides a simple yet effective caching library. +Home-page: https://github.com/sdispater/cachy +License: MIT +Keywords: cache +Author: Sébastien Eustace +Author-email: sebastien@eustace.io +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Provides-Extra: memcached +Provides-Extra: msgpack +Provides-Extra: redis +Requires-Dist: msgpack-python (>=0.5.0.0,<0.6.0.0); extra == "msgpack" +Requires-Dist: python-memcached (>=1.59.0.0,<2.0.0.0); extra == "memcached" +Requires-Dist: redis (>=2.10.0.0,<3.0.0.0); extra == "redis" +Description-Content-Type: text/x-rst + +Cachy +##### + +.. image:: https://travis-ci.org/sdispater/cachy.png + :alt: Cachy Build status + :target: https://travis-ci.org/sdispater/cachy + +Cachy provides a simple yet effective caching library. + +The full documentation is available here: http://cachy.readthedocs.org + + +Resources +========= + +* `Documentation `_ +* `Issue Tracker `_ + diff --git a/tests/repositories/fixtures/metadata/certifi-2021.10.8-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2021.10.8-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..7a6860db03a --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2021.10.8-py2.py3-none-any.whl.metadata @@ -0,0 +1,83 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2021.10.8 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://certifiio.readthedocs.io/en/latest/ +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Documentation, https://certifiio.readthedocs.io/en/latest/ +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 + +Certifi: Python SSL Certificates +================================ + +`Certifi`_ provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Certifi`: https://certifiio.readthedocs.io/en/latest/ +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.12.7-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.12.7-py3-none-any.whl.metadata new file mode 100644 index 00000000000..aeb1991aeed --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.12.7-py3-none-any.whl.metadata @@ -0,0 +1,83 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.12.7 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.5.18.1-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.5.18.1-py3-none-any.whl.metadata new file mode 100644 index 00000000000..e00fe313287 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.5.18.1-py3-none-any.whl.metadata @@ -0,0 +1,81 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.5.18.1 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.6.15-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.6.15-py3-none-any.whl.metadata new file mode 100644 index 00000000000..6f8de5dcae2 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.6.15-py3-none-any.whl.metadata @@ -0,0 +1,81 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.6.15 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.6.15.1-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.6.15.1-py3-none-any.whl.metadata new file mode 100644 index 00000000000..8e6d69456e2 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.6.15.1-py3-none-any.whl.metadata @@ -0,0 +1,83 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.6.15.1 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.6.15.2-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.6.15.2-py3-none-any.whl.metadata new file mode 100644 index 00000000000..e0ec3ac7206 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.6.15.2-py3-none-any.whl.metadata @@ -0,0 +1,83 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.6.15.2 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.9.14-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.9.14-py3-none-any.whl.metadata new file mode 100644 index 00000000000..f8f897ceb0c --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.9.14-py3-none-any.whl.metadata @@ -0,0 +1,83 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.9.14 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2022.9.24-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2022.9.24-py3-none-any.whl.metadata new file mode 100644 index 00000000000..92ea6c83f70 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2022.9.24-py3-none-any.whl.metadata @@ -0,0 +1,83 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2022.9.24 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +1024-bit Root Certificates +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Browsers and certificate authorities have concluded that 1024-bit keys are +unacceptably weak for certificates, particularly root certificates. For this +reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its +bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key) +certificate from the same CA. Because Mozilla removed these certificates from +its bundle, ``certifi`` removed them as well. + +In previous versions, ``certifi`` provided the ``certifi.old_where()`` function +to intentionally re-add the 1024-bit roots back into your bundle. This was not +recommended in production and therefore was removed at the end of 2018. + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2023.11.17-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2023.11.17-py3-none-any.whl.metadata new file mode 100644 index 00000000000..7dd1791d94d --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2023.11.17-py3-none-any.whl.metadata @@ -0,0 +1,66 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2023.11.17 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. diff --git a/tests/repositories/fixtures/metadata/certifi-2023.5.7-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2023.5.7-py3-none-any.whl.metadata new file mode 100644 index 00000000000..1e6ac65fbf9 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2023.5.7-py3-none-any.whl.metadata @@ -0,0 +1,69 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2023.5.7 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2023.7.22-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2023.7.22-py3-none-any.whl.metadata new file mode 100644 index 00000000000..07f4991b71c --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2023.7.22-py3-none-any.whl.metadata @@ -0,0 +1,69 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2023.7.22 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. + + diff --git a/tests/repositories/fixtures/metadata/certifi-2024.2.2-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/certifi-2024.2.2-py3-none-any.whl.metadata new file mode 100644 index 00000000000..c688a628485 --- /dev/null +++ b/tests/repositories/fixtures/metadata/certifi-2024.2.2-py3-none-any.whl.metadata @@ -0,0 +1,66 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2024.2.2 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. diff --git a/tests/repositories/fixtures/metadata/chardet-3.0.4-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/chardet-3.0.4-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..1427867ab86 --- /dev/null +++ b/tests/repositories/fixtures/metadata/chardet-3.0.4-py2.py3-none-any.whl.metadata @@ -0,0 +1,96 @@ +Metadata-Version: 2.0 +Name: chardet +Version: 3.0.4 +Summary: Universal encoding detector for Python 2 and 3 +Home-page: https://github.com/chardet/chardet +Author: Daniel Blanchard +Author-email: dan.blanchard@gmail.com +License: LGPL +Keywords: encoding,i18n,xml +Platform: UNKNOWN +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Text Processing :: Linguistic + +Chardet: The Universal Character Encoding Detector +-------------------------------------------------- + +.. image:: https://img.shields.io/travis/chardet/chardet/stable.svg + :alt: Build status + :target: https://travis-ci.org/chardet/chardet + +.. image:: https://img.shields.io/coveralls/chardet/chardet/stable.svg + :target: https://coveralls.io/r/chardet/chardet + +.. image:: https://img.shields.io/pypi/v/chardet.svg + :target: https://warehouse.python.org/project/chardet/ + :alt: Latest version on PyPI + +.. image:: https://img.shields.io/pypi/l/chardet.svg + :alt: License + + +Detects + - ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants) + - Big5, GB2312, EUC-TW, HZ-GB-2312, ISO-2022-CN (Traditional and Simplified Chinese) + - EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP (Japanese) + - EUC-KR, ISO-2022-KR (Korean) + - KOI8-R, MacCyrillic, IBM855, IBM866, ISO-8859-5, windows-1251 (Cyrillic) + - ISO-8859-5, windows-1251 (Bulgarian) + - ISO-8859-1, windows-1252 (Western European languages) + - ISO-8859-7, windows-1253 (Greek) + - ISO-8859-8, windows-1255 (Visual and Logical Hebrew) + - TIS-620 (Thai) + +.. note:: + Our ISO-8859-2 and windows-1250 (Hungarian) probers have been temporarily + disabled until we can retrain the models. + +Requires Python 2.6, 2.7, or 3.3+. + +Installation +------------ + +Install from `PyPI `_:: + + pip install chardet + +Documentation +------------- + +For users, docs are now available at https://chardet.readthedocs.io/. + +Command-line Tool +----------------- + +chardet comes with a command-line script which reports on the encodings of one +or more files:: + + % chardetect somefile someotherfile + somefile: windows-1252 with confidence 0.5 + someotherfile: ascii with confidence 1.0 + +About +----- + +This is a continuation of Mark Pilgrim's excellent chardet. Previously, two +versions needed to be maintained: one that supported python 2.x and one that +supported python 3.x. We've recently merged with `Ian Cordasco `_'s +`charade `_ fork, so now we have one +coherent version that works for Python 2.6+. + +:maintainer: Dan Blanchard + + diff --git a/tests/repositories/fixtures/metadata/charset_normalizer-3.3.2-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/charset_normalizer-3.3.2-py3-none-any.whl.metadata new file mode 100644 index 00000000000..822550e36bf --- /dev/null +++ b/tests/repositories/fixtures/metadata/charset_normalizer-3.3.2-py3-none-any.whl.metadata @@ -0,0 +1,683 @@ +Metadata-Version: 2.1 +Name: charset-normalizer +Version: 3.3.2 +Summary: The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet. +Home-page: https://github.com/Ousret/charset_normalizer +Author: Ahmed TAHRI +Author-email: ahmed.tahri@cloudnursery.dev +License: MIT +Project-URL: Bug Reports, https://github.com/Ousret/charset_normalizer/issues +Project-URL: Documentation, https://charset-normalizer.readthedocs.io/en/latest +Keywords: encoding,charset,charset-detector,detector,normalization,unicode,chardet,detect +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: MIT License +Classifier: Intended Audience :: Developers +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Text Processing :: Linguistic +Classifier: Topic :: Utilities +Classifier: Typing :: Typed +Requires-Python: >=3.7.0 +Description-Content-Type: text/markdown +License-File: LICENSE +Provides-Extra: unicode_backport + +

Charset Detection, for Everyone 👋

+ +

+ The Real First Universal Charset Detector
+ + + + + Download Count Total + + + + +

+

+ Featured Packages
+ + Static Badge + + + Static Badge + +

+

+ In other language (unofficial port - by the community)
+ + Static Badge + +

+ +> A library that helps you read text from an unknown charset encoding.
Motivated by `chardet`, +> I'm trying to resolve the issue by taking a new approach. +> All IANA character set names for which the Python core library provides codecs are supported. + +

+ >>>>> 👉 Try Me Online Now, Then Adopt Me 👈 <<<<< +

+ +This project offers you an alternative to **Universal Charset Encoding Detector**, also known as **Chardet**. + +| Feature | [Chardet](https://github.com/chardet/chardet) | Charset Normalizer | [cChardet](https://github.com/PyYoshi/cChardet) | +|--------------------------------------------------|:---------------------------------------------:|:--------------------------------------------------------------------------------------------------:|:-----------------------------------------------:| +| `Fast` | ❌ | ✅ | ✅ | +| `Universal**` | ❌ | ✅ | ❌ | +| `Reliable` **without** distinguishable standards | ❌ | ✅ | ✅ | +| `Reliable` **with** distinguishable standards | ✅ | ✅ | ✅ | +| `License` | LGPL-2.1
_restrictive_ | MIT | MPL-1.1
_restrictive_ | +| `Native Python` | ✅ | ✅ | ❌ | +| `Detect spoken language` | ❌ | ✅ | N/A | +| `UnicodeDecodeError Safety` | ❌ | ✅ | ❌ | +| `Whl Size (min)` | 193.6 kB | 42 kB | ~200 kB | +| `Supported Encoding` | 33 | 🎉 [99](https://charset-normalizer.readthedocs.io/en/latest/user/support.html#supported-encodings) | 40 | + +

+Reading Normalized TextCat Reading Text +

+ +*\*\* : They are clearly using specific code for a specific encoding even if covering most of used one*
+Did you got there because of the logs? See [https://charset-normalizer.readthedocs.io/en/latest/user/miscellaneous.html](https://charset-normalizer.readthedocs.io/en/latest/user/miscellaneous.html) + +## ⚡ Performance + +This package offer better performance than its counterpart Chardet. Here are some numbers. + +| Package | Accuracy | Mean per file (ms) | File per sec (est) | +|-----------------------------------------------|:--------:|:------------------:|:------------------:| +| [chardet](https://github.com/chardet/chardet) | 86 % | 200 ms | 5 file/sec | +| charset-normalizer | **98 %** | **10 ms** | 100 file/sec | + +| Package | 99th percentile | 95th percentile | 50th percentile | +|-----------------------------------------------|:---------------:|:---------------:|:---------------:| +| [chardet](https://github.com/chardet/chardet) | 1200 ms | 287 ms | 23 ms | +| charset-normalizer | 100 ms | 50 ms | 5 ms | + +Chardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload. + +> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows. +> And yes, these results might change at any time. The dataset can be updated to include more files. +> The actual delays heavily depends on your CPU capabilities. The factors should remain the same. +> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability +> (eg. Supported Encoding) Challenge-them if you want. + +## ✨ Installation + +Using pip: + +```sh +pip install charset-normalizer -U +``` + +## 🚀 Basic Usage + +### CLI +This package comes with a CLI. + +``` +usage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD] + file [file ...] + +The Real First Universal Charset Detector. Discover originating encoding used +on text file. Normalize text to unicode. + +positional arguments: + files File(s) to be analysed + +optional arguments: + -h, --help show this help message and exit + -v, --verbose Display complementary information about file if any. + Stdout will contain logs about the detection process. + -a, --with-alternative + Output complementary possibilities if any. Top-level + JSON WILL be a list. + -n, --normalize Permit to normalize input file. If not set, program + does not write anything. + -m, --minimal Only output the charset detected to STDOUT. Disabling + JSON output. + -r, --replace Replace file when trying to normalize it instead of + creating a new one. + -f, --force Replace file without asking if you are sure, use this + flag with caution. + -t THRESHOLD, --threshold THRESHOLD + Define a custom maximum amount of chaos allowed in + decoded content. 0. <= chaos <= 1. + --version Show version information and exit. +``` + +```bash +normalizer ./data/sample.1.fr.srt +``` + +or + +```bash +python -m charset_normalizer ./data/sample.1.fr.srt +``` + +🎉 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format. + +```json +{ + "path": "/home/default/projects/charset_normalizer/data/sample.1.fr.srt", + "encoding": "cp1252", + "encoding_aliases": [ + "1252", + "windows_1252" + ], + "alternative_encodings": [ + "cp1254", + "cp1256", + "cp1258", + "iso8859_14", + "iso8859_15", + "iso8859_16", + "iso8859_3", + "iso8859_9", + "latin_1", + "mbcs" + ], + "language": "French", + "alphabets": [ + "Basic Latin", + "Latin-1 Supplement" + ], + "has_sig_or_bom": false, + "chaos": 0.149, + "coherence": 97.152, + "unicode_path": null, + "is_preferred": true +} +``` + +### Python +*Just print out normalized text* +```python +from charset_normalizer import from_path + +results = from_path('./my_subtitle.srt') + +print(str(results.best())) +``` + +*Upgrade your code without effort* +```python +from charset_normalizer import detect +``` + +The above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible. + +See the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/) + +## 😇 Why + +When I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a +reliable alternative using a completely different method. Also! I never back down on a good challenge! + +I **don't care** about the **originating charset** encoding, because **two different tables** can +produce **two identical rendered string.** +What I want is to get readable text, the best I can. + +In a way, **I'm brute forcing text decoding.** How cool is that ? 😎 + +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. + +## 🍰 How + + - Discard all charset encoding table that could not fit the binary content. + - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding. + - Extract matches with the lowest mess detected. + - Additionally, we measure coherence / probe for a language. + +**Wait a minute**, what is noise/mess and coherence according to **YOU ?** + +*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then +**I established** some ground rules about **what is obvious** when **it seems like** a mess. + I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to + improve or rewrite it. + +*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought +that intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design. + +## ⚡ Known limitations + + - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters)) + - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content. + +## ⚠️ About Python EOLs + +**If you are running:** + +- Python >=2.7,<3.5: Unsupported +- Python 3.5: charset-normalizer < 2.1 +- Python 3.6: charset-normalizer < 3.1 +- Python 3.7: charset-normalizer < 4.0 + +Upgrade your Python interpreter as soon as possible. + +## 👤 Contributing + +Contributions, issues and feature requests are very much welcome.
+Feel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute. + +## 📝 License + +Copyright © [Ahmed TAHRI @Ousret](https://github.com/Ousret).
+This project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed. + +Characters frequencies used in this project © 2012 [Denny Vrandečić](http://simia.net/letters/) + +## 💼 For Enterprise + +Professional support for charset-normalizer is available as part of the [Tidelift +Subscription][1]. Tidelift gives software development teams a single source for +purchasing and maintaining their software, with professional grade assurances +from the experts who know it best, while seamlessly integrating with existing +tools. + +[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme + +# Changelog +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). +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31) + +### Fixed +- Unintentional memory usage regression when using large payload that match several encoding (#376) +- Regression on some detection case showcased in the documentation (#371) + +### Added +- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife) + +## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22) + +### Changed +- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8 +- Improved the general detection reliability based on reports from the community + +## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30) + +### Added +- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer` +- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323) + +### Removed +- (internal) Redundant utils.is_ascii function and unused function is_private_use_only +- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant + +### Changed +- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection +- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8 + +### Fixed +- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \_\_lt\_\_ (#350) + +## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07) + +### Changed +- Typehint for function `from_path` no longer enforce `PathLike` as its first argument +- Minor improvement over the global detection reliability + +### Added +- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries +- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True) +- Explicit support for Python 3.12 + +### Fixed +- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289) + +## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06) + +### Added +- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262) + +### Removed +- Support for Python 3.6 (PR #260) + +### Changed +- Optional speedup provided by mypy/c 1.0.1 + +## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18) + +### Fixed +- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233) + +### Changed +- Speedup provided by mypy/c 0.990 on Python >= 3.7 + +## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20) + +### Added +- 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 +- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES +- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio +- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl) + +### Changed +- Build with static metadata using 'build' frontend +- Make the language detection stricter +- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1 + +### Fixed +- CLI with opt --normalize fail when using full path for files +- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it +- Sphinx warnings when generating the documentation + +### Removed +- Coherence detector no longer return 'Simple English' instead return 'English' +- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese' +- Breaking: Method `first()` and `best()` from CharsetMatch +- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII) +- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches +- Breaking: Top-level function `normalize` +- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch +- Support for the backport `unicodedata2` + +## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18) + +### Added +- 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 +- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES +- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio + +### Changed +- Build with static metadata using 'build' frontend +- Make the language detection stricter + +### Fixed +- CLI with opt --normalize fail when using full path for files +- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it + +### Removed +- Coherence detector no longer return 'Simple English' instead return 'English' +- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese' + +## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21) + +### Added +- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl) + +### Removed +- Breaking: Method `first()` and `best()` from CharsetMatch +- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII) + +### Fixed +- Sphinx warnings when generating the documentation + +## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15) + +### Changed +- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1 + +### Removed +- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches +- Breaking: Top-level function `normalize` +- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch +- Support for the backport `unicodedata2` + +## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19) + +### Deprecated +- Function `normalize` scheduled for removal in 3.0 + +### Changed +- Removed useless call to decode in fn is_unprintable (#206) + +### Fixed +- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204) + +## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19) + +### Added +- Output the Unicode table version when running the CLI with `--version` (PR #194) + +### Changed +- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175) +- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183) + +### Fixed +- 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) +- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181) + +### Removed +- Support for Python 3.5 (PR #192) + +### Deprecated +- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194) + +## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12) + +### Fixed +- ASCII miss-detection on rare cases (PR #170) + +## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30) + +### Added +- Explicit support for Python 3.11 (PR #164) + +### Changed +- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165) + +## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04) + +### Fixed +- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154) + +### Changed +- Skipping the language-detection (CD) on ASCII (PR #155) + +## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03) + +### Changed +- Moderating the logging impact (since 2.0.8) for specific environments (PR #147) + +### Fixed +- Wrong logging level applied when setting kwarg `explain` to True (PR #146) + +## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24) +### Changed +- Improvement over Vietnamese detection (PR #126) +- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124) +- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122) +- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129) +- Code style as refactored by Sourcery-AI (PR #131) +- Minor adjustment on the MD around european words (PR #133) +- Remove and replace SRTs from assets / tests (PR #139) +- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135) +- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135) + +### Fixed +- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137) +- Avoid using too insignificant chunk (PR #137) + +### Added +- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135) +- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141) + +## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11) +### Added +- Add support for Kazakh (Cyrillic) language detection (PR #109) + +### Changed +- Further, improve inferring the language from a given single-byte code page (PR #112) +- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116) +- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113) +- Various detection improvement (MD+CD) (PR #117) + +### Removed +- Remove redundant logging entry about detected language(s) (PR #115) + +### Fixed +- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102) + +## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18) +### Fixed +- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100) +- Fix CLI crash when using --minimal output in certain cases (PR #103) + +### Changed +- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101) + +## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14) +### Changed +- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81) +- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82) +- The Unicode detection is slightly improved (PR #93) +- Add syntax sugar \_\_bool\_\_ for results CharsetMatches list-container (PR #91) + +### Removed +- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92) + +### Fixed +- 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) +- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96) +- The MANIFEST.in was not exhaustive (PR #78) + +## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30) +### Fixed +- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70) +- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68) +- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72) +- Submatch factoring could be wrong in rare edge cases (PR #72) +- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72) +- Fix line endings from CRLF to LF for certain project files (PR #67) + +### Changed +- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76) +- Allow fallback on specified encoding if any (PR #71) + +## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16) +### Changed +- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63) +- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64) + +## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15) +### Fixed +- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59) + +### Changed +- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57) + +## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13) +### Fixed +- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55) +- Using explain=False permanently disable the verbose output in the current runtime (PR #47) +- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47) +- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52) + +### Changed +- Public function normalize default args values were not aligned with from_bytes (PR #53) + +### Added +- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47) + +## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02) +### Changed +- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet. +- Accent has been made on UTF-8 detection, should perform rather instantaneous. +- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible. +- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time) +- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+ +- utf_7 detection has been reinstated. + +### Removed +- This package no longer require anything when used with Python 3.5 (Dropped cached_property) +- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volapük, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian. +- The exception hook on UnicodeDecodeError has been removed. + +### Deprecated +- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0 + +### Fixed +- The CLI output used the relative path of the file(s). Should be absolute. + +## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28) +### Fixed +- Logger configuration/usage no longer conflict with others (PR #44) + +## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21) +### Removed +- Using standard logging instead of using the package loguru. +- Dropping nose test framework in favor of the maintained pytest. +- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text. +- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version. +- Stop support for UTF-7 that does not contain a SIG. +- Dropping PrettyTable, replaced with pure JSON output in CLI. + +### Fixed +- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process. +- Not searching properly for the BOM when trying utf32/16 parent codec. + +### Changed +- Improving the package final size by compressing frequencies.json. +- Huge improvement over the larges payload. + +### Added +- CLI now produces JSON consumable output. +- Return ASCII if given sequences fit. Given reasonable confidence. + +## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13) + +### Fixed +- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40) + +## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12) + +### Fixed +- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39) + +## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12) + +### Fixed +- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38) + +## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09) + +### Changed +- Amend the previous release to allow prettytable 2.0 (PR #35) + +## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08) + +### Fixed +- Fix error while using the package with a python pre-release interpreter (PR #33) + +### Changed +- Dependencies refactoring, constraints revised. + +### Added +- Add python 3.9 and 3.10 to the supported interpreters + +MIT License + +Copyright (c) 2019 TAHRI Ahmed R. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/repositories/fixtures/metadata/cleo-0.6.8-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/cleo-0.6.8-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..b8784e1ca34 --- /dev/null +++ b/tests/repositories/fixtures/metadata/cleo-0.6.8-py2.py3-none-any.whl.metadata @@ -0,0 +1,537 @@ +Metadata-Version: 2.1 +Name: cleo +Version: 0.6.8 +Summary: Cleo allows you to create beautiful and testable command-line interfaces. +Home-page: https://github.com/sdispater/cleo +License: MIT +Keywords: cli,commands +Author: Sébastien Eustace +Author-email: sebastien@eustace.io +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Requires-Dist: pastel (>=0.1.0,<0.2.0) +Requires-Dist: pylev (>=1.3,<2.0) +Description-Content-Type: text/x-rst + +Cleo +#### + +.. image:: https://travis-ci.org/sdispater/cleo.png + :alt: Cleo Build status + :target: https://travis-ci.org/sdispater/cleo + +Create beautiful and testable command-line interfaces. + +Resources +========= + +* `Documentation `_ +* `Issue Tracker `_ + + +Usage +===== + +To make a command that greets you from the command line, +create ``greet_command.py`` and add the following to it: + +.. code-block:: python + + from cleo import Command + + + class GreetCommand(Command): + """ + Greets someone + + demo:greet + {name? : Who do you want to greet?} + {--y|yell : If set, the task will yell in uppercase letters} + """ + + def handle(self): + name = self.argument('name') + + if name: + text = 'Hello %s' % name + else: + text = 'Hello' + + if self.option('yell'): + text = text.upper() + + self.line(text) + + +You also need to create the file to run at the command line which creates +an ``Application`` and adds commands to it: + +.. code-block:: python + + #!/usr/bin/env python + # -*- coding: utf-8 -*- + + from greet_command import GreetCommand + from cleo import Application + + application = Application() + application.add(GreetCommand()) + + if __name__ == '__main__': + application.run() + +Test the new command by running the following + +.. code-block:: bash + + $ python application.py demo:greet John + +This will print the following to the command line: + +.. code-block:: text + + Hello John + +You can also use the ``--yell`` option to make everything uppercase: + +.. code-block:: bash + + $ python application.py demo:greet John --yell + +This prints: + +.. code-block:: text + + HELLO JOHN + +As you may have already seen, Cleo uses the command docstring to determine +the command definition. +The docstring must be in the following form : + +.. code-block:: python + + """ + Command description + + Command signature + """ + +The signature being in the following form: + +.. code-block:: python + + """ + command:name {argument : Argument description} {--option : Option description} + """ + +The signature can span multiple lines. + +.. code-block:: python + + """ + command:name + {argument : Argument description} + {--option : Option description} + """ + +Coloring the Output +------------------- + +Whenever you output text, you can surround the text with tags to color its +output. For example: + +.. code-block:: python + + # green text + self.line('foo') + + # yellow text + self.line('foo') + + # black text on a cyan background + self.line('foo') + + # white text on a red background + self.line('foo') + +The closing tag can be replaced by ````, which revokes all formatting options established by the last opened tag. + +You can also use the corresponding methods: + +.. code-block:: python + + self.info('foo') + self.comment('foo') + self.question('foo') + self.error('foo') + +It is possible to define your own styles using the ``set_style()`` method: + +.. code-block:: python + + self.set_style('fire', fg='red', bg='yellow', options=['bold', 'blink']) + self.line('foo') + +Available foreground and background colors are: ``black``, ``red``, ``green``, +``yellow``, ``blue``, ``magenta``, ``cyan`` and ``white``. + +And available options are: ``bold``, ``underscore``, ``blink``, ``reverse`` and ``conceal``. + +You can also set these colors and options inside the tagname: + +.. code-block:: python + + # green text + self.line('foo') + + # black text on a cyan background + self.line('foo') + + # bold text on a yellow background + self.line('foo') + + +Verbosity Levels +---------------- + +Cleo has five verbosity levels. These are defined in the ``Output`` class: + +======================================= ================================== ====================== +Mode Meaning Console option +======================================= ================================== ====================== +``Output.VERBOSITY_QUIET`` Do not output any messages ``-q`` or ``--quiet`` +``Output.VERBOSITY_NORMAL`` The default verbosity level (none) +``Output.VERBOSITY_VERBOSE`` Increased verbosity of messages ``-v`` +``Output.VERBOSITY_VERY_VERBOSE`` Informative non essential messages ``-vv`` +``Output.VERBOSITY_DEBUG`` Debug messages ``-vvv`` +======================================= ================================== ====================== + +It is possible to print a message in a command for only a specific verbosity +level. For example: + +.. code-block:: python + + if Output.VERBOSITY_VERBOSE <= self.output.get_verbosity(): + self.line(...) + +There are also more semantic methods you can use to test for each of the +verbosity levels: + +.. code-block:: python + + if self.output.is_quiet(): + # ... + + if self.output.is_verbose(): + # ... + +When the quiet level is used, all output is suppressed as the default +``Output.write()`` method returns without actually printing. + + +Using Arguments +--------------- + +The most interesting part of the commands are the arguments and options that +you can make available. Arguments are the strings - separated by spaces - that +come after the command name itself. They are ordered, and can be optional +or required. For example, add an optional ``last_name`` argument to the command +and make the ``name`` argument required: + +.. code-block:: python + + class GreetCommand(Command): + """ + Greets someone + + demo:greet + {name : Who do you want to greet?} + {last_name? : Your last name?} + {--y|yell : If set, the task will yell in uppercase letters} + """ + +You now have access to a ``last_name`` argument in your command: + +.. code-block:: python + + last_name = self.argument('last_name') + if last_name: + text += ' %s' % last_name + +The command can now be used in either of the following ways: + +.. code-block:: bash + + $ python application.py demo:greet John + $ python application.py demo:greet John Doe + +It is also possible to let an argument take a list of values (imagine you want +to greet all your friends). For this it must be specified at the end of the +argument list: + +.. code-block:: python + + class GreetCommand(Command): + """ + Greets someone + + demo:greet + {names* : Who do you want to greet?} + {--y|yell : If set, the task will yell in uppercase letters} + """ + +To use this, just specify as many names as you want: + +.. code-block:: bash + + $ python application.py demo:greet John Jane + +You can access the ``names`` argument as a list: + +.. code-block:: python + + names = self.argument('names') + if names: + text += ' %s' % ', '.join(names) + +There are 3 argument variants you can use: + +=========================== ==================================== =============================================================================================================== +Mode Notation Value +=========================== ==================================== =============================================================================================================== +``InputArgument.REQUIRED`` none (just write the argument name) The argument is required +``InputArgument.OPTIONAL`` ``argument?`` The argument is optional and therefore can be omitted +``InputArgument.IS_LIST`` ``argument*`` The argument can contain an indefinite number of arguments and must be used at the end of the argument list +=========================== ==================================== =============================================================================================================== + +You can combine ``IS_LIST`` with ``REQUIRED`` and ``OPTIONAL`` like this: + +.. code-block:: python + + class GreetCommand(Command): + """ + Greets someone + + demo:greet + {names?* : Who do you want to greet?} + {--y|yell : If set, the task will yell in uppercase letters} + """ + +If you want to set a default value, you can it like so: + +.. code-block:: text + + argument=default + +The argument will then be considered optional. + + +Using Options +------------- + +Unlike arguments, options are not ordered (meaning you can specify them in any +order) and are specified with two dashes (e.g. ``--yell`` - you can also +declare a one-letter shortcut that you can call with a single dash like +``-y``). Options are *always* optional, and can be setup to accept a value +(e.g. ``--dir=src``) or simply as a boolean flag without a value (e.g. +``--yell``). + +.. tip:: + + It is also possible to make an option *optionally* accept a value (so that + ``--yell`` or ``--yell=loud`` work). Options can also be configured to + accept a list of values. + +For example, add a new option to the command that can be used to specify +how many times in a row the message should be printed: + +.. code-block:: python + + class GreetCommand(Command): + """ + Greets someone + + demo:greet + {name? : Who do you want to greet?} + {--y|yell : If set, the task will yell in uppercase letters} + {--iterations=1 : How many times should the message be printed?} + """ + + +Next, use this in the command to print the message multiple times: + +.. code-block:: python + + for _ in range(0, self.option('iterations')): + self.line(text) + +Now, when you run the task, you can optionally specify a ``--iterations`` +flag: + +.. code-block:: bash + + $ python application.py demo:greet John + $ python application.py demo:greet John --iterations=5 + +The first example will only print once, since ``iterations`` is empty and +defaults to ``1``. The second example will print five times. + +Recall that options don't care about their order. So, either of the following +will work: + +.. code-block:: bash + + $ python application.py demo:greet John --iterations=5 --yell + $ python application.py demo:greet John --yell --iterations=5 + +There are 4 option variants you can use: + +=============================== =================================== ====================================================================================== +Option Notation Value +=============================== =================================== ====================================================================================== +``InputOption.VALUE_IS_LIST`` ``--option=*`` This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``) +``InputOption.VALUE_NONE`` ``--option`` Do not accept input for this option (e.g. ``--yell``) +``InputOption.VALUE_REQUIRED`` ``--option=`` This value is required (e.g. ``--iterations=5``), the option itself is still optional +``InputOption.VALUE_OPTIONAL`` ``--option=?`` This option may or may not have a value (e.g. ``--yell`` or ``--yell=loud``) +=============================== =================================== ====================================================================================== + +You can combine ``VALUE_IS_LIST`` with ``VALUE_REQUIRED`` or ``VALUE_OPTIONAL`` like this: + +.. code-block:: python + + class GreetCommand(Command): + """ + Greets someone + + demo:greet + {name? : Who do you want to greet?} + {--y|yell : If set, the task will yell in uppercase letters} + {--iterations=?*1 : How many times should the message be printed?} + """ + + +Testing Commands +---------------- + +Cleo provides several tools to help you test your commands. The most +useful one is the ``CommandTester`` class. +It uses special input and output classes to ease testing without a real +console: + +.. code-block:: python + + from unittest import TestCase + from cleo import Application, CommandTester + + class GreetCommandTest(TestCase): + + def test_execute(self): + application = Application() + application.add(GreetCommand()) + + command = application.find('demo:greet') + command_tester = CommandTester(command) + command_tester.execute([('command', command.get_name())]) + + self.assertRegex('...', command_tester.get_display()) + + # ... + +The ``CommandTester.get_display()`` method returns what would have been displayed +during a normal call from the console. + +You can test sending arguments and options to the command by passing them +as an list of tuples to the ``CommandTester.execute()`` method: + +.. code-block:: python + + from unittest import TestCase + from cleo import Application, CommandTester + + class GreetCommandTest(TestCase): + + def test_name_is_output(self): + application = Application() + application.add(GreetCommand()) + + commmand = application.find('demo:greet') + command_tester = CommandTester(command) + command_tester.execute([ + ('command', command.get_name()), + ('name', 'John') + ]) + + self.assertRegex('John', command_tester.get_display()) + +You can also test a whole console application by using the ``ApplicationTester`` class. + + +Calling an existing Command +--------------------------- + +If a command depends on another one being run before it, instead of asking the +user to remember the order of execution, you can call it directly yourself. +This is also useful if you want to create a "meta" command that just runs a +bunch of other commands. + +Calling a command from another one is straightforward: + +.. code-block:: python + + def handle(self): + return_code = self.call('demo:greet', [ + ('name', 'John'), + ('--yell', True) + ]) + + # ... + +If you want to suppress the output of the executed command, +you can use the ``call_silent()`` method instead. + + + +Autocompletion +-------------- + +Cleo supports automatic (tab) completion in ``bash`` and ``zsh``. + +To activate support for autocompletion, pass a ``complete`` keyword when initializing +your application: + +.. code-block:: python + + application = Application('My Application', '0.1', complete=True) + +Now, register completion for your application by running one of the following in a terminal, +replacing ``[program]`` with the command you use to run your application: + +.. code-block:: bash + + # BASH ~4.x, ZSH + source <([program] _completion --generate-hook) + + # BASH ~3.x, ZSH + [program] _completion --generate-hook | source /dev/stdin + + # BASH (any version) + eval $([program] _completion --generate-hook) + +By default this registers completion for the absolute path to you application, +which will work if the program is accessible on your PATH. +You can specify a program name to complete for instead using the ``-p\--program`` option, +which is required if you're using an alias to run the program. + +If you want the completion to apply automatically for all new shell sessions, +add the command to your shell's profile (eg. ``~/.bash_profile`` or ``~/.zshrc``) + +The type of shell (zsh/bash) is automatically detected using the ``SHELL`` environment variable at run time. +In some circumstances, you may need to explicitly specify the shell type with the ``--shell-type`` option. + diff --git a/tests/repositories/fixtures/metadata/colorama-0.3.9-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/colorama-0.3.9-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..7017c046c44 --- /dev/null +++ b/tests/repositories/fixtures/metadata/colorama-0.3.9-py2.py3-none-any.whl.metadata @@ -0,0 +1,375 @@ +Metadata-Version: 2.0 +Name: colorama +Version: 0.3.9 +Summary: Cross-platform colored terminal text. +Home-page: https://github.com/tartley/colorama +Author: Arnon Yaari +Author-email: tartley@tartley.com +License: BSD +Keywords: color colour terminal text ansi windows crossplatform xplatform +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Console +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.5 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.1 +Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Topic :: Terminals + +.. image:: https://img.shields.io/pypi/v/colorama.svg + :target: https://pypi.python.org/pypi/colorama/ + :alt: Latest Version + +.. image:: https://travis-ci.org/tartley/colorama.svg?branch=master + :target: https://travis-ci.org/tartley/colorama + :alt: Build Status + +Download and docs: + http://pypi.python.org/pypi/colorama +Source code & Development: + https://github.com/tartley/colorama + +Description +=========== + +Makes ANSI escape character sequences (for producing colored terminal text and +cursor positioning) work under MS Windows. + +ANSI escape character sequences have long been used to produce colored terminal +text and cursor positioning on Unix and Macs. Colorama makes this work on +Windows, too, by wrapping ``stdout``, stripping ANSI sequences it finds (which +would appear as gobbledygook in the output), and converting them into the +appropriate win32 calls to modify the state of the terminal. On other platforms, +Colorama does nothing. + +Colorama also provides some shortcuts to help generate ANSI sequences +but works fine in conjunction with any other ANSI sequence generation library, +such as the venerable Termcolor (http://pypi.python.org/pypi/termcolor) +or the fabulous Blessings (https://pypi.python.org/pypi/blessings). + +This has the upshot of providing a simple cross-platform API for printing +colored terminal text from Python, and has the happy side-effect that existing +applications or libraries which use ANSI sequences to produce colored output on +Linux or Macs can now also work on Windows, simply by calling +``colorama.init()``. + +An alternative approach is to install ``ansi.sys`` on Windows machines, which +provides the same behaviour for all applications running in terminals. Colorama +is intended for situations where that isn't easy (e.g., maybe your app doesn't +have an installer.) + +Demo scripts in the source code repository print some colored text using +ANSI sequences. Compare their output under Gnome-terminal's built in ANSI +handling, versus on Windows Command-Prompt using Colorama: + +.. image:: https://github.com/tartley/colorama/raw/master/screenshots/ubuntu-demo.png + :width: 661 + :height: 357 + :alt: ANSI sequences on Ubuntu under gnome-terminal. + +.. image:: https://github.com/tartley/colorama/raw/master/screenshots/windows-demo.png + :width: 668 + :height: 325 + :alt: Same ANSI sequences on Windows, using Colorama. + +These screengrabs show that, on Windows, Colorama does not support ANSI 'dim +text'; it looks the same as 'normal text'. + + +License +======= + +Copyright Jonathan Hartley 2013. BSD 3-Clause license; see LICENSE file. + + +Dependencies +============ + +None, other than Python. Tested on Python 2.5.5, 2.6.5, 2.7, 3.1.2, 3.2, 3.3, +3.4 and 3.5. + +Usage +===== + +Initialisation +-------------- + +Applications should initialise Colorama using: + +.. code-block:: python + + from colorama import init + init() + +On Windows, calling ``init()`` will filter ANSI escape sequences out of any +text sent to ``stdout`` or ``stderr``, and replace them with equivalent Win32 +calls. + +On other platforms, calling ``init()`` has no effect (unless you request other +optional functionality; see "Init Keyword Args", below). By design, this permits +applications to call ``init()`` unconditionally on all platforms, after which +ANSI output should just work. + +To stop using colorama before your program exits, simply call ``deinit()``. +This will restore ``stdout`` and ``stderr`` to their original values, so that +Colorama is disabled. To resume using Colorama again, call ``reinit()``; it is +cheaper to calling ``init()`` again (but does the same thing). + + +Colored Output +-------------- + +Cross-platform printing of colored text can then be done using Colorama's +constant shorthand for ANSI escape sequences: + +.. code-block:: python + + from colorama import Fore, Back, Style + print(Fore.RED + 'some red text') + print(Back.GREEN + 'and with a green background') + print(Style.DIM + 'and in dim text') + print(Style.RESET_ALL) + print('back to normal now') + +...or simply by manually printing ANSI sequences from your own code: + +.. code-block:: python + + print('\033[31m' + 'some red text') + print('\033[30m') # and reset to default color + +...or, Colorama can be used happily in conjunction with existing ANSI libraries +such as Termcolor: + +.. code-block:: python + + from colorama import init + from termcolor import colored + + # use Colorama to make Termcolor work on Windows too + init() + + # then use Termcolor for all colored text output + print(colored('Hello, World!', 'green', 'on_red')) + +Available formatting constants are:: + + Fore: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET. + Back: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET. + Style: DIM, NORMAL, BRIGHT, RESET_ALL + +``Style.RESET_ALL`` resets foreground, background, and brightness. Colorama will +perform this reset automatically on program exit. + + +Cursor Positioning +------------------ + +ANSI codes to reposition the cursor are supported. See ``demos/demo06.py`` for +an example of how to generate them. + + +Init Keyword Args +----------------- + +``init()`` accepts some ``**kwargs`` to override default behaviour. + +init(autoreset=False): + If you find yourself repeatedly sending reset sequences to turn off color + changes at the end of every print, then ``init(autoreset=True)`` will + automate that: + + .. code-block:: python + + from colorama import init + init(autoreset=True) + print(Fore.RED + 'some red text') + print('automatically back to default color again') + +init(strip=None): + Pass ``True`` or ``False`` to override whether ansi codes should be + stripped from the output. The default behaviour is to strip if on Windows + or if output is redirected (not a tty). + +init(convert=None): + Pass ``True`` or ``False`` to override whether to convert ANSI codes in the + output into win32 calls. The default behaviour is to convert if on Windows + and output is to a tty (terminal). + +init(wrap=True): + On Windows, colorama works by replacing ``sys.stdout`` and ``sys.stderr`` + with proxy objects, which override the ``.write()`` method to do their work. + If this wrapping causes you problems, then this can be disabled by passing + ``init(wrap=False)``. The default behaviour is to wrap if ``autoreset`` or + ``strip`` or ``convert`` are True. + + When wrapping is disabled, colored printing on non-Windows platforms will + continue to work as normal. To do cross-platform colored output, you can + use Colorama's ``AnsiToWin32`` proxy directly: + + .. code-block:: python + + import sys + from colorama import init, AnsiToWin32 + init(wrap=False) + stream = AnsiToWin32(sys.stderr).stream + + # Python 2 + print >>stream, Fore.BLUE + 'blue text on stderr' + + # Python 3 + print(Fore.BLUE + 'blue text on stderr', file=stream) + + +Status & Known Problems +======================= + +I've personally only tested it on Windows XP (CMD, Console2), Ubuntu +(gnome-terminal, xterm), and OS X. + +Some presumably valid ANSI sequences aren't recognised (see details below), +but to my knowledge nobody has yet complained about this. Puzzling. + +See outstanding issues and wishlist: +https://github.com/tartley/colorama/issues + +If anything doesn't work for you, or doesn't do what you expected or hoped for, +I'd love to hear about it on that issues list, would be delighted by patches, +and would be happy to grant commit access to anyone who submits a working patch +or two. + + +Recognised ANSI Sequences +========================= + +ANSI sequences generally take the form: + + ESC [ ; ... + +Where ```` is an integer, and ```` is a single letter. Zero or +more params are passed to a ````. If no params are passed, it is +generally synonymous with passing a single zero. No spaces exist in the +sequence; they have been inserted here simply to read more easily. + +The only ANSI sequences that colorama converts into win32 calls are:: + + ESC [ 0 m # reset all (colors and brightness) + ESC [ 1 m # bright + ESC [ 2 m # dim (looks same as normal brightness) + ESC [ 22 m # normal brightness + + # FOREGROUND: + ESC [ 30 m # black + ESC [ 31 m # red + ESC [ 32 m # green + ESC [ 33 m # yellow + ESC [ 34 m # blue + ESC [ 35 m # magenta + ESC [ 36 m # cyan + ESC [ 37 m # white + ESC [ 39 m # reset + + # BACKGROUND + ESC [ 40 m # black + ESC [ 41 m # red + ESC [ 42 m # green + ESC [ 43 m # yellow + ESC [ 44 m # blue + ESC [ 45 m # magenta + ESC [ 46 m # cyan + ESC [ 47 m # white + ESC [ 49 m # reset + + # cursor positioning + ESC [ y;x H # position cursor at x across, y down + ESC [ y;x f # position cursor at x across, y down + ESC [ n A # move cursor n lines up + ESC [ n B # move cursor n lines down + ESC [ n C # move cursor n characters forward + ESC [ n D # move cursor n characters backward + + # clear the screen + ESC [ mode J # clear the screen + + # clear the line + ESC [ mode K # clear the line + +Multiple numeric params to the ``'m'`` command can be combined into a single +sequence:: + + ESC [ 36 ; 45 ; 1 m # bright cyan text on magenta background + +All other ANSI sequences of the form ``ESC [ ; ... `` +are silently stripped from the output on Windows. + +Any other form of ANSI sequence, such as single-character codes or alternative +initial characters, are not recognised or stripped. It would be cool to add +them though. Let me know if it would be useful for you, via the Issues on +GitHub. + + +Development +=========== + +Help and fixes welcome! + +Running tests requires: + +- Michael Foord's ``mock`` module to be installed. +- Tests are written using 2010-era updates to ``unittest``, and require + Python 2.7 or greater, OR to have Michael Foord's ``unittest2`` module + installed. + +To run tests:: + + python -m unittest discover -p *_test.py + +This, like a few other handy commands, is captured in a ``Makefile``. + +If you use nose to run the tests, you must pass the ``-s`` flag; otherwise, +``nosetests`` applies its own proxy to ``stdout``, which confuses the unit +tests. + + +Thanks +====== +* Marc Schlaich (schlamar) for a ``setup.py`` fix for Python2.5. +* Marc Abramowitz, reported & fixed a crash on exit with closed ``stdout``, + providing a solution to issue #7's setuptools/distutils debate, + and other fixes. +* User 'eryksun', for guidance on correctly instantiating ``ctypes.windll``. +* Matthew McCormick for politely pointing out a longstanding crash on non-Win. +* Ben Hoyt, for a magnificent fix under 64-bit Windows. +* Jesse at Empty Square for submitting a fix for examples in the README. +* User 'jamessp', an observant documentation fix for cursor positioning. +* User 'vaal1239', Dave Mckee & Lackner Kristof for a tiny but much-needed Win7 + fix. +* Julien Stuyck, for wisely suggesting Python3 compatible updates to README. +* Daniel Griffith for multiple fabulous patches. +* Oscar Lesta for a valuable fix to stop ANSI chars being sent to non-tty + output. +* Roger Binns, for many suggestions, valuable feedback, & bug reports. +* Tim Golden for thought and much appreciated feedback on the initial idea. +* User 'Zearin' for updates to the README file. +* John Szakmeister for adding support for light colors +* Charles Merriam for adding documentation to demos +* Jurko for a fix on 64-bit Windows CPython2.5 w/o ctypes +* Florian Bruhin for a fix when stdout or stderr are None +* Thomas Weininger for fixing ValueError on Windows +* Remi Rampin for better Github integration and fixes to the README file +* Simeon Visser for closing a file handle using 'with' and updating classifiers + to include Python 3.3 and 3.4 +* Andy Neff for fixing RESET of LIGHT_EX colors. +* Jonathan Hartley for the initial idea and implementation. + + + diff --git a/tests/repositories/fixtures/metadata/discord.py-2.0.0-py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/discord.py-2.0.0-py3-none-any.whl.metadata new file mode 100644 index 00000000000..21531caea93 --- /dev/null +++ b/tests/repositories/fixtures/metadata/discord.py-2.0.0-py3-none-any.whl.metadata @@ -0,0 +1,166 @@ +Metadata-Version: 2.1 +Name: discord.py +Version: 2.0.0 +Summary: A Python wrapper for the Discord API +Home-page: https://github.com/Rapptz/discord.py +Author: Rapptz +License: MIT +Project-URL: Documentation, https://discordpy.readthedocs.io/en/latest/ +Project-URL: Issue tracker, https://github.com/Rapptz/discord.py/issues +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: MIT License +Classifier: Intended Audience :: Developers +Classifier: Natural Language :: English +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Topic :: Internet +Classifier: Topic :: Software Development :: Libraries +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Utilities +Classifier: Typing :: Typed +Requires-Python: >=3.8.0 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: aiohttp (<4,>=3.7.4) +Provides-Extra: docs +Requires-Dist: sphinx (==4.4.0) ; extra == 'docs' +Requires-Dist: sphinxcontrib-trio (==1.1.2) ; extra == 'docs' +Requires-Dist: sphinxcontrib-websupport ; extra == 'docs' +Requires-Dist: typing-extensions (<5,>=4.3) ; extra == 'docs' +Provides-Extra: speed +Requires-Dist: orjson (>=3.5.4) ; extra == 'speed' +Requires-Dist: aiodns (>=1.1) ; extra == 'speed' +Requires-Dist: Brotli ; extra == 'speed' +Requires-Dist: cchardet ; extra == 'speed' +Provides-Extra: test +Requires-Dist: coverage[toml] ; extra == 'test' +Requires-Dist: pytest ; extra == 'test' +Requires-Dist: pytest-asyncio ; extra == 'test' +Requires-Dist: pytest-cov ; extra == 'test' +Requires-Dist: pytest-mock ; extra == 'test' +Requires-Dist: typing-extensions (<5,>=4.3) ; extra == 'test' +Provides-Extra: voice +Requires-Dist: PyNaCl (<1.6,>=1.3.0) ; extra == 'voice' + +discord.py +========== + +.. image:: https://discord.com/api/guilds/336642139381301249/embed.png + :target: https://discord.gg/r3sSKJJ + :alt: Discord server invite +.. image:: https://img.shields.io/pypi/v/discord.py.svg + :target: https://pypi.python.org/pypi/discord.py + :alt: PyPI version info +.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg + :target: https://pypi.python.org/pypi/discord.py + :alt: PyPI supported Python versions + +A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. + +Key Features +------------- + +- Modern Pythonic API using ``async`` and ``await``. +- Proper rate limit handling. +- Optimised in both speed and memory. + +Installing +---------- + +**Python 3.8 or higher is required** + +To install the library without full voice support, you can just run the following command: + +.. code:: sh + + # Linux/macOS + python3 -m pip install -U discord.py + + # Windows + py -3 -m pip install -U discord.py + +Otherwise to get voice support you should run the following command: + +.. code:: sh + + # Linux/macOS + python3 -m pip install -U "discord.py[voice]" + + # Windows + py -3 -m pip install -U discord.py[voice] + + +To install the development version, do the following: + +.. code:: sh + + $ git clone https://github.com/Rapptz/discord.py + $ cd discord.py + $ python3 -m pip install -U .[voice] + + +Optional Packages +~~~~~~~~~~~~~~~~~~ + +* `PyNaCl `__ (for voice support) + +Please note that when installing voice support on Linux, you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands: + +* libffi-dev (or ``libffi-devel`` on some systems) +* python-dev (e.g. ``python3.6-dev`` for Python 3.6) + +Quick Example +-------------- + +.. code:: py + + import discord + + class MyClient(discord.Client): + async def on_ready(self): + print('Logged on as', self.user) + + async def on_message(self, message): + # don't respond to ourselves + if message.author == self.user: + return + + if message.content == 'ping': + await message.channel.send('pong') + + intents = discord.Intents.default() + intents.message_content = True + client = MyClient(intents=intents) + client.run('token') + +Bot Example +~~~~~~~~~~~~~ + +.. code:: py + + import discord + from discord.ext import commands + + intents = discord.Intents.default() + intents.message_content = True + bot = commands.Bot(command_prefix='>', intents=intents) + + @bot.command() + async def ping(ctx): + await ctx.send('pong') + + bot.run('token') + +You can find more examples in the examples directory. + +Links +------ + +- `Documentation `_ +- `Official Discord Server `_ +- `Discord API `_ + + diff --git a/tests/repositories/fixtures/metadata/html5lib-1.1-py2.py3-none-any.whl.metadata b/tests/repositories/fixtures/metadata/html5lib-1.1-py2.py3-none-any.whl.metadata new file mode 100644 index 00000000000..ee83c1f85b3 --- /dev/null +++ b/tests/repositories/fixtures/metadata/html5lib-1.1-py2.py3-none-any.whl.metadata @@ -0,0 +1,552 @@ +Metadata-Version: 2.1 +Name: html5lib +Version: 1.1 +Summary: HTML parser based on the WHATWG HTML specification +Home-page: https://github.com/html5lib/html5lib-python +Maintainer: James Graham +Maintainer-email: james@hoppipolla.co.uk +License: MIT License +Platform: UNKNOWN +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: Text Processing :: Markup :: HTML +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* +Requires-Dist: six (>=1.9) +Requires-Dist: webencodings +Provides-Extra: all +Requires-Dist: genshi ; extra == 'all' +Requires-Dist: chardet (>=2.2) ; extra == 'all' +Requires-Dist: lxml ; (platform_python_implementation == 'CPython') and extra == 'all' +Provides-Extra: chardet +Requires-Dist: chardet (>=2.2) ; extra == 'chardet' +Provides-Extra: genshi +Requires-Dist: genshi ; extra == 'genshi' +Provides-Extra: lxml +Requires-Dist: lxml ; (platform_python_implementation == 'CPython') and extra == 'lxml' + +html5lib +======== + +.. image:: https://travis-ci.org/html5lib/html5lib-python.svg?branch=master + :target: https://travis-ci.org/html5lib/html5lib-python + + +html5lib is a pure-python library for parsing HTML. It is designed to +conform to the WHATWG HTML specification, as is implemented by all major +web browsers. + + +Usage +----- + +Simple usage follows this pattern: + +.. code-block:: python + + import html5lib + with open("mydocument.html", "rb") as f: + document = html5lib.parse(f) + +or: + +.. code-block:: python + + import html5lib + document = html5lib.parse("

Hello World!") + +By default, the ``document`` will be an ``xml.etree`` element instance. +Whenever possible, html5lib chooses the accelerated ``ElementTree`` +implementation (i.e. ``xml.etree.cElementTree`` on Python 2.x). + +Two other tree types are supported: ``xml.dom.minidom`` and +``lxml.etree``. To use an alternative format, specify the name of +a treebuilder: + +.. code-block:: python + + import html5lib + with open("mydocument.html", "rb") as f: + lxml_etree_document = html5lib.parse(f, treebuilder="lxml") + +When using with ``urllib2`` (Python 2), the charset from HTTP should be +pass into html5lib as follows: + +.. code-block:: python + + from contextlib import closing + from urllib2 import urlopen + import html5lib + + with closing(urlopen("http://example.com/")) as f: + document = html5lib.parse(f, transport_encoding=f.info().getparam("charset")) + +When using with ``urllib.request`` (Python 3), the charset from HTTP +should be pass into html5lib as follows: + +.. code-block:: python + + from urllib.request import urlopen + import html5lib + + with urlopen("http://example.com/") as f: + document = html5lib.parse(f, transport_encoding=f.info().get_content_charset()) + +To have more control over the parser, create a parser object explicitly. +For instance, to make the parser raise exceptions on parse errors, use: + +.. code-block:: python + + import html5lib + with open("mydocument.html", "rb") as f: + parser = html5lib.HTMLParser(strict=True) + document = parser.parse(f) + +When you're instantiating parser objects explicitly, pass a treebuilder +class as the ``tree`` keyword argument to use an alternative document +format: + +.. code-block:: python + + import html5lib + parser = html5lib.HTMLParser(tree=html5lib.getTreeBuilder("dom")) + minidom_document = parser.parse("

Hello World!") + +More documentation is available at https://html5lib.readthedocs.io/. + + +Installation +------------ + +html5lib works on CPython 2.7+, CPython 3.5+ and PyPy. To install: + +.. code-block:: bash + + $ pip install html5lib + +The goal is to support a (non-strict) superset of the versions that `pip +supports +`_. + +Optional Dependencies +--------------------- + +The following third-party libraries may be used for additional +functionality: + +- ``lxml`` is supported as a tree format (for both building and + walking) under CPython (but *not* PyPy where it is known to cause + segfaults); + +- ``genshi`` has a treewalker (but not builder); and + +- ``chardet`` can be used as a fallback when character encoding cannot + be determined. + + +Bugs +---- + +Please report any bugs on the `issue tracker +`_. + + +Tests +----- + +Unit tests require the ``pytest`` and ``mock`` libraries and can be +run using the ``py.test`` command in the root directory. + +Test data are contained in a separate `html5lib-tests +`_ repository and included +as a submodule, thus for git checkouts they must be initialized:: + + $ git submodule init + $ git submodule update + +If you have all compatible Python implementations available on your +system, you can run tests on all of them using the ``tox`` utility, +which can be found on PyPI. + + +Questions? +---------- + +There's a mailing list available for support on Google Groups, +`html5lib-discuss `_, +though you may get a quicker response asking on IRC in `#whatwg on +irc.freenode.net `_. + +Change Log +---------- + +1.1 +~~~ + +UNRELEASED + +Breaking changes: + +* Drop support for Python 3.3. (#358) +* Drop support for Python 3.4. (#421) + +Deprecations: + +* Deprecate the ``html5lib`` sanitizer (``html5lib.serialize(sanitize=True)`` and + ``html5lib.filters.sanitizer``). We recommend users migrate to `Bleach + `. Please let us know if Bleach doesn't suffice for your + use. (#443) + +Other changes: + +* Try to import from ``collections.abc`` to remove DeprecationWarning and ensure + ``html5lib`` keeps working in future Python versions. (#403) +* Drop optional ``datrie`` dependency. (#442) + + +1.0.1 +~~~~~ + +Released on December 7, 2017 + +Breaking changes: + +* Drop support for Python 2.6. (#330) (Thank you, Hugo, Will Kahn-Greene!) +* Remove ``utils/spider.py`` (#353) (Thank you, Jon Dufresne!) + +Features: + +* Improve documentation. (#300, #307) (Thank you, Jon Dufresne, Tom Most, + Will Kahn-Greene!) +* Add iframe seamless boolean attribute. (Thank you, Ritwik Gupta!) +* Add itemscope as a boolean attribute. (#194) (Thank you, Jonathan Vanasco!) +* Support Python 3.6. (#333) (Thank you, Jon Dufresne!) +* Add CI support for Windows using AppVeyor. (Thank you, John Vandenberg!) +* Improve testing and CI and add code coverage (#323, #334), (Thank you, Jon + Dufresne, John Vandenberg, Sam Sneddon, Will Kahn-Greene!) +* Semver-compliant version number. + +Bug fixes: + +* Add support for setuptools < 18.5 to support environment markers. (Thank you, + John Vandenberg!) +* Add explicit dependency for six >= 1.9. (Thank you, Eric Amorde!) +* Fix regexes to work with Python 3.7 regex adjustments. (#318, #379) (Thank + you, Benedikt Morbach, Ville Skyttä, Mark Vasilkov!) +* Fix alphabeticalattributes filter namespace bug. (#324) (Thank you, Will + Kahn-Greene!) +* Include license file in generated wheel package. (#350) (Thank you, Jon + Dufresne!) +* Fix annotation-xml typo. (#339) (Thank you, Will Kahn-Greene!) +* Allow uppercase hex chararcters in CSS colour check. (#377) (Thank you, + Komal Dembla, Hugo!) + + +1.0 +~~~ + +Released and unreleased on December 7, 2017. Badly packaged release. + + +0.999999999/1.0b10 +~~~~~~~~~~~~~~~~~~ + +Released on July 15, 2016 + +* Fix attribute order going to the tree builder to be document order + instead of reverse document order(!). + + +0.99999999/1.0b9 +~~~~~~~~~~~~~~~~ + +Released on July 14, 2016 + +* **Added ordereddict as a mandatory dependency on Python 2.6.** + +* Added ``lxml``, ``genshi``, ``datrie``, ``charade``, and ``all`` + extras that will do the right thing based on the specific + interpreter implementation. + +* Now requires the ``mock`` package for the testsuite. + +* Cease supporting DATrie under PyPy. + +* **Remove PullDOM support, as this hasn't ever been properly + tested, doesn't entirely work, and as far as I can tell is + completely unused by anyone.** + +* Move testsuite to ``py.test``. + +* **Fix #124: move to webencodings for decoding the input byte stream; + this makes html5lib compliant with the Encoding Standard, and + introduces a required dependency on webencodings.** + +* **Cease supporting Python 3.2 (in both CPython and PyPy forms).** + +* **Fix comments containing double-dash with lxml 3.5 and above.** + +* **Use scripting disabled by default (as we don't implement + scripting).** + +* **Fix #11, avoiding the XSS bug potentially caused by serializer + allowing attribute values to be escaped out of in old browser versions, + changing the quote_attr_values option on serializer to take one of + three values, "always" (the old True value), "legacy" (the new option, + and the new default), and "spec" (the old False value, and the old + default).** + +* **Fix #72 by rewriting the sanitizer to apply only to treewalkers + (instead of the tokenizer); as such, this will require amending all + callers of it to use it via the treewalker API.** + +* **Drop support of charade, now that chardet is supported once more.** + +* **Replace the charset keyword argument on parse and related methods + with a set of keyword arguments: override_encoding, transport_encoding, + same_origin_parent_encoding, likely_encoding, and default_encoding.** + +* **Move filters._base, treebuilder._base, and treewalkers._base to .base + to clarify their status as public.** + +* **Get rid of the sanitizer package. Merge sanitizer.sanitize into the + sanitizer.htmlsanitizer module and move that to sanitizer. This means + anyone who used sanitizer.sanitize or sanitizer.HTMLSanitizer needs no + code changes.** + +* **Rename treewalkers.lxmletree to .etree_lxml and + treewalkers.genshistream to .genshi to have a consistent API.** + +* Move a whole load of stuff (inputstream, ihatexml, trie, tokenizer, + utils) to be underscore prefixed to clarify their status as private. + + +0.9999999/1.0b8 +~~~~~~~~~~~~~~~ + +Released on September 10, 2015 + +* Fix #195: fix the sanitizer to drop broken URLs (it threw an + exception between 0.9999 and 0.999999). + + +0.999999/1.0b7 +~~~~~~~~~~~~~~ + +Released on July 7, 2015 + +* Fix #189: fix the sanitizer to allow relative URLs again (as it did + prior to 0.9999/1.0b5). + + +0.99999/1.0b6 +~~~~~~~~~~~~~ + +Released on April 30, 2015 + +* Fix #188: fix the sanitizer to not throw an exception when sanitizing + bogus data URLs. + + +0.9999/1.0b5 +~~~~~~~~~~~~ + +Released on April 29, 2015 + +* Fix #153: Sanitizer fails to treat some attributes as URLs. Despite how + this sounds, this has no known security implications. No known version + of IE (5.5 to current), Firefox (3 to current), Safari (6 to current), + Chrome (1 to current), or Opera (12 to current) will run any script + provided in these attributes. + +* Pass error message to the ParseError exception in strict parsing mode. + +* Allow data URIs in the sanitizer, with a whitelist of content-types. + +* Add support for Python implementations that don't support lone + surrogates (read: Jython). Fixes #2. + +* Remove localization of error messages. This functionality was totally + unused (and untested that everything was localizable), so we may as + well follow numerous browsers in not supporting translating technical + strings. + +* Expose treewalkers.pprint as a public API. + +* Add a documentEncoding property to HTML5Parser, fix #121. + + +0.999 +~~~~~ + +Released on December 23, 2013 + +* Fix #127: add work-around for CPython issue #20007: .read(0) on + http.client.HTTPResponse drops the rest of the content. + +* Fix #115: lxml treewalker can now deal with fragments containing, at + their root level, text nodes with non-ASCII characters on Python 2. + + +0.99 +~~~~ + +Released on September 10, 2013 + +* No library changes from 1.0b3; released as 0.99 as pip has changed + behaviour from 1.4 to avoid installing pre-release versions per + PEP 440. + + +1.0b3 +~~~~~ + +Released on July 24, 2013 + +* Removed ``RecursiveTreeWalker`` from ``treewalkers._base``. Any + implementation using it should be moved to + ``NonRecursiveTreeWalker``, as everything bundled with html5lib has + for years. + +* Fix #67 so that ``BufferedStream`` to correctly returns a bytes + object, thereby fixing any case where html5lib is passed a + non-seekable RawIOBase-like object. + + +1.0b2 +~~~~~ + +Released on June 27, 2013 + +* Removed reordering of attributes within the serializer. There is now + an ``alphabetical_attributes`` option which preserves the previous + behaviour through a new filter. This allows attribute order to be + preserved through html5lib if the tree builder preserves order. + +* Removed ``dom2sax`` from DOM treebuilders. It has been replaced by + ``treeadapters.sax.to_sax`` which is generic and supports any + treewalker; it also resolves all known bugs with ``dom2sax``. + +* Fix treewalker assertions on hitting bytes strings on + Python 2. Previous to 1.0b1, treewalkers coped with mixed + bytes/unicode data on Python 2; this reintroduces this prior + behaviour on Python 2. Behaviour is unchanged on Python 3. + + +1.0b1 +~~~~~ + +Released on May 17, 2013 + +* Implementation updated to implement the `HTML specification + `_ as of 5th May + 2013 (`SVN `_ revision r7867). + +* Python 3.2+ supported in a single codebase using the ``six`` library. + +* Removed support for Python 2.5 and older. + +* Removed the deprecated Beautiful Soup 3 treebuilder. + ``beautifulsoup4`` can use ``html5lib`` as a parser instead. Note that + since it doesn't support namespaces, foreign content like SVG and + MathML is parsed incorrectly. + +* Removed ``simpletree`` from the package. The default tree builder is + now ``etree`` (using the ``xml.etree.cElementTree`` implementation if + available, and ``xml.etree.ElementTree`` otherwise). + +* Removed the ``XHTMLSerializer`` as it never actually guaranteed its + output was well-formed XML, and hence provided little of use. + +* Removed default DOM treebuilder, so ``html5lib.treebuilders.dom`` is no + longer supported. ``html5lib.treebuilders.getTreeBuilder("dom")`` will + return the default DOM treebuilder, which uses ``xml.dom.minidom``. + +* Optional heuristic character encoding detection now based on + ``charade`` for Python 2.6 - 3.3 compatibility. + +* Optional ``Genshi`` treewalker support fixed. + +* Many bugfixes, including: + + * #33: null in attribute value breaks XML AttValue; + + * #4: nested, indirect descendant,