From ea5044dda26f3ef18d46f139c4d9eb97baec5ba8 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 17 Jul 2023 13:28:38 -0700 Subject: [PATCH 001/105] Create script to update repo skeleton #80 Signed-off-by: Jono Yang --- etc/scripts/update_skeleton.py | 104 +++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 etc/scripts/update_skeleton.py diff --git a/etc/scripts/update_skeleton.py b/etc/scripts/update_skeleton.py new file mode 100644 index 00000000..635898ba --- /dev/null +++ b/etc/scripts/update_skeleton.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright (c) nexB Inc. and others. All rights reserved. +# ScanCode is a trademark of nexB Inc. +# SPDX-License-Identifier: Apache-2.0 +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. +# See https://github.com/nexB/skeleton for support or download. +# See https://aboutcode.org for more information about nexB OSS projects. +# + +from pathlib import Path +import os +import subprocess + +import click + + +NEXB_PUBLIC_REPO_NAMES=[ + "aboutcode-toolkit", + "ahocode", + "bitcode", + "clearcode-toolkit", + "commoncode", + "container-inspector", + "debian-inspector", + "deltacode", + "elf-inspector", + "extractcode", + "fetchcode", + "gemfileparser2", + "gh-issue-sandbox", + "go-inspector", + "heritedcode", + "license-expression", + "license_copyright_pipeline", + "nuget-inspector", + "pip-requirements-parser", + "plugincode", + "purldb", + "pygmars", + "python-inspector", + "sanexml", + "saneyaml", + "scancode-analyzer", + "scancode-toolkit-contrib", + "scancode-toolkit-reference-scans", + "thirdparty-toolkit", + "tracecode-toolkit", + "tracecode-toolkit-strace", + "turbo-spdx", + "typecode", + "univers", +] + + +@click.command() +@click.help_option("-h", "--help") +def update_skeleton_files(repo_names=NEXB_PUBLIC_REPO_NAMES): + """ + Update project files of nexB projects that use the skeleton + + This script will: + - Clone the repo + - Add the skeleton repo as a new origin + - Create a new branch named "update-skeleton-files" + - Merge in the new skeleton files into the "update-skeleton-files" branch + + The user will need to save merge commit messages that pop up when running + this script in addition to resolving the merge conflicts on repos that have + them. + """ + + # Create working directory + work_dir_path = Path("/tmp/update_skeleton/") + if not os.path.exists(work_dir_path): + os.makedirs(work_dir_path, exist_ok=True) + + for repo_name in repo_names: + # Move to work directory + os.chdir(work_dir_path) + + # Clone repo + repo_git = f"git@github.com:nexB/{repo_name}.git" + subprocess.run(["git", "clone", repo_git]) + + # Go into cloned repo + os.chdir(work_dir_path / repo_name) + + # Add skeleton as an origin + subprocess.run(["git", "remote", "add", "skeleton", "git@github.com:nexB/skeleton.git"]) + + # Fetch skeleton files + subprocess.run(["git", "fetch", "skeleton"]) + + # Create and checkout new branch + subprocess.run(["git", "checkout", "-b", "update-skeleton-files"]) + + # Merge skeleton files into the repo + subprocess.run(["git", "merge", "skeleton/main", "--allow-unrelated-histories"]) + + +if __name__ == "__main__": + update_skeleton_files() From 5ab9b3a15e0095a8186ca3870cb9f9eade83833d Mon Sep 17 00:00:00 2001 From: Omkar Phansopkar Date: Wed, 18 Oct 2023 15:42:56 +0530 Subject: [PATCH 002/105] Added docs server script, dark mode & copybutton for docs Signed-off-by: Omkar Phansopkar --- .github/workflows/docs-ci.yml | 3 --- docs/Makefile | 8 ++++++++ docs/make.bat | 12 ++++++++++++ docs/scripts/doc8_style_check.sh | 0 docs/source/conf.py | 4 ++++ setup.cfg | 3 +++ 6 files changed, 27 insertions(+), 3 deletions(-) mode change 100644 => 100755 docs/scripts/doc8_style_check.sh diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 511b7c28..ada779bf 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -20,9 +20,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Give permission to run scripts - run: chmod +x ./docs/scripts/doc8_style_check.sh - - name: Install Dependencies run: pip install -e .[docs] diff --git a/docs/Makefile b/docs/Makefile index d0c3cbf1..788b0396 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,6 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build +SPHINXAUTOBUILD = sphinx-autobuild SOURCEDIR = source BUILDDIR = build @@ -14,6 +15,13 @@ help: .PHONY: help Makefile +# Run the development server using sphinx-autobuild +docs: + @echo + @echo "Starting up the docs server..." + @echo + $(SPHINXAUTOBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile diff --git a/docs/make.bat b/docs/make.bat index 6247f7e2..4a3c1a48 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,11 +7,16 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) +if "%SPHINXAUTOBUILD%" == "" ( + set SPHINXAUTOBUILD=sphinx-autobuild +) set SOURCEDIR=source set BUILDDIR=build if "%1" == "" goto help +if "%1" == "docs" goto docs + %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. @@ -28,6 +33,13 @@ if errorlevel 9009 ( %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% goto end +:docs +@echo +@echo Starting up the docs server... +@echo +%SPHINXAUTOBUILD% --port 8000 --watch %SOURCEDIR% %SOURCEDIR% %BUILDDIR%\html %SPHINXOPTS% %O% +goto end + :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% diff --git a/docs/scripts/doc8_style_check.sh b/docs/scripts/doc8_style_check.sh old mode 100644 new mode 100755 diff --git a/docs/source/conf.py b/docs/source/conf.py index 918d62c1..54e5e665 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -30,6 +30,10 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx_reredirects", + 'sphinx_rtd_theme', + "sphinx_rtd_dark_mode", + "sphinx.ext.extlinks", + "sphinx_copybutton", ] diff --git a/setup.cfg b/setup.cfg index d6c7da7d..bd0e58a7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -62,4 +62,7 @@ docs = sphinx-rtd-theme>=1.0.0 sphinx-reredirects >= 0.1.2 doc8>=0.11.2 + sphinx-autobuild + sphinx-rtd-dark-mode>=1.3.0 + sphinx-copybutton From 0a9d983650bf042a5bd2c277711b637979e566f1 Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Mon, 20 Nov 2023 16:46:54 -0800 Subject: [PATCH 003/105] Update CSS to widen page and handle mobile #84 Reference: https://github.com/nexB/skeleton/issues/84 Signed-off-by: John M. Horan --- docs/source/_static/theme_overrides.css | 363 +----------------- .../_static/theme_overrides_SUPERSEDED.css | 353 +++++++++++++++++ docs/source/conf.py | 15 +- 3 files changed, 380 insertions(+), 351 deletions(-) create mode 100644 docs/source/_static/theme_overrides_SUPERSEDED.css diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css index 9662d63a..de5ae433 100644 --- a/docs/source/_static/theme_overrides.css +++ b/docs/source/_static/theme_overrides.css @@ -1,353 +1,26 @@ -body { - color: #000000; -} - -p { - margin-bottom: 10px; -} - -.wy-plain-list-disc, .rst-content .section ul, .rst-content .toctree-wrapper ul, article ul { - margin-bottom: 10px; -} - -.custom_header_01 { - color: #cc0000; - font-size: 22px; - font-weight: bold; - line-height: 50px; -} - -h1, h2, h3, h4, h5, h6 { - margin-bottom: 20px; - margin-top: 20px; -} - -h5 { - font-size: 18px; - color: #000000; - font-style: italic; - margin-bottom: 10px; -} - -h6 { - font-size: 15px; - color: #000000; - font-style: italic; - margin-bottom: 10px; -} - -/* custom admonitions */ -/* success */ -.custom-admonition-success .admonition-title { - color: #000000; - background: #ccffcc; - border-radius: 5px 5px 0px 0px; -} -div.custom-admonition-success.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* important */ -.custom-admonition-important .admonition-title { - color: #000000; - background: #ccffcc; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #000000; -} -div.custom-admonition-important.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* caution */ -.custom-admonition-caution .admonition-title { - color: #000000; - background: #ffff99; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #e8e8e8; -} -div.custom-admonition-caution.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* note */ -.custom-admonition-note .admonition-title { - color: #ffffff; - background: #006bb3; - border-radius: 5px 5px 0px 0px; -} -div.custom-admonition-note.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* todo */ -.custom-admonition-todo .admonition-title { - color: #000000; - background: #cce6ff; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #99ccff; -} -div.custom-admonition-todo.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #99ccff; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* examples */ -.custom-admonition-examples .admonition-title { - color: #000000; - background: #ffe6cc; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #d8d8d8; -} -div.custom-admonition-examples.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - +/* this is the container for the pages */ .wy-nav-content { max-width: 100%; - padding-right: 100px; - padding-left: 100px; - background-color: #f2f2f2; -} - -div.rst-content { - background-color: #ffffff; - border: solid 1px #e5e5e5; - padding: 20px 40px 20px 40px; -} - -.rst-content .guilabel { - border: 1px solid #ffff99; - background: #ffff99; - font-size: 100%; - font-weight: normal; - border-radius: 4px; - padding: 2px 0px; - margin: auto 2px; - vertical-align: middle; -} - -.rst-content kbd { - font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; - border: solid 1px #d8d8d8; - background-color: #f5f5f5; - padding: 0px 3px; - border-radius: 3px; -} - -.wy-nav-content-wrap a { - color: #0066cc; - text-decoration: none; -} -.wy-nav-content-wrap a:hover { - color: #0099cc; - text-decoration: underline; -} - -.wy-nav-top a { - color: #ffffff; -} - -/* Based on numerous similar approaches e.g., https://github.com/readthedocs/sphinx_rtd_theme/issues/117 and https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html -- but remove form-factor limits to enable table wrap on full-size and smallest-size form factors */ -.wy-table-responsive table td { - white-space: normal !important; -} - -.rst-content table.docutils td, -.rst-content table.docutils th { - padding: 5px 10px 5px 10px; -} -.rst-content table.docutils td p, -.rst-content table.docutils th p { - font-size: 14px; - margin-bottom: 0px; -} -.rst-content table.docutils td p cite, -.rst-content table.docutils th p cite { - font-size: 14px; - background-color: transparent; -} - -.colwidths-given th { - border: solid 1px #d8d8d8 !important; -} -.colwidths-given td { - border: solid 1px #d8d8d8 !important; -} - -/*handles single-tick inline code*/ -.wy-body-for-nav cite { - color: #000000; - background-color: transparent; - font-style: normal; - font-family: "Courier New"; - font-size: 13px; - padding: 3px 3px 3px 3px; -} - -.rst-content pre.literal-block, .rst-content div[class^="highlight"] pre, .rst-content .linenodiv pre { - font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; - font-size: 13px; - overflow: visible; - white-space: pre-wrap; - color: #000000; -} - -.rst-content pre.literal-block, .rst-content div[class^='highlight'] { - background-color: #f8f8f8; - border: solid 1px #e8e8e8; -} - -/* This enables inline code to wrap. */ -code, .rst-content tt, .rst-content code { - white-space: pre-wrap; - padding: 2px 3px 1px; - border-radius: 3px; - font-size: 13px; - background-color: #ffffff; -} - -/* use this added class for code blocks attached to bulleted list items */ -.highlight-top-margin { - margin-top: 20px !important; -} - -/* change color of inline code block */ -span.pre { - color: #e01e5a; -} - -.wy-body-for-nav blockquote { - margin: 1em 0; - padding-left: 1em; - border-left: 4px solid #ddd; - color: #000000; -} - -/* Fix the unwanted top and bottom padding inside a nested bulleted/numbered list */ -.rst-content .section ol p, .rst-content .section ul p { - margin-bottom: 0px; -} - -/* add spacing between bullets for legibility */ -.rst-content .section ol li, .rst-content .section ul li { - margin-bottom: 5px; -} - -.rst-content .section ol li:first-child, .rst-content .section ul li:first-child { - margin-top: 5px; -} - -/* but exclude the toctree bullets */ -.rst-content .toctree-wrapper ul li, .rst-content .toctree-wrapper ul li:first-child { + padding: 0px 40px 0px 0px; margin-top: 0px; - margin-bottom: 0px; } -/* remove extra space at bottom of multine list-table cell */ -.rst-content .line-block { - margin-left: 0px; - margin-bottom: 0px; - line-height: 24px; +.wy-nav-content-wrap { + border-right: solid 1px; } -/* fix extra vertical spacing in page toctree */ -.rst-content .toctree-wrapper ul li ul, article ul li ul { - margin-top: 0; - margin-bottom: 0; -} - -/* this is used by the genindex added via layout.html (see source/_templates/) to sidebar toc */ -.reference.internal.toc-index { - color: #d9d9d9; -} - -.reference.internal.toc-index.current { - background-color: #ffffff; - color: #000000; - font-weight: bold; -} - -.toc-index-div { - border-top: solid 1px #000000; - margin-top: 10px; - padding-top: 5px; -} - -.indextable ul li { - font-size: 14px; - margin-bottom: 5px; -} - -/* The next 2 fix the poor vertical spacing in genindex.html (the alphabetized index) */ -.indextable.genindextable { - margin-bottom: 20px; -} - -div.genindex-jumpbox { - margin-bottom: 10px; -} - -/* rst image classes */ - -.clear-both { - clear: both; - } - -.float-left { - float: left; - margin-right: 20px; -} - -img { - border: solid 1px #e8e8e8; -} - -/* These are custom and need to be defined in conf.py to access in all pages, e.g., '.. role:: red' */ -.img-title { - color: #000000; - /* neither padding nor margin works for vertical spacing bc it's a span -- line-height does, sort of */ - line-height: 3.0; - font-style: italic; - font-weight: 600; -} - -.img-title-para { - color: #000000; - margin-top: 20px; - margin-bottom: 0px; - font-style: italic; - font-weight: 500; -} - -.red { - color: red; +div.rst-content { + max-width: 1300px; + border: 0; + padding: 0px 80px 10px 80px; + margin-left: 50px; +} + +@media (max-width: 768px) { + div.rst-content { + max-width: 1300px; + border: 0; + padding: 0px 10px 10px 10px; + margin-left: 0px; + } } diff --git a/docs/source/_static/theme_overrides_SUPERSEDED.css b/docs/source/_static/theme_overrides_SUPERSEDED.css new file mode 100644 index 00000000..9662d63a --- /dev/null +++ b/docs/source/_static/theme_overrides_SUPERSEDED.css @@ -0,0 +1,353 @@ +body { + color: #000000; +} + +p { + margin-bottom: 10px; +} + +.wy-plain-list-disc, .rst-content .section ul, .rst-content .toctree-wrapper ul, article ul { + margin-bottom: 10px; +} + +.custom_header_01 { + color: #cc0000; + font-size: 22px; + font-weight: bold; + line-height: 50px; +} + +h1, h2, h3, h4, h5, h6 { + margin-bottom: 20px; + margin-top: 20px; +} + +h5 { + font-size: 18px; + color: #000000; + font-style: italic; + margin-bottom: 10px; +} + +h6 { + font-size: 15px; + color: #000000; + font-style: italic; + margin-bottom: 10px; +} + +/* custom admonitions */ +/* success */ +.custom-admonition-success .admonition-title { + color: #000000; + background: #ccffcc; + border-radius: 5px 5px 0px 0px; +} +div.custom-admonition-success.admonition { + color: #000000; + background: #ffffff; + border: solid 1px #cccccc; + border-radius: 5px; + box-shadow: 1px 1px 5px 3px #d8d8d8; + margin: 20px 0px 30px 0px; +} + +/* important */ +.custom-admonition-important .admonition-title { + color: #000000; + background: #ccffcc; + border-radius: 5px 5px 0px 0px; + border-bottom: solid 1px #000000; +} +div.custom-admonition-important.admonition { + color: #000000; + background: #ffffff; + border: solid 1px #cccccc; + border-radius: 5px; + box-shadow: 1px 1px 5px 3px #d8d8d8; + margin: 20px 0px 30px 0px; +} + +/* caution */ +.custom-admonition-caution .admonition-title { + color: #000000; + background: #ffff99; + border-radius: 5px 5px 0px 0px; + border-bottom: solid 1px #e8e8e8; +} +div.custom-admonition-caution.admonition { + color: #000000; + background: #ffffff; + border: solid 1px #cccccc; + border-radius: 5px; + box-shadow: 1px 1px 5px 3px #d8d8d8; + margin: 20px 0px 30px 0px; +} + +/* note */ +.custom-admonition-note .admonition-title { + color: #ffffff; + background: #006bb3; + border-radius: 5px 5px 0px 0px; +} +div.custom-admonition-note.admonition { + color: #000000; + background: #ffffff; + border: solid 1px #cccccc; + border-radius: 5px; + box-shadow: 1px 1px 5px 3px #d8d8d8; + margin: 20px 0px 30px 0px; +} + +/* todo */ +.custom-admonition-todo .admonition-title { + color: #000000; + background: #cce6ff; + border-radius: 5px 5px 0px 0px; + border-bottom: solid 1px #99ccff; +} +div.custom-admonition-todo.admonition { + color: #000000; + background: #ffffff; + border: solid 1px #99ccff; + border-radius: 5px; + box-shadow: 1px 1px 5px 3px #d8d8d8; + margin: 20px 0px 30px 0px; +} + +/* examples */ +.custom-admonition-examples .admonition-title { + color: #000000; + background: #ffe6cc; + border-radius: 5px 5px 0px 0px; + border-bottom: solid 1px #d8d8d8; +} +div.custom-admonition-examples.admonition { + color: #000000; + background: #ffffff; + border: solid 1px #cccccc; + border-radius: 5px; + box-shadow: 1px 1px 5px 3px #d8d8d8; + margin: 20px 0px 30px 0px; +} + +.wy-nav-content { + max-width: 100%; + padding-right: 100px; + padding-left: 100px; + background-color: #f2f2f2; +} + +div.rst-content { + background-color: #ffffff; + border: solid 1px #e5e5e5; + padding: 20px 40px 20px 40px; +} + +.rst-content .guilabel { + border: 1px solid #ffff99; + background: #ffff99; + font-size: 100%; + font-weight: normal; + border-radius: 4px; + padding: 2px 0px; + margin: auto 2px; + vertical-align: middle; +} + +.rst-content kbd { + font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; + border: solid 1px #d8d8d8; + background-color: #f5f5f5; + padding: 0px 3px; + border-radius: 3px; +} + +.wy-nav-content-wrap a { + color: #0066cc; + text-decoration: none; +} +.wy-nav-content-wrap a:hover { + color: #0099cc; + text-decoration: underline; +} + +.wy-nav-top a { + color: #ffffff; +} + +/* Based on numerous similar approaches e.g., https://github.com/readthedocs/sphinx_rtd_theme/issues/117 and https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html -- but remove form-factor limits to enable table wrap on full-size and smallest-size form factors */ +.wy-table-responsive table td { + white-space: normal !important; +} + +.rst-content table.docutils td, +.rst-content table.docutils th { + padding: 5px 10px 5px 10px; +} +.rst-content table.docutils td p, +.rst-content table.docutils th p { + font-size: 14px; + margin-bottom: 0px; +} +.rst-content table.docutils td p cite, +.rst-content table.docutils th p cite { + font-size: 14px; + background-color: transparent; +} + +.colwidths-given th { + border: solid 1px #d8d8d8 !important; +} +.colwidths-given td { + border: solid 1px #d8d8d8 !important; +} + +/*handles single-tick inline code*/ +.wy-body-for-nav cite { + color: #000000; + background-color: transparent; + font-style: normal; + font-family: "Courier New"; + font-size: 13px; + padding: 3px 3px 3px 3px; +} + +.rst-content pre.literal-block, .rst-content div[class^="highlight"] pre, .rst-content .linenodiv pre { + font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; + font-size: 13px; + overflow: visible; + white-space: pre-wrap; + color: #000000; +} + +.rst-content pre.literal-block, .rst-content div[class^='highlight'] { + background-color: #f8f8f8; + border: solid 1px #e8e8e8; +} + +/* This enables inline code to wrap. */ +code, .rst-content tt, .rst-content code { + white-space: pre-wrap; + padding: 2px 3px 1px; + border-radius: 3px; + font-size: 13px; + background-color: #ffffff; +} + +/* use this added class for code blocks attached to bulleted list items */ +.highlight-top-margin { + margin-top: 20px !important; +} + +/* change color of inline code block */ +span.pre { + color: #e01e5a; +} + +.wy-body-for-nav blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid #ddd; + color: #000000; +} + +/* Fix the unwanted top and bottom padding inside a nested bulleted/numbered list */ +.rst-content .section ol p, .rst-content .section ul p { + margin-bottom: 0px; +} + +/* add spacing between bullets for legibility */ +.rst-content .section ol li, .rst-content .section ul li { + margin-bottom: 5px; +} + +.rst-content .section ol li:first-child, .rst-content .section ul li:first-child { + margin-top: 5px; +} + +/* but exclude the toctree bullets */ +.rst-content .toctree-wrapper ul li, .rst-content .toctree-wrapper ul li:first-child { + margin-top: 0px; + margin-bottom: 0px; +} + +/* remove extra space at bottom of multine list-table cell */ +.rst-content .line-block { + margin-left: 0px; + margin-bottom: 0px; + line-height: 24px; +} + +/* fix extra vertical spacing in page toctree */ +.rst-content .toctree-wrapper ul li ul, article ul li ul { + margin-top: 0; + margin-bottom: 0; +} + +/* this is used by the genindex added via layout.html (see source/_templates/) to sidebar toc */ +.reference.internal.toc-index { + color: #d9d9d9; +} + +.reference.internal.toc-index.current { + background-color: #ffffff; + color: #000000; + font-weight: bold; +} + +.toc-index-div { + border-top: solid 1px #000000; + margin-top: 10px; + padding-top: 5px; +} + +.indextable ul li { + font-size: 14px; + margin-bottom: 5px; +} + +/* The next 2 fix the poor vertical spacing in genindex.html (the alphabetized index) */ +.indextable.genindextable { + margin-bottom: 20px; +} + +div.genindex-jumpbox { + margin-bottom: 10px; +} + +/* rst image classes */ + +.clear-both { + clear: both; + } + +.float-left { + float: left; + margin-right: 20px; +} + +img { + border: solid 1px #e8e8e8; +} + +/* These are custom and need to be defined in conf.py to access in all pages, e.g., '.. role:: red' */ +.img-title { + color: #000000; + /* neither padding nor margin works for vertical spacing bc it's a span -- line-height does, sort of */ + line-height: 3.0; + font-style: italic; + font-weight: 600; +} + +.img-title-para { + color: #000000; + margin-top: 20px; + margin-bottom: 0px; + font-style: italic; + font-weight: 500; +} + +.red { + color: red; +} diff --git a/docs/source/conf.py b/docs/source/conf.py index 54e5e665..7771ff09 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -30,7 +30,7 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx_reredirects", - 'sphinx_rtd_theme', + "sphinx_rtd_theme", "sphinx_rtd_dark_mode", "sphinx.ext.extlinks", "sphinx_copybutton", @@ -47,7 +47,10 @@ intersphinx_mapping = { "aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None), - "scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None), + "scancode-workbench": ( + "https://scancode-workbench.readthedocs.io/en/develop/", + None, + ), } @@ -82,7 +85,9 @@ "conf_py_path": "/docs/source/", # path in the checkout to the docs root } -html_css_files = ["_static/theme_overrides.css"] +html_css_files = [ + "theme_overrides.css", +] # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. @@ -108,6 +113,4 @@ # -- Options for LaTeX output ------------------------------------------------- -latex_elements = { - 'classoptions': ',openany,oneside' -} \ No newline at end of file +latex_elements = {"classoptions": ",openany,oneside"} From 4e36fc601eaa17bde0d2a4bebfed70d7bde28e7c Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Tue, 16 Jan 2024 12:22:54 -0800 Subject: [PATCH 004/105] Delete theme_overrides_SUPERSEDED.css as no longer needed #84 Reference: https://github.com/nexB/skeleton/issues/84 Signed-off-by: John M. Horan --- .../_static/theme_overrides_SUPERSEDED.css | 353 ------------------ 1 file changed, 353 deletions(-) delete mode 100644 docs/source/_static/theme_overrides_SUPERSEDED.css diff --git a/docs/source/_static/theme_overrides_SUPERSEDED.css b/docs/source/_static/theme_overrides_SUPERSEDED.css deleted file mode 100644 index 9662d63a..00000000 --- a/docs/source/_static/theme_overrides_SUPERSEDED.css +++ /dev/null @@ -1,353 +0,0 @@ -body { - color: #000000; -} - -p { - margin-bottom: 10px; -} - -.wy-plain-list-disc, .rst-content .section ul, .rst-content .toctree-wrapper ul, article ul { - margin-bottom: 10px; -} - -.custom_header_01 { - color: #cc0000; - font-size: 22px; - font-weight: bold; - line-height: 50px; -} - -h1, h2, h3, h4, h5, h6 { - margin-bottom: 20px; - margin-top: 20px; -} - -h5 { - font-size: 18px; - color: #000000; - font-style: italic; - margin-bottom: 10px; -} - -h6 { - font-size: 15px; - color: #000000; - font-style: italic; - margin-bottom: 10px; -} - -/* custom admonitions */ -/* success */ -.custom-admonition-success .admonition-title { - color: #000000; - background: #ccffcc; - border-radius: 5px 5px 0px 0px; -} -div.custom-admonition-success.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* important */ -.custom-admonition-important .admonition-title { - color: #000000; - background: #ccffcc; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #000000; -} -div.custom-admonition-important.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* caution */ -.custom-admonition-caution .admonition-title { - color: #000000; - background: #ffff99; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #e8e8e8; -} -div.custom-admonition-caution.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* note */ -.custom-admonition-note .admonition-title { - color: #ffffff; - background: #006bb3; - border-radius: 5px 5px 0px 0px; -} -div.custom-admonition-note.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* todo */ -.custom-admonition-todo .admonition-title { - color: #000000; - background: #cce6ff; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #99ccff; -} -div.custom-admonition-todo.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #99ccff; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -/* examples */ -.custom-admonition-examples .admonition-title { - color: #000000; - background: #ffe6cc; - border-radius: 5px 5px 0px 0px; - border-bottom: solid 1px #d8d8d8; -} -div.custom-admonition-examples.admonition { - color: #000000; - background: #ffffff; - border: solid 1px #cccccc; - border-radius: 5px; - box-shadow: 1px 1px 5px 3px #d8d8d8; - margin: 20px 0px 30px 0px; -} - -.wy-nav-content { - max-width: 100%; - padding-right: 100px; - padding-left: 100px; - background-color: #f2f2f2; -} - -div.rst-content { - background-color: #ffffff; - border: solid 1px #e5e5e5; - padding: 20px 40px 20px 40px; -} - -.rst-content .guilabel { - border: 1px solid #ffff99; - background: #ffff99; - font-size: 100%; - font-weight: normal; - border-radius: 4px; - padding: 2px 0px; - margin: auto 2px; - vertical-align: middle; -} - -.rst-content kbd { - font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; - border: solid 1px #d8d8d8; - background-color: #f5f5f5; - padding: 0px 3px; - border-radius: 3px; -} - -.wy-nav-content-wrap a { - color: #0066cc; - text-decoration: none; -} -.wy-nav-content-wrap a:hover { - color: #0099cc; - text-decoration: underline; -} - -.wy-nav-top a { - color: #ffffff; -} - -/* Based on numerous similar approaches e.g., https://github.com/readthedocs/sphinx_rtd_theme/issues/117 and https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html -- but remove form-factor limits to enable table wrap on full-size and smallest-size form factors */ -.wy-table-responsive table td { - white-space: normal !important; -} - -.rst-content table.docutils td, -.rst-content table.docutils th { - padding: 5px 10px 5px 10px; -} -.rst-content table.docutils td p, -.rst-content table.docutils th p { - font-size: 14px; - margin-bottom: 0px; -} -.rst-content table.docutils td p cite, -.rst-content table.docutils th p cite { - font-size: 14px; - background-color: transparent; -} - -.colwidths-given th { - border: solid 1px #d8d8d8 !important; -} -.colwidths-given td { - border: solid 1px #d8d8d8 !important; -} - -/*handles single-tick inline code*/ -.wy-body-for-nav cite { - color: #000000; - background-color: transparent; - font-style: normal; - font-family: "Courier New"; - font-size: 13px; - padding: 3px 3px 3px 3px; -} - -.rst-content pre.literal-block, .rst-content div[class^="highlight"] pre, .rst-content .linenodiv pre { - font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace; - font-size: 13px; - overflow: visible; - white-space: pre-wrap; - color: #000000; -} - -.rst-content pre.literal-block, .rst-content div[class^='highlight'] { - background-color: #f8f8f8; - border: solid 1px #e8e8e8; -} - -/* This enables inline code to wrap. */ -code, .rst-content tt, .rst-content code { - white-space: pre-wrap; - padding: 2px 3px 1px; - border-radius: 3px; - font-size: 13px; - background-color: #ffffff; -} - -/* use this added class for code blocks attached to bulleted list items */ -.highlight-top-margin { - margin-top: 20px !important; -} - -/* change color of inline code block */ -span.pre { - color: #e01e5a; -} - -.wy-body-for-nav blockquote { - margin: 1em 0; - padding-left: 1em; - border-left: 4px solid #ddd; - color: #000000; -} - -/* Fix the unwanted top and bottom padding inside a nested bulleted/numbered list */ -.rst-content .section ol p, .rst-content .section ul p { - margin-bottom: 0px; -} - -/* add spacing between bullets for legibility */ -.rst-content .section ol li, .rst-content .section ul li { - margin-bottom: 5px; -} - -.rst-content .section ol li:first-child, .rst-content .section ul li:first-child { - margin-top: 5px; -} - -/* but exclude the toctree bullets */ -.rst-content .toctree-wrapper ul li, .rst-content .toctree-wrapper ul li:first-child { - margin-top: 0px; - margin-bottom: 0px; -} - -/* remove extra space at bottom of multine list-table cell */ -.rst-content .line-block { - margin-left: 0px; - margin-bottom: 0px; - line-height: 24px; -} - -/* fix extra vertical spacing in page toctree */ -.rst-content .toctree-wrapper ul li ul, article ul li ul { - margin-top: 0; - margin-bottom: 0; -} - -/* this is used by the genindex added via layout.html (see source/_templates/) to sidebar toc */ -.reference.internal.toc-index { - color: #d9d9d9; -} - -.reference.internal.toc-index.current { - background-color: #ffffff; - color: #000000; - font-weight: bold; -} - -.toc-index-div { - border-top: solid 1px #000000; - margin-top: 10px; - padding-top: 5px; -} - -.indextable ul li { - font-size: 14px; - margin-bottom: 5px; -} - -/* The next 2 fix the poor vertical spacing in genindex.html (the alphabetized index) */ -.indextable.genindextable { - margin-bottom: 20px; -} - -div.genindex-jumpbox { - margin-bottom: 10px; -} - -/* rst image classes */ - -.clear-both { - clear: both; - } - -.float-left { - float: left; - margin-right: 20px; -} - -img { - border: solid 1px #e8e8e8; -} - -/* These are custom and need to be defined in conf.py to access in all pages, e.g., '.. role:: red' */ -.img-title { - color: #000000; - /* neither padding nor margin works for vertical spacing bc it's a span -- line-height does, sort of */ - line-height: 3.0; - font-style: italic; - font-weight: 600; -} - -.img-title-para { - color: #000000; - margin-top: 20px; - margin-bottom: 0px; - font-style: italic; - font-weight: 500; -} - -.red { - color: red; -} From 7d74b8a3c98761293cd133d543e4d58a525dc7bf Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Thu, 18 Jan 2024 17:11:14 +0530 Subject: [PATCH 005/105] Fix top padding for rst content Signed-off-by: Ayan Sinha Mahapatra --- docs/source/_static/theme_overrides.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css index de5ae433..5863ccf5 100644 --- a/docs/source/_static/theme_overrides.css +++ b/docs/source/_static/theme_overrides.css @@ -12,7 +12,7 @@ div.rst-content { max-width: 1300px; border: 0; - padding: 0px 80px 10px 80px; + padding: 10px 80px 10px 80px; margin-left: 50px; } From 008d521aec51e5983f6d6a2adc4efa7fd92159cf Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Mon, 19 Feb 2024 15:21:45 +0530 Subject: [PATCH 006/105] Update CI runners and python version Signed-off-by: Ayan Sinha Mahapatra --- .github/workflows/docs-ci.yml | 2 +- .github/workflows/pypi-release.yml | 8 ++++---- azure-pipelines.yml | 22 +++++++++++++++------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index ada779bf..8c2abfe9 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: max-parallel: 4 diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 95857301..d2206c87 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -21,10 +21,10 @@ on: jobs: build-pypi-distribs: name: Build and publish library to PyPI - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: @@ -47,7 +47,7 @@ jobs: name: Create GH release needs: - build-pypi-distribs - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Download built archives @@ -67,7 +67,7 @@ jobs: name: Create PyPI release needs: - create-gh-release - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Download built archives diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 764883de..373b78cd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ jobs: parameters: job_name: ubuntu20_cpython image_name: ubuntu-20.04 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -19,7 +19,7 @@ jobs: parameters: job_name: ubuntu22_cpython image_name: ubuntu-22.04 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -27,7 +27,7 @@ jobs: parameters: job_name: macos11_cpython image_name: macOS-11 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -35,7 +35,7 @@ jobs: parameters: job_name: macos12_cpython image_name: macOS-12 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -43,7 +43,15 @@ jobs: parameters: job_name: macos13_cpython image_name: macOS-13 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + test_suites: + all: venv/bin/pytest -n 2 -vvs + + - template: etc/ci/azure-posix.yml + parameters: + job_name: macos14_cpython + image_name: macOS-14 + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -51,7 +59,7 @@ jobs: parameters: job_name: win2019_cpython image_name: windows-2019 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv\Scripts\pytest -n 2 -vvs @@ -59,6 +67,6 @@ jobs: parameters: job_name: win2022_cpython image_name: windows-2022 - python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv\Scripts\pytest -n 2 -vvs From 124da3dcef0d95a6f6aa76ed849f47ada25b83e2 Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Mon, 1 Jul 2024 15:11:21 +0530 Subject: [PATCH 007/105] Replace deprecated macos CI runners Replace macos-11 runners with macos-14 runners. Reference: https://github.com/actions/runner-images?tab=readme-ov-file#available-images Reference: https://github.com/nexB/skeleton/issues/89 Signed-off-by: Ayan Sinha Mahapatra --- azure-pipelines.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 373b78cd..c2a3b522 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,24 +25,24 @@ jobs: - template: etc/ci/azure-posix.yml parameters: - job_name: macos11_cpython - image_name: macOS-11 + job_name: macos12_cpython + image_name: macOS-12 python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs - template: etc/ci/azure-posix.yml parameters: - job_name: macos12_cpython - image_name: macOS-12 + job_name: macos13_cpython + image_name: macOS-13 python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs - template: etc/ci/azure-posix.yml parameters: - job_name: macos13_cpython - image_name: macOS-13 + job_name: macos14_cpython_arm64 + image_name: macOS-14 python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -50,8 +50,8 @@ jobs: - template: etc/ci/azure-posix.yml parameters: job_name: macos14_cpython - image_name: macOS-14 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + image_name: macOS-14-large + python_versions: ['3.8', '3.8', '3.9', '3.10', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs From be4e14d414cf4f7112b529dc71f7abccc9dcf24a Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Mon, 1 Jul 2024 16:00:40 +0530 Subject: [PATCH 008/105] Update minimum required python version to 3.8 Signed-off-by: Ayan Sinha Mahapatra --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index bd0e58a7..a8e20c5d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,7 +38,7 @@ zip_safe = false setup_requires = setuptools_scm[toml] >= 4 -python_requires = >=3.7 +python_requires = >=3.8 install_requires = From 9c57f340d22d8891a5614a93553b20d75e2f3136 Mon Sep 17 00:00:00 2001 From: Chin Yeung Li Date: Tue, 20 Aug 2024 16:46:20 +0800 Subject: [PATCH 009/105] Update link references of ownership from nexB to aboutcode-org Signed-off-by: Chin Yeung Li --- Makefile | 4 +- NOTICE | 2 +- configure | 2 +- configure.bat | 2 +- docs/source/conf.py | 2 +- docs/source/contribute/contrib_doc.rst | 2 +- docs/source/skeleton-usage.rst | 2 +- etc/scripts/check_thirdparty.py | 5 +- etc/scripts/fetch_thirdparty.py | 19 ++++-- etc/scripts/gen_requirements.py | 2 +- etc/scripts/gen_requirements_dev.py | 2 +- etc/scripts/utils_dejacode.py | 11 ++-- etc/scripts/utils_requirements.py | 11 ++-- etc/scripts/utils_thirdparty.py | 89 +++++++++++++++++--------- setup.cfg | 2 +- tests/test_skeleton_codestyle.py | 2 +- 16 files changed, 100 insertions(+), 59 deletions(-) diff --git a/Makefile b/Makefile index cc36c355..94451b33 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # @@ -35,7 +35,7 @@ check: @echo "-> Run pycodestyle (PEP8) validation" @${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache . @echo "-> Run isort imports ordering validation" - @${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests . + @${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests . @echo "-> Run black validation" @${ACTIVATE} black --check --check -l 100 src tests setup.py diff --git a/NOTICE b/NOTICE index 65936b2b..cbdaef79 100644 --- a/NOTICE +++ b/NOTICE @@ -2,7 +2,7 @@ # Copyright (c) nexB Inc. and others. # SPDX-License-Identifier: Apache-2.0 # -# Visit https://aboutcode.org and https://github.com/nexB/ for support and download. +# Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download. # ScanCode is a trademark of nexB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/configure b/configure index 926a894e..22d92885 100755 --- a/configure +++ b/configure @@ -3,7 +3,7 @@ # Copyright (c) nexB Inc. and others. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/ for support or download. +# See https://github.com/aboutcode-org/ for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # diff --git a/configure.bat b/configure.bat index 5e95b311..5b9a9d68 100644 --- a/configure.bat +++ b/configure.bat @@ -4,7 +4,7 @@ @rem Copyright (c) nexB Inc. and others. All rights reserved. @rem SPDX-License-Identifier: Apache-2.0 @rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -@rem See https://github.com/nexB/ for support or download. +@rem See https://github.com/aboutcode-org/ for support or download. @rem See https://aboutcode.org for more information about nexB OSS projects. diff --git a/docs/source/conf.py b/docs/source/conf.py index 7771ff09..8c88fa2c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,7 +43,7 @@ # This points to aboutcode.readthedocs.io # In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot -# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83 +# Link was created at commit - https://github.com/aboutcode-org/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83 intersphinx_mapping = { "aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None), diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index 13882e10..5640db26 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -12,7 +12,7 @@ To get started, create or identify a working directory on your local machine. Open that directory and execute the following command in a terminal session:: - git clone https://github.com/nexB/skeleton.git + git clone https://github.com/aboutcode-org/skeleton.git That will create an ``/skeleton`` directory in your working directory. Now you can install the dependencies in a virtualenv:: diff --git a/docs/source/skeleton-usage.rst b/docs/source/skeleton-usage.rst index cde23dcd..6cb4cc5f 100644 --- a/docs/source/skeleton-usage.rst +++ b/docs/source/skeleton-usage.rst @@ -118,7 +118,7 @@ corrected. You can check to see if your corrections are valid by running: Once the wheels are collected and the ABOUT files are generated and correct, upload them to thirdparty.aboutcode.org/pypi by placing the wheels and ABOUT files from the thirdparty directory to the pypi directory at -https://github.com/nexB/thirdparty-packages +https://github.com/aboutcode-org/thirdparty-packages Usage after project initialization diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index b052f25b..2daded94 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # import click @@ -17,7 +17,8 @@ @click.option( "-d", "--dest", - type=click.Path(exists=True, readable=True, path_type=str, file_okay=False), + type=click.Path(exists=True, readable=True, + path_type=str, file_okay=False), required=True, help="Path to the thirdparty directory to check.", ) diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index eedf05c6..3f9ff527 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # @@ -55,7 +55,8 @@ "-d", "--dest", "dest_dir", - type=click.Path(exists=True, readable=True, path_type=str, file_okay=False), + type=click.Path(exists=True, readable=True, + path_type=str, file_okay=False), metavar="DIR", default=utils_thirdparty.THIRDPARTY_DIR, show_default=True, @@ -224,7 +225,8 @@ def fetch_thirdparty( environments = None if wheels: evts = itertools.product(python_versions, operating_systems) - environments = [utils_thirdparty.Environment.from_pyver_and_os(pyv, os) for pyv, os in evts] + environments = [utils_thirdparty.Environment.from_pyver_and_os( + pyv, os) for pyv, os in evts] # Collect PyPI repos repos = [] @@ -260,13 +262,14 @@ def fetch_thirdparty( repos=repos, ) if not fetched: - wheels_or_sdist_not_found[f"{name}=={version}"].append(environment) + wheels_or_sdist_not_found[f"{name}=={version}"].append( + environment) if TRACE: print(f" NOT FOUND") if (sdists or (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only) - ): + ): if TRACE: print(f" ==> Fetching sdist: {name}=={version}") @@ -289,7 +292,8 @@ def fetch_thirdparty( sdist_missing = sdists and "sdist" in dists and not name in wheel_only if sdist_missing: mia.append(f"SDist missing: {nv} {dists}") - wheels_missing = wheels and any(d for d in dists if d != "sdist") and not name in sdist_only + wheels_missing = wheels and any( + d for d in dists if d != "sdist") and not name in sdist_only if wheels_missing: mia.append(f"Wheels missing: {nv} {dists}") @@ -299,7 +303,8 @@ def fetch_thirdparty( raise Exception(mia) print(f"==> FETCHING OR CREATING ABOUT AND LICENSE FILES") - utils_thirdparty.fetch_abouts_and_licenses(dest_dir=dest_dir, use_cached_index=use_cached_index) + utils_thirdparty.fetch_abouts_and_licenses( + dest_dir=dest_dir, use_cached_index=use_cached_index) utils_thirdparty.clean_about_files(dest_dir=dest_dir) # check for problems diff --git a/etc/scripts/gen_requirements.py b/etc/scripts/gen_requirements.py index 07e26f77..2b65ae80 100644 --- a/etc/scripts/gen_requirements.py +++ b/etc/scripts/gen_requirements.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # import argparse diff --git a/etc/scripts/gen_requirements_dev.py b/etc/scripts/gen_requirements_dev.py index 12cc06d3..5db1c48e 100644 --- a/etc/scripts/gen_requirements_dev.py +++ b/etc/scripts/gen_requirements_dev.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # import argparse diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index c42e6c93..652252d4 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # import io @@ -33,7 +33,8 @@ def can_do_api_calls(): if not DEJACODE_API_KEY and DEJACODE_API_URL: - print("DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing") + print( + "DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing") return False else: return True @@ -68,7 +69,8 @@ def get_package_data(distribution): return results[0] elif len_results > 1: - print(f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}") + print( + f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}") else: print("Could not find package:", distribution.download_url) @@ -149,7 +151,8 @@ def find_latest_dejacode_package(distribution): # there was no exact match, find the latest version # TODO: consider the closest version rather than the latest # or the version that has the best data - with_versions = [(packaging_version.parse(p["version"]), p) for p in packages] + with_versions = [(packaging_version.parse(p["version"]), p) + for p in packages] with_versions = sorted(with_versions) latest_version, latest_package_version = sorted(with_versions)[-1] print( diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index 0fc25a35..1c502390 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # @@ -102,7 +102,8 @@ def lock_dev_requirements( all_req_nvs = get_required_name_versions(all_req_lines) dev_only_req_nvs = {n: v for n, v in all_req_nvs if n not in main_names} - new_reqs = "\n".join(f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items())) + new_reqs = "\n".join( + f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items())) with open(dev_requirements_file, "w") as fo: fo.write(new_reqs) @@ -113,10 +114,12 @@ def get_installed_reqs(site_packages_dir): as a text. """ if not os.path.exists(site_packages_dir): - raise Exception(f"site_packages directory: {site_packages_dir!r} does not exists") + raise Exception( + f"site_packages directory: {site_packages_dir!r} does not exists") # Also include these packages in the output with --all: wheel, distribute, # setuptools, pip - args = ["pip", "freeze", "--exclude-editable", "--all", "--path", site_packages_dir] + args = ["pip", "freeze", "--exclude-editable", + "--all", "--path", site_packages_dir] return subprocess.check_output(args, encoding="utf-8") diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index addf8e5e..46dc7289 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -5,7 +5,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # import email @@ -245,9 +245,11 @@ def download_wheel(name, version, environment, dest_dir=THIRDPARTY_DIR, repos=tu package = repo.get_package_version(name=name, version=version) if not package: if TRACE_DEEP: - print(f" download_wheel: No package in {repo.index_url} for {name}=={version}") + print( + f" download_wheel: No package in {repo.index_url} for {name}=={version}") continue - supported_wheels = list(package.get_supported_wheels(environment=environment)) + supported_wheels = list( + package.get_supported_wheels(environment=environment)) if not supported_wheels: if TRACE_DEEP: print( @@ -291,7 +293,8 @@ def download_sdist(name, version, dest_dir=THIRDPARTY_DIR, repos=tuple()): if not package: if TRACE_DEEP: - print(f" download_sdist: No package in {repo.index_url} for {name}=={version}") + print( + f" download_sdist: No package in {repo.index_url} for {name}=={version}") continue sdist = package.sdist if not sdist: @@ -300,7 +303,8 @@ def download_sdist(name, version, dest_dir=THIRDPARTY_DIR, repos=tuple()): continue if TRACE_DEEP: - print(f" download_sdist: Getting sdist from index (or cache): {sdist.download_url}") + print( + f" download_sdist: Getting sdist from index (or cache): {sdist.download_url}") fetched_sdist_filename = package.sdist.download(dest_dir=dest_dir) if fetched_sdist_filename: @@ -533,7 +537,8 @@ def get_best_download_url(self, repos=tuple()): repos = DEFAULT_PYPI_REPOS for repo in repos: - package = repo.get_package_version(name=self.name, version=self.version) + package = repo.get_package_version( + name=self.name, version=self.version) if not package: if TRACE: print( @@ -772,7 +777,8 @@ def load_remote_about_data(self): if notice_text: about_data["notice_text"] = notice_text except RemoteNotFetchedException: - print(f"Failed to fetch NOTICE file: {self.notice_download_url}") + print( + f"Failed to fetch NOTICE file: {self.notice_download_url}") return self.load_about_data(about_data) def get_checksums(self, dest_dir=THIRDPARTY_DIR): @@ -821,9 +827,11 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): Fetch license files if missing in `dest_dir`. Return True if license files were fetched. """ - urls = LinksRepository.from_url(use_cached_index=use_cached_index).links + urls = LinksRepository.from_url( + use_cached_index=use_cached_index).links errors = [] - extra_lic_names = [l.get("file") for l in self.extra_data.get("licenses", {})] + extra_lic_names = [l.get("file") + for l in self.extra_data.get("licenses", {})] extra_lic_names += [self.extra_data.get("license_file")] extra_lic_names = [ln for ln in extra_lic_names if ln] lic_names = [f"{key}.LICENSE" for key in self.get_license_keys()] @@ -834,7 +842,8 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): try: # try remotely first - lic_url = get_license_link_for_filename(filename=filename, urls=urls) + lic_url = get_license_link_for_filename( + filename=filename, urls=urls) fetch_and_save( path_or_url=lic_url, @@ -911,7 +920,8 @@ def load_pkginfo_data(self, dest_dir=THIRDPARTY_DIR): c for c in classifiers if c.startswith("License") ] license_expression = get_license_expression(declared_license) - other_classifiers = [c for c in classifiers if not c.startswith("License")] + other_classifiers = [ + c for c in classifiers if not c.startswith("License")] holder = raw_data["Author"] holder_contact = raw_data["Author-email"] @@ -953,7 +963,8 @@ def update(self, data, overwrite=False, keep_extra=True): package_url = data.get("package_url") if package_url: purl_from_data = packageurl.PackageURL.from_string(package_url) - purl_from_self = packageurl.PackageURL.from_string(self.package_url) + purl_from_self = packageurl.PackageURL.from_string( + self.package_url) if purl_from_data != purl_from_self: print( f"Invalid dist update attempt, no same same purl with dist: " @@ -1003,7 +1014,8 @@ def get_license_link_for_filename(filename, urls): if not path_or_url: raise Exception(f"Missing link to file: {filename}") if not len(path_or_url) == 1: - raise Exception(f"Multiple links to file: {filename}: \n" + "\n".join(path_or_url)) + raise Exception( + f"Multiple links to file: {filename}: \n" + "\n".join(path_or_url)) return path_or_url[0] @@ -1397,7 +1409,8 @@ def packages_from_dir(cls, directory): """ base = os.path.abspath(directory) - paths = [os.path.join(base, f) for f in os.listdir(base) if f.endswith(EXTENSIONS)] + paths = [os.path.join(base, f) + for f in os.listdir(base) if f.endswith(EXTENSIONS)] if TRACE_ULTRA_DEEP: print("packages_from_dir: paths:", paths) @@ -1458,7 +1471,8 @@ def dists_from_paths_or_urls(cls, paths_or_urls): dists = [] if TRACE_ULTRA_DEEP: print(" ###paths_or_urls:", paths_or_urls) - installable = [f for f in paths_or_urls if f.endswith(EXTENSIONS_INSTALLABLE)] + installable = [f for f in paths_or_urls if f.endswith( + EXTENSIONS_INSTALLABLE)] for path_or_url in installable: try: dist = Distribution.from_path_or_url(path_or_url) @@ -1476,7 +1490,8 @@ def dists_from_paths_or_urls(cls, paths_or_urls): ) except InvalidDistributionFilename: if TRACE_DEEP: - print(f" Skipping invalid distribution from: {path_or_url}") + print( + f" Skipping invalid distribution from: {path_or_url}") continue return dists @@ -1525,7 +1540,8 @@ class Environment: implementation = attr.ib( type=str, default="cp", - metadata=dict(help="Python implementation supported by this environment."), + metadata=dict( + help="Python implementation supported by this environment."), repr=False, ) @@ -1539,7 +1555,8 @@ class Environment: platforms = attr.ib( type=list, default=attr.Factory(list), - metadata=dict(help="List of platform tags supported by this environment."), + metadata=dict( + help="List of platform tags supported by this environment."), repr=False, ) @@ -1623,7 +1640,8 @@ class PypiSimpleRepository: fetched_package_normalized_names = attr.ib( type=set, default=attr.Factory(set), - metadata=dict(help="A set of already fetched package normalized names."), + metadata=dict( + help="A set of already fetched package normalized names."), ) use_cached_index = attr.ib( @@ -1654,10 +1672,12 @@ def _get_package_versions_map(self, name): self.packages[normalized_name] = versions except RemoteNotFetchedException as e: if TRACE: - print(f"failed to fetch package name: {name} from: {self.index_url}:\n{e}") + print( + f"failed to fetch package name: {name} from: {self.index_url}:\n{e}") if not versions and TRACE: - print(f"WARNING: package {name} not found in repo: {self.index_url}") + print( + f"WARNING: package {name} not found in repo: {self.index_url}") return versions @@ -1842,7 +1862,8 @@ def get(self, path_or_url, as_text=True, force=False): if force or not os.path.exists(cached): if TRACE_DEEP: print(f" FILE CACHE MISS: {path_or_url}") - content = get_file_content(path_or_url=path_or_url, as_text=as_text) + content = get_file_content( + path_or_url=path_or_url, as_text=as_text) wmode = "w" if as_text else "wb" with open(cached, wmode) as fo: fo.write(content) @@ -1864,7 +1885,8 @@ def get_file_content(path_or_url, as_text=True): if path_or_url.startswith("https://"): if TRACE_DEEP: print(f"Fetching: {path_or_url}") - _headers, content = get_remote_file_content(url=path_or_url, as_text=as_text) + _headers, content = get_remote_file_content( + url=path_or_url, as_text=as_text) return content elif path_or_url.startswith("file://") or ( @@ -1930,7 +1952,8 @@ def get_remote_file_content( ) else: - raise RemoteNotFetchedException(f"Failed HTTP request from {url} with {status}") + raise RemoteNotFetchedException( + f"Failed HTTP request from {url} with {status}") if headers_only: return response.headers, None @@ -2021,7 +2044,8 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files( + dest_dir=dest_dir, use_cached_index=use_cached_index) continue # lets try to get from another dist of the same local package @@ -2033,7 +2057,8 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files( + dest_dir=dest_dir, use_cached_index=use_cached_index) continue # try to get another version of the same package that is not our version @@ -2044,7 +2069,8 @@ def get_other_dists(_package, _dist): ] other_local_version = other_local_packages and other_local_packages[-1] if other_local_version: - latest_local_dists = list(other_local_version.get_distributions()) + latest_local_dists = list( + other_local_version.get_distributions()) for latest_local_dist in latest_local_dists: latest_local_dist.load_about_data(dest_dir=dest_dir) if not latest_local_dist.has_key_metadata(): @@ -2070,7 +2096,8 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files( + dest_dir=dest_dir, use_cached_index=use_cached_index) continue # try to get a latest version of the same package that is not our version @@ -2111,7 +2138,8 @@ def get_other_dists(_package, _dist): # if local_dist.has_key_metadata() or not local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir) - lic_errs = local_dist.fetch_license_files(dest_dir, use_cached_index=use_cached_index) + lic_errs = local_dist.fetch_license_files( + dest_dir, use_cached_index=use_cached_index) if not local_dist.has_key_metadata(): print(f"Unable to add essential ABOUT data for: {local_dist}") @@ -2259,7 +2287,8 @@ def find_problems( for dist in package.get_distributions(): dist.load_about_data(dest_dir=dest_dir) - abpth = os.path.abspath(os.path.join(dest_dir, dist.about_filename)) + abpth = os.path.abspath(os.path.join( + dest_dir, dist.about_filename)) if not dist.has_key_metadata(): print(f" Missing key ABOUT data in file://{abpth}") if "classifiers" in dist.extra_data: diff --git a/setup.cfg b/setup.cfg index a8e20c5d..ef7d369b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,7 @@ license = Apache-2.0 description = skeleton long_description = file:README.rst long_description_content_type = text/x-rst -url = https://github.com/nexB/skeleton +url = https://github.com/aboutcode-org/skeleton author = nexB. Inc. and others author_email = info@aboutcode.org diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index 2eb6e558..b4ce8c16 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -3,7 +3,7 @@ # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # From 2ddd9523e8ed0b518faa6b779ba51313c73ca071 Mon Sep 17 00:00:00 2001 From: Mathias Burger Date: Thu, 26 Sep 2024 21:47:03 +0200 Subject: [PATCH 010/105] Bugfix: support packages that only have manylinux 2 wheels Currently onnxruntime==1.19.2 cannot be analyzed with python-inspector, because get_supported_wheels() is unable to process packages that only have manylinux wheels. E.g. https://pypi.org/project/onnxruntime/#files only contains the file ' onnxruntime-1.19.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl' for the x86_64 architecture. Signed-off-by: Mathias Burger --- src/python_inspector/utils_pypi.py | 2 ++ tests/test_utils_pypi.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/python_inspector/utils_pypi.py b/src/python_inspector/utils_pypi.py index 2af5d57f..09b811ed 100644 --- a/src/python_inspector/utils_pypi.py +++ b/src/python_inspector/utils_pypi.py @@ -143,6 +143,8 @@ def get_python_dot_version(version): "manylinux1_x86_64", "manylinux2010_x86_64", "manylinux2014_x86_64", + "manylinux_2_27_x86_64", + "manylinux_2_28_x86_64", ], "macos": [ "macosx_10_6_intel", diff --git a/tests/test_utils_pypi.py b/tests/test_utils_pypi.py index de6d4db9..1932d9c1 100644 --- a/tests/test_utils_pypi.py +++ b/tests/test_utils_pypi.py @@ -13,7 +13,9 @@ import pytest +from python_inspector import utils_pypi from python_inspector.utils_pypi import Distribution +from python_inspector.utils_pypi import PypiPackage from python_inspector.utils_pypi import Sdist from python_inspector.utils_pypi import Wheel @@ -138,6 +140,15 @@ def check(self, using=Distribution): ), ] +linux_platforms = [ + "linux_x86_64", + "manylinux1_x86_64", + "manylinux2010_x86_64", + "manylinux2014_x86_64", + "manylinux_2_27_x86_64", + "manylinux_2_28_x86_64", +] + @pytest.mark.parametrize("dist_test", sdist_tests + wheel_tests) def test_Distribution_from_filename(dist_test): @@ -152,3 +163,14 @@ def test_Sdist_from_filename(dist_test): @pytest.mark.parametrize("dist_test", wheel_tests) def test_Wheel_from_filename(dist_test): dist_test.check(using=Wheel) + + +@pytest.mark.parametrize("linux_platform", linux_platforms) +def test_PypiPackage_get_supported_wheels(linux_platform): + whl = Wheel.from_filename(f"onnxruntime-1.19.2-cp311-cp311-{linux_platform}.whl") + pkg = PypiPackage.package_from_dists(dists=[whl]) + env = utils_pypi.Environment.from_pyver_and_os(python_version="311", operating_system="linux") + + supported_wheels = list(pkg.get_supported_wheels(environment=env)) + + assert supported_wheels == [whl] From a92905297acf39ecd820bfb133f8670c39b40c97 Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Fri, 17 Jan 2025 20:07:25 +0100 Subject: [PATCH 011/105] Drop deprecated macos-12 runner --- azure-pipelines.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c2a3b522..39601e62 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,14 +23,6 @@ jobs: test_suites: all: venv/bin/pytest -n 2 -vvs - - template: etc/ci/azure-posix.yml - parameters: - job_name: macos12_cpython - image_name: macOS-12 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] - test_suites: - all: venv/bin/pytest -n 2 -vvs - - template: etc/ci/azure-posix.yml parameters: job_name: macos13_cpython From 4af4fce3cc57d001c6c26f77d477cd44cef2ffef Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Sat, 15 Feb 2025 00:09:49 +0530 Subject: [PATCH 012/105] Update CI/Actions runners Signed-off-by: Ayan Sinha Mahapatra --- .github/workflows/docs-ci.yml | 8 ++++---- .github/workflows/pypi-release.yml | 18 +++++++++--------- azure-pipelines.yml | 22 +++++++++++----------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 8c2abfe9..621de4b2 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -4,19 +4,19 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: max-parallel: 4 matrix: - python-version: [3.9] + python-version: [3.12] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index d2206c87..a66c9c80 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -21,14 +21,14 @@ on: jobs: build-pypi-distribs: name: Build and publish library to PyPI - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.12 - name: Install pypa/build run: python -m pip install build --user @@ -37,7 +37,7 @@ jobs: run: python -m build --sdist --wheel --outdir dist/ - name: Upload built archives - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pypi_archives path: dist/* @@ -47,17 +47,17 @@ jobs: name: Create GH release needs: - build-pypi-distribs - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Download built archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: pypi_archives path: dist - name: Create GH release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: draft: true files: dist/* @@ -67,11 +67,11 @@ jobs: name: Create PyPI release needs: - create-gh-release - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Download built archives - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: pypi_archives path: dist diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 39601e62..a220f2be 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,17 +9,17 @@ jobs: - template: etc/ci/azure-posix.yml parameters: - job_name: ubuntu20_cpython - image_name: ubuntu-20.04 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + job_name: ubuntu22_cpython + image_name: ubuntu-22.04 + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs - template: etc/ci/azure-posix.yml parameters: - job_name: ubuntu22_cpython - image_name: ubuntu-22.04 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + job_name: ubuntu24_cpython + image_name: ubuntu-24.04 + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -27,7 +27,7 @@ jobs: parameters: job_name: macos13_cpython image_name: macOS-13 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -35,7 +35,7 @@ jobs: parameters: job_name: macos14_cpython_arm64 image_name: macOS-14 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -43,7 +43,7 @@ jobs: parameters: job_name: macos14_cpython image_name: macOS-14-large - python_versions: ['3.8', '3.8', '3.9', '3.10', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -51,7 +51,7 @@ jobs: parameters: job_name: win2019_cpython image_name: windows-2019 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv\Scripts\pytest -n 2 -vvs @@ -59,6 +59,6 @@ jobs: parameters: job_name: win2022_cpython image_name: windows-2022 - python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv\Scripts\pytest -n 2 -vvs From 320ec21daa249ceae0c07787f9e52134b3ad06ab Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Thu, 27 Mar 2025 14:54:31 -0700 Subject: [PATCH 013/105] Replace black and isort with ruff * Use ruff config and Make commands from scancode.io Signed-off-by: Jono Yang --- Makefile | 27 ++++++++++++--------------- pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ setup.cfg | 3 +-- 3 files changed, 50 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 94451b33..1738b20a 100644 --- a/Makefile +++ b/Makefile @@ -17,27 +17,24 @@ dev: @echo "-> Configure the development envt." ./configure --dev -isort: - @echo "-> Apply isort changes to ensure proper imports ordering" - ${VENV}/bin/isort --sl -l 100 src tests setup.py - -black: - @echo "-> Apply black code formatter" - ${VENV}/bin/black -l 100 src tests setup.py - doc8: @echo "-> Run doc8 validation" @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ -valid: isort black +valid: + @echo "-> Run Ruff format" + @${ACTIVATE} ruff format + @echo "-> Run Ruff linter" + @${ACTIVATE} ruff check --fix check: - @echo "-> Run pycodestyle (PEP8) validation" - @${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache . - @echo "-> Run isort imports ordering validation" - @${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests . - @echo "-> Run black validation" - @${ACTIVATE} black --check --check -l 100 src tests setup.py + @echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)" + @${ACTIVATE} ruff check + @echo "-> Run Ruff format validation" + @${ACTIVATE} ruff format --check + @$(MAKE) doc8 + @echo "-> Run ABOUT files validation" + @${ACTIVATE} about check etc/ clean: @echo "-> Clean the Python env" diff --git a/pyproject.toml b/pyproject.toml index cde79074..01e60fc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,3 +50,40 @@ addopts = [ "--strict-markers", "--doctest-modules" ] + +[tool.ruff] +line-length = 88 +extend-exclude = [] +target-version = "py310" + +[tool.ruff.lint] +# Rules: https://docs.astral.sh/ruff/rules/ +select = [ + "E", # pycodestyle + "W", # pycodestyle warnings + "D", # pydocstyle + "F", # Pyflakes + "UP", # pyupgrade + "S", # flake8-bandit + "I", # isort + "C9", # McCabe complexity +] +ignore = ["D1", "D203", "D205", "D212", "D400", "D415"] + +[tool.ruff.lint.isort] +force-single-line = true +sections = { django = ["django"] } +section-order = [ + "future", + "standard-library", + "django", + "third-party", + "first-party", + "local-folder", +] + +[tool.ruff.lint.mccabe] +max-complexity = 10 + +[tool.ruff.lint.per-file-ignores] +# Place paths of files to be ignored by ruff here diff --git a/setup.cfg b/setup.cfg index ef7d369b..aaec643f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,8 +54,7 @@ testing = aboutcode-toolkit >= 7.0.2 pycodestyle >= 2.8.0 twine - black - isort + ruff docs = Sphinx>=5.0.2 From d4e29c36c21ab81797604911cdeaea83d80e8088 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 00:46:06 +0100 Subject: [PATCH 014/105] Use org standard 100 line length Signed-off-by: Philippe Ombredanne --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01e60fc6..cea91bd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ addopts = [ ] [tool.ruff] -line-length = 88 +line-length = 100 extend-exclude = [] target-version = "py310" From 6c028f7219ae876ea62074ae435e574525e205d6 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 08:40:28 +0100 Subject: [PATCH 015/105] Lint all common code directories Signed-off-by: Philippe Ombredanne --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index cea91bd1..9e627366 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,14 @@ addopts = [ line-length = 100 extend-exclude = [] target-version = "py310" +include = [ + "pyproject.toml", + "src/**/*.py", + "etc/**/*.py", + "test/**/*.py", + "doc/**/*", + "*.py" +] [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ From 233f3edabfbab390029fb9f1842bf43766b04583 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 09:07:47 +0100 Subject: [PATCH 016/105] Remove unused targets Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1738b20a..930e8010 100644 --- a/Makefile +++ b/Makefile @@ -48,4 +48,4 @@ docs: rm -rf docs/_build/ @${ACTIVATE} sphinx-build docs/ docs/_build/ -.PHONY: conf dev check valid black isort clean test docs +.PHONY: conf dev check valid clean test docs From 55545bf7a1a8f119a560c7f548ce5a460f39f37d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 11:03:05 +0100 Subject: [PATCH 017/105] Improve import sorting Signed-off-by: Philippe Ombredanne --- etc/scripts/check_thirdparty.py | 1 - etc/scripts/fetch_thirdparty.py | 2 +- etc/scripts/test_utils_pip_compatibility_tags.py | 3 +-- etc/scripts/utils_dejacode.py | 1 - etc/scripts/utils_pip_compatibility_tags.py | 14 ++++++-------- etc/scripts/utils_thirdparty.py | 3 +-- pyproject.toml | 7 ++++++- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index 2daded94..62dbb14f 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -12,7 +12,6 @@ import utils_thirdparty - @click.command() @click.option( "-d", diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index 3f9ff527..30d376c4 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -16,8 +16,8 @@ import click -import utils_thirdparty import utils_requirements +import utils_thirdparty TRACE = False TRACE_DEEP = False diff --git a/etc/scripts/test_utils_pip_compatibility_tags.py b/etc/scripts/test_utils_pip_compatibility_tags.py index 98187c56..a33b8b38 100644 --- a/etc/scripts/test_utils_pip_compatibility_tags.py +++ b/etc/scripts/test_utils_pip_compatibility_tags.py @@ -25,14 +25,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from unittest.mock import patch import sysconfig +from unittest.mock import patch import pytest import utils_pip_compatibility_tags - @pytest.mark.parametrize( "version_info, expected", [ diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index 652252d4..c71543f6 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -14,7 +14,6 @@ import requests import saneyaml - from packvers import version as packaging_version """ diff --git a/etc/scripts/utils_pip_compatibility_tags.py b/etc/scripts/utils_pip_compatibility_tags.py index af42a0cd..de0ac95d 100644 --- a/etc/scripts/utils_pip_compatibility_tags.py +++ b/etc/scripts/utils_pip_compatibility_tags.py @@ -27,14 +27,12 @@ import re -from packvers.tags import ( - compatible_tags, - cpython_tags, - generic_tags, - interpreter_name, - interpreter_version, - mac_platforms, -) +from packvers.tags import compatible_tags +from packvers.tags import cpython_tags +from packvers.tags import generic_tags +from packvers.tags import interpreter_name +from packvers.tags import interpreter_version +from packvers.tags import mac_platforms _osx_arch_pat = re.compile(r"(.+)_(\d+)_(\d+)_(.+)") diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index 46dc7289..b0295eca 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -25,14 +25,13 @@ import packageurl import requests import saneyaml +import utils_pip_compatibility_tags from commoncode import fileutils from commoncode.hash import multi_checksums from commoncode.text import python_safe_name from packvers import tags as packaging_tags from packvers import version as packaging_version -import utils_pip_compatibility_tags - """ Utilities to manage Python thirparty libraries source, binaries and metadata in local directories and remote repositories. diff --git a/pyproject.toml b/pyproject.toml index 9e627366..ba55770f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,10 +76,15 @@ select = [ "I", # isort "C9", # McCabe complexity ] -ignore = ["D1", "D203", "D205", "D212", "D400", "D415"] +ignore = ["D1", "D200", "D203", "D205", "D212", "D400", "D415"] [tool.ruff.lint.isort] force-single-line = true +lines-after-imports = 1 +default-section = "first-party" +known-first-party = ["src", "tests", "etc/scripts/**/*.py"] +known-third-party = ["click", "pytest"] + sections = { django = ["django"] } section-order = [ "future", From 0b63e5073b6b1cdc0960abe35060ad0fdb67b665 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 21:35:16 +0100 Subject: [PATCH 018/105] Apply small code updates Signed-off-by: Philippe Ombredanne --- etc/scripts/utils_requirements.py | 20 ++++++++----- etc/scripts/utils_thirdparty.py | 48 +++++++++++++++---------------- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index 1c502390..a9ac2235 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -57,21 +57,25 @@ def get_required_name_version(requirement, with_unpinned=False): >>> assert get_required_name_version("fooA==1.2.3.DEV1") == ("fooa", "1.2.3.dev1") >>> assert get_required_name_version("foo==1.2.3", with_unpinned=False) == ("foo", "1.2.3") >>> assert get_required_name_version("foo", with_unpinned=True) == ("foo", "") - >>> assert get_required_name_version("foo>=1.2", with_unpinned=True) == ("foo", ""), get_required_name_version("foo>=1.2") + >>> expected = ("foo", ""), get_required_name_version("foo>=1.2") + >>> assert get_required_name_version("foo>=1.2", with_unpinned=True) == expected >>> try: ... assert not get_required_name_version("foo", with_unpinned=False) ... except Exception as e: ... assert "Requirement version must be pinned" in str(e) """ requirement = requirement and "".join(requirement.lower().split()) - assert requirement, f"specifier is required is empty:{requirement!r}" + if not requirement: + raise ValueError(f"specifier is required is empty:{requirement!r}") name, operator, version = split_req(requirement) - assert name, f"Name is required: {requirement}" + if not name: + raise ValueError(f"Name is required: {requirement}") is_pinned = operator == "==" if with_unpinned: version = "" else: - assert is_pinned and version, f"Requirement version must be pinned: {requirement}" + if not is_pinned and version: + raise ValueError(f"Requirement version must be pinned: {requirement}") return name, version @@ -120,7 +124,7 @@ def get_installed_reqs(site_packages_dir): # setuptools, pip args = ["pip", "freeze", "--exclude-editable", "--all", "--path", site_packages_dir] - return subprocess.check_output(args, encoding="utf-8") + return subprocess.check_output(args, encoding="utf-8") # noqa: S603 comparators = ( @@ -150,9 +154,11 @@ def split_req(req): >>> assert split_req("foo >= 1.2.3 ") == ("foo", ">=", "1.2.3"), split_req("foo >= 1.2.3 ") >>> assert split_req("foo>=1.2") == ("foo", ">=", "1.2"), split_req("foo>=1.2") """ - assert req + if not req: + raise ValueError("req is required") # do not allow multiple constraints and tags - assert not any(c in req for c in ",;") + if not any(c in req for c in ",;"): + raise Exception(f"complex requirements with : or ; not supported: {req}") req = "".join(req.split()) if not any(c in req for c in comparators): return req, "", "" diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index b0295eca..6d5ffdce 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -559,7 +558,8 @@ def download(self, dest_dir=THIRDPARTY_DIR): Download this distribution into `dest_dir` directory. Return the fetched filename. """ - assert self.filename + if not self.filename: + raise ValueError(f"self.filename has no value but is required: {self.filename!r}") if TRACE_DEEP: print( f"Fetching distribution of {self.name}=={self.version}:", @@ -829,10 +829,9 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): urls = LinksRepository.from_url( use_cached_index=use_cached_index).links errors = [] - extra_lic_names = [l.get("file") - for l in self.extra_data.get("licenses", {})] + extra_lic_names = [lic.get("file") for lic in self.extra_data.get("licenses", {})] extra_lic_names += [self.extra_data.get("license_file")] - extra_lic_names = [ln for ln in extra_lic_names if ln] + extra_lic_names = [eln for eln in extra_lic_names if eln] lic_names = [f"{key}.LICENSE" for key in self.get_license_keys()] for filename in lic_names + extra_lic_names: floc = os.path.join(dest_dir, filename) @@ -853,7 +852,7 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): if TRACE: print(f"Fetched license from remote: {lic_url}") - except: + except Exception: try: # try licensedb second lic_url = f"{LICENSEDB_API_URL}/{filename}" @@ -866,8 +865,9 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): if TRACE: print(f"Fetched license from licensedb: {lic_url}") - except: - msg = f'No text for license {filename} in expression "{self.license_expression}" from {self}' + except Exception: + msg = f"No text for license {filename} in expression " + f"{self.license_expression!r} from {self}" print(msg) errors.append(msg) @@ -1009,7 +1009,7 @@ def get_license_link_for_filename(filename, urls): exception if no link is found or if there are more than one link for that file name. """ - path_or_url = [l for l in urls if l.endswith(f"/{filename}")] + path_or_url = [url for url in urls if url.endswith(f"/{filename}")] if not path_or_url: raise Exception(f"Missing link to file: {filename}") if not len(path_or_url) == 1: @@ -1140,7 +1140,6 @@ def to_filename(self): @attr.attributes class Wheel(Distribution): - """ Represents a wheel file. @@ -1301,7 +1300,7 @@ def is_pure(self): def is_pure_wheel(filename): try: return Wheel.from_filename(filename).is_pure() - except: + except Exception: return False @@ -1489,8 +1488,7 @@ def dists_from_paths_or_urls(cls, paths_or_urls): ) except InvalidDistributionFilename: if TRACE_DEEP: - print( - f" Skipping invalid distribution from: {path_or_url}") + print(f" Skipping invalid distribution from: {path_or_url}") continue return dists @@ -1500,8 +1498,7 @@ def get_distributions(self): """ if self.sdist: yield self.sdist - for wheel in self.wheels: - yield wheel + yield from self.wheels def get_url_for_filename(self, filename): """ @@ -1632,7 +1629,8 @@ class PypiSimpleRepository: type=dict, default=attr.Factory(lambda: defaultdict(dict)), metadata=dict( - help="Mapping of {name: {version: PypiPackage, version: PypiPackage, etc} available in this repo" + help="Mapping of {name: {version: PypiPackage, version: PypiPackage, etc} " + "available in this repo" ), ) @@ -1647,7 +1645,8 @@ class PypiSimpleRepository: type=bool, default=False, metadata=dict( - help="If True, use any existing on-disk cached PyPI index files. Otherwise, fetch and cache." + help="If True, use any existing on-disk cached PyPI index files. " + "Otherwise, fetch and cache." ), ) @@ -1656,7 +1655,8 @@ def _get_package_versions_map(self, name): Return a mapping of all available PypiPackage version for this package name. The mapping may be empty. It is ordered by version from oldest to newest """ - assert name + if not name: + raise ValueError(f"name is required: {name!r}") normalized_name = NameVer.normalize_name(name) versions = self.packages[normalized_name] if not versions and normalized_name not in self.fetched_package_normalized_names: @@ -1713,7 +1713,7 @@ def fetch_links(self, normalized_name): ) links = collect_urls(text) # TODO: keep sha256 - links = [l.partition("#sha256=") for l in links] + links = [link.partition("#sha256=") for link in links] links = [url for url, _, _sha256 in links] return links @@ -1936,7 +1936,7 @@ def get_remote_file_content( # several redirects and that we can ignore content there. A HEAD request may # not get us this last header print(f" DOWNLOADING: {url}") - with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: + with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: # noqa: S113 status = response.status_code if status != requests.codes.ok: # NOQA if status == 429 and _delay < 20: @@ -2161,7 +2161,7 @@ def call(args, verbose=TRACE): """ if TRACE_DEEP: print("Calling:", " ".join(args)) - with subprocess.Popen( + with subprocess.Popen( # noqa: S603 args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8" ) as process: @@ -2227,7 +2227,7 @@ def download_wheels_with_pip( cli_args.extend(["--requirement", req_file]) if TRACE: - print(f"Downloading wheels using command:", " ".join(cli_args)) + print("Downloading wheels using command:", " ".join(cli_args)) existing = set(os.listdir(dest_dir)) error = False @@ -2260,7 +2260,7 @@ def download_wheels_with_pip( def check_about(dest_dir=THIRDPARTY_DIR): try: - subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) + subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) # noqa: S603 except subprocess.CalledProcessError as cpe: print() print("Invalid ABOUT files:") @@ -2312,5 +2312,5 @@ def get_license_expression(declared_licenses): return get_only_expression_from_extracted_license(declared_licenses) except ImportError: # Scancode is not installed, clean and join all the licenses - lics = [python_safe_name(l).lower() for l in declared_licenses] + lics = [python_safe_name(lic).lower() for lic in declared_licenses] return " AND ".join(lics).lower() From 092f545f5b87442ae22884cb4d5381883343a1c2 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 21:42:03 +0100 Subject: [PATCH 019/105] Format code Signed-off-by: Philippe Ombredanne --- etc/scripts/check_thirdparty.py | 3 +- etc/scripts/fetch_thirdparty.py | 26 ++++----- etc/scripts/gen_pypi_simple.py | 4 +- etc/scripts/utils_dejacode.py | 15 +++--- etc/scripts/utils_requirements.py | 9 ++-- etc/scripts/utils_thirdparty.py | 90 +++++++++++-------------------- 6 files changed, 50 insertions(+), 97 deletions(-) diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index 62dbb14f..1aa4e28a 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -16,8 +16,7 @@ @click.option( "-d", "--dest", - type=click.Path(exists=True, readable=True, - path_type=str, file_okay=False), + type=click.Path(exists=True, readable=True, path_type=str, file_okay=False), required=True, help="Path to the thirdparty directory to check.", ) diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index 30d376c4..c2246837 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -55,8 +55,7 @@ "-d", "--dest", "dest_dir", - type=click.Path(exists=True, readable=True, - path_type=str, file_okay=False), + type=click.Path(exists=True, readable=True, path_type=str, file_okay=False), metavar="DIR", default=utils_thirdparty.THIRDPARTY_DIR, show_default=True, @@ -121,7 +120,7 @@ show_default=False, multiple=True, help="Package name(s) that come only in sdist format (no wheels). " - "The command will not fail and exit if no wheel exists for these names", + "The command will not fail and exit if no wheel exists for these names", ) @click.option( "--wheel-only", @@ -132,7 +131,7 @@ show_default=False, multiple=True, help="Package name(s) that come only in wheel format (no sdist). " - "The command will not fail and exit if no sdist exists for these names", + "The command will not fail and exit if no sdist exists for these names", ) @click.option( "--no-dist", @@ -143,7 +142,7 @@ show_default=False, multiple=True, help="Package name(s) that do not come either in wheel or sdist format. " - "The command will not fail and exit if no distribution exists for these names", + "The command will not fail and exit if no distribution exists for these names", ) @click.help_option("-h", "--help") def fetch_thirdparty( @@ -225,8 +224,7 @@ def fetch_thirdparty( environments = None if wheels: evts = itertools.product(python_versions, operating_systems) - environments = [utils_thirdparty.Environment.from_pyver_and_os( - pyv, os) for pyv, os in evts] + environments = [utils_thirdparty.Environment.from_pyver_and_os(pyv, os) for pyv, os in evts] # Collect PyPI repos repos = [] @@ -250,7 +248,6 @@ def fetch_thirdparty( print(f"Processing: {name} @ {version}") if wheels: for environment in environments: - if TRACE: print(f" ==> Fetching wheel for envt: {environment}") @@ -262,14 +259,11 @@ def fetch_thirdparty( repos=repos, ) if not fetched: - wheels_or_sdist_not_found[f"{name}=={version}"].append( - environment) + wheels_or_sdist_not_found[f"{name}=={version}"].append(environment) if TRACE: print(f" NOT FOUND") - if (sdists or - (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only) - ): + if sdists or (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only): if TRACE: print(f" ==> Fetching sdist: {name}=={version}") @@ -292,8 +286,7 @@ def fetch_thirdparty( sdist_missing = sdists and "sdist" in dists and not name in wheel_only if sdist_missing: mia.append(f"SDist missing: {nv} {dists}") - wheels_missing = wheels and any( - d for d in dists if d != "sdist") and not name in sdist_only + wheels_missing = wheels and any(d for d in dists if d != "sdist") and not name in sdist_only if wheels_missing: mia.append(f"Wheels missing: {nv} {dists}") @@ -303,8 +296,7 @@ def fetch_thirdparty( raise Exception(mia) print(f"==> FETCHING OR CREATING ABOUT AND LICENSE FILES") - utils_thirdparty.fetch_abouts_and_licenses( - dest_dir=dest_dir, use_cached_index=use_cached_index) + utils_thirdparty.fetch_abouts_and_licenses(dest_dir=dest_dir, use_cached_index=use_cached_index) utils_thirdparty.clean_about_files(dest_dir=dest_dir) # check for problems diff --git a/etc/scripts/gen_pypi_simple.py b/etc/scripts/gen_pypi_simple.py index 214d90dc..cfe68e67 100644 --- a/etc/scripts/gen_pypi_simple.py +++ b/etc/scripts/gen_pypi_simple.py @@ -69,7 +69,6 @@ def get_package_name_from_filename(filename): raise InvalidDistributionFilename(filename) elif filename.endswith(wheel_ext): - wheel_info = get_wheel_from_filename(filename) if not wheel_info: @@ -200,11 +199,10 @@ def build_pypi_index(directory, base_url="https://thirdparty.aboutcode.org/pypi" simple_html_index = [ "", "PyPI Simple Index", - '' '', + '', ] for pkg_file in directory.iterdir(): - pkg_filename = pkg_file.name if ( diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index c71543f6..cd39cda3 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -32,8 +32,7 @@ def can_do_api_calls(): if not DEJACODE_API_KEY and DEJACODE_API_URL: - print( - "DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing") + print("DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing") return False else: return True @@ -68,8 +67,7 @@ def get_package_data(distribution): return results[0] elif len_results > 1: - print( - f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}") + print(f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}") else: print("Could not find package:", distribution.download_url) @@ -150,12 +148,11 @@ def find_latest_dejacode_package(distribution): # there was no exact match, find the latest version # TODO: consider the closest version rather than the latest # or the version that has the best data - with_versions = [(packaging_version.parse(p["version"]), p) - for p in packages] + with_versions = [(packaging_version.parse(p["version"]), p) for p in packages] with_versions = sorted(with_versions) latest_version, latest_package_version = sorted(with_versions)[-1] print( - f"Found DejaCode latest version: {latest_version} " f"for dist: {distribution.package_url}", + f"Found DejaCode latest version: {latest_version} for dist: {distribution.package_url}", ) return latest_package_version @@ -181,7 +178,7 @@ def create_dejacode_package(distribution): } fields_to_carry_over = [ - "download_url" "type", + "download_urltype", "namespace", "name", "version", @@ -209,5 +206,5 @@ def create_dejacode_package(distribution): if response.status_code != 201: raise Exception(f"Error, cannot create package for: {distribution}") - print(f'New Package created at: {new_package_data["absolute_url"]}') + print(f"New Package created at: {new_package_data['absolute_url']}") return new_package_data diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index a9ac2235..167bc9f5 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -106,8 +106,7 @@ def lock_dev_requirements( all_req_nvs = get_required_name_versions(all_req_lines) dev_only_req_nvs = {n: v for n, v in all_req_nvs if n not in main_names} - new_reqs = "\n".join( - f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items())) + new_reqs = "\n".join(f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items())) with open(dev_requirements_file, "w") as fo: fo.write(new_reqs) @@ -118,12 +117,10 @@ def get_installed_reqs(site_packages_dir): as a text. """ if not os.path.exists(site_packages_dir): - raise Exception( - f"site_packages directory: {site_packages_dir!r} does not exists") + raise Exception(f"site_packages directory: {site_packages_dir!r} does not exists") # Also include these packages in the output with --all: wheel, distribute, # setuptools, pip - args = ["pip", "freeze", "--exclude-editable", - "--all", "--path", site_packages_dir] + args = ["pip", "freeze", "--exclude-editable", "--all", "--path", site_packages_dir] return subprocess.check_output(args, encoding="utf-8") # noqa: S603 diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index 6d5ffdce..4ea1babb 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -243,11 +243,9 @@ def download_wheel(name, version, environment, dest_dir=THIRDPARTY_DIR, repos=tu package = repo.get_package_version(name=name, version=version) if not package: if TRACE_DEEP: - print( - f" download_wheel: No package in {repo.index_url} for {name}=={version}") + print(f" download_wheel: No package in {repo.index_url} for {name}=={version}") continue - supported_wheels = list( - package.get_supported_wheels(environment=environment)) + supported_wheels = list(package.get_supported_wheels(environment=environment)) if not supported_wheels: if TRACE_DEEP: print( @@ -291,8 +289,7 @@ def download_sdist(name, version, dest_dir=THIRDPARTY_DIR, repos=tuple()): if not package: if TRACE_DEEP: - print( - f" download_sdist: No package in {repo.index_url} for {name}=={version}") + print(f" download_sdist: No package in {repo.index_url} for {name}=={version}") continue sdist = package.sdist if not sdist: @@ -301,8 +298,7 @@ def download_sdist(name, version, dest_dir=THIRDPARTY_DIR, repos=tuple()): continue if TRACE_DEEP: - print( - f" download_sdist: Getting sdist from index (or cache): {sdist.download_url}") + print(f" download_sdist: Getting sdist from index (or cache): {sdist.download_url}") fetched_sdist_filename = package.sdist.download(dest_dir=dest_dir) if fetched_sdist_filename: @@ -357,7 +353,6 @@ def sorted(cls, namevers): @attr.attributes class Distribution(NameVer): - # field names that can be updated from another Distribution or mapping updatable_fields = [ "license_expression", @@ -535,8 +530,7 @@ def get_best_download_url(self, repos=tuple()): repos = DEFAULT_PYPI_REPOS for repo in repos: - package = repo.get_package_version( - name=self.name, version=self.version) + package = repo.get_package_version(name=self.name, version=self.version) if not package: if TRACE: print( @@ -776,8 +770,7 @@ def load_remote_about_data(self): if notice_text: about_data["notice_text"] = notice_text except RemoteNotFetchedException: - print( - f"Failed to fetch NOTICE file: {self.notice_download_url}") + print(f"Failed to fetch NOTICE file: {self.notice_download_url}") return self.load_about_data(about_data) def get_checksums(self, dest_dir=THIRDPARTY_DIR): @@ -826,8 +819,7 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): Fetch license files if missing in `dest_dir`. Return True if license files were fetched. """ - urls = LinksRepository.from_url( - use_cached_index=use_cached_index).links + urls = LinksRepository.from_url(use_cached_index=use_cached_index).links errors = [] extra_lic_names = [lic.get("file") for lic in self.extra_data.get("licenses", {})] extra_lic_names += [self.extra_data.get("license_file")] @@ -840,8 +832,7 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): try: # try remotely first - lic_url = get_license_link_for_filename( - filename=filename, urls=urls) + lic_url = get_license_link_for_filename(filename=filename, urls=urls) fetch_and_save( path_or_url=lic_url, @@ -919,8 +910,7 @@ def load_pkginfo_data(self, dest_dir=THIRDPARTY_DIR): c for c in classifiers if c.startswith("License") ] license_expression = get_license_expression(declared_license) - other_classifiers = [ - c for c in classifiers if not c.startswith("License")] + other_classifiers = [c for c in classifiers if not c.startswith("License")] holder = raw_data["Author"] holder_contact = raw_data["Author-email"] @@ -962,8 +952,7 @@ def update(self, data, overwrite=False, keep_extra=True): package_url = data.get("package_url") if package_url: purl_from_data = packageurl.PackageURL.from_string(package_url) - purl_from_self = packageurl.PackageURL.from_string( - self.package_url) + purl_from_self = packageurl.PackageURL.from_string(self.package_url) if purl_from_data != purl_from_self: print( f"Invalid dist update attempt, no same same purl with dist: " @@ -1013,8 +1002,7 @@ def get_license_link_for_filename(filename, urls): if not path_or_url: raise Exception(f"Missing link to file: {filename}") if not len(path_or_url) == 1: - raise Exception( - f"Multiple links to file: {filename}: \n" + "\n".join(path_or_url)) + raise Exception(f"Multiple links to file: {filename}: \n" + "\n".join(path_or_url)) return path_or_url[0] @@ -1102,7 +1090,6 @@ def get_sdist_name_ver_ext(filename): @attr.attributes class Sdist(Distribution): - extension = attr.ib( repr=False, type=str, @@ -1407,8 +1394,7 @@ def packages_from_dir(cls, directory): """ base = os.path.abspath(directory) - paths = [os.path.join(base, f) - for f in os.listdir(base) if f.endswith(EXTENSIONS)] + paths = [os.path.join(base, f) for f in os.listdir(base) if f.endswith(EXTENSIONS)] if TRACE_ULTRA_DEEP: print("packages_from_dir: paths:", paths) @@ -1469,8 +1455,7 @@ def dists_from_paths_or_urls(cls, paths_or_urls): dists = [] if TRACE_ULTRA_DEEP: print(" ###paths_or_urls:", paths_or_urls) - installable = [f for f in paths_or_urls if f.endswith( - EXTENSIONS_INSTALLABLE)] + installable = [f for f in paths_or_urls if f.endswith(EXTENSIONS_INSTALLABLE)] for path_or_url in installable: try: dist = Distribution.from_path_or_url(path_or_url) @@ -1536,8 +1521,7 @@ class Environment: implementation = attr.ib( type=str, default="cp", - metadata=dict( - help="Python implementation supported by this environment."), + metadata=dict(help="Python implementation supported by this environment."), repr=False, ) @@ -1551,8 +1535,7 @@ class Environment: platforms = attr.ib( type=list, default=attr.Factory(list), - metadata=dict( - help="List of platform tags supported by this environment."), + metadata=dict(help="List of platform tags supported by this environment."), repr=False, ) @@ -1637,8 +1620,7 @@ class PypiSimpleRepository: fetched_package_normalized_names = attr.ib( type=set, default=attr.Factory(set), - metadata=dict( - help="A set of already fetched package normalized names."), + metadata=dict(help="A set of already fetched package normalized names."), ) use_cached_index = attr.ib( @@ -1671,12 +1653,10 @@ def _get_package_versions_map(self, name): self.packages[normalized_name] = versions except RemoteNotFetchedException as e: if TRACE: - print( - f"failed to fetch package name: {name} from: {self.index_url}:\n{e}") + print(f"failed to fetch package name: {name} from: {self.index_url}:\n{e}") if not versions and TRACE: - print( - f"WARNING: package {name} not found in repo: {self.index_url}") + print(f"WARNING: package {name} not found in repo: {self.index_url}") return versions @@ -1861,8 +1841,7 @@ def get(self, path_or_url, as_text=True, force=False): if force or not os.path.exists(cached): if TRACE_DEEP: print(f" FILE CACHE MISS: {path_or_url}") - content = get_file_content( - path_or_url=path_or_url, as_text=as_text) + content = get_file_content(path_or_url=path_or_url, as_text=as_text) wmode = "w" if as_text else "wb" with open(cached, wmode) as fo: fo.write(content) @@ -1884,8 +1863,7 @@ def get_file_content(path_or_url, as_text=True): if path_or_url.startswith("https://"): if TRACE_DEEP: print(f"Fetching: {path_or_url}") - _headers, content = get_remote_file_content( - url=path_or_url, as_text=as_text) + _headers, content = get_remote_file_content(url=path_or_url, as_text=as_text) return content elif path_or_url.startswith("file://") or ( @@ -1936,7 +1914,7 @@ def get_remote_file_content( # several redirects and that we can ignore content there. A HEAD request may # not get us this last header print(f" DOWNLOADING: {url}") - with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: # noqa: S113 + with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: # noqa: S113 status = response.status_code if status != requests.codes.ok: # NOQA if status == 429 and _delay < 20: @@ -1951,8 +1929,7 @@ def get_remote_file_content( ) else: - raise RemoteNotFetchedException( - f"Failed HTTP request from {url} with {status}") + raise RemoteNotFetchedException(f"Failed HTTP request from {url} with {status}") if headers_only: return response.headers, None @@ -2043,8 +2020,7 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files( - dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) continue # lets try to get from another dist of the same local package @@ -2056,8 +2032,7 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files( - dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) continue # try to get another version of the same package that is not our version @@ -2068,8 +2043,7 @@ def get_other_dists(_package, _dist): ] other_local_version = other_local_packages and other_local_packages[-1] if other_local_version: - latest_local_dists = list( - other_local_version.get_distributions()) + latest_local_dists = list(other_local_version.get_distributions()) for latest_local_dist in latest_local_dists: latest_local_dist.load_about_data(dest_dir=dest_dir) if not latest_local_dist.has_key_metadata(): @@ -2095,8 +2069,7 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files( - dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) continue # try to get a latest version of the same package that is not our version @@ -2137,8 +2110,7 @@ def get_other_dists(_package, _dist): # if local_dist.has_key_metadata() or not local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir) - lic_errs = local_dist.fetch_license_files( - dest_dir, use_cached_index=use_cached_index) + lic_errs = local_dist.fetch_license_files(dest_dir, use_cached_index=use_cached_index) if not local_dist.has_key_metadata(): print(f"Unable to add essential ABOUT data for: {local_dist}") @@ -2161,10 +2133,9 @@ def call(args, verbose=TRACE): """ if TRACE_DEEP: print("Calling:", " ".join(args)) - with subprocess.Popen( # noqa: S603 + with subprocess.Popen( # noqa: S603 args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8" ) as process: - stdouts = [] while True: line = process.stdout.readline() @@ -2260,7 +2231,7 @@ def download_wheels_with_pip( def check_about(dest_dir=THIRDPARTY_DIR): try: - subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) # noqa: S603 + subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) # noqa: S603 except subprocess.CalledProcessError as cpe: print() print("Invalid ABOUT files:") @@ -2286,8 +2257,7 @@ def find_problems( for dist in package.get_distributions(): dist.load_about_data(dest_dir=dest_dir) - abpth = os.path.abspath(os.path.join( - dest_dir, dist.about_filename)) + abpth = os.path.abspath(os.path.join(dest_dir, dist.about_filename)) if not dist.has_key_metadata(): print(f" Missing key ABOUT data in file://{abpth}") if "classifiers" in dist.extra_data: From d05665ad44a50b71f66b974ad24c81f7443e8180 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:02:19 +0100 Subject: [PATCH 020/105] Apply cosmetic refactorings Signed-off-by: Philippe Ombredanne --- docs/source/conf.py | 3 ++- etc/scripts/check_thirdparty.py | 4 +--- etc/scripts/fetch_thirdparty.py | 17 ++++++++--------- etc/scripts/gen_pypi_simple.py | 15 +++++++-------- etc/scripts/gen_requirements.py | 4 ++-- etc/scripts/gen_requirements_dev.py | 4 ++-- .../test_utils_pip_compatibility_tags.py | 9 +++++---- etc/scripts/utils_dejacode.py | 9 +++++---- etc/scripts/utils_pip_compatibility_tags.py | 8 +++++--- etc/scripts/utils_requirements.py | 3 +-- etc/scripts/utils_thirdparty.py | 3 ++- 11 files changed, 40 insertions(+), 39 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8c88fa2c..8aad8294 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -94,7 +94,8 @@ html_show_sphinx = True # Define CSS and HTML abbreviations used in .rst files. These are examples. -# .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text` +# .. role:: is used to refer to styles defined in _static/theme_overrides.css +# and is used like this: :red:`text` rst_prolog = """ .. |psf| replace:: Python Software Foundation diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index 1aa4e28a..bb8347a5 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -41,8 +40,7 @@ def check_thirdparty_dir( """ Check a thirdparty directory for problems and print these on screen. """ - # check for problems - print(f"==> CHECK FOR PROBLEMS") + print("==> CHECK FOR PROBLEMS") utils_thirdparty.find_problems( dest_dir=dest, report_missing_sources=sdists, diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index c2246837..76a19a60 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -10,7 +9,6 @@ # import itertools -import os import sys from collections import defaultdict @@ -109,7 +107,8 @@ @click.option( "--use-cached-index", is_flag=True, - help="Use on disk cached PyPI indexes list of packages and versions and do not refetch if present.", + help="Use on disk cached PyPI indexes list of packages and versions and " + "do not refetch if present.", ) @click.option( "--sdist-only", @@ -261,7 +260,7 @@ def fetch_thirdparty( if not fetched: wheels_or_sdist_not_found[f"{name}=={version}"].append(environment) if TRACE: - print(f" NOT FOUND") + print(" NOT FOUND") if sdists or (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only): if TRACE: @@ -276,17 +275,17 @@ def fetch_thirdparty( if not fetched: wheels_or_sdist_not_found[f"{name}=={version}"].append("sdist") if TRACE: - print(f" NOT FOUND") + print(" NOT FOUND") mia = [] for nv, dists in wheels_or_sdist_not_found.items(): name, _, version = nv.partition("==") if name in no_dist: continue - sdist_missing = sdists and "sdist" in dists and not name in wheel_only + sdist_missing = sdists and "sdist" in dists and name not in wheel_only if sdist_missing: mia.append(f"SDist missing: {nv} {dists}") - wheels_missing = wheels and any(d for d in dists if d != "sdist") and not name in sdist_only + wheels_missing = wheels and any(d for d in dists if d != "sdist") and name not in sdist_only if wheels_missing: mia.append(f"Wheels missing: {nv} {dists}") @@ -295,12 +294,12 @@ def fetch_thirdparty( print(m) raise Exception(mia) - print(f"==> FETCHING OR CREATING ABOUT AND LICENSE FILES") + print("==> FETCHING OR CREATING ABOUT AND LICENSE FILES") utils_thirdparty.fetch_abouts_and_licenses(dest_dir=dest_dir, use_cached_index=use_cached_index) utils_thirdparty.clean_about_files(dest_dir=dest_dir) # check for problems - print(f"==> CHECK FOR PROBLEMS") + print("==> CHECK FOR PROBLEMS") utils_thirdparty.find_problems( dest_dir=dest_dir, report_missing_sources=sdists, diff --git a/etc/scripts/gen_pypi_simple.py b/etc/scripts/gen_pypi_simple.py index cfe68e67..89d06265 100644 --- a/etc/scripts/gen_pypi_simple.py +++ b/etc/scripts/gen_pypi_simple.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # SPDX-License-Identifier: BSD-2-Clause-Views AND MIT # Copyright (c) 2010 David Wolever . All rights reserved. @@ -132,7 +131,7 @@ def build_links_package_index(packages_by_package_name, base_url): Return an HTML document as string which is a links index of all packages """ document = [] - header = f""" + header = """ Links for all packages @@ -177,13 +176,13 @@ def simple_index_entry(self, base_url): def build_pypi_index(directory, base_url="https://thirdparty.aboutcode.org/pypi"): """ - Using a ``directory`` directory of wheels and sdists, create the a PyPI - simple directory index at ``directory``/simple/ populated with the proper - PyPI simple index directory structure crafted using symlinks. + Create the a PyPI simple directory index using a ``directory`` directory of wheels and sdists in + the direvctory at ``directory``/simple/ populated with the proper PyPI simple index directory + structure crafted using symlinks. - WARNING: The ``directory``/simple/ directory is removed if it exists. - NOTE: in addition to the a PyPI simple index.html there is also a links.html - index file generated which is suitable to use with pip's --find-links + WARNING: The ``directory``/simple/ directory is removed if it exists. NOTE: in addition to the a + PyPI simple index.html there is also a links.html index file generated which is suitable to use + with pip's --find-links """ directory = Path(directory) diff --git a/etc/scripts/gen_requirements.py b/etc/scripts/gen_requirements.py index 2b65ae80..1b879442 100644 --- a/etc/scripts/gen_requirements.py +++ b/etc/scripts/gen_requirements.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -34,7 +33,8 @@ def gen_requirements(): type=pathlib.Path, required=True, metavar="DIR", - help="Path to the 'site-packages' directory where wheels are installed such as lib/python3.6/site-packages", + help="Path to the 'site-packages' directory where wheels are installed " + "such as lib/python3.12/site-packages", ) parser.add_argument( "-r", diff --git a/etc/scripts/gen_requirements_dev.py b/etc/scripts/gen_requirements_dev.py index 5db1c48e..85482056 100644 --- a/etc/scripts/gen_requirements_dev.py +++ b/etc/scripts/gen_requirements_dev.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -36,7 +35,8 @@ def gen_dev_requirements(): type=pathlib.Path, required=True, metavar="DIR", - help='Path to the "site-packages" directory where wheels are installed such as lib/python3.6/site-packages', + help="Path to the 'site-packages' directory where wheels are installed " + "such as lib/python3.12/site-packages", ) parser.add_argument( "-d", diff --git a/etc/scripts/test_utils_pip_compatibility_tags.py b/etc/scripts/test_utils_pip_compatibility_tags.py index a33b8b38..de4b7066 100644 --- a/etc/scripts/test_utils_pip_compatibility_tags.py +++ b/etc/scripts/test_utils_pip_compatibility_tags.py @@ -1,4 +1,5 @@ -"""Generate and work with PEP 425 Compatibility Tags. +""" +Generate and work with PEP 425 Compatibility Tags. copied from pip-20.3.1 pip/tests/unit/test_utils_compatibility_tags.py download_url: https://raw.githubusercontent.com/pypa/pip/20.3.1/tests/unit/test_utils_compatibility_tags.py @@ -50,7 +51,7 @@ def test_version_info_to_nodot(version_info, expected): assert actual == expected -class Testcompatibility_tags(object): +class Testcompatibility_tags: def mock_get_config_var(self, **kwd): """ Patch sysconfig.get_config_var for arbitrary keys. @@ -81,7 +82,7 @@ def test_no_hyphen_tag(self): assert "-" not in tag.platform -class TestManylinux2010Tags(object): +class TestManylinux2010Tags: @pytest.mark.parametrize( "manylinux2010,manylinux1", [ @@ -104,7 +105,7 @@ def test_manylinux2010_implies_manylinux1(self, manylinux2010, manylinux1): assert arches[:2] == [manylinux2010, manylinux1] -class TestManylinux2014Tags(object): +class TestManylinux2014Tags: @pytest.mark.parametrize( "manylinuxA,manylinuxB", [ diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index cd39cda3..b6bff518 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -25,7 +24,7 @@ DEJACODE_API_URL_PACKAGES = f"{DEJACODE_API_URL}packages/" DEJACODE_API_HEADERS = { - "Authorization": "Token {}".format(DEJACODE_API_KEY), + "Authorization": f"Token {DEJACODE_API_KEY}", "Accept": "application/json; indent=4", } @@ -50,6 +49,7 @@ def fetch_dejacode_packages(params): DEJACODE_API_URL_PACKAGES, params=params, headers=DEJACODE_API_HEADERS, + timeout=10, ) return response.json()["results"] @@ -93,7 +93,7 @@ def update_with_dejacode_about_data(distribution): if package_data: package_api_url = package_data["api_url"] about_url = f"{package_api_url}about" - response = requests.get(about_url, headers=DEJACODE_API_HEADERS) + response = requests.get(about_url, headers=DEJACODE_API_HEADERS, timeout=10) # note that this is YAML-formatted about_text = response.json()["about_data"] about_data = saneyaml.load(about_text) @@ -113,7 +113,7 @@ def fetch_and_save_about_files(distribution, dest_dir="thirdparty"): if package_data: package_api_url = package_data["api_url"] about_url = f"{package_api_url}about_files" - response = requests.get(about_url, headers=DEJACODE_API_HEADERS) + response = requests.get(about_url, headers=DEJACODE_API_HEADERS, timeout=10) about_zip = response.content with io.BytesIO(about_zip) as zf: with zipfile.ZipFile(zf) as zi: @@ -201,6 +201,7 @@ def create_dejacode_package(distribution): DEJACODE_API_URL_PACKAGES, data=new_package_payload, headers=DEJACODE_API_HEADERS, + timeout=10, ) new_package_data = response.json() if response.status_code != 201: diff --git a/etc/scripts/utils_pip_compatibility_tags.py b/etc/scripts/utils_pip_compatibility_tags.py index de0ac95d..dd954bca 100644 --- a/etc/scripts/utils_pip_compatibility_tags.py +++ b/etc/scripts/utils_pip_compatibility_tags.py @@ -1,4 +1,5 @@ -"""Generate and work with PEP 425 Compatibility Tags. +""" +Generate and work with PEP 425 Compatibility Tags. copied from pip-20.3.1 pip/_internal/utils/compatibility_tags.py download_url: https://github.com/pypa/pip/blob/20.3.1/src/pip/_internal/utils/compatibility_tags.py @@ -130,7 +131,7 @@ def _get_custom_interpreter(implementation=None, version=None): implementation = interpreter_name() if version is None: version = interpreter_version() - return "{}{}".format(implementation, version) + return f"{implementation}{version}" def get_supported( @@ -140,7 +141,8 @@ def get_supported( abis=None, # type: Optional[List[str]] ): # type: (...) -> List[Tag] - """Return a list of supported tags for each version specified in + """ + Return a list of supported tags for each version specified in `versions`. :param version: a string version, of the form "33" or "32", diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index 167bc9f5..b9b2c0e7 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -40,7 +39,7 @@ def get_required_name_versions(requirement_lines, with_unpinned=False): req_line = req_line.strip() if not req_line or req_line.startswith("#"): continue - if req_line.startswith("-") or (not with_unpinned and not "==" in req_line): + if req_line.startswith("-") or (not with_unpinned and "==" not in req_line): print(f"Requirement line is not supported: ignored: {req_line}") continue yield get_required_name_version(requirement=req_line, with_unpinned=with_unpinned) diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index 4ea1babb..aafc1d69 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -91,7 +91,8 @@ - parse requirement file - create a TODO queue of requirements to process -- done: create an empty map of processed binary requirements as {package name: (list of versions/tags} +- done: create an empty map of processed binary requirements as + {package name: (list of versions/tags} - while we have package reqs in TODO queue, process one requirement: From 63bcbf507e8a25f22853d56605c107e47c3673cc Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:05:23 +0100 Subject: [PATCH 021/105] Reformat test code Signed-off-by: Philippe Ombredanne --- .gitignore | 1 + pyproject.toml | 19 +++++++++++-------- tests/test_skeleton_codestyle.py | 25 ++++++++++++++++--------- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 2d48196f..8a93c94d 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ tcl # Ignore Jupyter Notebook related temp files .ipynb_checkpoints/ +/.ruff_cache/ diff --git a/pyproject.toml b/pyproject.toml index ba55770f..a872ab3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,16 +67,17 @@ include = [ [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ select = [ - "E", # pycodestyle - "W", # pycodestyle warnings - "D", # pydocstyle - "F", # Pyflakes - "UP", # pyupgrade - "S", # flake8-bandit +# "E", # pycodestyle +# "W", # pycodestyle warnings +# "D", # pydocstyle +# "F", # Pyflakes +# "UP", # pyupgrade +# "S", # flake8-bandit "I", # isort - "C9", # McCabe complexity +# "C9", # McCabe complexity ] -ignore = ["D1", "D200", "D203", "D205", "D212", "D400", "D415"] +ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415"] + [tool.ruff.lint.isort] force-single-line = true @@ -100,3 +101,5 @@ max-complexity = 10 [tool.ruff.lint.per-file-ignores] # Place paths of files to be ignored by ruff here +"tests/*" = ["S101"] +"test_*.py" = ["S101"] diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index b4ce8c16..8cd85c94 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -7,30 +7,37 @@ # See https://aboutcode.org for more information about nexB OSS projects. # +import configparser import subprocess import unittest -import configparser - class BaseTests(unittest.TestCase): def test_skeleton_codestyle(self): - """ - This test shouldn't run in proliferated repositories. - """ + # This test shouldn't run in proliferated repositories. + + # TODO: update with switch to pyproject.toml setup_cfg = configparser.ConfigParser() setup_cfg.read("setup.cfg") if setup_cfg["metadata"]["name"] != "skeleton": return - args = "venv/bin/black --check -l 100 setup.py etc tests" + commands = [ + ["venv/bin/ruff", "--check"], + ["venv/bin/ruff", "format", "--check"], + ] + command = None try: - subprocess.check_output(args.split()) + for command in commands: + subprocess.check_output(command) # noqa: S603 except subprocess.CalledProcessError as e: print("===========================================================") print(e.output) print("===========================================================") raise Exception( - "Black style check failed; please format the code using:\n" - " python -m black -l 100 setup.py etc tests", + f"Code style and linting command check failed: {' '.join(command)!r}.\n" + "You can check and format the code using:\n" + " make valid\n", + "OR:\n ruff format\n", + " ruff check --fix\n", e.output, ) from e From 9d1393a85303bf8cf92c9a25aa5cc50bdfd080d1 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:08:25 +0100 Subject: [PATCH 022/105] Format code Signed-off-by: Philippe Ombredanne --- etc/scripts/check_thirdparty.py | 1 + etc/scripts/test_utils_pip_compatibility_tags.py | 1 + tests/test_skeleton_codestyle.py | 1 + 3 files changed, 3 insertions(+) diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index bb8347a5..65ae595e 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -11,6 +11,7 @@ import utils_thirdparty + @click.command() @click.option( "-d", diff --git a/etc/scripts/test_utils_pip_compatibility_tags.py b/etc/scripts/test_utils_pip_compatibility_tags.py index de4b7066..0e9c360a 100644 --- a/etc/scripts/test_utils_pip_compatibility_tags.py +++ b/etc/scripts/test_utils_pip_compatibility_tags.py @@ -33,6 +33,7 @@ import utils_pip_compatibility_tags + @pytest.mark.parametrize( "version_info, expected", [ diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index 8cd85c94..7135ac0d 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -11,6 +11,7 @@ import subprocess import unittest + class BaseTests(unittest.TestCase): def test_skeleton_codestyle(self): # This test shouldn't run in proliferated repositories. From f10b783b6b6fe33032a7862352ed532294efdf14 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:10:45 +0100 Subject: [PATCH 023/105] Refine ruff configuration Signed-off-by: Philippe Ombredanne --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a872ab3a..0f8bd587 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,11 +72,11 @@ select = [ # "D", # pydocstyle # "F", # Pyflakes # "UP", # pyupgrade -# "S", # flake8-bandit + "S", # flake8-bandit "I", # isort # "C9", # McCabe complexity ] -ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415"] +ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415", "I001"] [tool.ruff.lint.isort] From 1d6c8f3bb8755aa7c9d2804240c01b0161417328 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:54:01 +0100 Subject: [PATCH 024/105] Format doc Signed-off-by: Philippe Ombredanne --- AUTHORS.rst | 2 +- README.rst | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 51a19cc8..16e20464 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,3 +1,3 @@ The following organizations or individuals have contributed to this repo: -- +- diff --git a/README.rst b/README.rst index 6cbd8395..3d6cb4e1 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,6 @@ A Simple Python Project Skeleton ================================ + This repo attempts to standardize the structure of the Python-based project's repositories using modern Python packaging and configuration techniques. Using this `blog post`_ as inspiration, this repository serves as the base for @@ -47,16 +48,19 @@ Release Notes - 2022-03-04: - Synchronize configure and configure.bat scripts for sanity - Update CI operating system support with latest Azure OS images - - Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party dependencies - There are now fewer scripts. See etc/scripts/README.rst for details + - Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party + dependencies. There are now fewer scripts. See etc/scripts/README.rst for details - 2021-09-03: - - ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` and ``requirements-dev.txt`` + - ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` + and ``requirements-dev.txt`` - ``configure`` can now accept multiple options at once - Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files - Rename virtual environment directory from ``tmp`` to ``venv`` - - Update README.rst with instructions for generating ``requirements.txt`` and ``requirements-dev.txt``, - as well as collecting dependencies as wheels and generating ABOUT files for them. + - Update README.rst with instructions for generating ``requirements.txt`` + and ``requirements-dev.txt``, as well as collecting dependencies as wheels and generating + ABOUT files for them. - 2021-05-11: - - Adopt new configure scripts from ScanCode TK that allows correct configuration of which Python version is used. + - Adopt new configure scripts from ScanCode TK that allows correct configuration of which + Python version is used. From 0213c1ea9a15ab94a854b8d7af27a1a036e393f4 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:54:35 +0100 Subject: [PATCH 025/105] Run doc8 on all rst files Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 930e8010..debc404e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ + @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ *.rst valid: @echo "-> Run Ruff format" From c112f2a9c20d58e986424f5f32bd259814fc8e3f Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:55:20 +0100 Subject: [PATCH 026/105] Enable doc style checks Signed-off-by: Philippe Ombredanne --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0f8bd587..51761ff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,8 @@ include = [ "etc/**/*.py", "test/**/*.py", "doc/**/*", - "*.py" + "*.py", + "." ] [tool.ruff.lint] @@ -69,10 +70,10 @@ include = [ select = [ # "E", # pycodestyle # "W", # pycodestyle warnings -# "D", # pydocstyle + "D", # pydocstyle # "F", # Pyflakes # "UP", # pyupgrade - "S", # flake8-bandit +# "S", # flake8-bandit "I", # isort # "C9", # McCabe complexity ] From 944b6c5371bea2ce0763fd26888de6436116d185 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 00:34:26 +0100 Subject: [PATCH 027/105] Add support for new OS versions Signed-off-by: Philippe Ombredanne --- README.rst | 50 +++++++++++++++++++++++++++++++++++++++++---- azure-pipelines.yml | 36 ++++++++++++++++++++++++++++++-- 2 files changed, 80 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 6cbd8395..f848b4b3 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,11 @@ A Simple Python Project Skeleton ================================ -This repo attempts to standardize the structure of the Python-based project's -repositories using modern Python packaging and configuration techniques. -Using this `blog post`_ as inspiration, this repository serves as the base for -all new Python projects and is mergeable in existing repositories as well. + +This repo attempts to standardize the structure of the Python-based project's repositories using +modern Python packaging and configuration techniques that can then be applied to many repos. + +Using this `blog post`_ as inspiration, this repository serves as the base for all new Python +projects and is mergeable in existing repositories as well. .. _blog post: https://blog.jaraco.com/a-project-skeleton-for-python-projects/ @@ -13,6 +15,7 @@ Usage A brand new project ------------------- + .. code-block:: bash git init my-new-repo @@ -26,6 +29,7 @@ From here, you can make the appropriate changes to the files for your specific p Update an existing project --------------------------- + .. code-block:: bash cd my-existing-project @@ -41,17 +45,54 @@ More usage instructions can be found in ``docs/skeleton-usage.rst``. Release Notes ============= +- 2025-03-29: + + - Add support for beta macOS-15 + - Add support for beta windows-2025 + +- 2025-02-14: + + - Drop support for Python 3.8, add support in CI for Python 3.13, use Python 3.12 as default + version. + +- 2025-01-17: + + - Drop support for macOS-12, add support for macOS-14 + - Add support in CI for ubuntu-24.04 + - Add support in CI for Python 3.12 + +- 2024-08-20: + + - Update references of ownership from nexB to aboutcode-org + +- 2024-07-01: + + - Drop support for Python 3.8 + - Drop support for macOS-11, add support for macOS-14 + +- 2024-02-19: + + - Replace support in CI of default ubuntu-20.04 by ubuntu-22.04 + +- 2023-10-18: + + - Add dark mode support in documentation + - 2023-07-18: + - Add macOS-13 job in azure-pipelines.yml - 2022-03-04: + - Synchronize configure and configure.bat scripts for sanity - Update CI operating system support with latest Azure OS images - Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party dependencies There are now fewer scripts. See etc/scripts/README.rst for details - 2021-09-03: + - ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` and ``requirements-dev.txt`` + - ``configure`` can now accept multiple options at once - Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files - Rename virtual environment directory from ``tmp`` to ``venv`` @@ -59,4 +100,5 @@ Release Notes as well as collecting dependencies as wheels and generating ABOUT files for them. - 2021-05-11: + - Adopt new configure scripts from ScanCode TK that allows correct configuration of which Python version is used. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a220f2be..80ae45b1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,11 +26,27 @@ jobs: - template: etc/ci/azure-posix.yml parameters: job_name: macos13_cpython + image_name: macOS-13-xlarge + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + test_suites: + all: venv/bin/pytest -n 2 -vvs + + - template: etc/ci/azure-posix.yml + parameters: + job_name: macos13_cpython_arm64 image_name: macOS-13 python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs + - template: etc/ci/azure-posix.yml + parameters: + job_name: macos14_cpython + image_name: macOS-14-large + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + test_suites: + all: venv/bin/pytest -n 2 -vvs + - template: etc/ci/azure-posix.yml parameters: job_name: macos14_cpython_arm64 @@ -41,8 +57,16 @@ jobs: - template: etc/ci/azure-posix.yml parameters: - job_name: macos14_cpython - image_name: macOS-14-large + job_name: macos15_cpython + image_name: macOS-15 + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + test_suites: + all: venv/bin/pytest -n 2 -vvs + + - template: etc/ci/azure-posix.yml + parameters: + job_name: macos15_cpython_arm64 + image_name: macOS-15-large python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -62,3 +86,11 @@ jobs: python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: all: venv\Scripts\pytest -n 2 -vvs + + - template: etc/ci/azure-win.yml + parameters: + job_name: win2025_cpython + image_name: windows-2025 + python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + test_suites: + all: venv\Scripts\pytest -n 2 -vvs From 136af3912336616fbd2431a96230961517a2c356 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 12:45:32 +0200 Subject: [PATCH 028/105] Update scripts aboutcode references Signed-off-by: Philippe Ombredanne --- etc/scripts/update_skeleton.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/etc/scripts/update_skeleton.py b/etc/scripts/update_skeleton.py index 635898ba..5705fc43 100644 --- a/etc/scripts/update_skeleton.py +++ b/etc/scripts/update_skeleton.py @@ -1,11 +1,10 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # -# Copyright (c) nexB Inc. and others. All rights reserved. +# Copyright (c) nexB Inc. AboutCode, and others. All rights reserved. # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. +# See https://github.com/aboutcode-org/skeleton for support or download. # See https://aboutcode.org for more information about nexB OSS projects. # @@ -16,7 +15,7 @@ import click -NEXB_PUBLIC_REPO_NAMES=[ +ABOUTCODE_PUBLIC_REPO_NAMES=[ "aboutcode-toolkit", "ahocode", "bitcode", @@ -56,9 +55,9 @@ @click.command() @click.help_option("-h", "--help") -def update_skeleton_files(repo_names=NEXB_PUBLIC_REPO_NAMES): +def update_skeleton_files(repo_names=ABOUTCODE_PUBLIC_REPO_NAMES): """ - Update project files of nexB projects that use the skeleton + Update project files of AboutCode projects that use the skeleton This script will: - Clone the repo @@ -81,14 +80,14 @@ def update_skeleton_files(repo_names=NEXB_PUBLIC_REPO_NAMES): os.chdir(work_dir_path) # Clone repo - repo_git = f"git@github.com:nexB/{repo_name}.git" + repo_git = f"git@github.com:aboutcode-org/{repo_name}.git" subprocess.run(["git", "clone", repo_git]) # Go into cloned repo os.chdir(work_dir_path / repo_name) # Add skeleton as an origin - subprocess.run(["git", "remote", "add", "skeleton", "git@github.com:nexB/skeleton.git"]) + subprocess.run(["git", "remote", "add", "skeleton", "git@github.com:aboutcode-org/skeleton.git"]) # Fetch skeleton files subprocess.run(["git", "fetch", "skeleton"]) From b1f0ba9e0bda078abf39c3bde8d1bf525d8cec60 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 14:40:36 +0200 Subject: [PATCH 029/105] Do not format more more test data Signed-off-by: Philippe Ombredanne --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 51761ff8..961e70e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,10 +60,25 @@ include = [ "src/**/*.py", "etc/**/*.py", "test/**/*.py", + "tests/**/*.py", "doc/**/*", + "docs/**/*", "*.py", "." ] +# ignore test data and testfiles: they should never be linted nor formatted +exclude = [ +# main style + "**/tests/data/**/*", +# scancode-toolkit + "**/tests/*/data/**/*", +# dejacode, purldb + "**/tests/testfiles/**/*" +# vulnerablecode, fetchcode + "**/tests/*/test_data/**/*", + "**/tests/test_data/**/*", +] + [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ From 4f2b7e17e1cd799d18f40ffc0b1167a3333b08ac Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 14:40:36 +0200 Subject: [PATCH 030/105] Do not format more test data Signed-off-by: Philippe Ombredanne --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 51761ff8..961e70e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,10 +60,25 @@ include = [ "src/**/*.py", "etc/**/*.py", "test/**/*.py", + "tests/**/*.py", "doc/**/*", + "docs/**/*", "*.py", "." ] +# ignore test data and testfiles: they should never be linted nor formatted +exclude = [ +# main style + "**/tests/data/**/*", +# scancode-toolkit + "**/tests/*/data/**/*", +# dejacode, purldb + "**/tests/testfiles/**/*" +# vulnerablecode, fetchcode + "**/tests/*/test_data/**/*", + "**/tests/test_data/**/*", +] + [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ From da8eff0383611df60311b8bac599657450eaeb52 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 14:40:36 +0200 Subject: [PATCH 031/105] Do not format more test data Signed-off-by: Philippe Ombredanne --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 51761ff8..7d807ebf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,10 +60,25 @@ include = [ "src/**/*.py", "etc/**/*.py", "test/**/*.py", + "tests/**/*.py", "doc/**/*", + "docs/**/*", "*.py", "." ] +# ignore test data and testfiles: they should never be linted nor formatted +exclude = [ +# main style + "**/tests/data/**/*", +# scancode-toolkit + "**/tests/*/data/**/*", +# dejacode, purldb + "**/tests/testfiles/**/*", +# vulnerablecode, fetchcode + "**/tests/*/test_data/**/*", + "**/tests/test_data/**/*", +] + [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ From 4f9e936d452acc3822df8d3f932cbd7071b31d72 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 14:58:36 +0200 Subject: [PATCH 032/105] Do not treat rst as Python Signed-off-by: Philippe Ombredanne --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7d807ebf..5e16b564 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,8 +61,8 @@ include = [ "etc/**/*.py", "test/**/*.py", "tests/**/*.py", - "doc/**/*", - "docs/**/*", + "doc/**/*.py", + "docs/**/*.py", "*.py", "." ] From a2809fb28c60b54aec0c367285acacdea1cb03a8 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 16:41:57 +0200 Subject: [PATCH 033/105] Combine testing and docs extra for simplicity Signed-off-by: Philippe Ombredanne --- configure | 2 -- configure.bat | 4 ---- setup.cfg | 3 --- 3 files changed, 9 deletions(-) diff --git a/configure b/configure index 22d92885..83fd2035 100755 --- a/configure +++ b/configure @@ -30,7 +30,6 @@ CLI_ARGS=$1 # Requirement arguments passed to pip and used by default or with --dev. REQUIREMENTS="--editable . --constraint requirements.txt" DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt" -DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt" # where we create a virtualenv VIRTUALENV_DIR=venv @@ -185,7 +184,6 @@ while getopts :-: optchar; do help ) cli_help;; clean ) find_python && clean;; dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";; - docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";; esac;; esac done diff --git a/configure.bat b/configure.bat index 5b9a9d68..18b37038 100644 --- a/configure.bat +++ b/configure.bat @@ -28,7 +28,6 @@ @rem # Requirement arguments passed to pip and used by default or with --dev. set "REQUIREMENTS=--editable . --constraint requirements.txt" set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt" -set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt" @rem # where we create a virtualenv set "VIRTUALENV_DIR=venv" @@ -76,9 +75,6 @@ if not "%1" == "" ( if "%1" EQU "--dev" ( set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%" ) - if "%1" EQU "--docs" ( - set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%" - ) shift goto again ) diff --git a/setup.cfg b/setup.cfg index aaec643f..ad8e0d8f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,8 +55,6 @@ testing = pycodestyle >= 2.8.0 twine ruff - -docs = Sphinx>=5.0.2 sphinx-rtd-theme>=1.0.0 sphinx-reredirects >= 0.1.2 @@ -64,4 +62,3 @@ docs = sphinx-autobuild sphinx-rtd-dark-mode>=1.3.0 sphinx-copybutton - From c718d19c02608e6e9a43f1b7e8e469ab475ae9a5 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 16:47:10 +0200 Subject: [PATCH 034/105] Add missing docstring Signed-off-by: Philippe Ombredanne --- src/python_inspector/resolution.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python_inspector/resolution.py b/src/python_inspector/resolution.py index 87aa371f..6bfec4c3 100644 --- a/src/python_inspector/resolution.py +++ b/src/python_inspector/resolution.py @@ -170,6 +170,8 @@ def is_valid_version( def get_python_version_from_env_tag(python_version: str) -> str: """ + Return the python version extracted from an environment tag. + >>> assert get_python_version_from_env_tag("310") == "3.10" >>> assert get_python_version_from_env_tag("39") == "3.9" """ From d05613a7b59479bef0a272dd7fa623d47a5dd2d7 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 16:52:44 +0200 Subject: [PATCH 035/105] Apply cosmetic code formatting adn refactoring Signed-off-by: Philippe Ombredanne --- src/python_inspector/setup_py_live_eval.py | 4 ++-- src/python_inspector/utils_pip_compatibility_tags.py | 6 ++++-- src/python_inspector/utils_pypi.py | 2 -- tests/test_codestyle.py | 7 ++----- tests/test_setup_py_live_eval.py | 1 + tests/test_utils_pip_compatibility_tags.py | 3 ++- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/python_inspector/setup_py_live_eval.py b/src/python_inspector/setup_py_live_eval.py index 7ba51c52..e955f34e 100755 --- a/src/python_inspector/setup_py_live_eval.py +++ b/src/python_inspector/setup_py_live_eval.py @@ -29,7 +29,7 @@ def minver_error(pkg_name): """Report error about missing minimum version constraint and exit.""" print( - 'ERROR: specify minimal version of "{0}" using ' '">=" or "=="'.format(pkg_name), + 'ERROR: specify minimal version of "{0}" using ">=" or "=="'.format(pkg_name), file=sys.stderr, ) sys.exit(1) @@ -164,7 +164,7 @@ def iter_requirements(level, extras, setup_file): specs = {s.operator: s.version for s in specs._specs} if ((">=" in specs) and (">" in specs)) or (("<=" in specs) and ("<" in specs)): print( - "ERROR: Do not specify such weird constraints! " '("{0}")'.format(pkg), + 'ERROR: Do not specify such weird constraints! ("{0}")'.format(pkg), file=sys.stderr, ) sys.exit(1) diff --git a/src/python_inspector/utils_pip_compatibility_tags.py b/src/python_inspector/utils_pip_compatibility_tags.py index afe3fb3b..cb52c353 100644 --- a/src/python_inspector/utils_pip_compatibility_tags.py +++ b/src/python_inspector/utils_pip_compatibility_tags.py @@ -1,4 +1,5 @@ -"""Generate and work with PEP 425 Compatibility Tags. +""" +Generate and work with PEP 425 Compatibility Tags. copied from pip-20.3.1 pip/_internal/utils/compatibility_tags.py download_url: https://github.com/pypa/pip/blob/20.3.1/src/pip/_internal/utils/compatibility_tags.py @@ -141,7 +142,8 @@ def get_supported( abis=None, # type: Optional[List[str]] ): # type: (...) -> List[Tag] - """Return a list of supported tags for each version specified in + """ + Return a list of supported tags for each version specified in `versions`. :param version: a string version, of the form "33" or "32", diff --git a/src/python_inspector/utils_pypi.py b/src/python_inspector/utils_pypi.py index 3f3e0bb6..69e9cab0 100644 --- a/src/python_inspector/utils_pypi.py +++ b/src/python_inspector/utils_pypi.py @@ -433,7 +433,6 @@ class Link(NamedTuple): @attr.attributes class Distribution(NameVer): - """ A Distribution is either either a Wheel or Sdist and is identified by and created from its filename as well as its name and version. A Distribution is @@ -1005,7 +1004,6 @@ def to_filename(self): @attr.attributes class Wheel(Distribution): - """ Represents a wheel file. diff --git a/tests/test_codestyle.py b/tests/test_codestyle.py index b86afa9c..986cd563 100644 --- a/tests/test_codestyle.py +++ b/tests/test_codestyle.py @@ -17,12 +17,9 @@ class BaseTests(unittest.TestCase): @pytest.mark.skipif(sys.version_info[:2] == (3, 12), reason="Skipping test for Python 3.12") def test_codestyle(self): - """ - This test shouldn't run in proliferated repositories. - """ - args = "make check" + args = ["make", "check"] try: - subprocess.check_output(args.split()) + subprocess.check_output(args) except subprocess.CalledProcessError as e: print("===========================================================") print(e.output) diff --git a/tests/test_setup_py_live_eval.py b/tests/test_setup_py_live_eval.py index 92c69f4c..5166df39 100755 --- a/tests/test_setup_py_live_eval.py +++ b/tests/test_setup_py_live_eval.py @@ -8,6 +8,7 @@ # file for more details. # """Tests for `requirements-builder` module.""" + from os.path import abspath from os.path import dirname from os.path import join diff --git a/tests/test_utils_pip_compatibility_tags.py b/tests/test_utils_pip_compatibility_tags.py index a492912c..69771352 100644 --- a/tests/test_utils_pip_compatibility_tags.py +++ b/tests/test_utils_pip_compatibility_tags.py @@ -1,4 +1,5 @@ -"""Generate and work with PEP 425 Compatibility Tags. +""" +Generate and work with PEP 425 Compatibility Tags. copied from pip-20.3.1 pip/tests/unit/test_utils_compatibility_tags.py download_url: https://raw.githubusercontent.com/pypa/pip/20.3.1/tests/unit/test_utils_compatibility_tags.py From 43b96c28baaa1621d24b6f5791c6d915d2edc5f3 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 17:18:19 +0200 Subject: [PATCH 036/105] Refine checking of docs with doc8 Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- pyproject.toml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index debc404e..d21a2f95 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ *.rst + @${ACTIVATE} doc8 docs/ *.rst valid: @echo "-> Run Ruff format" diff --git a/pyproject.toml b/pyproject.toml index 5e16b564..bfb1d353 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,3 +119,10 @@ max-complexity = 10 # Place paths of files to be ignored by ruff here "tests/*" = ["S101"] "test_*.py" = ["S101"] + + +[tool.doc8] + +ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"] +max-line-length=100 +verbose=0 From eedb4c939fc7def6efef421e02b23e32a063af39 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 17:25:19 +0200 Subject: [PATCH 037/105] Format doc files Signed-off-by: Philippe Ombredanne --- CHANGELOG.rst | 3 ++- README.rst | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3d9e4e6b..8dc90fa2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -64,7 +64,8 @@ v0.9.5 v0.9.4 ------ -- Create PyPI cache location in the home directory if a cache directory cannot be made at the project root. +- Create PyPI cache location in the home directory if a cache directory cannot be made at the + project root. - Replace packaging with packvers. - Prevent duplicated package versions. diff --git a/README.rst b/README.rst index 145e9301..3abfbbce 100644 --- a/README.rst +++ b/README.rst @@ -81,19 +81,19 @@ This project is funded, supported and sponsored by: - Generous support and contributions from users like you! - the European Commission NGI programme -- the NLnet Foundation +- the NLnet Foundation - the Swiss State Secretariat for Education, Research and Innovation (SERI) - Google, including the Google Summer of Code and the Google Seasons of Doc programmes - Mercedes-Benz Group - Microsoft and Microsoft Azure - AboutCode ASBL -- nexB Inc. +- nexB Inc. -|europa| |dgconnect| +|europa| |dgconnect| -|ngi| |nlnet| +|ngi| |nlnet| |aboutcode| |nexb| From b7194c80c9425087f1d05e430bd9d6a14fb9c3a0 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 18:41:00 +0200 Subject: [PATCH 038/105] Refine doc handling * remove CI scripts and use Makefile targets instead * ensure doc8 runs quiet * add new docs-check make target to run documentation and links checks * update oudated doc for docs contribution Signed-off-by: Philippe Ombredanne --- .github/workflows/docs-ci.yml | 12 +++++------- Makefile | 10 +++++++--- docs/scripts/doc8_style_check.sh | 5 ----- docs/scripts/sphinx_build_link_check.sh | 5 ----- docs/source/conf.py | 2 +- docs/source/contribute/contrib_doc.rst | 8 ++++---- pyproject.toml | 2 -- 7 files changed, 17 insertions(+), 27 deletions(-) delete mode 100755 docs/scripts/doc8_style_check.sh delete mode 100644 docs/scripts/sphinx_build_link_check.sh diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 621de4b2..10ba5faa 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -21,14 +21,12 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Dependencies - run: pip install -e .[docs] + run: ./configure --dev - - name: Check Sphinx Documentation build minimally - working-directory: ./docs - run: sphinx-build -E -W source build + - name: Check documentation and HTML for errors and dead links + run: make docs-check - - name: Check for documentation style errors - working-directory: ./docs - run: ./scripts/doc8_style_check.sh + - name: Check documentation for style errors + run: make doc8 diff --git a/Makefile b/Makefile index d21a2f95..413399e5 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 docs/ *.rst + @${ACTIVATE} doc8 --quiet docs/ *.rst valid: @echo "-> Run Ruff format" @@ -46,6 +46,10 @@ test: docs: rm -rf docs/_build/ - @${ACTIVATE} sphinx-build docs/ docs/_build/ + @${ACTIVATE} sphinx-build docs/source docs/_build/ -.PHONY: conf dev check valid clean test docs +docs-check: + @${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/ + @${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/ + +.PHONY: conf dev check valid clean test docs docs-check diff --git a/docs/scripts/doc8_style_check.sh b/docs/scripts/doc8_style_check.sh deleted file mode 100755 index 94163239..00000000 --- a/docs/scripts/doc8_style_check.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# halt script on error -set -e -# Check for Style Code Violations -doc8 --max-line-length 100 source --ignore D000 --quiet \ No newline at end of file diff --git a/docs/scripts/sphinx_build_link_check.sh b/docs/scripts/sphinx_build_link_check.sh deleted file mode 100644 index c5426863..00000000 --- a/docs/scripts/sphinx_build_link_check.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# halt script on error -set -e -# Build locally, and then check links -sphinx-build -E -W -b linkcheck source build \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 8aad8294..056ca6ea 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,7 +18,7 @@ # -- Project information ----------------------------------------------------- project = "nexb-skeleton" -copyright = "nexB Inc. and others." +copyright = "nexB Inc., AboutCode and others." author = "AboutCode.org authors and contributors" diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index 5640db26..041b3583 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -147,7 +147,7 @@ What is Checked? ^^^^^^^^^^^^^^^^ PyCQA is an Organization for code quality tools (and plugins) for the Python programming language. -Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. +Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. What is checked: @@ -169,11 +169,11 @@ What is checked: Interspinx ---------- -ScanCode toolkit documentation uses `Intersphinx `_ +ScanCode toolkit documentation uses `Intersphinx `_ to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects. To link sections in the same documentation, standart reST labels are used. Refer -`Cross-Referencing `_ for more information. +`Cross-Referencing `_ for more information. For example:: @@ -230,7 +230,7 @@ Style Conventions for the Documentaion 1. Headings - (`Refer `_) + (`Refer `_) Normally, there are no heading levels assigned to certain characters as the structure is determined from the succession of headings. However, this convention is used in Python’s Style Guide for documenting which you may follow: diff --git a/pyproject.toml b/pyproject.toml index bfb1d353..c9e67720 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,5 @@ max-complexity = 10 [tool.doc8] - ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"] max-line-length=100 -verbose=0 From a5bcdbdd71d1542a0e9ec9b190a2e3d573c53744 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 18:49:01 +0200 Subject: [PATCH 039/105] Add twine check to release publication Signed-off-by: Philippe Ombredanne --- .github/workflows/pypi-release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index a66c9c80..cf0579a7 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -30,12 +30,15 @@ jobs: with: python-version: 3.12 - - name: Install pypa/build - run: python -m pip install build --user + - name: Install pypa/build and twine + run: python -m pip install --user build twine - name: Build a binary wheel and a source tarball run: python -m build --sdist --wheel --outdir dist/ + - name: Validate wheel and sdis for Pypi + run: python -m twine check dist/* + - name: Upload built archives uses: actions/upload-artifact@v4 with: From 4aea060a697b72b1d1a87a08da472c71a8fec8f0 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 18:49:43 +0200 Subject: [PATCH 040/105] Do not format vendored code from ScanCode Signed-off-by: Philippe Ombredanne --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index bfb1d353..0b24bef9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,8 @@ exclude = [ # vulnerablecode, fetchcode "**/tests/*/test_data/**/*", "**/tests/test_data/**/*", +# exclude vendored code from ScanCode + "src/_packagedcode", ] From a6c25fb2a2fa35311d26621b9db400ca52bd376e Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 19:16:31 +0200 Subject: [PATCH 041/105] Refine doc contribution docs Signed-off-by: Philippe Ombredanne --- docs/source/contribute/contrib_doc.rst | 119 ++++++++----------------- 1 file changed, 38 insertions(+), 81 deletions(-) diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index 041b3583..dee9296d 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -8,109 +8,59 @@ Contributing to the Documentation Setup Local Build ----------------- -To get started, create or identify a working directory on your local machine. +To get started, check out and configure the repository for development:: -Open that directory and execute the following command in a terminal session:: + git clone https://github.com/aboutcode-org/.git - git clone https://github.com/aboutcode-org/skeleton.git + cd your-repo + ./configure --dev -That will create an ``/skeleton`` directory in your working directory. -Now you can install the dependencies in a virtualenv:: - - cd skeleton - ./configure --docs +(Or use "make dev") .. note:: - In case of windows, run ``configure --docs`` instead of this. - -Now, this will install the following prerequisites: - -- Sphinx -- sphinx_rtd_theme (the format theme used by ReadTheDocs) -- docs8 (style linter) + In case of windows, run ``configure --dev``. -These requirements are already present in setup.cfg and `./configure --docs` installs them. +This will install and configure all requirements foer development including for docs development. -Now you can build the HTML documents locally:: +Now you can build the HTML documentation locally:: source venv/bin/activate - cd docs - make html - -Assuming that your Sphinx installation was successful, Sphinx should build a local instance of the -documentation .html files:: - - open build/html/index.html - -.. note:: - - In case this command did not work, for example on Ubuntu 18.04 you may get a message like “Couldn’t - get a file descriptor referring to the console”, try: - - :: - - see build/html/index.html + make docs -You now have a local build of the AboutCode documents. +This will build a local instance of the ``docs/_build`` directory:: -.. _contrib_doc_share_improvements: + open docs/_build/index.html -Share Document Improvements ---------------------------- - -Ensure that you have the latest files:: - - git pull - git status -Before commiting changes run Continious Integration Scripts locally to run tests. Refer -:ref:`doc_ci` for instructions on the same. +To validate the documentation style and content, use:: -Follow standard git procedures to upload your new and modified files. The following commands are -examples:: - - git status - git add source/index.rst - git add source/how-to-scan.rst - git status - git commit -m "New how-to document that explains how to scan" - git status - git push - git status - -The Scancode-Toolkit webhook with ReadTheDocs should rebuild the documentation after your -Pull Request is Merged. + source venv/bin/activate + make doc8 + make docs-check -Refer the `Pro Git Book `_ available online for Git tutorials -covering more complex topics on Branching, Merging, Rebasing etc. .. _doc_ci: Continuous Integration ---------------------- -The documentations are checked on every new commit through Travis-CI, so that common errors are -avoided and documentation standards are enforced. Travis-CI presently checks for these 3 aspects -of the documentation : +The documentations are checked on every new commit, so that common errors are avoided and +documentation standards are enforced. We checks for these aspects of the documentation: 1. Successful Builds (By using ``sphinx-build``) -2. No Broken Links (By Using ``link-check``) -3. Linting Errors (By Using ``Doc8``) +2. No Broken Links (By Using ``linkcheck``) +3. Linting Errors (By Using ``doc8``) -So run these scripts at your local system before creating a Pull Request:: +You myst run these scripts locally before creating a pull request:: - cd docs - ./scripts/sphinx_build_link_check.sh - ./scripts/doc8_style_check.sh + make doc8 + make check-docs -If you don't have permission to run the scripts, run:: - - chmod u+x ./scripts/doc8_style_check.sh .. _doc_style_docs8: -Style Checks Using ``Doc8`` +Style Checks Using ``doc8`` --------------------------- How To Run Style Tests @@ -118,8 +68,7 @@ How To Run Style Tests In the project root, run the following commands:: - $ cd docs - $ ./scripts/doc8_style_check.sh + make doc8 A sample output is:: @@ -143,11 +92,13 @@ A sample output is:: Now fix the errors and run again till there isn't any style error in the documentation. + What is Checked? ^^^^^^^^^^^^^^^^ PyCQA is an Organization for code quality tools (and plugins) for the Python programming language. -Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. +Doc8 is a sub-project of the same Organization. Refer this +`README `_ for more details. What is checked: @@ -164,16 +115,19 @@ What is checked: - no carriage returns (use UNIX newlines) - D004 - no newline at end of file - D005 + .. _doc_interspinx: Interspinx ---------- -ScanCode toolkit documentation uses `Intersphinx `_ +AboutCode documentation uses +`Intersphinx `_ to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects. To link sections in the same documentation, standart reST labels are used. Refer -`Cross-Referencing `_ for more information. +`Cross-Referencing `_ +for more information. For example:: @@ -223,6 +177,7 @@ Intersphinx, and you link to that label, it will create a link to the local labe For more information, refer this tutorial named `Using Intersphinx `_. + .. _doc_style_conv: Style Conventions for the Documentaion @@ -303,12 +258,14 @@ Style Conventions for the Documentaion ``rst_snippets/warning_snippets/`` and then included to eliminate redundancy, as these are frequently used in multiple files. + Converting from Markdown ------------------------ -If you want to convert a ``.md`` file to a ``.rst`` file, this `tool `_ -does it pretty well. You'd still have to clean up and check for errors as this contains a lot of -bugs. But this is definitely better than converting everything by yourself. +If you want to convert a ``.md`` file to a ``.rst`` file, this +`tool `_ does it pretty well. +You will still have to clean up and check for errors as this contains a lot of bugs. But this is +definitely better than converting everything by yourself. This will be helpful in converting GitHub wiki's (Markdown Files) to reStructuredtext files for Sphinx/ReadTheDocs hosting. From b55a22de235bbe64e91b95f1ba8b954bbac2f7b7 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Mon, 31 Mar 2025 20:32:43 +0200 Subject: [PATCH 042/105] Correct doc style Signed-off-by: Philippe Ombredanne --- docs/source/dependencies-design.rst | 6 +++--- docs/source/index.rst | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/dependencies-design.rst b/docs/source/dependencies-design.rst index 41ccd9c3..b16a3070 100644 --- a/docs/source/dependencies-design.rst +++ b/docs/source/dependencies-design.rst @@ -19,16 +19,16 @@ the dependencies of each dependency. For each dependency, there can be a version "requirement" that can be an exact version, a version expression (aka. version specifier) as defined -in `pep-0440 `__ +in `pep-0440 `__ with additional OS and environment tags and constraints as specified in -`pep-0508 `__ . +`pep-0508 `__ . In particular the required Python version of a package (or version specifier) can be set for the whole package (with the``python_requires`` attribute) or as a marker for a given direct or indirect dependency. pip processes requirement specifiers and constraints from a "requirements" file and internally resolves dependency versions recursively by querying the PyPI Python package -index repository at https://PyPI.org +index repository at https://pypi.org/ *************** Problem diff --git a/docs/source/index.rst b/docs/source/index.rst index c5ac78f0..f7b76352 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,6 +7,7 @@ Welcome to python-inspector's documentation! dependencies-design test-protocol + contribute/contrib_doc Indices and tables ================== From 68daae1e7e475a89568e353f64f29af13754ce9e Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Thu, 27 Mar 2025 14:54:31 -0700 Subject: [PATCH 043/105] Replace black and isort with ruff * Use ruff config and Make commands from scancode.io Signed-off-by: Jono Yang --- Makefile | 27 ++++++++++++--------------- pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ setup.cfg | 3 +-- 3 files changed, 50 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 94451b33..1738b20a 100644 --- a/Makefile +++ b/Makefile @@ -17,27 +17,24 @@ dev: @echo "-> Configure the development envt." ./configure --dev -isort: - @echo "-> Apply isort changes to ensure proper imports ordering" - ${VENV}/bin/isort --sl -l 100 src tests setup.py - -black: - @echo "-> Apply black code formatter" - ${VENV}/bin/black -l 100 src tests setup.py - doc8: @echo "-> Run doc8 validation" @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ -valid: isort black +valid: + @echo "-> Run Ruff format" + @${ACTIVATE} ruff format + @echo "-> Run Ruff linter" + @${ACTIVATE} ruff check --fix check: - @echo "-> Run pycodestyle (PEP8) validation" - @${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache . - @echo "-> Run isort imports ordering validation" - @${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests . - @echo "-> Run black validation" - @${ACTIVATE} black --check --check -l 100 src tests setup.py + @echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)" + @${ACTIVATE} ruff check + @echo "-> Run Ruff format validation" + @${ACTIVATE} ruff format --check + @$(MAKE) doc8 + @echo "-> Run ABOUT files validation" + @${ACTIVATE} about check etc/ clean: @echo "-> Clean the Python env" diff --git a/pyproject.toml b/pyproject.toml index cde79074..01e60fc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,3 +50,40 @@ addopts = [ "--strict-markers", "--doctest-modules" ] + +[tool.ruff] +line-length = 88 +extend-exclude = [] +target-version = "py310" + +[tool.ruff.lint] +# Rules: https://docs.astral.sh/ruff/rules/ +select = [ + "E", # pycodestyle + "W", # pycodestyle warnings + "D", # pydocstyle + "F", # Pyflakes + "UP", # pyupgrade + "S", # flake8-bandit + "I", # isort + "C9", # McCabe complexity +] +ignore = ["D1", "D203", "D205", "D212", "D400", "D415"] + +[tool.ruff.lint.isort] +force-single-line = true +sections = { django = ["django"] } +section-order = [ + "future", + "standard-library", + "django", + "third-party", + "first-party", + "local-folder", +] + +[tool.ruff.lint.mccabe] +max-complexity = 10 + +[tool.ruff.lint.per-file-ignores] +# Place paths of files to be ignored by ruff here diff --git a/setup.cfg b/setup.cfg index ef7d369b..aaec643f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,8 +54,7 @@ testing = aboutcode-toolkit >= 7.0.2 pycodestyle >= 2.8.0 twine - black - isort + ruff docs = Sphinx>=5.0.2 From 6a8c9ae144a1985b59fb69a0b2c55e32831714b8 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 00:46:06 +0100 Subject: [PATCH 044/105] Use org standard 100 line length Signed-off-by: Philippe Ombredanne --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01e60fc6..cea91bd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ addopts = [ ] [tool.ruff] -line-length = 88 +line-length = 100 extend-exclude = [] target-version = "py310" From 2fd31d54afa47418c764de0f1a30d67c7059ed7b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 08:40:28 +0100 Subject: [PATCH 045/105] Lint all common code directories Signed-off-by: Philippe Ombredanne --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index cea91bd1..9e627366 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,14 @@ addopts = [ line-length = 100 extend-exclude = [] target-version = "py310" +include = [ + "pyproject.toml", + "src/**/*.py", + "etc/**/*.py", + "test/**/*.py", + "doc/**/*", + "*.py" +] [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ From eb5fc82ab1cab8a4742a2b9028d1436956960e81 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 09:07:47 +0100 Subject: [PATCH 046/105] Remove unused targets Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1738b20a..930e8010 100644 --- a/Makefile +++ b/Makefile @@ -48,4 +48,4 @@ docs: rm -rf docs/_build/ @${ACTIVATE} sphinx-build docs/ docs/_build/ -.PHONY: conf dev check valid black isort clean test docs +.PHONY: conf dev check valid clean test docs From 529d51621c9e2af8e1ec2503044b8752c71c3ba7 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 11:03:05 +0100 Subject: [PATCH 047/105] Improve import sorting Signed-off-by: Philippe Ombredanne --- etc/scripts/check_thirdparty.py | 1 - etc/scripts/fetch_thirdparty.py | 2 +- etc/scripts/test_utils_pip_compatibility_tags.py | 3 +-- etc/scripts/utils_dejacode.py | 1 - etc/scripts/utils_pip_compatibility_tags.py | 14 ++++++-------- etc/scripts/utils_thirdparty.py | 3 +-- pyproject.toml | 7 ++++++- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index 2daded94..62dbb14f 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -12,7 +12,6 @@ import utils_thirdparty - @click.command() @click.option( "-d", diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index 3f9ff527..30d376c4 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -16,8 +16,8 @@ import click -import utils_thirdparty import utils_requirements +import utils_thirdparty TRACE = False TRACE_DEEP = False diff --git a/etc/scripts/test_utils_pip_compatibility_tags.py b/etc/scripts/test_utils_pip_compatibility_tags.py index 98187c56..a33b8b38 100644 --- a/etc/scripts/test_utils_pip_compatibility_tags.py +++ b/etc/scripts/test_utils_pip_compatibility_tags.py @@ -25,14 +25,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from unittest.mock import patch import sysconfig +from unittest.mock import patch import pytest import utils_pip_compatibility_tags - @pytest.mark.parametrize( "version_info, expected", [ diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index 652252d4..c71543f6 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -14,7 +14,6 @@ import requests import saneyaml - from packvers import version as packaging_version """ diff --git a/etc/scripts/utils_pip_compatibility_tags.py b/etc/scripts/utils_pip_compatibility_tags.py index af42a0cd..de0ac95d 100644 --- a/etc/scripts/utils_pip_compatibility_tags.py +++ b/etc/scripts/utils_pip_compatibility_tags.py @@ -27,14 +27,12 @@ import re -from packvers.tags import ( - compatible_tags, - cpython_tags, - generic_tags, - interpreter_name, - interpreter_version, - mac_platforms, -) +from packvers.tags import compatible_tags +from packvers.tags import cpython_tags +from packvers.tags import generic_tags +from packvers.tags import interpreter_name +from packvers.tags import interpreter_version +from packvers.tags import mac_platforms _osx_arch_pat = re.compile(r"(.+)_(\d+)_(\d+)_(.+)") diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index 46dc7289..b0295eca 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -25,14 +25,13 @@ import packageurl import requests import saneyaml +import utils_pip_compatibility_tags from commoncode import fileutils from commoncode.hash import multi_checksums from commoncode.text import python_safe_name from packvers import tags as packaging_tags from packvers import version as packaging_version -import utils_pip_compatibility_tags - """ Utilities to manage Python thirparty libraries source, binaries and metadata in local directories and remote repositories. diff --git a/pyproject.toml b/pyproject.toml index 9e627366..ba55770f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,10 +76,15 @@ select = [ "I", # isort "C9", # McCabe complexity ] -ignore = ["D1", "D203", "D205", "D212", "D400", "D415"] +ignore = ["D1", "D200", "D203", "D205", "D212", "D400", "D415"] [tool.ruff.lint.isort] force-single-line = true +lines-after-imports = 1 +default-section = "first-party" +known-first-party = ["src", "tests", "etc/scripts/**/*.py"] +known-third-party = ["click", "pytest"] + sections = { django = ["django"] } section-order = [ "future", From aae1a2847c0e493b0e8bea542da30dbdfb2be68e Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 21:35:16 +0100 Subject: [PATCH 048/105] Apply small code updates Signed-off-by: Philippe Ombredanne --- etc/scripts/utils_requirements.py | 20 ++++++++----- etc/scripts/utils_thirdparty.py | 48 +++++++++++++++---------------- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index 1c502390..a9ac2235 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -57,21 +57,25 @@ def get_required_name_version(requirement, with_unpinned=False): >>> assert get_required_name_version("fooA==1.2.3.DEV1") == ("fooa", "1.2.3.dev1") >>> assert get_required_name_version("foo==1.2.3", with_unpinned=False) == ("foo", "1.2.3") >>> assert get_required_name_version("foo", with_unpinned=True) == ("foo", "") - >>> assert get_required_name_version("foo>=1.2", with_unpinned=True) == ("foo", ""), get_required_name_version("foo>=1.2") + >>> expected = ("foo", ""), get_required_name_version("foo>=1.2") + >>> assert get_required_name_version("foo>=1.2", with_unpinned=True) == expected >>> try: ... assert not get_required_name_version("foo", with_unpinned=False) ... except Exception as e: ... assert "Requirement version must be pinned" in str(e) """ requirement = requirement and "".join(requirement.lower().split()) - assert requirement, f"specifier is required is empty:{requirement!r}" + if not requirement: + raise ValueError(f"specifier is required is empty:{requirement!r}") name, operator, version = split_req(requirement) - assert name, f"Name is required: {requirement}" + if not name: + raise ValueError(f"Name is required: {requirement}") is_pinned = operator == "==" if with_unpinned: version = "" else: - assert is_pinned and version, f"Requirement version must be pinned: {requirement}" + if not is_pinned and version: + raise ValueError(f"Requirement version must be pinned: {requirement}") return name, version @@ -120,7 +124,7 @@ def get_installed_reqs(site_packages_dir): # setuptools, pip args = ["pip", "freeze", "--exclude-editable", "--all", "--path", site_packages_dir] - return subprocess.check_output(args, encoding="utf-8") + return subprocess.check_output(args, encoding="utf-8") # noqa: S603 comparators = ( @@ -150,9 +154,11 @@ def split_req(req): >>> assert split_req("foo >= 1.2.3 ") == ("foo", ">=", "1.2.3"), split_req("foo >= 1.2.3 ") >>> assert split_req("foo>=1.2") == ("foo", ">=", "1.2"), split_req("foo>=1.2") """ - assert req + if not req: + raise ValueError("req is required") # do not allow multiple constraints and tags - assert not any(c in req for c in ",;") + if not any(c in req for c in ",;"): + raise Exception(f"complex requirements with : or ; not supported: {req}") req = "".join(req.split()) if not any(c in req for c in comparators): return req, "", "" diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index b0295eca..6d5ffdce 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -559,7 +558,8 @@ def download(self, dest_dir=THIRDPARTY_DIR): Download this distribution into `dest_dir` directory. Return the fetched filename. """ - assert self.filename + if not self.filename: + raise ValueError(f"self.filename has no value but is required: {self.filename!r}") if TRACE_DEEP: print( f"Fetching distribution of {self.name}=={self.version}:", @@ -829,10 +829,9 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): urls = LinksRepository.from_url( use_cached_index=use_cached_index).links errors = [] - extra_lic_names = [l.get("file") - for l in self.extra_data.get("licenses", {})] + extra_lic_names = [lic.get("file") for lic in self.extra_data.get("licenses", {})] extra_lic_names += [self.extra_data.get("license_file")] - extra_lic_names = [ln for ln in extra_lic_names if ln] + extra_lic_names = [eln for eln in extra_lic_names if eln] lic_names = [f"{key}.LICENSE" for key in self.get_license_keys()] for filename in lic_names + extra_lic_names: floc = os.path.join(dest_dir, filename) @@ -853,7 +852,7 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): if TRACE: print(f"Fetched license from remote: {lic_url}") - except: + except Exception: try: # try licensedb second lic_url = f"{LICENSEDB_API_URL}/{filename}" @@ -866,8 +865,9 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): if TRACE: print(f"Fetched license from licensedb: {lic_url}") - except: - msg = f'No text for license {filename} in expression "{self.license_expression}" from {self}' + except Exception: + msg = f"No text for license {filename} in expression " + f"{self.license_expression!r} from {self}" print(msg) errors.append(msg) @@ -1009,7 +1009,7 @@ def get_license_link_for_filename(filename, urls): exception if no link is found or if there are more than one link for that file name. """ - path_or_url = [l for l in urls if l.endswith(f"/{filename}")] + path_or_url = [url for url in urls if url.endswith(f"/{filename}")] if not path_or_url: raise Exception(f"Missing link to file: {filename}") if not len(path_or_url) == 1: @@ -1140,7 +1140,6 @@ def to_filename(self): @attr.attributes class Wheel(Distribution): - """ Represents a wheel file. @@ -1301,7 +1300,7 @@ def is_pure(self): def is_pure_wheel(filename): try: return Wheel.from_filename(filename).is_pure() - except: + except Exception: return False @@ -1489,8 +1488,7 @@ def dists_from_paths_or_urls(cls, paths_or_urls): ) except InvalidDistributionFilename: if TRACE_DEEP: - print( - f" Skipping invalid distribution from: {path_or_url}") + print(f" Skipping invalid distribution from: {path_or_url}") continue return dists @@ -1500,8 +1498,7 @@ def get_distributions(self): """ if self.sdist: yield self.sdist - for wheel in self.wheels: - yield wheel + yield from self.wheels def get_url_for_filename(self, filename): """ @@ -1632,7 +1629,8 @@ class PypiSimpleRepository: type=dict, default=attr.Factory(lambda: defaultdict(dict)), metadata=dict( - help="Mapping of {name: {version: PypiPackage, version: PypiPackage, etc} available in this repo" + help="Mapping of {name: {version: PypiPackage, version: PypiPackage, etc} " + "available in this repo" ), ) @@ -1647,7 +1645,8 @@ class PypiSimpleRepository: type=bool, default=False, metadata=dict( - help="If True, use any existing on-disk cached PyPI index files. Otherwise, fetch and cache." + help="If True, use any existing on-disk cached PyPI index files. " + "Otherwise, fetch and cache." ), ) @@ -1656,7 +1655,8 @@ def _get_package_versions_map(self, name): Return a mapping of all available PypiPackage version for this package name. The mapping may be empty. It is ordered by version from oldest to newest """ - assert name + if not name: + raise ValueError(f"name is required: {name!r}") normalized_name = NameVer.normalize_name(name) versions = self.packages[normalized_name] if not versions and normalized_name not in self.fetched_package_normalized_names: @@ -1713,7 +1713,7 @@ def fetch_links(self, normalized_name): ) links = collect_urls(text) # TODO: keep sha256 - links = [l.partition("#sha256=") for l in links] + links = [link.partition("#sha256=") for link in links] links = [url for url, _, _sha256 in links] return links @@ -1936,7 +1936,7 @@ def get_remote_file_content( # several redirects and that we can ignore content there. A HEAD request may # not get us this last header print(f" DOWNLOADING: {url}") - with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: + with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: # noqa: S113 status = response.status_code if status != requests.codes.ok: # NOQA if status == 429 and _delay < 20: @@ -2161,7 +2161,7 @@ def call(args, verbose=TRACE): """ if TRACE_DEEP: print("Calling:", " ".join(args)) - with subprocess.Popen( + with subprocess.Popen( # noqa: S603 args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8" ) as process: @@ -2227,7 +2227,7 @@ def download_wheels_with_pip( cli_args.extend(["--requirement", req_file]) if TRACE: - print(f"Downloading wheels using command:", " ".join(cli_args)) + print("Downloading wheels using command:", " ".join(cli_args)) existing = set(os.listdir(dest_dir)) error = False @@ -2260,7 +2260,7 @@ def download_wheels_with_pip( def check_about(dest_dir=THIRDPARTY_DIR): try: - subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) + subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) # noqa: S603 except subprocess.CalledProcessError as cpe: print() print("Invalid ABOUT files:") @@ -2312,5 +2312,5 @@ def get_license_expression(declared_licenses): return get_only_expression_from_extracted_license(declared_licenses) except ImportError: # Scancode is not installed, clean and join all the licenses - lics = [python_safe_name(l).lower() for l in declared_licenses] + lics = [python_safe_name(lic).lower() for lic in declared_licenses] return " AND ".join(lics).lower() From 037f9fc1b03736eeac9e0eefac3e35acc916d193 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 21:42:03 +0100 Subject: [PATCH 049/105] Format code Signed-off-by: Philippe Ombredanne --- etc/scripts/check_thirdparty.py | 3 +- etc/scripts/fetch_thirdparty.py | 26 ++++----- etc/scripts/gen_pypi_simple.py | 4 +- etc/scripts/utils_dejacode.py | 15 +++--- etc/scripts/utils_requirements.py | 9 ++-- etc/scripts/utils_thirdparty.py | 90 +++++++++++-------------------- 6 files changed, 50 insertions(+), 97 deletions(-) diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index 62dbb14f..1aa4e28a 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -16,8 +16,7 @@ @click.option( "-d", "--dest", - type=click.Path(exists=True, readable=True, - path_type=str, file_okay=False), + type=click.Path(exists=True, readable=True, path_type=str, file_okay=False), required=True, help="Path to the thirdparty directory to check.", ) diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index 30d376c4..c2246837 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -55,8 +55,7 @@ "-d", "--dest", "dest_dir", - type=click.Path(exists=True, readable=True, - path_type=str, file_okay=False), + type=click.Path(exists=True, readable=True, path_type=str, file_okay=False), metavar="DIR", default=utils_thirdparty.THIRDPARTY_DIR, show_default=True, @@ -121,7 +120,7 @@ show_default=False, multiple=True, help="Package name(s) that come only in sdist format (no wheels). " - "The command will not fail and exit if no wheel exists for these names", + "The command will not fail and exit if no wheel exists for these names", ) @click.option( "--wheel-only", @@ -132,7 +131,7 @@ show_default=False, multiple=True, help="Package name(s) that come only in wheel format (no sdist). " - "The command will not fail and exit if no sdist exists for these names", + "The command will not fail and exit if no sdist exists for these names", ) @click.option( "--no-dist", @@ -143,7 +142,7 @@ show_default=False, multiple=True, help="Package name(s) that do not come either in wheel or sdist format. " - "The command will not fail and exit if no distribution exists for these names", + "The command will not fail and exit if no distribution exists for these names", ) @click.help_option("-h", "--help") def fetch_thirdparty( @@ -225,8 +224,7 @@ def fetch_thirdparty( environments = None if wheels: evts = itertools.product(python_versions, operating_systems) - environments = [utils_thirdparty.Environment.from_pyver_and_os( - pyv, os) for pyv, os in evts] + environments = [utils_thirdparty.Environment.from_pyver_and_os(pyv, os) for pyv, os in evts] # Collect PyPI repos repos = [] @@ -250,7 +248,6 @@ def fetch_thirdparty( print(f"Processing: {name} @ {version}") if wheels: for environment in environments: - if TRACE: print(f" ==> Fetching wheel for envt: {environment}") @@ -262,14 +259,11 @@ def fetch_thirdparty( repos=repos, ) if not fetched: - wheels_or_sdist_not_found[f"{name}=={version}"].append( - environment) + wheels_or_sdist_not_found[f"{name}=={version}"].append(environment) if TRACE: print(f" NOT FOUND") - if (sdists or - (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only) - ): + if sdists or (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only): if TRACE: print(f" ==> Fetching sdist: {name}=={version}") @@ -292,8 +286,7 @@ def fetch_thirdparty( sdist_missing = sdists and "sdist" in dists and not name in wheel_only if sdist_missing: mia.append(f"SDist missing: {nv} {dists}") - wheels_missing = wheels and any( - d for d in dists if d != "sdist") and not name in sdist_only + wheels_missing = wheels and any(d for d in dists if d != "sdist") and not name in sdist_only if wheels_missing: mia.append(f"Wheels missing: {nv} {dists}") @@ -303,8 +296,7 @@ def fetch_thirdparty( raise Exception(mia) print(f"==> FETCHING OR CREATING ABOUT AND LICENSE FILES") - utils_thirdparty.fetch_abouts_and_licenses( - dest_dir=dest_dir, use_cached_index=use_cached_index) + utils_thirdparty.fetch_abouts_and_licenses(dest_dir=dest_dir, use_cached_index=use_cached_index) utils_thirdparty.clean_about_files(dest_dir=dest_dir) # check for problems diff --git a/etc/scripts/gen_pypi_simple.py b/etc/scripts/gen_pypi_simple.py index 214d90dc..cfe68e67 100644 --- a/etc/scripts/gen_pypi_simple.py +++ b/etc/scripts/gen_pypi_simple.py @@ -69,7 +69,6 @@ def get_package_name_from_filename(filename): raise InvalidDistributionFilename(filename) elif filename.endswith(wheel_ext): - wheel_info = get_wheel_from_filename(filename) if not wheel_info: @@ -200,11 +199,10 @@ def build_pypi_index(directory, base_url="https://thirdparty.aboutcode.org/pypi" simple_html_index = [ "", "PyPI Simple Index", - '' '', + '', ] for pkg_file in directory.iterdir(): - pkg_filename = pkg_file.name if ( diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index c71543f6..cd39cda3 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -32,8 +32,7 @@ def can_do_api_calls(): if not DEJACODE_API_KEY and DEJACODE_API_URL: - print( - "DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing") + print("DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing") return False else: return True @@ -68,8 +67,7 @@ def get_package_data(distribution): return results[0] elif len_results > 1: - print( - f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}") + print(f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}") else: print("Could not find package:", distribution.download_url) @@ -150,12 +148,11 @@ def find_latest_dejacode_package(distribution): # there was no exact match, find the latest version # TODO: consider the closest version rather than the latest # or the version that has the best data - with_versions = [(packaging_version.parse(p["version"]), p) - for p in packages] + with_versions = [(packaging_version.parse(p["version"]), p) for p in packages] with_versions = sorted(with_versions) latest_version, latest_package_version = sorted(with_versions)[-1] print( - f"Found DejaCode latest version: {latest_version} " f"for dist: {distribution.package_url}", + f"Found DejaCode latest version: {latest_version} for dist: {distribution.package_url}", ) return latest_package_version @@ -181,7 +178,7 @@ def create_dejacode_package(distribution): } fields_to_carry_over = [ - "download_url" "type", + "download_urltype", "namespace", "name", "version", @@ -209,5 +206,5 @@ def create_dejacode_package(distribution): if response.status_code != 201: raise Exception(f"Error, cannot create package for: {distribution}") - print(f'New Package created at: {new_package_data["absolute_url"]}') + print(f"New Package created at: {new_package_data['absolute_url']}") return new_package_data diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index a9ac2235..167bc9f5 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -106,8 +106,7 @@ def lock_dev_requirements( all_req_nvs = get_required_name_versions(all_req_lines) dev_only_req_nvs = {n: v for n, v in all_req_nvs if n not in main_names} - new_reqs = "\n".join( - f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items())) + new_reqs = "\n".join(f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items())) with open(dev_requirements_file, "w") as fo: fo.write(new_reqs) @@ -118,12 +117,10 @@ def get_installed_reqs(site_packages_dir): as a text. """ if not os.path.exists(site_packages_dir): - raise Exception( - f"site_packages directory: {site_packages_dir!r} does not exists") + raise Exception(f"site_packages directory: {site_packages_dir!r} does not exists") # Also include these packages in the output with --all: wheel, distribute, # setuptools, pip - args = ["pip", "freeze", "--exclude-editable", - "--all", "--path", site_packages_dir] + args = ["pip", "freeze", "--exclude-editable", "--all", "--path", site_packages_dir] return subprocess.check_output(args, encoding="utf-8") # noqa: S603 diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index 6d5ffdce..4ea1babb 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -243,11 +243,9 @@ def download_wheel(name, version, environment, dest_dir=THIRDPARTY_DIR, repos=tu package = repo.get_package_version(name=name, version=version) if not package: if TRACE_DEEP: - print( - f" download_wheel: No package in {repo.index_url} for {name}=={version}") + print(f" download_wheel: No package in {repo.index_url} for {name}=={version}") continue - supported_wheels = list( - package.get_supported_wheels(environment=environment)) + supported_wheels = list(package.get_supported_wheels(environment=environment)) if not supported_wheels: if TRACE_DEEP: print( @@ -291,8 +289,7 @@ def download_sdist(name, version, dest_dir=THIRDPARTY_DIR, repos=tuple()): if not package: if TRACE_DEEP: - print( - f" download_sdist: No package in {repo.index_url} for {name}=={version}") + print(f" download_sdist: No package in {repo.index_url} for {name}=={version}") continue sdist = package.sdist if not sdist: @@ -301,8 +298,7 @@ def download_sdist(name, version, dest_dir=THIRDPARTY_DIR, repos=tuple()): continue if TRACE_DEEP: - print( - f" download_sdist: Getting sdist from index (or cache): {sdist.download_url}") + print(f" download_sdist: Getting sdist from index (or cache): {sdist.download_url}") fetched_sdist_filename = package.sdist.download(dest_dir=dest_dir) if fetched_sdist_filename: @@ -357,7 +353,6 @@ def sorted(cls, namevers): @attr.attributes class Distribution(NameVer): - # field names that can be updated from another Distribution or mapping updatable_fields = [ "license_expression", @@ -535,8 +530,7 @@ def get_best_download_url(self, repos=tuple()): repos = DEFAULT_PYPI_REPOS for repo in repos: - package = repo.get_package_version( - name=self.name, version=self.version) + package = repo.get_package_version(name=self.name, version=self.version) if not package: if TRACE: print( @@ -776,8 +770,7 @@ def load_remote_about_data(self): if notice_text: about_data["notice_text"] = notice_text except RemoteNotFetchedException: - print( - f"Failed to fetch NOTICE file: {self.notice_download_url}") + print(f"Failed to fetch NOTICE file: {self.notice_download_url}") return self.load_about_data(about_data) def get_checksums(self, dest_dir=THIRDPARTY_DIR): @@ -826,8 +819,7 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): Fetch license files if missing in `dest_dir`. Return True if license files were fetched. """ - urls = LinksRepository.from_url( - use_cached_index=use_cached_index).links + urls = LinksRepository.from_url(use_cached_index=use_cached_index).links errors = [] extra_lic_names = [lic.get("file") for lic in self.extra_data.get("licenses", {})] extra_lic_names += [self.extra_data.get("license_file")] @@ -840,8 +832,7 @@ def fetch_license_files(self, dest_dir=THIRDPARTY_DIR, use_cached_index=False): try: # try remotely first - lic_url = get_license_link_for_filename( - filename=filename, urls=urls) + lic_url = get_license_link_for_filename(filename=filename, urls=urls) fetch_and_save( path_or_url=lic_url, @@ -919,8 +910,7 @@ def load_pkginfo_data(self, dest_dir=THIRDPARTY_DIR): c for c in classifiers if c.startswith("License") ] license_expression = get_license_expression(declared_license) - other_classifiers = [ - c for c in classifiers if not c.startswith("License")] + other_classifiers = [c for c in classifiers if not c.startswith("License")] holder = raw_data["Author"] holder_contact = raw_data["Author-email"] @@ -962,8 +952,7 @@ def update(self, data, overwrite=False, keep_extra=True): package_url = data.get("package_url") if package_url: purl_from_data = packageurl.PackageURL.from_string(package_url) - purl_from_self = packageurl.PackageURL.from_string( - self.package_url) + purl_from_self = packageurl.PackageURL.from_string(self.package_url) if purl_from_data != purl_from_self: print( f"Invalid dist update attempt, no same same purl with dist: " @@ -1013,8 +1002,7 @@ def get_license_link_for_filename(filename, urls): if not path_or_url: raise Exception(f"Missing link to file: {filename}") if not len(path_or_url) == 1: - raise Exception( - f"Multiple links to file: {filename}: \n" + "\n".join(path_or_url)) + raise Exception(f"Multiple links to file: {filename}: \n" + "\n".join(path_or_url)) return path_or_url[0] @@ -1102,7 +1090,6 @@ def get_sdist_name_ver_ext(filename): @attr.attributes class Sdist(Distribution): - extension = attr.ib( repr=False, type=str, @@ -1407,8 +1394,7 @@ def packages_from_dir(cls, directory): """ base = os.path.abspath(directory) - paths = [os.path.join(base, f) - for f in os.listdir(base) if f.endswith(EXTENSIONS)] + paths = [os.path.join(base, f) for f in os.listdir(base) if f.endswith(EXTENSIONS)] if TRACE_ULTRA_DEEP: print("packages_from_dir: paths:", paths) @@ -1469,8 +1455,7 @@ def dists_from_paths_or_urls(cls, paths_or_urls): dists = [] if TRACE_ULTRA_DEEP: print(" ###paths_or_urls:", paths_or_urls) - installable = [f for f in paths_or_urls if f.endswith( - EXTENSIONS_INSTALLABLE)] + installable = [f for f in paths_or_urls if f.endswith(EXTENSIONS_INSTALLABLE)] for path_or_url in installable: try: dist = Distribution.from_path_or_url(path_or_url) @@ -1536,8 +1521,7 @@ class Environment: implementation = attr.ib( type=str, default="cp", - metadata=dict( - help="Python implementation supported by this environment."), + metadata=dict(help="Python implementation supported by this environment."), repr=False, ) @@ -1551,8 +1535,7 @@ class Environment: platforms = attr.ib( type=list, default=attr.Factory(list), - metadata=dict( - help="List of platform tags supported by this environment."), + metadata=dict(help="List of platform tags supported by this environment."), repr=False, ) @@ -1637,8 +1620,7 @@ class PypiSimpleRepository: fetched_package_normalized_names = attr.ib( type=set, default=attr.Factory(set), - metadata=dict( - help="A set of already fetched package normalized names."), + metadata=dict(help="A set of already fetched package normalized names."), ) use_cached_index = attr.ib( @@ -1671,12 +1653,10 @@ def _get_package_versions_map(self, name): self.packages[normalized_name] = versions except RemoteNotFetchedException as e: if TRACE: - print( - f"failed to fetch package name: {name} from: {self.index_url}:\n{e}") + print(f"failed to fetch package name: {name} from: {self.index_url}:\n{e}") if not versions and TRACE: - print( - f"WARNING: package {name} not found in repo: {self.index_url}") + print(f"WARNING: package {name} not found in repo: {self.index_url}") return versions @@ -1861,8 +1841,7 @@ def get(self, path_or_url, as_text=True, force=False): if force or not os.path.exists(cached): if TRACE_DEEP: print(f" FILE CACHE MISS: {path_or_url}") - content = get_file_content( - path_or_url=path_or_url, as_text=as_text) + content = get_file_content(path_or_url=path_or_url, as_text=as_text) wmode = "w" if as_text else "wb" with open(cached, wmode) as fo: fo.write(content) @@ -1884,8 +1863,7 @@ def get_file_content(path_or_url, as_text=True): if path_or_url.startswith("https://"): if TRACE_DEEP: print(f"Fetching: {path_or_url}") - _headers, content = get_remote_file_content( - url=path_or_url, as_text=as_text) + _headers, content = get_remote_file_content(url=path_or_url, as_text=as_text) return content elif path_or_url.startswith("file://") or ( @@ -1936,7 +1914,7 @@ def get_remote_file_content( # several redirects and that we can ignore content there. A HEAD request may # not get us this last header print(f" DOWNLOADING: {url}") - with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: # noqa: S113 + with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response: # noqa: S113 status = response.status_code if status != requests.codes.ok: # NOQA if status == 429 and _delay < 20: @@ -1951,8 +1929,7 @@ def get_remote_file_content( ) else: - raise RemoteNotFetchedException( - f"Failed HTTP request from {url} with {status}") + raise RemoteNotFetchedException(f"Failed HTTP request from {url} with {status}") if headers_only: return response.headers, None @@ -2043,8 +2020,7 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files( - dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) continue # lets try to get from another dist of the same local package @@ -2056,8 +2032,7 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files( - dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) continue # try to get another version of the same package that is not our version @@ -2068,8 +2043,7 @@ def get_other_dists(_package, _dist): ] other_local_version = other_local_packages and other_local_packages[-1] if other_local_version: - latest_local_dists = list( - other_local_version.get_distributions()) + latest_local_dists = list(other_local_version.get_distributions()) for latest_local_dist in latest_local_dists: latest_local_dist.load_about_data(dest_dir=dest_dir) if not latest_local_dist.has_key_metadata(): @@ -2095,8 +2069,7 @@ def get_other_dists(_package, _dist): # if has key data we may look to improve later, but we can move on if local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir=dest_dir) - local_dist.fetch_license_files( - dest_dir=dest_dir, use_cached_index=use_cached_index) + local_dist.fetch_license_files(dest_dir=dest_dir, use_cached_index=use_cached_index) continue # try to get a latest version of the same package that is not our version @@ -2137,8 +2110,7 @@ def get_other_dists(_package, _dist): # if local_dist.has_key_metadata() or not local_dist.has_key_metadata(): local_dist.save_about_and_notice_files(dest_dir) - lic_errs = local_dist.fetch_license_files( - dest_dir, use_cached_index=use_cached_index) + lic_errs = local_dist.fetch_license_files(dest_dir, use_cached_index=use_cached_index) if not local_dist.has_key_metadata(): print(f"Unable to add essential ABOUT data for: {local_dist}") @@ -2161,10 +2133,9 @@ def call(args, verbose=TRACE): """ if TRACE_DEEP: print("Calling:", " ".join(args)) - with subprocess.Popen( # noqa: S603 + with subprocess.Popen( # noqa: S603 args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8" ) as process: - stdouts = [] while True: line = process.stdout.readline() @@ -2260,7 +2231,7 @@ def download_wheels_with_pip( def check_about(dest_dir=THIRDPARTY_DIR): try: - subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) # noqa: S603 + subprocess.check_output(f"venv/bin/about check {dest_dir}".split()) # noqa: S603 except subprocess.CalledProcessError as cpe: print() print("Invalid ABOUT files:") @@ -2286,8 +2257,7 @@ def find_problems( for dist in package.get_distributions(): dist.load_about_data(dest_dir=dest_dir) - abpth = os.path.abspath(os.path.join( - dest_dir, dist.about_filename)) + abpth = os.path.abspath(os.path.join(dest_dir, dist.about_filename)) if not dist.has_key_metadata(): print(f" Missing key ABOUT data in file://{abpth}") if "classifiers" in dist.extra_data: From 1189dda52570ed018f52eacd38c4990e8be8ff1a Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:02:19 +0100 Subject: [PATCH 050/105] Apply cosmetic refactorings Signed-off-by: Philippe Ombredanne --- docs/source/conf.py | 3 ++- etc/scripts/check_thirdparty.py | 4 +--- etc/scripts/fetch_thirdparty.py | 17 ++++++++--------- etc/scripts/gen_pypi_simple.py | 15 +++++++-------- etc/scripts/gen_requirements.py | 4 ++-- etc/scripts/gen_requirements_dev.py | 4 ++-- .../test_utils_pip_compatibility_tags.py | 9 +++++---- etc/scripts/utils_dejacode.py | 9 +++++---- etc/scripts/utils_pip_compatibility_tags.py | 8 +++++--- etc/scripts/utils_requirements.py | 3 +-- etc/scripts/utils_thirdparty.py | 3 ++- 11 files changed, 40 insertions(+), 39 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8c88fa2c..8aad8294 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -94,7 +94,8 @@ html_show_sphinx = True # Define CSS and HTML abbreviations used in .rst files. These are examples. -# .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text` +# .. role:: is used to refer to styles defined in _static/theme_overrides.css +# and is used like this: :red:`text` rst_prolog = """ .. |psf| replace:: Python Software Foundation diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index 1aa4e28a..bb8347a5 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -41,8 +40,7 @@ def check_thirdparty_dir( """ Check a thirdparty directory for problems and print these on screen. """ - # check for problems - print(f"==> CHECK FOR PROBLEMS") + print("==> CHECK FOR PROBLEMS") utils_thirdparty.find_problems( dest_dir=dest, report_missing_sources=sdists, diff --git a/etc/scripts/fetch_thirdparty.py b/etc/scripts/fetch_thirdparty.py index c2246837..76a19a60 100644 --- a/etc/scripts/fetch_thirdparty.py +++ b/etc/scripts/fetch_thirdparty.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -10,7 +9,6 @@ # import itertools -import os import sys from collections import defaultdict @@ -109,7 +107,8 @@ @click.option( "--use-cached-index", is_flag=True, - help="Use on disk cached PyPI indexes list of packages and versions and do not refetch if present.", + help="Use on disk cached PyPI indexes list of packages and versions and " + "do not refetch if present.", ) @click.option( "--sdist-only", @@ -261,7 +260,7 @@ def fetch_thirdparty( if not fetched: wheels_or_sdist_not_found[f"{name}=={version}"].append(environment) if TRACE: - print(f" NOT FOUND") + print(" NOT FOUND") if sdists or (f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only): if TRACE: @@ -276,17 +275,17 @@ def fetch_thirdparty( if not fetched: wheels_or_sdist_not_found[f"{name}=={version}"].append("sdist") if TRACE: - print(f" NOT FOUND") + print(" NOT FOUND") mia = [] for nv, dists in wheels_or_sdist_not_found.items(): name, _, version = nv.partition("==") if name in no_dist: continue - sdist_missing = sdists and "sdist" in dists and not name in wheel_only + sdist_missing = sdists and "sdist" in dists and name not in wheel_only if sdist_missing: mia.append(f"SDist missing: {nv} {dists}") - wheels_missing = wheels and any(d for d in dists if d != "sdist") and not name in sdist_only + wheels_missing = wheels and any(d for d in dists if d != "sdist") and name not in sdist_only if wheels_missing: mia.append(f"Wheels missing: {nv} {dists}") @@ -295,12 +294,12 @@ def fetch_thirdparty( print(m) raise Exception(mia) - print(f"==> FETCHING OR CREATING ABOUT AND LICENSE FILES") + print("==> FETCHING OR CREATING ABOUT AND LICENSE FILES") utils_thirdparty.fetch_abouts_and_licenses(dest_dir=dest_dir, use_cached_index=use_cached_index) utils_thirdparty.clean_about_files(dest_dir=dest_dir) # check for problems - print(f"==> CHECK FOR PROBLEMS") + print("==> CHECK FOR PROBLEMS") utils_thirdparty.find_problems( dest_dir=dest_dir, report_missing_sources=sdists, diff --git a/etc/scripts/gen_pypi_simple.py b/etc/scripts/gen_pypi_simple.py index cfe68e67..89d06265 100644 --- a/etc/scripts/gen_pypi_simple.py +++ b/etc/scripts/gen_pypi_simple.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # SPDX-License-Identifier: BSD-2-Clause-Views AND MIT # Copyright (c) 2010 David Wolever . All rights reserved. @@ -132,7 +131,7 @@ def build_links_package_index(packages_by_package_name, base_url): Return an HTML document as string which is a links index of all packages """ document = [] - header = f""" + header = """ Links for all packages @@ -177,13 +176,13 @@ def simple_index_entry(self, base_url): def build_pypi_index(directory, base_url="https://thirdparty.aboutcode.org/pypi"): """ - Using a ``directory`` directory of wheels and sdists, create the a PyPI - simple directory index at ``directory``/simple/ populated with the proper - PyPI simple index directory structure crafted using symlinks. + Create the a PyPI simple directory index using a ``directory`` directory of wheels and sdists in + the direvctory at ``directory``/simple/ populated with the proper PyPI simple index directory + structure crafted using symlinks. - WARNING: The ``directory``/simple/ directory is removed if it exists. - NOTE: in addition to the a PyPI simple index.html there is also a links.html - index file generated which is suitable to use with pip's --find-links + WARNING: The ``directory``/simple/ directory is removed if it exists. NOTE: in addition to the a + PyPI simple index.html there is also a links.html index file generated which is suitable to use + with pip's --find-links """ directory = Path(directory) diff --git a/etc/scripts/gen_requirements.py b/etc/scripts/gen_requirements.py index 2b65ae80..1b879442 100644 --- a/etc/scripts/gen_requirements.py +++ b/etc/scripts/gen_requirements.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -34,7 +33,8 @@ def gen_requirements(): type=pathlib.Path, required=True, metavar="DIR", - help="Path to the 'site-packages' directory where wheels are installed such as lib/python3.6/site-packages", + help="Path to the 'site-packages' directory where wheels are installed " + "such as lib/python3.12/site-packages", ) parser.add_argument( "-r", diff --git a/etc/scripts/gen_requirements_dev.py b/etc/scripts/gen_requirements_dev.py index 5db1c48e..85482056 100644 --- a/etc/scripts/gen_requirements_dev.py +++ b/etc/scripts/gen_requirements_dev.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -36,7 +35,8 @@ def gen_dev_requirements(): type=pathlib.Path, required=True, metavar="DIR", - help='Path to the "site-packages" directory where wheels are installed such as lib/python3.6/site-packages', + help="Path to the 'site-packages' directory where wheels are installed " + "such as lib/python3.12/site-packages", ) parser.add_argument( "-d", diff --git a/etc/scripts/test_utils_pip_compatibility_tags.py b/etc/scripts/test_utils_pip_compatibility_tags.py index a33b8b38..de4b7066 100644 --- a/etc/scripts/test_utils_pip_compatibility_tags.py +++ b/etc/scripts/test_utils_pip_compatibility_tags.py @@ -1,4 +1,5 @@ -"""Generate and work with PEP 425 Compatibility Tags. +""" +Generate and work with PEP 425 Compatibility Tags. copied from pip-20.3.1 pip/tests/unit/test_utils_compatibility_tags.py download_url: https://raw.githubusercontent.com/pypa/pip/20.3.1/tests/unit/test_utils_compatibility_tags.py @@ -50,7 +51,7 @@ def test_version_info_to_nodot(version_info, expected): assert actual == expected -class Testcompatibility_tags(object): +class Testcompatibility_tags: def mock_get_config_var(self, **kwd): """ Patch sysconfig.get_config_var for arbitrary keys. @@ -81,7 +82,7 @@ def test_no_hyphen_tag(self): assert "-" not in tag.platform -class TestManylinux2010Tags(object): +class TestManylinux2010Tags: @pytest.mark.parametrize( "manylinux2010,manylinux1", [ @@ -104,7 +105,7 @@ def test_manylinux2010_implies_manylinux1(self, manylinux2010, manylinux1): assert arches[:2] == [manylinux2010, manylinux1] -class TestManylinux2014Tags(object): +class TestManylinux2014Tags: @pytest.mark.parametrize( "manylinuxA,manylinuxB", [ diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index cd39cda3..b6bff518 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -25,7 +24,7 @@ DEJACODE_API_URL_PACKAGES = f"{DEJACODE_API_URL}packages/" DEJACODE_API_HEADERS = { - "Authorization": "Token {}".format(DEJACODE_API_KEY), + "Authorization": f"Token {DEJACODE_API_KEY}", "Accept": "application/json; indent=4", } @@ -50,6 +49,7 @@ def fetch_dejacode_packages(params): DEJACODE_API_URL_PACKAGES, params=params, headers=DEJACODE_API_HEADERS, + timeout=10, ) return response.json()["results"] @@ -93,7 +93,7 @@ def update_with_dejacode_about_data(distribution): if package_data: package_api_url = package_data["api_url"] about_url = f"{package_api_url}about" - response = requests.get(about_url, headers=DEJACODE_API_HEADERS) + response = requests.get(about_url, headers=DEJACODE_API_HEADERS, timeout=10) # note that this is YAML-formatted about_text = response.json()["about_data"] about_data = saneyaml.load(about_text) @@ -113,7 +113,7 @@ def fetch_and_save_about_files(distribution, dest_dir="thirdparty"): if package_data: package_api_url = package_data["api_url"] about_url = f"{package_api_url}about_files" - response = requests.get(about_url, headers=DEJACODE_API_HEADERS) + response = requests.get(about_url, headers=DEJACODE_API_HEADERS, timeout=10) about_zip = response.content with io.BytesIO(about_zip) as zf: with zipfile.ZipFile(zf) as zi: @@ -201,6 +201,7 @@ def create_dejacode_package(distribution): DEJACODE_API_URL_PACKAGES, data=new_package_payload, headers=DEJACODE_API_HEADERS, + timeout=10, ) new_package_data = response.json() if response.status_code != 201: diff --git a/etc/scripts/utils_pip_compatibility_tags.py b/etc/scripts/utils_pip_compatibility_tags.py index de0ac95d..dd954bca 100644 --- a/etc/scripts/utils_pip_compatibility_tags.py +++ b/etc/scripts/utils_pip_compatibility_tags.py @@ -1,4 +1,5 @@ -"""Generate and work with PEP 425 Compatibility Tags. +""" +Generate and work with PEP 425 Compatibility Tags. copied from pip-20.3.1 pip/_internal/utils/compatibility_tags.py download_url: https://github.com/pypa/pip/blob/20.3.1/src/pip/_internal/utils/compatibility_tags.py @@ -130,7 +131,7 @@ def _get_custom_interpreter(implementation=None, version=None): implementation = interpreter_name() if version is None: version = interpreter_version() - return "{}{}".format(implementation, version) + return f"{implementation}{version}" def get_supported( @@ -140,7 +141,8 @@ def get_supported( abis=None, # type: Optional[List[str]] ): # type: (...) -> List[Tag] - """Return a list of supported tags for each version specified in + """ + Return a list of supported tags for each version specified in `versions`. :param version: a string version, of the form "33" or "32", diff --git a/etc/scripts/utils_requirements.py b/etc/scripts/utils_requirements.py index 167bc9f5..b9b2c0e7 100644 --- a/etc/scripts/utils_requirements.py +++ b/etc/scripts/utils_requirements.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. @@ -40,7 +39,7 @@ def get_required_name_versions(requirement_lines, with_unpinned=False): req_line = req_line.strip() if not req_line or req_line.startswith("#"): continue - if req_line.startswith("-") or (not with_unpinned and not "==" in req_line): + if req_line.startswith("-") or (not with_unpinned and "==" not in req_line): print(f"Requirement line is not supported: ignored: {req_line}") continue yield get_required_name_version(requirement=req_line, with_unpinned=with_unpinned) diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index 4ea1babb..aafc1d69 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -91,7 +91,8 @@ - parse requirement file - create a TODO queue of requirements to process -- done: create an empty map of processed binary requirements as {package name: (list of versions/tags} +- done: create an empty map of processed binary requirements as + {package name: (list of versions/tags} - while we have package reqs in TODO queue, process one requirement: From 84257fbe200e5780cb13536a5c8eb56a88539e6a Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:05:23 +0100 Subject: [PATCH 051/105] Reformat test code Signed-off-by: Philippe Ombredanne --- .gitignore | 1 + pyproject.toml | 19 +++++++++++-------- tests/test_skeleton_codestyle.py | 25 ++++++++++++++++--------- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 2d48196f..8a93c94d 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ tcl # Ignore Jupyter Notebook related temp files .ipynb_checkpoints/ +/.ruff_cache/ diff --git a/pyproject.toml b/pyproject.toml index ba55770f..a872ab3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,16 +67,17 @@ include = [ [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ select = [ - "E", # pycodestyle - "W", # pycodestyle warnings - "D", # pydocstyle - "F", # Pyflakes - "UP", # pyupgrade - "S", # flake8-bandit +# "E", # pycodestyle +# "W", # pycodestyle warnings +# "D", # pydocstyle +# "F", # Pyflakes +# "UP", # pyupgrade +# "S", # flake8-bandit "I", # isort - "C9", # McCabe complexity +# "C9", # McCabe complexity ] -ignore = ["D1", "D200", "D203", "D205", "D212", "D400", "D415"] +ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415"] + [tool.ruff.lint.isort] force-single-line = true @@ -100,3 +101,5 @@ max-complexity = 10 [tool.ruff.lint.per-file-ignores] # Place paths of files to be ignored by ruff here +"tests/*" = ["S101"] +"test_*.py" = ["S101"] diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index b4ce8c16..8cd85c94 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -7,30 +7,37 @@ # See https://aboutcode.org for more information about nexB OSS projects. # +import configparser import subprocess import unittest -import configparser - class BaseTests(unittest.TestCase): def test_skeleton_codestyle(self): - """ - This test shouldn't run in proliferated repositories. - """ + # This test shouldn't run in proliferated repositories. + + # TODO: update with switch to pyproject.toml setup_cfg = configparser.ConfigParser() setup_cfg.read("setup.cfg") if setup_cfg["metadata"]["name"] != "skeleton": return - args = "venv/bin/black --check -l 100 setup.py etc tests" + commands = [ + ["venv/bin/ruff", "--check"], + ["venv/bin/ruff", "format", "--check"], + ] + command = None try: - subprocess.check_output(args.split()) + for command in commands: + subprocess.check_output(command) # noqa: S603 except subprocess.CalledProcessError as e: print("===========================================================") print(e.output) print("===========================================================") raise Exception( - "Black style check failed; please format the code using:\n" - " python -m black -l 100 setup.py etc tests", + f"Code style and linting command check failed: {' '.join(command)!r}.\n" + "You can check and format the code using:\n" + " make valid\n", + "OR:\n ruff format\n", + " ruff check --fix\n", e.output, ) from e From 00684f733a0873bd837af85471814907ba93f456 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:08:25 +0100 Subject: [PATCH 052/105] Format code Signed-off-by: Philippe Ombredanne --- etc/scripts/check_thirdparty.py | 1 + etc/scripts/test_utils_pip_compatibility_tags.py | 1 + tests/test_skeleton_codestyle.py | 1 + 3 files changed, 3 insertions(+) diff --git a/etc/scripts/check_thirdparty.py b/etc/scripts/check_thirdparty.py index bb8347a5..65ae595e 100644 --- a/etc/scripts/check_thirdparty.py +++ b/etc/scripts/check_thirdparty.py @@ -11,6 +11,7 @@ import utils_thirdparty + @click.command() @click.option( "-d", diff --git a/etc/scripts/test_utils_pip_compatibility_tags.py b/etc/scripts/test_utils_pip_compatibility_tags.py index de4b7066..0e9c360a 100644 --- a/etc/scripts/test_utils_pip_compatibility_tags.py +++ b/etc/scripts/test_utils_pip_compatibility_tags.py @@ -33,6 +33,7 @@ import utils_pip_compatibility_tags + @pytest.mark.parametrize( "version_info, expected", [ diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index 8cd85c94..7135ac0d 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -11,6 +11,7 @@ import subprocess import unittest + class BaseTests(unittest.TestCase): def test_skeleton_codestyle(self): # This test shouldn't run in proliferated repositories. From 7c4278df4e8acf04888a188d115b4c687060f1e5 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:10:45 +0100 Subject: [PATCH 053/105] Refine ruff configuration Signed-off-by: Philippe Ombredanne --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a872ab3a..0f8bd587 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,11 +72,11 @@ select = [ # "D", # pydocstyle # "F", # Pyflakes # "UP", # pyupgrade -# "S", # flake8-bandit + "S", # flake8-bandit "I", # isort # "C9", # McCabe complexity ] -ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415"] +ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415", "I001"] [tool.ruff.lint.isort] From 47cb840db13d3e7328dba8d8e62197cda82e48ec Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:54:01 +0100 Subject: [PATCH 054/105] Format doc Signed-off-by: Philippe Ombredanne --- AUTHORS.rst | 2 +- README.rst | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 51a19cc8..16e20464 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,3 +1,3 @@ The following organizations or individuals have contributed to this repo: -- +- diff --git a/README.rst b/README.rst index f848b4b3..01d02108 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,10 @@ A Simple Python Project Skeleton ================================ -This repo attempts to standardize the structure of the Python-based project's repositories using -modern Python packaging and configuration techniques that can then be applied to many repos. - -Using this `blog post`_ as inspiration, this repository serves as the base for all new Python -projects and is mergeable in existing repositories as well. +This repo attempts to standardize the structure of the Python-based project's +repositories using modern Python packaging and configuration techniques. +Using this `blog post`_ as inspiration, this repository serves as the base for +all new Python projects and is mergeable in existing repositories as well. .. _blog post: https://blog.jaraco.com/a-project-skeleton-for-python-projects/ @@ -69,7 +68,7 @@ Release Notes - Drop support for Python 3.8 - Drop support for macOS-11, add support for macOS-14 - + - 2024-02-19: - Replace support in CI of default ubuntu-20.04 by ubuntu-22.04 @@ -86,19 +85,19 @@ Release Notes - Synchronize configure and configure.bat scripts for sanity - Update CI operating system support with latest Azure OS images - - Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party dependencies - There are now fewer scripts. See etc/scripts/README.rst for details + - Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party + dependencies. There are now fewer scripts. See etc/scripts/README.rst for details - 2021-09-03: - - - ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` and ``requirements-dev.txt`` - + - ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` + and ``requirements-dev.txt`` - ``configure`` can now accept multiple options at once - Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files - Rename virtual environment directory from ``tmp`` to ``venv`` - - Update README.rst with instructions for generating ``requirements.txt`` and ``requirements-dev.txt``, - as well as collecting dependencies as wheels and generating ABOUT files for them. + - Update README.rst with instructions for generating ``requirements.txt`` + and ``requirements-dev.txt``, as well as collecting dependencies as wheels and generating + ABOUT files for them. - 2021-05-11: - - - Adopt new configure scripts from ScanCode TK that allows correct configuration of which Python version is used. + - Adopt new configure scripts from ScanCode TK that allows correct configuration of which + Python version is used. From 7b29b5914a443069a7ff967eb4ef096034333248 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:54:35 +0100 Subject: [PATCH 055/105] Run doc8 on all rst files Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 930e8010..debc404e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ + @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ *.rst valid: @echo "-> Run Ruff format" From 86c7ca45d3132e5f6873658ab1743b6e27cfeb58 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 29 Mar 2025 22:55:20 +0100 Subject: [PATCH 056/105] Enable doc style checks Signed-off-by: Philippe Ombredanne --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0f8bd587..51761ff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,8 @@ include = [ "etc/**/*.py", "test/**/*.py", "doc/**/*", - "*.py" + "*.py", + "." ] [tool.ruff.lint] @@ -69,10 +70,10 @@ include = [ select = [ # "E", # pycodestyle # "W", # pycodestyle warnings -# "D", # pydocstyle + "D", # pydocstyle # "F", # Pyflakes # "UP", # pyupgrade - "S", # flake8-bandit +# "S", # flake8-bandit "I", # isort # "C9", # McCabe complexity ] From 71583c5ecdfe5dd352b7f2bb9d26deaad971e151 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 14:40:36 +0200 Subject: [PATCH 057/105] Do not format more test data Signed-off-by: Philippe Ombredanne --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 51761ff8..7d807ebf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,10 +60,25 @@ include = [ "src/**/*.py", "etc/**/*.py", "test/**/*.py", + "tests/**/*.py", "doc/**/*", + "docs/**/*", "*.py", "." ] +# ignore test data and testfiles: they should never be linted nor formatted +exclude = [ +# main style + "**/tests/data/**/*", +# scancode-toolkit + "**/tests/*/data/**/*", +# dejacode, purldb + "**/tests/testfiles/**/*", +# vulnerablecode, fetchcode + "**/tests/*/test_data/**/*", + "**/tests/test_data/**/*", +] + [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ From 0f1a40382bdcadf82512395787faab50927256f6 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 14:58:36 +0200 Subject: [PATCH 058/105] Do not treat rst as Python Signed-off-by: Philippe Ombredanne --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7d807ebf..5e16b564 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,8 +61,8 @@ include = [ "etc/**/*.py", "test/**/*.py", "tests/**/*.py", - "doc/**/*", - "docs/**/*", + "doc/**/*.py", + "docs/**/*.py", "*.py", "." ] From 6bea6577864bf432438dabaed9e46a721aae2961 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 16:41:57 +0200 Subject: [PATCH 059/105] Combine testing and docs extra for simplicity Signed-off-by: Philippe Ombredanne --- configure | 2 -- configure.bat | 4 ---- setup.cfg | 3 --- 3 files changed, 9 deletions(-) diff --git a/configure b/configure index 22d92885..83fd2035 100755 --- a/configure +++ b/configure @@ -30,7 +30,6 @@ CLI_ARGS=$1 # Requirement arguments passed to pip and used by default or with --dev. REQUIREMENTS="--editable . --constraint requirements.txt" DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt" -DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt" # where we create a virtualenv VIRTUALENV_DIR=venv @@ -185,7 +184,6 @@ while getopts :-: optchar; do help ) cli_help;; clean ) find_python && clean;; dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";; - docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";; esac;; esac done diff --git a/configure.bat b/configure.bat index 5b9a9d68..18b37038 100644 --- a/configure.bat +++ b/configure.bat @@ -28,7 +28,6 @@ @rem # Requirement arguments passed to pip and used by default or with --dev. set "REQUIREMENTS=--editable . --constraint requirements.txt" set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt" -set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt" @rem # where we create a virtualenv set "VIRTUALENV_DIR=venv" @@ -76,9 +75,6 @@ if not "%1" == "" ( if "%1" EQU "--dev" ( set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%" ) - if "%1" EQU "--docs" ( - set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%" - ) shift goto again ) diff --git a/setup.cfg b/setup.cfg index aaec643f..ad8e0d8f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,8 +55,6 @@ testing = pycodestyle >= 2.8.0 twine ruff - -docs = Sphinx>=5.0.2 sphinx-rtd-theme>=1.0.0 sphinx-reredirects >= 0.1.2 @@ -64,4 +62,3 @@ docs = sphinx-autobuild sphinx-rtd-dark-mode>=1.3.0 sphinx-copybutton - From c615589b54bfac74b6f17b2233b2afe60bf1d0f6 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 17:18:19 +0200 Subject: [PATCH 060/105] Refine checking of docs with doc8 Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- pyproject.toml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index debc404e..d21a2f95 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/ *.rst + @${ACTIVATE} doc8 docs/ *.rst valid: @echo "-> Run Ruff format" diff --git a/pyproject.toml b/pyproject.toml index 5e16b564..bfb1d353 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,3 +119,10 @@ max-complexity = 10 # Place paths of files to be ignored by ruff here "tests/*" = ["S101"] "test_*.py" = ["S101"] + + +[tool.doc8] + +ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"] +max-line-length=100 +verbose=0 From 04e0a89a3bbf5359f27b6e3ef9a5026638e63de8 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 18:41:00 +0200 Subject: [PATCH 061/105] Refine doc handling * remove CI scripts and use Makefile targets instead * ensure doc8 runs quiet * add new docs-check make target to run documentation and links checks * update oudated doc for docs contribution Signed-off-by: Philippe Ombredanne --- .github/workflows/docs-ci.yml | 12 +++++------- Makefile | 10 +++++++--- docs/scripts/doc8_style_check.sh | 5 ----- docs/scripts/sphinx_build_link_check.sh | 5 ----- docs/source/conf.py | 2 +- docs/source/contribute/contrib_doc.rst | 8 ++++---- pyproject.toml | 2 -- 7 files changed, 17 insertions(+), 27 deletions(-) delete mode 100755 docs/scripts/doc8_style_check.sh delete mode 100644 docs/scripts/sphinx_build_link_check.sh diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 621de4b2..10ba5faa 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -21,14 +21,12 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Dependencies - run: pip install -e .[docs] + run: ./configure --dev - - name: Check Sphinx Documentation build minimally - working-directory: ./docs - run: sphinx-build -E -W source build + - name: Check documentation and HTML for errors and dead links + run: make docs-check - - name: Check for documentation style errors - working-directory: ./docs - run: ./scripts/doc8_style_check.sh + - name: Check documentation for style errors + run: make doc8 diff --git a/Makefile b/Makefile index d21a2f95..413399e5 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 docs/ *.rst + @${ACTIVATE} doc8 --quiet docs/ *.rst valid: @echo "-> Run Ruff format" @@ -46,6 +46,10 @@ test: docs: rm -rf docs/_build/ - @${ACTIVATE} sphinx-build docs/ docs/_build/ + @${ACTIVATE} sphinx-build docs/source docs/_build/ -.PHONY: conf dev check valid clean test docs +docs-check: + @${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/ + @${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/ + +.PHONY: conf dev check valid clean test docs docs-check diff --git a/docs/scripts/doc8_style_check.sh b/docs/scripts/doc8_style_check.sh deleted file mode 100755 index 94163239..00000000 --- a/docs/scripts/doc8_style_check.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# halt script on error -set -e -# Check for Style Code Violations -doc8 --max-line-length 100 source --ignore D000 --quiet \ No newline at end of file diff --git a/docs/scripts/sphinx_build_link_check.sh b/docs/scripts/sphinx_build_link_check.sh deleted file mode 100644 index c5426863..00000000 --- a/docs/scripts/sphinx_build_link_check.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# halt script on error -set -e -# Build locally, and then check links -sphinx-build -E -W -b linkcheck source build \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 8aad8294..056ca6ea 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,7 +18,7 @@ # -- Project information ----------------------------------------------------- project = "nexb-skeleton" -copyright = "nexB Inc. and others." +copyright = "nexB Inc., AboutCode and others." author = "AboutCode.org authors and contributors" diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index 5640db26..041b3583 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -147,7 +147,7 @@ What is Checked? ^^^^^^^^^^^^^^^^ PyCQA is an Organization for code quality tools (and plugins) for the Python programming language. -Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. +Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. What is checked: @@ -169,11 +169,11 @@ What is checked: Interspinx ---------- -ScanCode toolkit documentation uses `Intersphinx `_ +ScanCode toolkit documentation uses `Intersphinx `_ to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects. To link sections in the same documentation, standart reST labels are used. Refer -`Cross-Referencing `_ for more information. +`Cross-Referencing `_ for more information. For example:: @@ -230,7 +230,7 @@ Style Conventions for the Documentaion 1. Headings - (`Refer `_) + (`Refer `_) Normally, there are no heading levels assigned to certain characters as the structure is determined from the succession of headings. However, this convention is used in Python’s Style Guide for documenting which you may follow: diff --git a/pyproject.toml b/pyproject.toml index bfb1d353..c9e67720 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,5 @@ max-complexity = 10 [tool.doc8] - ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"] max-line-length=100 -verbose=0 From 8897cc63eb9ef9b06a1fdc77ebfe21289c69961b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 18:49:01 +0200 Subject: [PATCH 062/105] Add twine check to release publication Signed-off-by: Philippe Ombredanne --- .github/workflows/pypi-release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index a66c9c80..cf0579a7 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -30,12 +30,15 @@ jobs: with: python-version: 3.12 - - name: Install pypa/build - run: python -m pip install build --user + - name: Install pypa/build and twine + run: python -m pip install --user build twine - name: Build a binary wheel and a source tarball run: python -m build --sdist --wheel --outdir dist/ + - name: Validate wheel and sdis for Pypi + run: python -m twine check dist/* + - name: Upload built archives uses: actions/upload-artifact@v4 with: From 3d42985990860188c5fbf9f64f3fd4d14c590a65 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sun, 30 Mar 2025 19:16:31 +0200 Subject: [PATCH 063/105] Refine doc contribution docs Signed-off-by: Philippe Ombredanne --- docs/source/contribute/contrib_doc.rst | 119 ++++++++----------------- 1 file changed, 38 insertions(+), 81 deletions(-) diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index 041b3583..dee9296d 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -8,109 +8,59 @@ Contributing to the Documentation Setup Local Build ----------------- -To get started, create or identify a working directory on your local machine. +To get started, check out and configure the repository for development:: -Open that directory and execute the following command in a terminal session:: + git clone https://github.com/aboutcode-org/.git - git clone https://github.com/aboutcode-org/skeleton.git + cd your-repo + ./configure --dev -That will create an ``/skeleton`` directory in your working directory. -Now you can install the dependencies in a virtualenv:: - - cd skeleton - ./configure --docs +(Or use "make dev") .. note:: - In case of windows, run ``configure --docs`` instead of this. - -Now, this will install the following prerequisites: - -- Sphinx -- sphinx_rtd_theme (the format theme used by ReadTheDocs) -- docs8 (style linter) + In case of windows, run ``configure --dev``. -These requirements are already present in setup.cfg and `./configure --docs` installs them. +This will install and configure all requirements foer development including for docs development. -Now you can build the HTML documents locally:: +Now you can build the HTML documentation locally:: source venv/bin/activate - cd docs - make html - -Assuming that your Sphinx installation was successful, Sphinx should build a local instance of the -documentation .html files:: - - open build/html/index.html - -.. note:: - - In case this command did not work, for example on Ubuntu 18.04 you may get a message like “Couldn’t - get a file descriptor referring to the console”, try: - - :: - - see build/html/index.html + make docs -You now have a local build of the AboutCode documents. +This will build a local instance of the ``docs/_build`` directory:: -.. _contrib_doc_share_improvements: + open docs/_build/index.html -Share Document Improvements ---------------------------- - -Ensure that you have the latest files:: - - git pull - git status -Before commiting changes run Continious Integration Scripts locally to run tests. Refer -:ref:`doc_ci` for instructions on the same. +To validate the documentation style and content, use:: -Follow standard git procedures to upload your new and modified files. The following commands are -examples:: - - git status - git add source/index.rst - git add source/how-to-scan.rst - git status - git commit -m "New how-to document that explains how to scan" - git status - git push - git status - -The Scancode-Toolkit webhook with ReadTheDocs should rebuild the documentation after your -Pull Request is Merged. + source venv/bin/activate + make doc8 + make docs-check -Refer the `Pro Git Book `_ available online for Git tutorials -covering more complex topics on Branching, Merging, Rebasing etc. .. _doc_ci: Continuous Integration ---------------------- -The documentations are checked on every new commit through Travis-CI, so that common errors are -avoided and documentation standards are enforced. Travis-CI presently checks for these 3 aspects -of the documentation : +The documentations are checked on every new commit, so that common errors are avoided and +documentation standards are enforced. We checks for these aspects of the documentation: 1. Successful Builds (By using ``sphinx-build``) -2. No Broken Links (By Using ``link-check``) -3. Linting Errors (By Using ``Doc8``) +2. No Broken Links (By Using ``linkcheck``) +3. Linting Errors (By Using ``doc8``) -So run these scripts at your local system before creating a Pull Request:: +You myst run these scripts locally before creating a pull request:: - cd docs - ./scripts/sphinx_build_link_check.sh - ./scripts/doc8_style_check.sh + make doc8 + make check-docs -If you don't have permission to run the scripts, run:: - - chmod u+x ./scripts/doc8_style_check.sh .. _doc_style_docs8: -Style Checks Using ``Doc8`` +Style Checks Using ``doc8`` --------------------------- How To Run Style Tests @@ -118,8 +68,7 @@ How To Run Style Tests In the project root, run the following commands:: - $ cd docs - $ ./scripts/doc8_style_check.sh + make doc8 A sample output is:: @@ -143,11 +92,13 @@ A sample output is:: Now fix the errors and run again till there isn't any style error in the documentation. + What is Checked? ^^^^^^^^^^^^^^^^ PyCQA is an Organization for code quality tools (and plugins) for the Python programming language. -Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. +Doc8 is a sub-project of the same Organization. Refer this +`README `_ for more details. What is checked: @@ -164,16 +115,19 @@ What is checked: - no carriage returns (use UNIX newlines) - D004 - no newline at end of file - D005 + .. _doc_interspinx: Interspinx ---------- -ScanCode toolkit documentation uses `Intersphinx `_ +AboutCode documentation uses +`Intersphinx `_ to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects. To link sections in the same documentation, standart reST labels are used. Refer -`Cross-Referencing `_ for more information. +`Cross-Referencing `_ +for more information. For example:: @@ -223,6 +177,7 @@ Intersphinx, and you link to that label, it will create a link to the local labe For more information, refer this tutorial named `Using Intersphinx `_. + .. _doc_style_conv: Style Conventions for the Documentaion @@ -303,12 +258,14 @@ Style Conventions for the Documentaion ``rst_snippets/warning_snippets/`` and then included to eliminate redundancy, as these are frequently used in multiple files. + Converting from Markdown ------------------------ -If you want to convert a ``.md`` file to a ``.rst`` file, this `tool `_ -does it pretty well. You'd still have to clean up and check for errors as this contains a lot of -bugs. But this is definitely better than converting everything by yourself. +If you want to convert a ``.md`` file to a ``.rst`` file, this +`tool `_ does it pretty well. +You will still have to clean up and check for errors as this contains a lot of bugs. But this is +definitely better than converting everything by yourself. This will be helpful in converting GitHub wiki's (Markdown Files) to reStructuredtext files for Sphinx/ReadTheDocs hosting. From f428366859a143add93160bd0b1ae685be89fcbb Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 31 Mar 2025 13:35:36 -0700 Subject: [PATCH 064/105] Update codestyle command * Remove trailing whitespace Signed-off-by: Jono Yang --- docs/source/contribute/contrib_doc.rst | 4 ++-- tests/test_skeleton_codestyle.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index dee9296d..2a719a52 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -97,7 +97,7 @@ What is Checked? ^^^^^^^^^^^^^^^^ PyCQA is an Organization for code quality tools (and plugins) for the Python programming language. -Doc8 is a sub-project of the same Organization. Refer this +Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. What is checked: @@ -263,7 +263,7 @@ Converting from Markdown ------------------------ If you want to convert a ``.md`` file to a ``.rst`` file, this -`tool `_ does it pretty well. +`tool `_ does it pretty well. You will still have to clean up and check for errors as this contains a lot of bugs. But this is definitely better than converting everything by yourself. diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py index 7135ac0d..6060c085 100644 --- a/tests/test_skeleton_codestyle.py +++ b/tests/test_skeleton_codestyle.py @@ -23,7 +23,7 @@ def test_skeleton_codestyle(self): return commands = [ - ["venv/bin/ruff", "--check"], + ["venv/bin/ruff", "check"], ["venv/bin/ruff", "format", "--check"], ] command = None From f0d0e21d5e6f98645b02ff9a8fee6ee3def1be75 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 31 Mar 2025 13:44:30 -0700 Subject: [PATCH 065/105] Update README.rst Signed-off-by: Jono Yang --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 01d02108..11a4dfb0 100644 --- a/README.rst +++ b/README.rst @@ -44,6 +44,10 @@ More usage instructions can be found in ``docs/skeleton-usage.rst``. Release Notes ============= +- 2025-03-31: + + - Use ruff as the main code formatting tool, add ruff rules to pyproject.toml + - 2025-03-29: - Add support for beta macOS-15 From f3a8aa6cee5f645a668750ab7e6bf0cdc774e041 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 31 Mar 2025 14:31:37 -0700 Subject: [PATCH 066/105] Update BUILDDIR envvar in docs/Makefile Signed-off-by: Jono Yang --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 788b0396..94f686b2 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,7 +7,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SPHINXAUTOBUILD = sphinx-autobuild SOURCEDIR = source -BUILDDIR = build +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: From 772bb4391f8d71bde690a728455a27d04c9d9fba Mon Sep 17 00:00:00 2001 From: Tushar Goel Date: Tue, 1 Apr 2025 13:08:37 +0530 Subject: [PATCH 067/105] Add regenrated test files Signed-off-by: Tushar Goel --- tests/data/azure-devops.req-310-expected.json | 88 +++++++++---------- tests/data/azure-devops.req-312-expected.json | 88 +++++++++---------- tests/data/azure-devops.req-313-expected.json | 88 +++++++++---------- tests/data/azure-devops.req-38-expected.json | 88 +++++++++---------- 4 files changed, 160 insertions(+), 192 deletions(-) diff --git a/tests/data/azure-devops.req-310-expected.json b/tests/data/azure-devops.req-310-expected.json index 1b7189db..84ac573e 100644 --- a/tests/data/azure-devops.req-310-expected.json +++ b/tests/data/azure-devops.req-310-expected.json @@ -384,12 +384,12 @@ "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:12", + "release_date": "2025-03-27T17:13:06", "parties": [ { "type": "person", @@ -413,11 +413,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/90/b2bb0c338a486e62428d5126236d09e03e890f59c4939292e13ee57e5007/azure_storage_blob-12.25.0-py3-none-any.whl", - "size": 406921, + "download_url": "https://files.pythonhosted.org/packages/57/33/085d9352d416e617993821b9d9488222fbb559bc15c3641d6cbd6d16d236/azure_storage_blob-12.25.1-py3-none-any.whl", + "size": 406990, "sha1": null, - "md5": "825a064146b7a7bf354078618da07c79", - "sha256": "a38e18bf10258fb19028f343db0d3d373280c6427a619c98c06d76485805b755", + "md5": "20b5072c0d73c87cc0bd020da5c5f2f4", + "sha256": "1f337aab12e918ec3f1b638baada97550673911c4ceed892acc8e4e891b74167", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -437,20 +437,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:10", + "release_date": "2025-03-27T17:13:05", "parties": [ { "type": "person", @@ -474,11 +474,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/a6/343e225ffd1c27971fa3059b8bbb90088042ff9a41f631fdf2f9df4f190e/azure_storage_blob-12.25.0.tar.gz", - "size": 570274, + "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", + "size": 570541, "sha1": null, - "md5": "45f79f3e1d3eb55dea7d7ed5ef5df200", - "sha256": "42364ca8f9f49dbccd0acc10144ed47bb6770bf78719970b51915f048891abba", + "md5": "0e0be21e8fd942300ba335049912d4a2", + "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -498,9 +498,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", @@ -2220,12 +2220,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:13", + "release_date": "2025-03-26T03:49:40", "parties": [ { "type": "person", @@ -2263,22 +2263,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", - "size": 37438, + "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", + "size": 45683, "sha1": null, - "md5": "f5db8e1f1ab10181587cfe0b9ed1fc7f", - "sha256": "04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "md5": "7ff271e4526b7cd1c260bdcc610b11c4", + "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2286,20 +2282,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:15", + "release_date": "2025-03-26T03:49:41", "parties": [ { "type": "person", @@ -2337,22 +2333,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", - "size": 85321, + "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", + "size": 106520, "sha1": null, - "md5": "cf64c2313f5fa5eb04c1deb3fc93abe9", - "sha256": "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", + "md5": "f53b1a7955332b9c74fdbfb847399edb", + "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2360,9 +2352,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", @@ -2529,7 +2521,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2539,12 +2531,12 @@ ] }, { - "package": "pkg:pypi/azure-storage-blob@12.25.0", + "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ "pkg:pypi/azure-core@1.32.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2618,7 +2610,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.12.2", + "package": "pkg:pypi/typing-extensions@4.13.0", "dependencies": [] }, { diff --git a/tests/data/azure-devops.req-312-expected.json b/tests/data/azure-devops.req-312-expected.json index b78dd779..1cced512 100644 --- a/tests/data/azure-devops.req-312-expected.json +++ b/tests/data/azure-devops.req-312-expected.json @@ -384,12 +384,12 @@ "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:12", + "release_date": "2025-03-27T17:13:06", "parties": [ { "type": "person", @@ -413,11 +413,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/90/b2bb0c338a486e62428d5126236d09e03e890f59c4939292e13ee57e5007/azure_storage_blob-12.25.0-py3-none-any.whl", - "size": 406921, + "download_url": "https://files.pythonhosted.org/packages/57/33/085d9352d416e617993821b9d9488222fbb559bc15c3641d6cbd6d16d236/azure_storage_blob-12.25.1-py3-none-any.whl", + "size": 406990, "sha1": null, - "md5": "825a064146b7a7bf354078618da07c79", - "sha256": "a38e18bf10258fb19028f343db0d3d373280c6427a619c98c06d76485805b755", + "md5": "20b5072c0d73c87cc0bd020da5c5f2f4", + "sha256": "1f337aab12e918ec3f1b638baada97550673911c4ceed892acc8e4e891b74167", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -437,20 +437,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:10", + "release_date": "2025-03-27T17:13:05", "parties": [ { "type": "person", @@ -474,11 +474,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/a6/343e225ffd1c27971fa3059b8bbb90088042ff9a41f631fdf2f9df4f190e/azure_storage_blob-12.25.0.tar.gz", - "size": 570274, + "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", + "size": 570541, "sha1": null, - "md5": "45f79f3e1d3eb55dea7d7ed5ef5df200", - "sha256": "42364ca8f9f49dbccd0acc10144ed47bb6770bf78719970b51915f048891abba", + "md5": "0e0be21e8fd942300ba335049912d4a2", + "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -498,9 +498,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", @@ -2220,12 +2220,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:13", + "release_date": "2025-03-26T03:49:40", "parties": [ { "type": "person", @@ -2263,22 +2263,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", - "size": 37438, + "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", + "size": 45683, "sha1": null, - "md5": "f5db8e1f1ab10181587cfe0b9ed1fc7f", - "sha256": "04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "md5": "7ff271e4526b7cd1c260bdcc610b11c4", + "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2286,20 +2282,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:15", + "release_date": "2025-03-26T03:49:41", "parties": [ { "type": "person", @@ -2337,22 +2333,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", - "size": 85321, + "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", + "size": 106520, "sha1": null, - "md5": "cf64c2313f5fa5eb04c1deb3fc93abe9", - "sha256": "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", + "md5": "f53b1a7955332b9c74fdbfb847399edb", + "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2360,9 +2352,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", @@ -2529,7 +2521,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2539,12 +2531,12 @@ ] }, { - "package": "pkg:pypi/azure-storage-blob@12.25.0", + "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ "pkg:pypi/azure-core@1.32.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2618,7 +2610,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.12.2", + "package": "pkg:pypi/typing-extensions@4.13.0", "dependencies": [] }, { diff --git a/tests/data/azure-devops.req-313-expected.json b/tests/data/azure-devops.req-313-expected.json index fdc11902..832b9258 100644 --- a/tests/data/azure-devops.req-313-expected.json +++ b/tests/data/azure-devops.req-313-expected.json @@ -384,12 +384,12 @@ "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:12", + "release_date": "2025-03-27T17:13:06", "parties": [ { "type": "person", @@ -413,11 +413,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/90/b2bb0c338a486e62428d5126236d09e03e890f59c4939292e13ee57e5007/azure_storage_blob-12.25.0-py3-none-any.whl", - "size": 406921, + "download_url": "https://files.pythonhosted.org/packages/57/33/085d9352d416e617993821b9d9488222fbb559bc15c3641d6cbd6d16d236/azure_storage_blob-12.25.1-py3-none-any.whl", + "size": 406990, "sha1": null, - "md5": "825a064146b7a7bf354078618da07c79", - "sha256": "a38e18bf10258fb19028f343db0d3d373280c6427a619c98c06d76485805b755", + "md5": "20b5072c0d73c87cc0bd020da5c5f2f4", + "sha256": "1f337aab12e918ec3f1b638baada97550673911c4ceed892acc8e4e891b74167", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -437,20 +437,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:10", + "release_date": "2025-03-27T17:13:05", "parties": [ { "type": "person", @@ -474,11 +474,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/a6/343e225ffd1c27971fa3059b8bbb90088042ff9a41f631fdf2f9df4f190e/azure_storage_blob-12.25.0.tar.gz", - "size": 570274, + "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", + "size": 570541, "sha1": null, - "md5": "45f79f3e1d3eb55dea7d7ed5ef5df200", - "sha256": "42364ca8f9f49dbccd0acc10144ed47bb6770bf78719970b51915f048891abba", + "md5": "0e0be21e8fd942300ba335049912d4a2", + "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -498,9 +498,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", @@ -2220,12 +2220,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:13", + "release_date": "2025-03-26T03:49:40", "parties": [ { "type": "person", @@ -2263,22 +2263,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", - "size": 37438, + "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", + "size": 45683, "sha1": null, - "md5": "f5db8e1f1ab10181587cfe0b9ed1fc7f", - "sha256": "04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "md5": "7ff271e4526b7cd1c260bdcc610b11c4", + "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2286,20 +2282,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:15", + "release_date": "2025-03-26T03:49:41", "parties": [ { "type": "person", @@ -2337,22 +2333,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", - "size": 85321, + "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", + "size": 106520, "sha1": null, - "md5": "cf64c2313f5fa5eb04c1deb3fc93abe9", - "sha256": "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", + "md5": "f53b1a7955332b9c74fdbfb847399edb", + "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2360,9 +2352,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", @@ -2529,7 +2521,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2539,12 +2531,12 @@ ] }, { - "package": "pkg:pypi/azure-storage-blob@12.25.0", + "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ "pkg:pypi/azure-core@1.32.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2618,7 +2610,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.12.2", + "package": "pkg:pypi/typing-extensions@4.13.0", "dependencies": [] }, { diff --git a/tests/data/azure-devops.req-38-expected.json b/tests/data/azure-devops.req-38-expected.json index 5a76ebe5..c2f4c0cf 100644 --- a/tests/data/azure-devops.req-38-expected.json +++ b/tests/data/azure-devops.req-38-expected.json @@ -384,12 +384,12 @@ "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:12", + "release_date": "2025-03-27T17:13:06", "parties": [ { "type": "person", @@ -413,11 +413,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/90/b2bb0c338a486e62428d5126236d09e03e890f59c4939292e13ee57e5007/azure_storage_blob-12.25.0-py3-none-any.whl", - "size": 406921, + "download_url": "https://files.pythonhosted.org/packages/57/33/085d9352d416e617993821b9d9488222fbb559bc15c3641d6cbd6d16d236/azure_storage_blob-12.25.1-py3-none-any.whl", + "size": 406990, "sha1": null, - "md5": "825a064146b7a7bf354078618da07c79", - "sha256": "a38e18bf10258fb19028f343db0d3d373280c6427a619c98c06d76485805b755", + "md5": "20b5072c0d73c87cc0bd020da5c5f2f4", + "sha256": "1f337aab12e918ec3f1b638baada97550673911c4ceed892acc8e4e891b74167", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -437,20 +437,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", "namespace": null, "name": "azure-storage-blob", - "version": "12.25.0", + "version": "12.25.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-11T18:50:10", + "release_date": "2025-03-27T17:13:05", "parties": [ { "type": "person", @@ -474,11 +474,11 @@ "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8a/a6/343e225ffd1c27971fa3059b8bbb90088042ff9a41f631fdf2f9df4f190e/azure_storage_blob-12.25.0.tar.gz", - "size": 570274, + "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", + "size": 570541, "sha1": null, - "md5": "45f79f3e1d3eb55dea7d7ed5ef5df200", - "sha256": "42364ca8f9f49dbccd0acc10144ed47bb6770bf78719970b51915f048891abba", + "md5": "0e0be21e8fd942300ba335049912d4a2", + "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -498,9 +498,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.0/json", + "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.0" + "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, { "type": "pypi", @@ -2220,12 +2220,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:13", + "release_date": "2025-03-26T03:49:40", "parties": [ { "type": "person", @@ -2263,22 +2263,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", - "size": 37438, + "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", + "size": 45683, "sha1": null, - "md5": "f5db8e1f1ab10181587cfe0b9ed1fc7f", - "sha256": "04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "md5": "7ff271e4526b7cd1c260bdcc610b11c4", + "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2286,20 +2282,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.12.2", + "version": "4.13.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2024-06-07T18:52:15", + "release_date": "2025-03-26T03:49:41", "parties": [ { "type": "person", @@ -2337,22 +2333,18 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", - "size": 85321, + "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", + "size": 106520, "sha1": null, - "md5": "cf64c2313f5fa5eb04c1deb3fc93abe9", - "sha256": "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", + "md5": "f53b1a7955332b9c74fdbfb847399edb", + "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, + "license_expression": "PSF-2.0", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -2360,9 +2352,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.12.2/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.12.2" + "purl": "pkg:pypi/typing-extensions@4.13.0" }, { "type": "pypi", @@ -2531,7 +2523,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2541,12 +2533,12 @@ ] }, { - "package": "pkg:pypi/azure-storage-blob@12.25.0", + "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ "pkg:pypi/azure-core@1.32.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.12.2" + "pkg:pypi/typing-extensions@4.13.0" ] }, { @@ -2620,7 +2612,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.12.2", + "package": "pkg:pypi/typing-extensions@4.13.0", "dependencies": [] }, { From 85ca9f572d4aa30f923654d3d71601d07743f47e Mon Sep 17 00:00:00 2001 From: Tushar Goel Date: Tue, 1 Apr 2025 13:36:39 +0530 Subject: [PATCH 068/105] Fix regenerated file Signed-off-by: Tushar Goel --- .../insecure-setup-2/setup.py-expected.json | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/data/insecure-setup-2/setup.py-expected.json b/tests/data/insecure-setup-2/setup.py-expected.json index 2f524869..af67bb99 100644 --- a/tests/data/insecure-setup-2/setup.py-expected.json +++ b/tests/data/insecure-setup-2/setup.py-expected.json @@ -6557,12 +6557,12 @@ "type": "pypi", "namespace": null, "name": "pytz", - "version": "2025.1", + "version": "2025.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", - "release_date": "2025-01-31T01:54:45", + "release_date": "2025-03-25T02:24:58", "parties": [ { "type": "person", @@ -6612,11 +6612,11 @@ "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": "http://pythonhosted.org/pytz", - "download_url": "https://files.pythonhosted.org/packages/eb/38/ac33370d784287baa1c3d538978b5e2ea064d4c1b93ffbd12826c190dd10/pytz-2025.1-py2.py3-none-any.whl", - "size": 507930, + "download_url": "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", + "size": 509225, "sha1": null, - "md5": "f326851cfc6226db3bdf2571d1a3de8a", - "sha256": "89dd22dca55b46eac6eda23b2d72721bf1bdfef212645d81513ef5d03038de57", + "md5": "51ad498990b93bab1efdb6ecce983474", + "sha256": "5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -6636,20 +6636,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pytz/2025.1/json", + "api_data_url": "https://pypi.org/pypi/pytz/2025.2/json", "datasource_id": null, - "purl": "pkg:pypi/pytz@2025.1" + "purl": "pkg:pypi/pytz@2025.2" }, { "type": "pypi", "namespace": null, "name": "pytz", - "version": "2025.1", + "version": "2025.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", - "release_date": "2025-01-31T01:54:48", + "release_date": "2025-03-25T02:25:00", "parties": [ { "type": "person", @@ -6699,11 +6699,11 @@ "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": "http://pythonhosted.org/pytz", - "download_url": "https://files.pythonhosted.org/packages/5f/57/df1c9157c8d5a05117e455d66fd7cf6dbc46974f832b1058ed4856785d8a/pytz-2025.1.tar.gz", - "size": 319617, + "download_url": "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", + "size": 320884, "sha1": null, - "md5": "b51879337eb45a56947f91e82ec83ef1", - "sha256": "c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e", + "md5": "6a7760c71e38b6c75577b34b18b89d5b", + "sha256": "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -6723,9 +6723,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pytz/2025.1/json", + "api_data_url": "https://pypi.org/pypi/pytz/2025.2/json", "datasource_id": null, - "purl": "pkg:pypi/pytz@2025.1" + "purl": "pkg:pypi/pytz@2025.2" }, { "type": "pypi", @@ -8220,7 +8220,7 @@ { "package": "pkg:pypi/babel@2.9.1", "dependencies": [ - "pkg:pypi/pytz@2025.1" + "pkg:pypi/pytz@2025.2" ] }, { @@ -8256,7 +8256,7 @@ "dependencies": [ "pkg:pypi/billiard@3.6.4.0", "pkg:pypi/kombu@4.6.11", - "pkg:pypi/pytz@2025.1", + "pkg:pypi/pytz@2025.2", "pkg:pypi/vine@1.3.0" ] }, @@ -8573,7 +8573,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/pytz@2025.1", + "package": "pkg:pypi/pytz@2025.2", "dependencies": [] }, { From 5b0f4d6b4079719caa9ed97efb2ba776bc2bbac1 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 14:42:52 +0200 Subject: [PATCH 069/105] Fix doc line length Signed-off-by: Philippe Ombredanne --- docs/source/contribute/contrib_doc.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index dee9296d..2a719a52 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -97,7 +97,7 @@ What is Checked? ^^^^^^^^^^^^^^^^ PyCQA is an Organization for code quality tools (and plugins) for the Python programming language. -Doc8 is a sub-project of the same Organization. Refer this +Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details. What is checked: @@ -263,7 +263,7 @@ Converting from Markdown ------------------------ If you want to convert a ``.md`` file to a ``.rst`` file, this -`tool `_ does it pretty well. +`tool `_ does it pretty well. You will still have to clean up and check for errors as this contains a lot of bugs. But this is definitely better than converting everything by yourself. From e776fef5ad595378752d39425109a4cbd2cb5175 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 14:49:40 +0200 Subject: [PATCH 070/105] Format code Signed-off-by: Philippe Ombredanne --- etc/scripts/update_skeleton.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/scripts/update_skeleton.py b/etc/scripts/update_skeleton.py index 5705fc43..374c06f2 100644 --- a/etc/scripts/update_skeleton.py +++ b/etc/scripts/update_skeleton.py @@ -15,7 +15,7 @@ import click -ABOUTCODE_PUBLIC_REPO_NAMES=[ +ABOUTCODE_PUBLIC_REPO_NAMES = [ "aboutcode-toolkit", "ahocode", "bitcode", @@ -87,7 +87,9 @@ def update_skeleton_files(repo_names=ABOUTCODE_PUBLIC_REPO_NAMES): os.chdir(work_dir_path / repo_name) # Add skeleton as an origin - subprocess.run(["git", "remote", "add", "skeleton", "git@github.com:aboutcode-org/skeleton.git"]) + subprocess.run( + ["git", "remote", "add", "skeleton", "git@github.com:aboutcode-org/skeleton.git"] + ) # Fetch skeleton files subprocess.run(["git", "fetch", "skeleton"]) From 2a43f4cdc8105473b279eea873db00addaa14551 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 14:59:05 +0200 Subject: [PATCH 071/105] Correct supported runner on Azure See for details: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml macOS ARM images do not seem to be supported there Signed-off-by: Philippe Ombredanne --- azure-pipelines.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 80ae45b1..fb03c090 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,14 +26,6 @@ jobs: - template: etc/ci/azure-posix.yml parameters: job_name: macos13_cpython - image_name: macOS-13-xlarge - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] - test_suites: - all: venv/bin/pytest -n 2 -vvs - - - template: etc/ci/azure-posix.yml - parameters: - job_name: macos13_cpython_arm64 image_name: macOS-13 python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: @@ -42,14 +34,6 @@ jobs: - template: etc/ci/azure-posix.yml parameters: job_name: macos14_cpython - image_name: macOS-14-large - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] - test_suites: - all: venv/bin/pytest -n 2 -vvs - - - template: etc/ci/azure-posix.yml - parameters: - job_name: macos14_cpython_arm64 image_name: macOS-14 python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] test_suites: @@ -63,14 +47,6 @@ jobs: test_suites: all: venv/bin/pytest -n 2 -vvs - - template: etc/ci/azure-posix.yml - parameters: - job_name: macos15_cpython_arm64 - image_name: macOS-15-large - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] - test_suites: - all: venv/bin/pytest -n 2 -vvs - - template: etc/ci/azure-win.yml parameters: job_name: win2019_cpython From a488b3169b83fb49f90e3135e7faf3c149b65adf Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 15:11:29 +0200 Subject: [PATCH 072/105] Add debug details to random CI Exception Signed-off-by: Philippe Ombredanne --- src/python_inspector/resolution.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python_inspector/resolution.py b/src/python_inspector/resolution.py index 6bfec4c3..f5217023 100644 --- a/src/python_inspector/resolution.py +++ b/src/python_inspector/resolution.py @@ -83,8 +83,11 @@ def get_requirements_from_distribution( if not os.path.exists(location): return [] reqs = [] - for package_data in handler.parse(location): - dependencies = package_data.dependencies + try: + for package_data in handler.parse(location): + dependencies = package_data.dependencies + except Exception as e: + raise Exception(f"Failed to get_requirements_from_distribution for: {location!r}") from e reqs.extend(get_requirements_from_dependencies(dependencies=dependencies)) return reqs From d1dd08743c8dcd989317c7e6d64b5f83d3b60324 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 19:26:43 +0200 Subject: [PATCH 073/105] Skip test that cannot work on Python 3.13 Reference: https://github.com/aboutcode-org/python-inspector/issues/212 Signed-off-by: Philippe Ombredanne --- tests/test_cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 3d356867..4c431156 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -345,7 +345,13 @@ def test_cli_with_insecure_option(): ) -@pytest.mark.skipif(sys.version_info[:2] == (3, 12), reason="Skipping test for Python 3.12") +@pytest.mark.skipif( + sys.version_info[:2] >= (3, 12), + reason="Skipping test for Python 3.12+ because of " + "https://github.com/aboutcode-org/python-inspector/issues/212" + "to avoid error AttributeError: module 'configparser' has no attribute " + "'SafeConfigParser'. Did you mean: 'RawConfigParser'?", +) @pytest.mark.online def test_cli_with_insecure_option_testpkh(): setup_py_file = test_env.get_test_loc("insecure-setup-2/setup.py") From 4a15550b7bcea5ec949a5049fe1a501d3bb888ff Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 19:34:14 +0200 Subject: [PATCH 074/105] Add code checks to CI Remove running "make check" as a test Signed-off-by: Philippe Ombredanne --- azure-pipelines.yml | 8 ++++++ tests/test_skeleton_codestyle.py | 44 -------------------------------- 2 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 tests/test_skeleton_codestyle.py diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fb03c090..ad18b28a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,6 +7,14 @@ jobs: + - template: etc/ci/azure-posix.yml + parameters: + job_name: run_code_checks + image_name: ubuntu-24.04 + python_versions: ['3.12'] + test_suites: + all: make check + - template: etc/ci/azure-posix.yml parameters: job_name: ubuntu22_cpython diff --git a/tests/test_skeleton_codestyle.py b/tests/test_skeleton_codestyle.py deleted file mode 100644 index 6060c085..00000000 --- a/tests/test_skeleton_codestyle.py +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (c) nexB Inc. and others. All rights reserved. -# ScanCode is a trademark of nexB Inc. -# SPDX-License-Identifier: Apache-2.0 -# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/aboutcode-org/skeleton for support or download. -# See https://aboutcode.org for more information about nexB OSS projects. -# - -import configparser -import subprocess -import unittest - - -class BaseTests(unittest.TestCase): - def test_skeleton_codestyle(self): - # This test shouldn't run in proliferated repositories. - - # TODO: update with switch to pyproject.toml - setup_cfg = configparser.ConfigParser() - setup_cfg.read("setup.cfg") - if setup_cfg["metadata"]["name"] != "skeleton": - return - - commands = [ - ["venv/bin/ruff", "check"], - ["venv/bin/ruff", "format", "--check"], - ] - command = None - try: - for command in commands: - subprocess.check_output(command) # noqa: S603 - except subprocess.CalledProcessError as e: - print("===========================================================") - print(e.output) - print("===========================================================") - raise Exception( - f"Code style and linting command check failed: {' '.join(command)!r}.\n" - "You can check and format the code using:\n" - " make valid\n", - "OR:\n ruff format\n", - " ruff check --fix\n", - e.output, - ) from e From d8c5454d4c77e0776062da903537703df042b5d4 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 19:36:11 +0200 Subject: [PATCH 075/105] Remove test for code style This is now part of a CI command with the latest skeleton Signed-off-by: Philippe Ombredanne --- tests/test_codestyle.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 tests/test_codestyle.py diff --git a/tests/test_codestyle.py b/tests/test_codestyle.py deleted file mode 100644 index 986cd563..00000000 --- a/tests/test_codestyle.py +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) nexB Inc. and others. All rights reserved. -# ScanCode is a trademark of nexB Inc. -# SPDX-License-Identifier: Apache-2.0 -# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/skeleton for support or download. -# See https://aboutcode.org for more information about nexB OSS projects. -# - -import subprocess -import sys -import unittest - -import pytest - - -class BaseTests(unittest.TestCase): - @pytest.mark.skipif(sys.version_info[:2] == (3, 12), reason="Skipping test for Python 3.12") - def test_codestyle(self): - args = ["make", "check"] - try: - subprocess.check_output(args) - except subprocess.CalledProcessError as e: - print("===========================================================") - print(e.output) - print("===========================================================") - raise Exception( - "Code style check failed!", - e.output, - ) from e From 8a31546dbcbf84885787f598cef794ded51cbd9b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 20:12:12 +0200 Subject: [PATCH 076/105] Format code Signed-off-by: Philippe Ombredanne --- tests/test_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 4c431156..0bf93a80 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -348,9 +348,9 @@ def test_cli_with_insecure_option(): @pytest.mark.skipif( sys.version_info[:2] >= (3, 12), reason="Skipping test for Python 3.12+ because of " - "https://github.com/aboutcode-org/python-inspector/issues/212" - "to avoid error AttributeError: module 'configparser' has no attribute " - "'SafeConfigParser'. Did you mean: 'RawConfigParser'?", + "https://github.com/aboutcode-org/python-inspector/issues/212" + "to avoid error AttributeError: module 'configparser' has no attribute " + "'SafeConfigParser'. Did you mean: 'RawConfigParser'?", ) @pytest.mark.online def test_cli_with_insecure_option_testpkh(): From b2d7512735ca257088d2cac4b55590fc5d7b20b4 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 1 Apr 2025 20:15:18 +0200 Subject: [PATCH 077/105] Revert support for Python 3.13 This is not yet supported everywhere Signed-off-by: Philippe Ombredanne --- azure-pipelines.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ad18b28a..7a2d4d9b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,7 +19,7 @@ jobs: parameters: job_name: ubuntu22_cpython image_name: ubuntu-22.04 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -27,7 +27,7 @@ jobs: parameters: job_name: ubuntu24_cpython image_name: ubuntu-24.04 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -35,7 +35,7 @@ jobs: parameters: job_name: macos13_cpython image_name: macOS-13 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -43,7 +43,7 @@ jobs: parameters: job_name: macos14_cpython image_name: macOS-14 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -51,7 +51,7 @@ jobs: parameters: job_name: macos15_cpython image_name: macOS-15 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv/bin/pytest -n 2 -vvs @@ -59,7 +59,7 @@ jobs: parameters: job_name: win2019_cpython image_name: windows-2019 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv\Scripts\pytest -n 2 -vvs @@ -67,7 +67,7 @@ jobs: parameters: job_name: win2022_cpython image_name: windows-2022 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv\Scripts\pytest -n 2 -vvs @@ -75,6 +75,6 @@ jobs: parameters: job_name: win2025_cpython image_name: windows-2025 - python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: all: venv\Scripts\pytest -n 2 -vvs From f4bf8a96715b11add97af07009b66c14b3994aa9 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 12:30:42 +0200 Subject: [PATCH 078/105] Mark as online tests that are online We were missing some Signed-off-by: Philippe Ombredanne --- tests/test_api.py | 9 ++++++++- tests/test_utils.py | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index f704f7bf..957589a0 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -21,6 +21,7 @@ test_env.test_data_dir = os.path.join(os.path.dirname(__file__), "data") +@pytest.mark.online def test_api_with_specifier(): expected_file = test_env.get_test_loc("test-api-expected.json", must_exist=False) results = resolver_api( @@ -31,6 +32,7 @@ def test_api_with_specifier(): check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) +@pytest.mark.online def test_api_with_specifier_pdt(): expected_file = test_env.get_test_loc("test-api-pdt-expected.json", must_exist=False) results = resolver_api( @@ -41,7 +43,7 @@ def test_api_with_specifier_pdt(): ) check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) - +@pytest.mark.online def test_api_with_requirement_file(): expected_file = test_env.get_test_loc("test-api-with-requirement-file.json", must_exist=False) results = resolver_api( @@ -52,6 +54,7 @@ def test_api_with_requirement_file(): check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) +@pytest.mark.online def test_api_with_prefer_source(): expected_file = test_env.get_test_loc("test-api-with-prefer-source.json", must_exist=False) results = resolver_api( @@ -63,6 +66,7 @@ def test_api_with_prefer_source(): check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) +@pytest.mark.online def test_api_with_recursive_requirement_file(): requirement_file = test_env.get_test_loc("recursive_requirements/r.txt") expected_file = test_env.get_test_loc( @@ -96,6 +100,7 @@ def test_api_with_wrong_pyver(): resolver_api(specifiers=["flask==2.1.2"], python_version="3.14", operating_system="linux") +@pytest.mark.online def test_api_with_python_311(): expected_file = test_env.get_test_loc("test-api-with-python-311.json", must_exist=False) results = resolver_api( @@ -107,6 +112,7 @@ def test_api_with_python_311(): check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) +@pytest.mark.online def test_api_with_lief_python_312(): expected_file = test_env.get_test_loc("test-api-with-lief-python-312.json", must_exist=False) results = resolver_api( @@ -118,6 +124,7 @@ def test_api_with_lief_python_312(): check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) +@pytest.mark.online def test_api_with_partial_setup_py(): expected_file = test_env.get_test_loc("test-api-with-partial-setup-py.json", must_exist=False) results = resolver_api( diff --git a/tests/test_utils.py b/tests/test_utils.py index b60f67a1..a6f34af7 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -22,6 +22,7 @@ from python_inspector.utils import get_netrc_auth from python_inspector.utils_pypi import PypiSimpleRepository from python_inspector.utils_pypi import valid_python_version +import pytest test_env = FileDrivenTesting() test_env.test_data_dir = os.path.join(os.path.dirname(__file__), "data") @@ -83,6 +84,7 @@ def test_parse_reqs(): check_json_file_results(result_file, expected_file) +@pytest.mark.online def test_get_sdist_file(): sdist_file = fetch_and_extract_sdist( repos=tuple([PypiSimpleRepository()]), From 2cd910b6a3be8391f7bdce25d026f14cfd9de256 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 12:35:07 +0200 Subject: [PATCH 079/105] Run online tests only once per OS We do not need to run all online tests on all OSes adn Python combinations, but just once for sanity on each OS. Signed-off-by: Philippe Ombredanne --- azure-pipelines.yml | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7a2d4d9b..d9912e3d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,13 +15,37 @@ jobs: test_suites: all: make check + - template: etc/ci/azure-posix.yml + parameters: + job_name: online_ubuntu24_cpython + image_name: ubuntu-24.04 + python_versions: ['3.10'] + test_suites: + all: venv/bin/pytest -n 2 -vvs -m 'online' + + - template: etc/ci/azure-win.yml + parameters: + job_name: online_win2022_cpython + image_name: windows-2022 + python_versions: ['3.10'] + test_suites: + all: venv\Scripts\pytest -n 2 -vvs -m 'online' + + - template: etc/ci/azure-posix.yml + parameters: + job_name: online_macos14_cpython + image_name: macOS-14 + python_versions: ['3.10'] + test_suites: + all: venv/bin/pytest -n 2 -vvs -m 'online' + - template: etc/ci/azure-posix.yml parameters: job_name: ubuntu22_cpython image_name: ubuntu-22.04 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs + all: venv/bin/pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-posix.yml parameters: @@ -29,7 +53,7 @@ jobs: image_name: ubuntu-24.04 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs + all: venv/bin/pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-posix.yml parameters: @@ -37,7 +61,7 @@ jobs: image_name: macOS-13 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs + all: venv/bin/pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-posix.yml parameters: @@ -45,7 +69,7 @@ jobs: image_name: macOS-14 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs + all: venv/bin/pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-posix.yml parameters: @@ -53,7 +77,7 @@ jobs: image_name: macOS-15 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs + all: venv/bin/pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-win.yml parameters: @@ -61,7 +85,7 @@ jobs: image_name: windows-2019 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs + all: venv\Scripts\pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-win.yml parameters: @@ -69,7 +93,7 @@ jobs: image_name: windows-2022 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs + all: venv\Scripts\pytest -n 2 -vvs -m 'not online' - template: etc/ci/azure-win.yml parameters: @@ -77,4 +101,4 @@ jobs: image_name: windows-2025 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs + all: venv\Scripts\pytest -n 2 -vvs -m 'not online' From 60ecee5f1628ec132814d3a7a033304186064b42 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 14:15:28 +0200 Subject: [PATCH 080/105] Format code Signed-off-by: Philippe Ombredanne --- tests/test_api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_api.py b/tests/test_api.py index 957589a0..680f215b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -43,6 +43,7 @@ def test_api_with_specifier_pdt(): ) check_data_results(results=results.to_dict(generic_paths=True), expected_file=expected_file) + @pytest.mark.online def test_api_with_requirement_file(): expected_file = test_env.get_test_loc("test-api-with-requirement-file.json", must_exist=False) From 148aae90a79cc0499660fc1903adf0c3d83421ca Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 14:22:04 +0200 Subject: [PATCH 081/105] Use double quotes for Windows Otherwise CI test fails with pytest markers Signed-off-by: Philippe Ombredanne --- azure-pipelines.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d9912e3d..f57e2dae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,7 @@ jobs: image_name: ubuntu-24.04 python_versions: ['3.10'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'online' + all: venv/bin/pytest -n 2 -vvs -m "online" - template: etc/ci/azure-win.yml parameters: @@ -29,7 +29,7 @@ jobs: image_name: windows-2022 python_versions: ['3.10'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs -m 'online' + all: venv\Scripts\pytest -n 2 -vvs -m "online" - template: etc/ci/azure-posix.yml parameters: @@ -37,7 +37,7 @@ jobs: image_name: macOS-14 python_versions: ['3.10'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'online' + all: venv/bin/pytest -n 2 -vvs -m "online" - template: etc/ci/azure-posix.yml parameters: @@ -45,7 +45,7 @@ jobs: image_name: ubuntu-22.04 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'not online' + all: venv/bin/pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-posix.yml parameters: @@ -53,7 +53,7 @@ jobs: image_name: ubuntu-24.04 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'not online' + all: venv/bin/pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-posix.yml parameters: @@ -61,7 +61,7 @@ jobs: image_name: macOS-13 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'not online' + all: venv/bin/pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-posix.yml parameters: @@ -69,7 +69,7 @@ jobs: image_name: macOS-14 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'not online' + all: venv/bin/pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-posix.yml parameters: @@ -77,7 +77,7 @@ jobs: image_name: macOS-15 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv/bin/pytest -n 2 -vvs -m 'not online' + all: venv/bin/pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-win.yml parameters: @@ -85,7 +85,7 @@ jobs: image_name: windows-2019 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs -m 'not online' + all: venv\Scripts\pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-win.yml parameters: @@ -93,7 +93,7 @@ jobs: image_name: windows-2022 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs -m 'not online' + all: venv\Scripts\pytest -n 2 -vvs -m "not online" - template: etc/ci/azure-win.yml parameters: @@ -101,4 +101,4 @@ jobs: image_name: windows-2025 python_versions: ['3.9', '3.10', '3.11', '3.12'] test_suites: - all: venv\Scripts\pytest -n 2 -vvs -m 'not online' + all: venv\Scripts\pytest -n 2 -vvs -m "not online" From 2e3464b79811bcf505d93692da2418e2444150ed Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 16:52:32 +0200 Subject: [PATCH 082/105] Ignore local .env file Signed-off-by: Philippe Ombredanne --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8a93c94d..4818bb3a 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ tcl # Ignore Jupyter Notebook related temp files .ipynb_checkpoints/ /.ruff_cache/ +.env \ No newline at end of file From d4af79f0da82ab0d16dcf60b363a6a5290cd9403 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 16:54:29 +0200 Subject: [PATCH 083/105] Add correct extras for documentation Signed-off-by: Philippe Ombredanne --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 8ab23688..7e399c8a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -26,4 +26,4 @@ python: - method: pip path: . extra_requirements: - - docs + - testing From 49bfd37c7273f2118d35585c67e53f0cf7642f43 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 16:58:37 +0200 Subject: [PATCH 084/105] Improve MANIFEST Signed-off-by: Philippe Ombredanne --- MANIFEST.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index ef3721e8..0f197075 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,6 @@ graft src +graft docs +graft etc include *.LICENSE include NOTICE @@ -6,10 +8,18 @@ include *.ABOUT include *.toml include *.yml include *.rst +include *.png include setup.* include configure* include requirements* -include .git* +include .dockerignore +include .gitignore +include .readthedocs.yml +include manage.py +include Dockerfile* +include Makefile +include MANIFEST.in -global-exclude *.py[co] __pycache__ *.*~ +include .VERSION +global-exclude *.py[co] __pycache__ *.*~ From 5bc987a16cb3ae0f6de101a9c9e277df431f4317 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 17:12:58 +0200 Subject: [PATCH 085/105] Improve cleaning on POSIX Signed-off-by: Philippe Ombredanne --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 83fd2035..3dd9a0ab 100755 --- a/configure +++ b/configure @@ -35,7 +35,7 @@ DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constrai VIRTUALENV_DIR=venv # Cleanable files and directories to delete with the --clean option -CLEANABLE="build dist venv .cache .eggs" +CLEANABLE="build dist venv .cache .eggs *.egg-info docs/_build/ pip-selfcheck.json" # extra arguments passed to pip PIP_EXTRA_ARGS=" " @@ -167,6 +167,7 @@ clean() { for cln in $CLEANABLE; do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}"; done + find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete set +e exit } From 887779a9bd36650ffc6751f0069b492e80dd2f08 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 17:19:44 +0200 Subject: [PATCH 086/105] Rename dev extra to "dev" Instead of testing ... and update references accordingly Signed-off-by: Philippe Ombredanne --- .readthedocs.yml | 2 +- Makefile | 7 ++++++- configure | 2 +- configure.bat | 2 +- setup.cfg | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 7e399c8a..683f3a82 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -26,4 +26,4 @@ python: - method: pip path: . extra_requirements: - - testing + - dev diff --git a/Makefile b/Makefile index 413399e5..3041547b 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,13 @@ PYTHON_EXE?=python3 VENV=venv ACTIVATE?=. ${VENV}/bin/activate; + +conf: + @echo "-> Install dependencies" + ./configure + dev: - @echo "-> Configure the development envt." + @echo "-> Configure and install development dependencies" ./configure --dev doc8: diff --git a/configure b/configure index 3dd9a0ab..5ef0e063 100755 --- a/configure +++ b/configure @@ -29,7 +29,7 @@ CLI_ARGS=$1 # Requirement arguments passed to pip and used by default or with --dev. REQUIREMENTS="--editable . --constraint requirements.txt" -DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt" +DEV_REQUIREMENTS="--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt" # where we create a virtualenv VIRTUALENV_DIR=venv diff --git a/configure.bat b/configure.bat index 18b37038..3e9881fb 100644 --- a/configure.bat +++ b/configure.bat @@ -27,7 +27,7 @@ @rem # Requirement arguments passed to pip and used by default or with --dev. set "REQUIREMENTS=--editable . --constraint requirements.txt" -set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt" +set "DEV_REQUIREMENTS=--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt" @rem # where we create a virtualenv set "VIRTUALENV_DIR=venv" diff --git a/setup.cfg b/setup.cfg index ad8e0d8f..99ba2607 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,7 +48,7 @@ where = src [options.extras_require] -testing = +dev = pytest >= 6, != 7.0.0 pytest-xdist >= 2 aboutcode-toolkit >= 7.0.2 From 209231f0d27de0b0cfcc51eeb0fbaf9393d3df1c Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 17:50:44 +0200 Subject: [PATCH 087/105] Add more excludes from tests Signed-off-by: Philippe Ombredanne --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c9e67720..bcca1a8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ norecursedirs = [ "dist", "build", "_build", - "dist", "etc", "local", "ci", @@ -34,7 +33,9 @@ norecursedirs = [ "thirdparty", "tmp", "venv", + ".venv", "tests/data", + "*/tests/test_data", ".eggs", "src/*/data", "tests/*/data" From 47bce2da33db6b3ce3bb16831ddca89a65494e23 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 17:54:23 +0200 Subject: [PATCH 088/105] Do not lint django migrations Signed-off-by: Philippe Ombredanne --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bcca1a8a..d79574ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,6 +66,7 @@ include = [ "docs/**/*.py", "*.py", "." + ] # ignore test data and testfiles: they should never be linted nor formatted exclude = [ @@ -78,9 +79,10 @@ exclude = [ # vulnerablecode, fetchcode "**/tests/*/test_data/**/*", "**/tests/test_data/**/*", +# django migrations + "**/migrations/**/*" ] - [tool.ruff.lint] # Rules: https://docs.astral.sh/ruff/rules/ select = [ From 5025cfb59f0555bf4b40cd75e75ce41188e19e11 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 17:58:07 +0200 Subject: [PATCH 089/105] Add README.rst to list of "license files" Signed-off-by: Philippe Ombredanne --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 99ba2607..e5b56dad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,6 +28,7 @@ license_files = AUTHORS.rst CHANGELOG.rst CODE_OF_CONDUCT.rst + README.rst [options] package_dir = From 548a72eac69e4400e4b01f22941d38fe1cb4648d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 18:59:08 +0200 Subject: [PATCH 090/105] Use Python 3.9 as lowest suupported version Signed-off-by: Philippe Ombredanne --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e5b56dad..a9c5dbc6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,6 +31,8 @@ license_files = README.rst [options] +python_requires = >=3.9 + package_dir = =src packages = find: @@ -39,7 +41,6 @@ zip_safe = false setup_requires = setuptools_scm[toml] >= 4 -python_requires = >=3.8 install_requires = From 3d256b4ac7976b46c23424e86bb62a38f0e4a095 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 19:01:22 +0200 Subject: [PATCH 091/105] Drop pycodestyle Not used anymore Signed-off-by: Philippe Ombredanne --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a9c5dbc6..6d0b6488 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,6 @@ dev = pytest >= 6, != 7.0.0 pytest-xdist >= 2 aboutcode-toolkit >= 7.0.2 - pycodestyle >= 2.8.0 twine ruff Sphinx>=5.0.2 From 645052974bf7e6f45c1e55a24a2acaa0cee24523 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 2 Apr 2025 19:26:17 +0200 Subject: [PATCH 092/105] Bump pytest minimal version Signed-off-by: Philippe Ombredanne --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6d0b6488..69f850ca 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,7 +51,7 @@ where = src [options.extras_require] dev = - pytest >= 6, != 7.0.0 + pytest >= 7.0.1 pytest-xdist >= 2 aboutcode-toolkit >= 7.0.2 twine From c3bc758e4680e8ce6d3f412e1814da494564f3ea Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 3 Apr 2025 15:32:06 +0200 Subject: [PATCH 093/105] Pin test requirements This avoid some churn from version updates Signed-off-by: Philippe Ombredanne --- tests/data/pinned-pdt-requirements.txt | 1 + .../pinned-pdt-requirements.txt-expected.json | 21 +++++++++++++++++++ tests/data/pinned-requirements.txt | 1 + .../pinned-requirements.txt-expected.json | 21 +++++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/tests/data/pinned-pdt-requirements.txt b/tests/data/pinned-pdt-requirements.txt index f3c5ff11..12d7f144 100644 --- a/tests/data/pinned-pdt-requirements.txt +++ b/tests/data/pinned-pdt-requirements.txt @@ -27,3 +27,4 @@ typing==3.6.6 typing_extensions==4.1.1 urllib3==1.26.9 zipp==3.6.0 +boolean.py==4.0.0 diff --git a/tests/data/pinned-pdt-requirements.txt-expected.json b/tests/data/pinned-pdt-requirements.txt-expected.json index 5046b41d..a9076839 100644 --- a/tests/data/pinned-pdt-requirements.txt-expected.json +++ b/tests/data/pinned-pdt-requirements.txt-expected.json @@ -656,6 +656,27 @@ "is_name_at_url": false, "is_local_path": null } + }, + { + "purl": "pkg:pypi/boolean-py@4.0.0", + "extracted_requirement": "boolean.py==4.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + } } ], "repository_homepage_url": null, diff --git a/tests/data/pinned-requirements.txt b/tests/data/pinned-requirements.txt index f3c5ff11..12d7f144 100644 --- a/tests/data/pinned-requirements.txt +++ b/tests/data/pinned-requirements.txt @@ -27,3 +27,4 @@ typing==3.6.6 typing_extensions==4.1.1 urllib3==1.26.9 zipp==3.6.0 +boolean.py==4.0.0 diff --git a/tests/data/pinned-requirements.txt-expected.json b/tests/data/pinned-requirements.txt-expected.json index 5531d406..6b13bb50 100644 --- a/tests/data/pinned-requirements.txt-expected.json +++ b/tests/data/pinned-requirements.txt-expected.json @@ -656,6 +656,27 @@ "is_name_at_url": false, "is_local_path": null } + }, + { + "purl": "pkg:pypi/boolean-py@4.0.0", + "extracted_requirement": "boolean.py==4.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + } } ], "repository_homepage_url": null, From 2e9ceff8b5ffcd1512c3e97daf3be816e94d019b Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Mon, 7 Apr 2025 09:11:47 +0200 Subject: [PATCH 094/105] Regen tests expectations Signed-off-by: Philippe Ombredanne --- tests/data/azure-devops.req-310-expected.json | 1409 +--- tests/data/azure-devops.req-312-expected.json | 1409 +--- tests/data/azure-devops.req-313-expected.json | 1409 +--- tests/data/azure-devops.req-38-expected.json | 1414 +--- .../insecure-setup-2/setup.py-expected.json | 5935 ++++------------- 5 files changed, 1543 insertions(+), 10033 deletions(-) diff --git a/tests/data/azure-devops.req-310-expected.json b/tests/data/azure-devops.req-310-expected.json index 84ac573e..2c44d88b 100644 --- a/tests/data/azure-devops.req-310-expected.json +++ b/tests/data/azure-devops.req-310-expected.json @@ -126,73 +126,12 @@ "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.32.0", + "version": "1.33.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:19", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "azpysdkhelp@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/39/83/325bf5e02504dbd8b4faa98197a44cdf8a325ef259b48326a2b6f17f8383/azure_core-1.32.0-py3-none-any.whl", - "size": 198855, - "sha1": null, - "md5": "63590a499bd095f8ca407464df434dd5", - "sha256": "eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "azure-core", - "version": "1.32.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:17", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://learn.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.33.0 (2025-04-03)\n\n### Features Added\n\n- Added native OpenTelemetry tracing to Azure Core which enables users to use OpenTelemetry to trace Azure SDK operations without needing to install a plugin. #39563\n - To enable native OpenTelemetry tracing, users need to:\n 1. Have `opentelemetry-api` installed.\n 2. Ensure that `settings.tracing_implementation` is not set.\n 3. Ensure that `settings.tracing_enabled` is set to `True`.\n - If `setting.tracing_implementation` is set, the tracing plugin will be used instead of the native tracing.\n - If `settings.tracing_enabled` is set to `False`, tracing will be disabled.\n - The `OpenTelemetryTracer` class was added to the `azure.core.tracing.opentelemetry` module. This is a wrapper around the OpenTelemetry tracer that is used to create spans for Azure SDK operations.\n - Added a `get_tracer` method to the new `azure.core.instrumentation` module. This method returns an instance of the `OpenTelemetryTracer` class if OpenTelemetry is available.\n - A `TracingOptions` TypedDict class was added to define the options that SDK users can use to configure tracing per-operation. These options include the ability to enable or disable tracing and set additional attributes on spans.\n - Example usage: `client.method(tracing_options={\"enabled\": True, \"attributes\": {\"foo\": \"bar\"}})`\n - The `DistributedTracingPolicy` and `distributed_trace`/`distributed_trace_async` decorators now uses the OpenTelemetry tracer if it is available and native tracing is enabled.\n - SDK clients can define an `_instrumentation_config` class variable to configure the OpenTelemetry tracer used in method span creation. Possible configuration options are `library_name`, `library_version`, `schema_url`, and `attributes`.\n - `DistributedTracingPolicy` now accepts a `instrumentation_config` keyword argument to configure the OpenTelemetry tracer used in HTTP span creation.\n\n### Breaking Changes\n\n- Removed automatic tracing enablement for the OpenTelemetry plugin if `opentelemetry` was imported. To enable tracing with the plugin, please import `azure.core.settings.settings` and set `settings.tracing_implementation` to `\"opentelemetry\"`. #39563\n- In `DistributedTracingPolicy`, the default span name is now just the HTTP method (e.g., \"GET\", \"POST\") and no longer includes the URL path. This change was made to converge with the OpenTelemetry HTTP semantic conventions. The full URL is still included in the span attributes.\n- Renamed span attributes in `DistributedTracingPolicy`:\n - \"x-ms-client-request-id\" is now \"az.client_request_id\"\n - \"x-ms-request-id\" is now \"az.service_request_id\"\n\n### Bugs Fixed\n\n- Fixed an issue where the `traceparent` header was not being set correctly in the `DistributedTracingPolicy`. The `traceparent` header will now set based on the context of the HTTP client span. #40074\n\n### Other Changes\n\n- Added `opentelemetry-api` as an optional dependency for tracing. This can be installed with `pip install azure-core[tracing]`. #39563\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2025-04-03T23:51:03", "parties": [ { "type": "person", @@ -212,15 +151,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/cc/ee/668328306a9e963a5ad9f152cd98c7adad86c822729fd1d2a01613ad1e67/azure_core-1.32.0.tar.gz", - "size": 279128, + "download_url": "https://files.pythonhosted.org/packages/07/b7/76b7e144aa53bd206bf1ce34fa75350472c3f69bf30e5c8c18bc9881035d/azure_core-1.33.0-py3-none-any.whl", + "size": 207071, "sha1": null, - "md5": "eac67c509ddce142eadef1e384e1f631", - "sha256": "22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5", + "md5": "ddd17415a5573ca4c435d7db0ff5631f", + "sha256": "9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -240,9 +180,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.33.0/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" + "purl": "pkg:pypi/azure-core@1.33.0" }, { "type": "pypi", @@ -312,74 +252,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-devops@7.1.0b4" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-devops", - "version": "7.1.0b4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python wrapper around the Azure DevOps 7.x APIs\nAzure DevOps Python clients", - "release_date": "2023-11-20T14:38:06", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Microsoft", - "VSTS", - "Team Services", - "SDK", - "AzureTfs", - "AzureDevOps", - "DevOps", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/microsoft/azure-devops-python-api", - "download_url": "https://files.pythonhosted.org/packages/e1/f9/495982345252dc7a15ac632e038be1f975ca0d2f25abfe8f8d908569141d/azure-devops-7.1.0b4.tar.gz", - "size": 1336261, - "sha1": null, - "md5": "bf401acf6533d4a2dcfd2106ffcbc86a", - "sha256": "f04ba939112579f3d530cfecc044a74ef9e9339ba23c9ee1ece248241f07ff85", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-devops/7.1.0b4/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-devops@7.1.0b4" - }, { "type": "pypi", "namespace": null, @@ -441,67 +313,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-storage-blob", - "version": "12.25.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-27T17:13:05", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "ascl@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", - "size": 570541, - "sha1": null, - "md5": "0e0be21e8fd942300ba335049912d4a2", - "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.1" - }, { "type": "pypi", "namespace": null, @@ -566,70 +377,6 @@ "datasource_id": null, "purl": "pkg:pypi/certifi@2025.1.31" }, - { - "type": "pypi", - "namespace": null, - "name": "certifi", - "version": "2025.1.31", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python package for providing Mozilla's CA Bundle.\nCertifi: Python SSL Certificates\n================================\n\nCertifi provides Mozilla's carefully curated collection of Root Certificates for\nvalidating the trustworthiness of SSL certificates while verifying the identity\nof TLS hosts. It has been extracted from the `Requests`_ project.\n\nInstallation\n------------\n\n``certifi`` is available on PyPI. Simply install it with ``pip``::\n\n $ pip install certifi\n\nUsage\n-----\n\nTo reference the installed certificate authority (CA) bundle, you can use the\nbuilt-in function::\n\n >>> import certifi\n\n >>> certifi.where()\n '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'\n\nOr from the command line::\n\n $ python -m certifi\n /usr/local/lib/python3.7/site-packages/certifi/cacert.pem\n\nEnjoy!\n\n.. _`Requests`: https://requests.readthedocs.io/en/master/\n\nAddition/Removal of Certificates\n--------------------------------\n\nCertifi does not support any addition/removal or other modification of the\nCA trust store content. This project is intended to provide a reliable and\nhighly portable root of trust to python deployments. Look to upstream projects\nfor methods to use alternate trust.", - "release_date": "2025-01-31T02:16:47", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/certifi/python-certifi", - "download_url": "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", - "size": 167577, - "sha1": null, - "md5": "6d326c5b0649c4dee817837c192f3824", - "sha256": "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/certifi/python-certifi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MPL-2.0", - "classifiers": [ - "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/certifi/2025.1.31/json", - "datasource_id": null, - "purl": "pkg:pypi/certifi@2025.1.31" - }, { "type": "pypi", "namespace": null, @@ -693,86 +440,26 @@ { "type": "pypi", "namespace": null, - "name": "cffi", - "version": "1.17.1", + "name": "charset-normalizer", + "version": "3.4.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "CFFI\n====\n\nForeign Function Interface for Python calling C code.\nPlease see the `Documentation `_.\n\nContact\n-------\n\n`Mailing list `_", - "release_date": "2024-09-04T20:45:21", + "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", + "release_date": "2024-12-24T18:09:54", "parties": [ { "type": "person", "role": "author", - "name": "Armin Rigo, Maciej Fijalkowski", - "email": "python-cffi@googlegroups.com", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "http://cffi.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", - "size": 516621, - "sha1": null, - "md5": "4336ca58b2df0cc3b163884d5fa2e5e2", - "sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", - "sha512": null, - "bug_tracking_url": "https://github.com/python-cffi/cffi/issues", - "code_view_url": "https://github.com/python-cffi/cffi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cffi/1.17.1/json", - "datasource_id": null, - "purl": "pkg:pypi/cffi@1.17.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:09:54", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", "url": null } ], @@ -833,89 +520,6 @@ "datasource_id": null, "purl": "pkg:pypi/charset-normalizer@3.4.1" }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:12:35", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - } - ], - "keywords": [ - "encoding", - "charset", - "charset-detector", - "detector", - "normalization", - "unicode", - "chardet", - "detect", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Linguistic", - "Topic :: Utilities", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz", - "size": 123188, - "sha1": null, - "md5": "1d808eb9efaf70bf0ec3b800f3c7dca8", - "sha256": "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/jawah/charset_normalizer", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/charset-normalizer/3.4.1/json", - "datasource_id": null, - "purl": "pkg:pypi/charset-normalizer@3.4.1" - }, { "type": "pypi", "namespace": null, @@ -970,60 +574,6 @@ "datasource_id": null, "purl": "pkg:pypi/click@8.1.8" }, - { - "type": "pypi", - "namespace": null, - "name": "click", - "version": "8.1.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Composable command line interface toolkit\n# $ click_\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\n## A Simple Example\n\n```python\nimport click\n\n@click.command()\n@click.option(\"--count\", default=1, help=\"Number of greetings.\")\n@click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\ndef hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\nif __name__ == '__main__':\n hello()\n```\n\n```\n$ python hello.py --count=3\nYour name: Click\nHello, Click!\nHello, Click!\nHello, Click!\n```\n\n\n## Donate\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, [please\ndonate today][].\n\n[please donate today]: https://palletsprojects.com/donate", - "release_date": "2024-12-21T18:38:44", - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Pallets ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", - "size": 226593, - "sha1": null, - "md5": "b52ee8e6c33d88a2b4626e6a6002245d", - "sha256": "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/click/", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.8/json", - "datasource_id": null, - "purl": "pkg:pypi/click@8.1.8" - }, { "type": "pypi", "namespace": null, @@ -1099,31 +649,27 @@ { "type": "pypi", "namespace": null, - "name": "cryptography", - "version": "44.0.2", + "name": "idna", + "version": "3.10", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.11+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2025-03-02T00:01:37", + "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", + "release_date": "2024-09-15T18:07:37", "parties": [ { "type": "person", "role": "author", - "name": "The cryptography developers ", - "email": "The Python Cryptographic Authority and individual contributors ", + "name": null, + "email": "Kim Davies ", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: POSIX :: BSD", - "Operating System :: POSIX :: Linux", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", @@ -1131,29 +677,30 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Security :: Cryptography" + "Topic :: Internet :: Name Service (DNS)", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/cd/25/4ce80c78963834b8a9fd1cc1266be5ed8d1840785c0f2e1b73b8d128d505/cryptography-44.0.2.tar.gz", - "size": 710807, + "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", + "size": 70442, "sha1": null, - "md5": "9cb2411324687347a27d349d3e74eb7c", - "sha256": "c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "md5": "ce22685f1b296fb33e5fda362870685d", + "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/kjd/idna", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0 OR BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: BSD License" ] }, @@ -1164,64 +711,61 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/44.0.2/json", + "api_data_url": "https://pypi.org/pypi/idna/3.10/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@44.0.2" + "purl": "pkg:pypi/idna@3.10" }, { "type": "pypi", "namespace": null, - "name": "idna", - "version": "3.10", + "name": "isodate", + "version": "0.7.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:37", + "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", + "release_date": "2024-10-08T23:04:09", "parties": [ { "type": "person", "role": "author", - "name": null, - "email": "Kim Davies ", + "name": "Gerhard Weis", + "email": null, "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", - "size": 70442, + "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", + "size": 22320, "sha1": null, - "md5": "ce22685f1b296fb33e5fda362870685d", - "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", + "md5": "f94e527b847362a79a455d0b55134579", + "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { + "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1233,210 +777,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", + "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "idna", - "version": "3.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:39", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Kim Davies ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", - "size": 190490, - "sha1": null, - "md5": "28448b00665099117b6daa9887812cc4", - "sha256": "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", - "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:09", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", - "size": 22320, - "sha1": null, - "md5": "f94e527b847362a79a455d0b55134579", - "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:11", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", - "size": 29705, - "sha1": null, - "md5": "5ce182fd7f6152cda19ec605b6740687", - "sha256": "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" + "purl": "pkg:pypi/isodate@0.7.2" }, { "type": "pypi", @@ -1498,66 +841,6 @@ "datasource_id": null, "purl": "pkg:pypi/msrest@0.7.1" }, - { - "type": "pypi", - "namespace": null, - "name": "msrest", - "version": "0.7.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "AutoRest swagger generator Python client runtime.\nAutoRest: Python Client Runtime\n===============================\n\n.. image:: https://travis-ci.org/Azure/msrest-for-python.svg?branch=master\n :target: https://travis-ci.org/Azure/msrest-for-python\n\n.. image:: https://codecov.io/gh/azure/msrest-for-python/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/azure/msrest-for-python\n\nInstallation\n------------\n\nTo install:\n\n.. code-block:: bash\n\n $ pip install msrest\n\n\nRelease History\n---------------\n\n2022-06-10 Version 0.7.1\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Declare correctly msrest as Python 3.6 and more only for clarity #251\n\n\n2022-06-07 Version 0.7.0\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `azure-core` as installation requirement #247\n- Replace `SerializationError` and `DeserializationError` in `msrest.exceptions` with those in `azure.core` #247\n\n**Bugfixes**\n\n- Typing annotation in LROPoller (thanks to akx) #242\n\nThanks to kianmeng for typo fixes in the documentation.\n\n2021-01-26 Version 0.6.21\n+++++++++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixes `failsafe_deserialize` introduced in `0.6.20` #232\n\n2021-01-25 Version 0.6.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `failsafe_deserialize` method to the `Deserializer` object. #232\n- Serialize `datetime`, `date`, `time`, `timedelta` and `Decimal` correctly when serializing `object` . #224\n\n2020-09-08 Version 0.6.19\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization of random Model object #220\n- Fix serialization of unicode string in Py2 and object mode #221\n\n\n2020-07-27 Version 0.6.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for attributes/text in the same XML node #218\n\n\n2020-06-25 Version 0.6.17\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML and discriminator #214\n\n\n2020-06-09 Version 0.6.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML parsing with namespaces and attributes #209\n\n**Features**\n\n- Add py.typed for mypy support\n\n\n2020-06-04 Version 0.6.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix RFC regression introduced in 0.6.14 (RFC parse date are no longer pickable) #208\n- Fix XML parsing with namespaces #206\n\nThanks to ivanst0 for the contribution\n\n\n2020-05-18 Version 0.6.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix \"from_dict\" in some complex flattening scenario #204\n- Fix RFC date parsing if machine locale is not English #201\n\n\n2020-04-07 Version 0.6.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix deserializer and flattening if intermediate node is None #198\n- Fix validation exception message for minimum/maximum checks #199\n\n\n2020-04-06 Version 0.6.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add \"time\" serializer/deserializer #196\n\n2020-01-30 Version 0.6.11\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode can now be enabled even if the given Model has no XML metadata #184\n- Add Kerberos Authentication #186\n- Improve error message if expected type is dictionary and something else is provided #188\n\n**Bugfixes**\n\n- Fix comma separated serialization of array in query #186\n- Fix validation of basic types in some complex scenario #189\n\nThanks to catatonicprime for the contribution\n\n2019-09-04 Version 0.6.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode now supports OpenAPI additional properties # 174\n\n**Bugfixes**\n\n- Accept \"is_xml\" kwargs to force XML serialization #178\n- Disable XML deserialization if received element is not an ElementTree #178\n- A \"null\" enum deserialize as None, and not \"None\" anymore #173\n- Fix some UTF8 encoding issue in Python 2.7 and XML mode #172\n\n\n2019-07-24 Version 0.6.9\n++++++++++++++++++++++++\n\n**Features**\n\n- Accept extensions of JSON mimetype as valid JSON #167\n\n2019-06-24 Version 0.6.8\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Impossible to serialize XML if model contains UTF8 characters on Python 2.7 #165\n- Impossible to deserialize a HTTP response as XML if body contains UTF8 characters on Python 2.7 #165\n- Loading a serialized configuration fails with NameError on NoOptionError #162\n\nThanks to cclauss for the contribution\n\n2019-06-12 Version 0.6.7\n++++++++++++++++++++++++\n\n**Features**\n\n- Add DomainCredentials credentials for EventGrid\n\nThanks to kalyanaj for the contribution\n\n2019-03-21 Version 0.6.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Make 0.6.x series compatible with pyinstaller again\n- sdist now includes tests\n\nThanks to dotlambda for the contribution\n\n2019-03-11 Version 0.6.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix list of integers serialization if div is provided #151\n- Fix parsing of UTF8 with BOM #145\n\nThanks to eduardomourar for the contribution\n\n2019-01-09 Version 0.6.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression on credentials configuration if used outside of Autorest scope #135\n\n2019-01-08 Version 0.6.3\n++++++++++++++++++++++++\n\n**Features**\n\n- Updated **experimental** async support. Requires Autorest.Python 4.0.64.\n\n2018-11-19 Version 0.6.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix circular dependency in TYPE_CHECKING mode #128\n\n2018-10-15 Version 0.6.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove unnecessary verbose \"warnings\" log #126\n\n2018-10-02 Version 0.6.0\n++++++++++++++++++++++++\n\n**Features**\n\n- The environment variable AZURE_HTTP_USER_AGENT, if present, is now injected part of the UserAgent\n- New **preview** msrest.universal_http module. Provide tools to generic HTTP management (sync/async, requests/aiohttp, etc.)\n- New **preview** msrest.pipeline implementation:\n\n - A Pipeline is an ordered list of Policies than can process an HTTP request and response in a generic way.\n - More details in the wiki page about Pipeline: https://github.com/Azure/msrest-for-python/wiki/msrest-0.6.0---Pipeline\n\n- Adding new attributes to Configuration instance:\n\n - http_logger_policy - Policy to handle HTTP logging\n - user_agent_policy - Policy to handle UserAgent\n - pipeline - The current pipeline used by the SDK client\n - async_pipeline - The current async pipeline used by the async SDK client\n\n- Installing \"msrest[async]\" now installs the **experimental** async support. Works ONLY for Autorest.Python 4.0.63.\n\n**Breaking changes**\n\n- The HTTPDriver API introduced in 0.5.0 has been replaced by the Pipeline implementation.\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http\":\n\n - ClientRedirectPolicy\n - ClientProxies\n - ClientConnection\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http.requests\":\n\n - ClientRetryPolicy\n\n**Bugfixes**\n\n- Fix \"long\" on Python 2 if used with the \"object\" type #121\n\nThanks to robgolding for the contribution\n\n2018-09-04 Version 0.5.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix a serialization issue if additional_properties is declared, and \"automatic model\" syntax is used\n (\"automatic model\" being the ability to pass a dict to command and have the model auto-created) # 120\n\n2018-07-12 Version 0.5.4\n++++++++++++++++++++++++\n\n**Features**\n\n- Support additionalProperties and XML\n\n**BugFixes**\n\n- Better parse empty node and not string types\n- Improve \"object\" XML parsing\n\n2018-07-10 Version 0.5.3\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Fix some XML serialization subtle scenarios\n\n2018-07-09 Version 0.5.2\n++++++++++++++++++++++++\n\n**Features**\n\n- deserialize/from_dict now accepts a content-type parameter to parse XML strings\n\n**Bugfixes**\n\n- Fix some complex XML Swagger definitions.\n\nThis release likely breaks already generated XML SDKs, that needs to be regenerated with autorest.python 3.0.58\n\n2018-06-21 Version 0.5.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Lower Accept header overwrite logging message #110\n- Fix 'object' type and XML format\n\nThanks to dharmab for the contribution\n\n2018-06-12 Version 0.5.0\n++++++++++++++++++++++++\n\n**Disclaimer**\n\nThis released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring\nand new features to continue with 0.4.x versioning\n\n**Features**\n\n- Add XML support\n- Add many type hints, and MyPY testing on CI.\n- HTTP calls are made through a HTTPDriver API. Only implementation is `requests` for now. This driver API is *not* considered stable\n and you should pin your msrest version if you want to provide a personal implementation.\n\n**Bugfixes**\n\n- Incorrect milliseconds serialization for some datetime object #94\n\n**Deprecation**\n\nThat will trigger a DeprecationWarning if an old Autorest generated code is used.\n\n- _client.add_header is deprecated, and config.headers should be used instead\n- _client.send_formdata is deprecated, and _client.put/get/delete/post + _client.send should be used instead\n\n2018-04-30 Version 0.4.29\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Improve `SDKClient.__exit__` to take exc_details as optional parameters and not required #93\n- refresh_session should also use the permanent HTTP session if available #91\n\n2018-04-18 Version 0.4.28\n+++++++++++++++++++++++++\n\n**Features**\n\n- msrest is now able to keep the \"requests.Session\" alive for performance. To activate this behavior:\n\n - Use the final Client as a context manager (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and `client.close()` (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and client._client.close() (not recommended, but available in old releases of SDK)\n\n- All Authentication classes now define `signed_session` and `refresh_session` with an optional `session` parameter.\n To take benefits of the session improvement, a subclass of Authentication *MUST* add this optional parameter\n and use it if it's not `None`:\n\n def signed_session(self, session=None):\n session = session or requests.Session()\n\n # As usual from here.\n\n2018-03-07 Version 0.4.27\n+++++++++++++++++++++++++\n\n**Features**\n\n- Disable HTTP log by default (security), add `enable_http_log` to restore it #86\n\n**BugFixes**\n\n- Fix incorrect date parsing if ms precision is over 6 digits #82\n\n2018-01-30 Version 0.4.26\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add TopicCredentials for EventGrid client\n\n**Bugfixes**\n\n- Fix minimal dependency of isodate\n- Fix serialisation from dict if datetime provided\n\n2018-01-08 Version 0.4.25\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add LROPoller class. This is a customizable LRO engine.\n This is the poller engine of Autorest.Python 3.0, and is not used by code generated by previous Autorest version.\n\n2018-01-03 Version 0.4.24\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Date parsing is now compliant with Autorest / Swagger 2.0 specification (less lenient)\n\n**Internal optimisation**\n\n- Call that does not return a streamable object are now executed in requests stream mode False (was True whatever the type of the call).\n This should reduce the number of leaked opened session and allow urllib3 to manage connection pooling more efficiently.\n Only clients generated with Autorest.Python >= 2.1.31 (not impacted otherwise, fully backward compatible)\n\n2017-12-21 Version 0.4.23\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept to deserialize enum of different type if content string match #75\n- Stop failing on deserialization if enum string is unkwon. Return the string instead.\n\n**Features**\n\n- Model now accept kwargs in constructor for future kwargs models\n\n2017-12-15 Version 0.4.22\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Do not validate additional_properties #73\n- Improve validation error if expected type is dict, but actual type is not #73\n\n2017-12-14 Version 0.4.21\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix additional_properties if Swagger was flatten #72\n\n2017-12-13 Version 0.4.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for additional_properties\n\n - By default, all additional_properties are kept.\n - Additional properties are sent to the server only if it was specified in the Swagger,\n or if \"enable_additional_properties_sending\" is called on the model we want it.\n This is a class method that enables it for all instance of this model.\n\n2017-11-20 Version 0.4.19\n+++++++++++++++++++++++++\n\n**Features**\n\n- The interpretation of Swagger 2.0 \"discriminator\" is now lenient. This means for these two scenarios:\n\n - Discriminator value is missing from the received payload\n - Discriminator value is not defined in the Swagger\n\n Instead of failing with an exception, this now returns the base type for this \"discriminator\".\n\n Note that this is not a contradiction of the Swagger 2.0 spec, that specifies\n \"validation SHOULD fail [...] there may exist valid reasons in particular circumstances to ignore a particular item,\n but the full implications must be understood and carefully weighed before choosing a different course.\"\n\n This cannot be configured for now and is the new default behvaior, but can be in the future if needed.\n\n**Bugfixes**\n\n- Optional formdata parameters were raising an exception (#65)\n- \"application/x-www-form-urlencoded\" form was sent using \"multipart/form-data\".\n This causes problems if the server does not support \"multipart/form-data\" (#66)\n\n2017-10-26 Version 0.4.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add ApiKeyCredentials class. This can be used to support OpenAPI ApiKey feature.\n- Add CognitiveServicesAuthentication class. Pre-declared ApiKeyCredentials class for Cognitive Services.\n\n2017-10-12 Version 0.4.17\n+++++++++++++++++++++++++\n\n**Features**\n\nThis make Authentication classes more consistent:\n\n- OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)\n- BasicTokenAuthentication has now a \"set_token\" methods that does nothing.\n\nThis allows test like \"isintance(o, BasicTokenAuthentication)\" to be guaranteed that the following attributes exists:\n\n- token\n- set_token()\n- signed_session()\n\nThis means for users of \"msrestazure\", that they are guaranteed that all AD classes somehow inherits from \"BasicTokenAuthentication\"\n\n2017-10-05 Version 0.4.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression: accept \"set\" as a valid \"[str]\" (#60)\n\n2017-09-28 Version 0.4.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Always log response body (#16)\n- Improved exception message if error JSON is Odata v4 (#55)\n- Refuse \"str\" as a valid \"[str]\" type (#41)\n- Better exception handling if input from server is not JSON valid\n\n**Features**\n\n- Add Configuration.session_configuration_callback to customize the requests.Session if necessary (#52)\n- Add a flag to Serializer to disable client-side-validation (#51)\n- Remove \"import requests\" from \"exceptions.py\" for apps that require fast loading time (#23)\n\nThank you to jayden-at-arista for the contribution\n\n2017-08-23 Version 0.4.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax with enum modeled as string and enum used\n\n2017-08-22 Version 0.4.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax using isodate.Duration (#42)\n\n2017-08-21 Version 0.4.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Input is now more lenient\n- Model have a \"validate\" method to check content constraints\n- Model have now 4 new methods:\n\n - \"serialize\" that gives the RestAPI that will be sent\n - \"as_dict\" that returns a dict version of the Model. Callbacks are available.\n - \"deserialize\" the parses the RestAPI JSON into a Model\n - \"from_dict\" that parses several dict syntax into a Model. Callbacks are available.\n\nMore details and examples in the Wiki article on Github:\nhttps://github.com/Azure/msrest-for-python/wiki/msrest-0.4.12---Serialization-change\n\n**Bugfixes**\n\n- Better Enum checking (#38)\n\n2017-06-21 Version 0.4.11\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix incorrect dependency to \"requests\" 2.14.x, instead of 2.x meant in 0.4.8\n\n2017-06-15 Version 0.4.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add requests hooks to configuration\n\n2017-06-08 Version 0.4.9\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept \"null\" value for paging array as an empty list and do not raise (#30)\n\n2017-05-22 Version 0.4.8\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix random \"pool is closed\" error (#29)\n- Fix requests dependency to version 2.x, since version 3.x is annunced to be breaking.\n\n2017-04-04 Version 0.4.7\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Refactor paging #22:\n\n - \"next\" is renamed \"advance_page\" and \"next\" returns only 1 element (Python 2 expected behavior)\n - paging objects are now real generator and support the \"next()\" built-in function without need for \"iter()\"\n\n- Raise accurate DeserialisationError on incorrect RestAPI discriminator usage #27\n- Fix discriminator usage of the base class name #27\n- Remove default mutable arguments in Clients #20\n- Fix object comparison in some scenarios #24\n\n2017-03-06 Version 0.4.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Allow Model sub-classes to be serialized if type is \"object\"\n\n2017-02-13 Version 0.4.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix polymorphic deserialization #11\n- Fix regexp validation if '\\\\w' is used in Python 2.7 #13\n- Fix dict deserialization if keys are unicode in Python 2.7\n\n**Improvements**\n\n- Add polymorphic serialisation from dict objects\n- Remove chardet and use HTTP charset declaration (fallback to utf8)\n\n2016-09-14 Version 0.4.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove paging URL validation, part of fix https://github.com/Azure/autorest/pull/1420\n\n**Disclaimer**\n\nIn order to get paging fixes for impacted clients, you need this package and Autorest > 0.17.0 Nightly 20160913\n\n2016-09-01 Version 0.4.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Better exception message (https://github.com/Azure/autorest/pull/1300)\n\n2016-08-15 Version 0.4.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization if \"object\" type contains None (https://github.com/Azure/autorest/issues/1353)\n\n2016-08-08 Version 0.4.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix compatibility issues with requests 2.11.0 (https://github.com/Azure/autorest/issues/1337)\n- Allow url of ClientRequest to have parameters (https://github.com/Azure/autorest/issues/1217)\n\n2016-05-25 Version 0.4.0\n++++++++++++++++++++++++\n\nThis version has no bug fixes, but implements new features of Autorest:\n- Base64 url type\n- unixtime type\n- x-ms-enum modelAsString flag\n\n**Behaviour changes**\n\n- Add Platform information in UserAgent\n- Needs Autorest > 0.17.0 Nightly 20160525\n\n2016-04-26 Version 0.3.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Read only values are no longer in __init__ or sent to the server (https://github.com/Azure/autorest/pull/959)\n- Useless kwarg removed\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160426\n\n\n2016-03-25 Version 0.2.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Manage integer enum values (https://github.com/Azure/autorest/pull/879)\n- Add missing application/json Accept HTTP header (https://github.com/Azure/azure-sdk-for-python/issues/553)\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160324\n\n\n2016-03-21 Version 0.1.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Deserialisation of generic resource if null in JSON (https://github.com/Azure/azure-sdk-for-python/issues/544)\n\n\n2016-03-14 Version 0.1.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- urllib3 side effect (https://github.com/Azure/autorest/issues/824)\n\n\n2016-03-04 Version 0.1.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/799)\n\n2016-03-04 Version 0.1.0\n+++++++++++++++++++++++++\n\n**Behavioural Changes**\n\n- Removed custom logging set up and configuration. All loggers are now children of the root logger 'msrest' with no pre-defined configurations.\n- Replaced _required attribute in Model class with more extensive _validation dict.\n\n**Improvement**\n\n- Removed hierarchy scanning for attribute maps from base Model class - relies on generator to populate attribute\n maps according to hierarchy.\n- Base class Paged now inherits from collections.Iterable.\n- Data validation during serialization using custom parameters (e.g. max, min etc).\n- Added ValidationError to be raised if invalid data encountered during serialization.\n\n2016-02-29 Version 0.0.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/718)\n\n2016-02-19 Version 0.0.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fixed bug in exception logging before logger configured.\n\n2016-02-19 Version 0.0.1\n++++++++++++++++++++++++\n\n- Initial release.", - "release_date": "2022-06-13T22:41:25", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": "https://github.com/Azure/msrest-for-python", - "download_url": "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip", - "size": 175332, - "sha1": null, - "md5": "3079617446a011d4fc0098687609671e", - "sha256": "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/msrest/0.7.1/json", - "datasource_id": null, - "purl": "pkg:pypi/msrest@0.7.1" - }, { "type": "pypi", "namespace": null, @@ -1634,82 +917,6 @@ "datasource_id": null, "purl": "pkg:pypi/oauthlib@3.2.2" }, - { - "type": "pypi", - "namespace": null, - "name": "oauthlib", - "version": "3.2.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic\nOAuthLib - Python Framework for OAuth1 & OAuth2\n===============================================\n\n*A generic, spec-compliant, thorough implementation of the OAuth request-signing\nlogic for Python 3.6+.*\n\n.. image:: https://app.travis-ci.com/oauthlib/oauthlib.svg?branch=master\n :target: https://app.travis-ci.com/oauthlib/oauthlib\n :alt: Travis\n.. image:: https://coveralls.io/repos/oauthlib/oauthlib/badge.svg?branch=master\n :target: https://coveralls.io/r/oauthlib/oauthlib\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/pyversions/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: Download from PyPI\n.. image:: https://img.shields.io/pypi/l/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: License\n.. image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib.svg?type=shield\n :target: https://app.fossa.io/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib?ref=badge_shield\n :alt: FOSSA Status\n.. image:: https://img.shields.io/readthedocs/oauthlib.svg\n :target: https://oauthlib.readthedocs.io/en/latest/index.html\n :alt: Read the Docs\n.. image:: https://badges.gitter.im/oauthlib/oauthlib.svg\n :target: https://gitter.im/oauthlib/Lobby\n :alt: Chat on Gitter\n\n\n.. image:: https://raw.githubusercontent.com/oauthlib/oauthlib/8d71b161fd145d11c40d55c9ab66ac134a303253/docs/logo/oauthlib-banner-700x192.png\n :target: https://github.com/oauthlib/oauthlib/\n :alt: OAuth + Python = OAuthlib Python Framework\n\n\nOAuth often seems complicated and difficult-to-implement. There are several\nprominent libraries for handling OAuth requests, but they all suffer from one or\nboth of the following:\n\n1. They predate the `OAuth 1.0 spec`_, AKA RFC 5849.\n2. They predate the `OAuth 2.0 spec`_, AKA RFC 6749.\n3. They assume the usage of a specific HTTP request library.\n\n.. _`OAuth 1.0 spec`: https://tools.ietf.org/html/rfc5849\n.. _`OAuth 2.0 spec`: https://tools.ietf.org/html/rfc6749\n\nOAuthLib is a framework which implements the logic of OAuth1 or OAuth2 without\nassuming a specific HTTP request object or web framework. Use it to graft OAuth\nclient support onto your favorite HTTP library, or provide support onto your\nfavourite web framework. If you're a maintainer of such a library, write a thin\nveneer on top of OAuthLib and get OAuth support for very little effort.\n\n\nDocumentation\n--------------\n\nFull documentation is available on `Read the Docs`_. All contributions are very\nwelcome! The documentation is still quite sparse, please open an issue for what\nyou'd like to know, or discuss it in our `Gitter community`_, or even better, send a\npull request!\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n.. _`Read the Docs`: https://oauthlib.readthedocs.io/en/latest/index.html\n\nInterested in making OAuth requests?\n------------------------------------\n\nThen you might be more interested in using `requests`_ which has OAuthLib\npowered OAuth support provided by the `requests-oauthlib`_ library.\n\n.. _`requests`: https://github.com/requests/requests\n.. _`requests-oauthlib`: https://github.com/requests/requests-oauthlib\n\nWhich web frameworks are supported?\n-----------------------------------\n\nThe following packages provide OAuth support using OAuthLib.\n\n- For Django there is `django-oauth-toolkit`_, which includes `Django REST framework`_ support.\n- For Flask there is `flask-oauthlib`_ and `Flask-Dance`_.\n- For Pyramid there is `pyramid-oauthlib`_.\n- For Bottle there is `bottle-oauthlib`_.\n\nIf you have written an OAuthLib package that supports your favorite framework,\nplease open a Pull Request, updating the documentation.\n\n.. _`django-oauth-toolkit`: https://github.com/evonove/django-oauth-toolkit\n.. _`flask-oauthlib`: https://github.com/lepture/flask-oauthlib\n.. _`Django REST framework`: http://django-rest-framework.org\n.. _`Flask-Dance`: https://github.com/singingwolfboy/flask-dance\n.. _`pyramid-oauthlib`: https://github.com/tilgovi/pyramid-oauthlib\n.. _`bottle-oauthlib`: https://github.com/thomsonreuters/bottle-oauthlib\n\nUsing OAuthLib? Please get in touch!\n------------------------------------\nPatching OAuth support onto an http request framework? Creating an OAuth\nprovider extension for a web framework? Simply using OAuthLib to Get Things Done\nor to learn?\n\nNo matter which we'd love to hear from you in our `Gitter community`_ or if you have\nanything in particular you would like to have, change or comment on don't\nhesitate for a second to send a pull request or open an issue. We might be quite\nbusy and therefore slow to reply but we love feedback!\n\nChances are you have run into something annoying that you wish there was\ndocumentation for, if you wish to gain eternal fame and glory, and a drink if we\nhave the pleasure to run into each other, please send a docs pull request =)\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n\nLicense\n-------\n\nOAuthLib is yours to use and abuse according to the terms of the BSD license.\nCheck the LICENSE file for full details.\n\nCredits\n-------\n\nOAuthLib has been started and maintained several years by Idan Gazit and other\namazing `AUTHORS`_. Thanks to their wonderful work, the open-source `community`_\ncreation has been possible and the project can stay active and reactive to users\nrequests.\n\n\n.. _`AUTHORS`: https://github.com/oauthlib/oauthlib/blob/master/AUTHORS\n.. _`community`: https://github.com/oauthlib/\n\nChangelog\n---------\n\n*OAuthLib is in active development, with the core of both OAuth1 and OAuth2\ncompleted, for providers as well as clients.* See `supported features`_ for\ndetails.\n\n.. _`supported features`: https://oauthlib.readthedocs.io/en/latest/feature_matrix.html\n\nFor a full changelog see ``CHANGELOG.rst``.", - "release_date": "2022-10-17T20:04:27", - "parties": [ - { - "type": "person", - "role": "author", - "name": "The OAuthlib Community", - "email": "idan@gazit.me", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Ib Lundgren", - "email": "ib.lundgren@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/oauthlib/oauthlib", - "download_url": "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz", - "size": 177352, - "sha1": null, - "md5": "2f7b898cc1af8c1409cc329e8843ea8f", - "sha256": "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved", - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/oauthlib/3.2.2/json", - "datasource_id": null, - "purl": "pkg:pypi/oauthlib@3.2.2" - }, { "type": "pypi", "namespace": null, @@ -1743,210 +950,14 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", - "size": 117552, - "sha1": null, - "md5": "e9bf4a92f270e6482393bd716406ff85", - "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "pycparser", - "version": "2.22", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", - "release_date": "2024-03-30T13:22:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Eli Bendersky", - "email": "eliben@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Eli Bendersky", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", - "size": 172736, - "sha1": null, - "md5": "8922b0b1b53b419e3a38fba4aa43a348", - "sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", - "size": 24179, - "sha1": null, - "md5": "68df2f3e274ac34fb2c5f32b15374156", - "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ISC", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", - "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:29", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" + "Programming Language :: Python :: 3.9" ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz", - "size": 55650, + "homepage_url": "https://github.com/eliben/pycparser", + "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", + "size": 117552, "sha1": null, - "md5": "713dc7856f9ff625d75335c10d332a1b", - "sha256": "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9", + "md5": "e9bf4a92f270e6482393bd716406ff85", + "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1954,7 +965,7 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "ISC", + "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1966,64 +977,63 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", + "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" + "purl": "pkg:pypi/pycparser@2.22" }, { "type": "pypi", "namespace": null, - "name": "requests", - "version": "2.32.3", + "name": "requests-oauthlib", + "version": "2.0.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:47", + "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", + "release_date": "2024-03-22T20:32:28", "parties": [ { "type": "person", "role": "author", "name": "Kenneth Reitz", - "email": "me@kennethreitz.org", + "email": "me@kennethreitz.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Natural Language :: English", - "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", - "size": 64928, + "homepage_url": "https://github.com/requests/requests-oauthlib", + "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", + "size": 24179, "sha1": null, - "md5": "83d50f7980b330c48f3bfe86372adcca", - "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", + "md5": "68df2f3e274ac34fb2c5f32b15374156", + "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/psf/requests", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0", + "license": "ISC", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -2033,9 +1043,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests/2.32.3/json", + "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", "datasource_id": null, - "purl": "pkg:pypi/requests@2.32.3" + "purl": "pkg:pypi/requests-oauthlib@2.0.0" }, { "type": "pypi", @@ -2046,7 +1056,7 @@ "subpath": null, "primary_language": "Python", "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:49", + "release_date": "2024-05-29T15:37:47", "parties": [ { "type": "person", @@ -2076,11 +1086,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", - "size": 131218, + "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", + "size": 64928, "sha1": null, - "md5": "fa3ee5ac3f1b3f4368bd74ab530d3f0f", - "sha256": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "md5": "83d50f7980b330c48f3bfe86372adcca", + "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/psf/requests", @@ -2160,142 +1170,16 @@ "datasource_id": null, "purl": "pkg:pypi/six@1.17.0" }, - { - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", - "release_date": "2024-12-04T17:35:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/benjaminp/six", - "download_url": "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", - "size": 34031, - "sha1": null, - "md5": "a0387fe15662c71057b4fb2b7aa9056a", - "sha256": "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", - "datasource_id": null, - "purl": "pkg:pypi/six@1.17.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "typing-extensions", - "version": "4.13.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:40", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Michael Lee\" ", - "url": null - } - ], - "keywords": [ - "annotations", - "backport", - "checker", - "checking", - "function", - "hinting", - "hints", - "type", - "typechecking", - "typehinting", - "typehints", - "typing", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", - "size": 45683, - "sha1": null, - "md5": "7ff271e4526b7cd1c260bdcc610b11c4", - "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", - "sha512": null, - "bug_tracking_url": "https://github.com/python/typing_extensions/issues", - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "PSF-2.0", - "declared_license": {}, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", - "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" - }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.0", + "version": "4.13.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:41", + "release_date": "2025-04-03T16:11:19", "parties": [ { "type": "person", @@ -2333,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", - "size": 106520, + "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", + "size": 45739, "sha1": null, - "md5": "f53b1a7955332b9c74fdbfb847399edb", - "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", + "md5": "88648ecb0c5e2dfdb72097ec846b87c8", + "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2352,9 +1236,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" + "purl": "pkg:pypi/typing-extensions@4.13.1" }, { "type": "pypi", @@ -2434,94 +1318,15 @@ "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", "datasource_id": null, "purl": "pkg:pypi/urllib3@2.3.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "urllib3", - "version": "2.3.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-12-22T07:47:30", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Andrey Petrov ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Seth Michael Larson , Quentin Pradet , Illia Volochii ", - "url": null - } - ], - "keywords": [ - "filepost", - "http", - "httplib", - "https", - "pooling", - "ssl", - "threadsafe", - "urllib", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", - "size": 307268, - "sha1": null, - "md5": "6388afd062cf2e1ef27843738629dbc1", - "sha256": "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/urllib3/urllib3", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", - "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.3.0" } ], "resolved_dependencies_graph": [ { - "package": "pkg:pypi/azure-core@1.32.0", + "package": "pkg:pypi/azure-core@1.33.0", "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2533,10 +1338,10 @@ { "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2574,7 +1379,7 @@ { "package": "pkg:pypi/msrest@0.7.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/certifi@2025.1.31", "pkg:pypi/isodate@0.7.2", "pkg:pypi/requests-oauthlib@2.0.0", @@ -2610,7 +1415,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.0", + "package": "pkg:pypi/typing-extensions@4.13.1", "dependencies": [] }, { diff --git a/tests/data/azure-devops.req-312-expected.json b/tests/data/azure-devops.req-312-expected.json index 1cced512..1fd7a15b 100644 --- a/tests/data/azure-devops.req-312-expected.json +++ b/tests/data/azure-devops.req-312-expected.json @@ -126,73 +126,12 @@ "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.32.0", + "version": "1.33.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:19", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "azpysdkhelp@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/39/83/325bf5e02504dbd8b4faa98197a44cdf8a325ef259b48326a2b6f17f8383/azure_core-1.32.0-py3-none-any.whl", - "size": 198855, - "sha1": null, - "md5": "63590a499bd095f8ca407464df434dd5", - "sha256": "eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "azure-core", - "version": "1.32.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:17", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://learn.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.33.0 (2025-04-03)\n\n### Features Added\n\n- Added native OpenTelemetry tracing to Azure Core which enables users to use OpenTelemetry to trace Azure SDK operations without needing to install a plugin. #39563\n - To enable native OpenTelemetry tracing, users need to:\n 1. Have `opentelemetry-api` installed.\n 2. Ensure that `settings.tracing_implementation` is not set.\n 3. Ensure that `settings.tracing_enabled` is set to `True`.\n - If `setting.tracing_implementation` is set, the tracing plugin will be used instead of the native tracing.\n - If `settings.tracing_enabled` is set to `False`, tracing will be disabled.\n - The `OpenTelemetryTracer` class was added to the `azure.core.tracing.opentelemetry` module. This is a wrapper around the OpenTelemetry tracer that is used to create spans for Azure SDK operations.\n - Added a `get_tracer` method to the new `azure.core.instrumentation` module. This method returns an instance of the `OpenTelemetryTracer` class if OpenTelemetry is available.\n - A `TracingOptions` TypedDict class was added to define the options that SDK users can use to configure tracing per-operation. These options include the ability to enable or disable tracing and set additional attributes on spans.\n - Example usage: `client.method(tracing_options={\"enabled\": True, \"attributes\": {\"foo\": \"bar\"}})`\n - The `DistributedTracingPolicy` and `distributed_trace`/`distributed_trace_async` decorators now uses the OpenTelemetry tracer if it is available and native tracing is enabled.\n - SDK clients can define an `_instrumentation_config` class variable to configure the OpenTelemetry tracer used in method span creation. Possible configuration options are `library_name`, `library_version`, `schema_url`, and `attributes`.\n - `DistributedTracingPolicy` now accepts a `instrumentation_config` keyword argument to configure the OpenTelemetry tracer used in HTTP span creation.\n\n### Breaking Changes\n\n- Removed automatic tracing enablement for the OpenTelemetry plugin if `opentelemetry` was imported. To enable tracing with the plugin, please import `azure.core.settings.settings` and set `settings.tracing_implementation` to `\"opentelemetry\"`. #39563\n- In `DistributedTracingPolicy`, the default span name is now just the HTTP method (e.g., \"GET\", \"POST\") and no longer includes the URL path. This change was made to converge with the OpenTelemetry HTTP semantic conventions. The full URL is still included in the span attributes.\n- Renamed span attributes in `DistributedTracingPolicy`:\n - \"x-ms-client-request-id\" is now \"az.client_request_id\"\n - \"x-ms-request-id\" is now \"az.service_request_id\"\n\n### Bugs Fixed\n\n- Fixed an issue where the `traceparent` header was not being set correctly in the `DistributedTracingPolicy`. The `traceparent` header will now set based on the context of the HTTP client span. #40074\n\n### Other Changes\n\n- Added `opentelemetry-api` as an optional dependency for tracing. This can be installed with `pip install azure-core[tracing]`. #39563\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2025-04-03T23:51:03", "parties": [ { "type": "person", @@ -212,15 +151,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/cc/ee/668328306a9e963a5ad9f152cd98c7adad86c822729fd1d2a01613ad1e67/azure_core-1.32.0.tar.gz", - "size": 279128, + "download_url": "https://files.pythonhosted.org/packages/07/b7/76b7e144aa53bd206bf1ce34fa75350472c3f69bf30e5c8c18bc9881035d/azure_core-1.33.0-py3-none-any.whl", + "size": 207071, "sha1": null, - "md5": "eac67c509ddce142eadef1e384e1f631", - "sha256": "22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5", + "md5": "ddd17415a5573ca4c435d7db0ff5631f", + "sha256": "9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -240,9 +180,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.33.0/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" + "purl": "pkg:pypi/azure-core@1.33.0" }, { "type": "pypi", @@ -312,74 +252,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-devops@7.1.0b4" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-devops", - "version": "7.1.0b4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python wrapper around the Azure DevOps 7.x APIs\nAzure DevOps Python clients", - "release_date": "2023-11-20T14:38:06", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Microsoft", - "VSTS", - "Team Services", - "SDK", - "AzureTfs", - "AzureDevOps", - "DevOps", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/microsoft/azure-devops-python-api", - "download_url": "https://files.pythonhosted.org/packages/e1/f9/495982345252dc7a15ac632e038be1f975ca0d2f25abfe8f8d908569141d/azure-devops-7.1.0b4.tar.gz", - "size": 1336261, - "sha1": null, - "md5": "bf401acf6533d4a2dcfd2106ffcbc86a", - "sha256": "f04ba939112579f3d530cfecc044a74ef9e9339ba23c9ee1ece248241f07ff85", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-devops/7.1.0b4/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-devops@7.1.0b4" - }, { "type": "pypi", "namespace": null, @@ -441,67 +313,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-storage-blob", - "version": "12.25.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-27T17:13:05", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "ascl@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", - "size": 570541, - "sha1": null, - "md5": "0e0be21e8fd942300ba335049912d4a2", - "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.1" - }, { "type": "pypi", "namespace": null, @@ -566,70 +377,6 @@ "datasource_id": null, "purl": "pkg:pypi/certifi@2025.1.31" }, - { - "type": "pypi", - "namespace": null, - "name": "certifi", - "version": "2025.1.31", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python package for providing Mozilla's CA Bundle.\nCertifi: Python SSL Certificates\n================================\n\nCertifi provides Mozilla's carefully curated collection of Root Certificates for\nvalidating the trustworthiness of SSL certificates while verifying the identity\nof TLS hosts. It has been extracted from the `Requests`_ project.\n\nInstallation\n------------\n\n``certifi`` is available on PyPI. Simply install it with ``pip``::\n\n $ pip install certifi\n\nUsage\n-----\n\nTo reference the installed certificate authority (CA) bundle, you can use the\nbuilt-in function::\n\n >>> import certifi\n\n >>> certifi.where()\n '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'\n\nOr from the command line::\n\n $ python -m certifi\n /usr/local/lib/python3.7/site-packages/certifi/cacert.pem\n\nEnjoy!\n\n.. _`Requests`: https://requests.readthedocs.io/en/master/\n\nAddition/Removal of Certificates\n--------------------------------\n\nCertifi does not support any addition/removal or other modification of the\nCA trust store content. This project is intended to provide a reliable and\nhighly portable root of trust to python deployments. Look to upstream projects\nfor methods to use alternate trust.", - "release_date": "2025-01-31T02:16:47", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/certifi/python-certifi", - "download_url": "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", - "size": 167577, - "sha1": null, - "md5": "6d326c5b0649c4dee817837c192f3824", - "sha256": "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/certifi/python-certifi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MPL-2.0", - "classifiers": [ - "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/certifi/2025.1.31/json", - "datasource_id": null, - "purl": "pkg:pypi/certifi@2025.1.31" - }, { "type": "pypi", "namespace": null, @@ -693,86 +440,26 @@ { "type": "pypi", "namespace": null, - "name": "cffi", - "version": "1.17.1", + "name": "charset-normalizer", + "version": "3.4.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "CFFI\n====\n\nForeign Function Interface for Python calling C code.\nPlease see the `Documentation `_.\n\nContact\n-------\n\n`Mailing list `_", - "release_date": "2024-09-04T20:45:21", + "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", + "release_date": "2024-12-24T18:10:50", "parties": [ { "type": "person", "role": "author", - "name": "Armin Rigo, Maciej Fijalkowski", - "email": "python-cffi@googlegroups.com", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "http://cffi.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", - "size": 516621, - "sha1": null, - "md5": "4336ca58b2df0cc3b163884d5fa2e5e2", - "sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", - "sha512": null, - "bug_tracking_url": "https://github.com/python-cffi/cffi/issues", - "code_view_url": "https://github.com/python-cffi/cffi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cffi/1.17.1/json", - "datasource_id": null, - "purl": "pkg:pypi/cffi@1.17.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:10:50", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", "url": null } ], @@ -833,89 +520,6 @@ "datasource_id": null, "purl": "pkg:pypi/charset-normalizer@3.4.1" }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:12:35", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - } - ], - "keywords": [ - "encoding", - "charset", - "charset-detector", - "detector", - "normalization", - "unicode", - "chardet", - "detect", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Linguistic", - "Topic :: Utilities", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz", - "size": 123188, - "sha1": null, - "md5": "1d808eb9efaf70bf0ec3b800f3c7dca8", - "sha256": "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/jawah/charset_normalizer", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/charset-normalizer/3.4.1/json", - "datasource_id": null, - "purl": "pkg:pypi/charset-normalizer@3.4.1" - }, { "type": "pypi", "namespace": null, @@ -970,60 +574,6 @@ "datasource_id": null, "purl": "pkg:pypi/click@8.1.8" }, - { - "type": "pypi", - "namespace": null, - "name": "click", - "version": "8.1.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Composable command line interface toolkit\n# $ click_\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\n## A Simple Example\n\n```python\nimport click\n\n@click.command()\n@click.option(\"--count\", default=1, help=\"Number of greetings.\")\n@click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\ndef hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\nif __name__ == '__main__':\n hello()\n```\n\n```\n$ python hello.py --count=3\nYour name: Click\nHello, Click!\nHello, Click!\nHello, Click!\n```\n\n\n## Donate\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, [please\ndonate today][].\n\n[please donate today]: https://palletsprojects.com/donate", - "release_date": "2024-12-21T18:38:44", - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Pallets ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", - "size": 226593, - "sha1": null, - "md5": "b52ee8e6c33d88a2b4626e6a6002245d", - "sha256": "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/click/", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.8/json", - "datasource_id": null, - "purl": "pkg:pypi/click@8.1.8" - }, { "type": "pypi", "namespace": null, @@ -1099,31 +649,27 @@ { "type": "pypi", "namespace": null, - "name": "cryptography", - "version": "44.0.2", + "name": "idna", + "version": "3.10", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.11+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2025-03-02T00:01:37", + "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", + "release_date": "2024-09-15T18:07:37", "parties": [ { "type": "person", "role": "author", - "name": "The cryptography developers ", - "email": "The Python Cryptographic Authority and individual contributors ", + "name": null, + "email": "Kim Davies ", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: POSIX :: BSD", - "Operating System :: POSIX :: Linux", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", @@ -1131,29 +677,30 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Security :: Cryptography" + "Topic :: Internet :: Name Service (DNS)", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/cd/25/4ce80c78963834b8a9fd1cc1266be5ed8d1840785c0f2e1b73b8d128d505/cryptography-44.0.2.tar.gz", - "size": 710807, + "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", + "size": 70442, "sha1": null, - "md5": "9cb2411324687347a27d349d3e74eb7c", - "sha256": "c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "md5": "ce22685f1b296fb33e5fda362870685d", + "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/kjd/idna", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0 OR BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: BSD License" ] }, @@ -1164,64 +711,61 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/44.0.2/json", + "api_data_url": "https://pypi.org/pypi/idna/3.10/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@44.0.2" + "purl": "pkg:pypi/idna@3.10" }, { "type": "pypi", "namespace": null, - "name": "idna", - "version": "3.10", + "name": "isodate", + "version": "0.7.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:37", + "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", + "release_date": "2024-10-08T23:04:09", "parties": [ { "type": "person", "role": "author", - "name": null, - "email": "Kim Davies ", + "name": "Gerhard Weis", + "email": null, "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", - "size": 70442, + "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", + "size": 22320, "sha1": null, - "md5": "ce22685f1b296fb33e5fda362870685d", - "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", + "md5": "f94e527b847362a79a455d0b55134579", + "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { + "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1233,210 +777,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", + "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "idna", - "version": "3.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:39", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Kim Davies ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", - "size": 190490, - "sha1": null, - "md5": "28448b00665099117b6daa9887812cc4", - "sha256": "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", - "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:09", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", - "size": 22320, - "sha1": null, - "md5": "f94e527b847362a79a455d0b55134579", - "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:11", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", - "size": 29705, - "sha1": null, - "md5": "5ce182fd7f6152cda19ec605b6740687", - "sha256": "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" + "purl": "pkg:pypi/isodate@0.7.2" }, { "type": "pypi", @@ -1498,66 +841,6 @@ "datasource_id": null, "purl": "pkg:pypi/msrest@0.7.1" }, - { - "type": "pypi", - "namespace": null, - "name": "msrest", - "version": "0.7.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "AutoRest swagger generator Python client runtime.\nAutoRest: Python Client Runtime\n===============================\n\n.. image:: https://travis-ci.org/Azure/msrest-for-python.svg?branch=master\n :target: https://travis-ci.org/Azure/msrest-for-python\n\n.. image:: https://codecov.io/gh/azure/msrest-for-python/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/azure/msrest-for-python\n\nInstallation\n------------\n\nTo install:\n\n.. code-block:: bash\n\n $ pip install msrest\n\n\nRelease History\n---------------\n\n2022-06-10 Version 0.7.1\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Declare correctly msrest as Python 3.6 and more only for clarity #251\n\n\n2022-06-07 Version 0.7.0\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `azure-core` as installation requirement #247\n- Replace `SerializationError` and `DeserializationError` in `msrest.exceptions` with those in `azure.core` #247\n\n**Bugfixes**\n\n- Typing annotation in LROPoller (thanks to akx) #242\n\nThanks to kianmeng for typo fixes in the documentation.\n\n2021-01-26 Version 0.6.21\n+++++++++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixes `failsafe_deserialize` introduced in `0.6.20` #232\n\n2021-01-25 Version 0.6.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `failsafe_deserialize` method to the `Deserializer` object. #232\n- Serialize `datetime`, `date`, `time`, `timedelta` and `Decimal` correctly when serializing `object` . #224\n\n2020-09-08 Version 0.6.19\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization of random Model object #220\n- Fix serialization of unicode string in Py2 and object mode #221\n\n\n2020-07-27 Version 0.6.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for attributes/text in the same XML node #218\n\n\n2020-06-25 Version 0.6.17\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML and discriminator #214\n\n\n2020-06-09 Version 0.6.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML parsing with namespaces and attributes #209\n\n**Features**\n\n- Add py.typed for mypy support\n\n\n2020-06-04 Version 0.6.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix RFC regression introduced in 0.6.14 (RFC parse date are no longer pickable) #208\n- Fix XML parsing with namespaces #206\n\nThanks to ivanst0 for the contribution\n\n\n2020-05-18 Version 0.6.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix \"from_dict\" in some complex flattening scenario #204\n- Fix RFC date parsing if machine locale is not English #201\n\n\n2020-04-07 Version 0.6.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix deserializer and flattening if intermediate node is None #198\n- Fix validation exception message for minimum/maximum checks #199\n\n\n2020-04-06 Version 0.6.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add \"time\" serializer/deserializer #196\n\n2020-01-30 Version 0.6.11\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode can now be enabled even if the given Model has no XML metadata #184\n- Add Kerberos Authentication #186\n- Improve error message if expected type is dictionary and something else is provided #188\n\n**Bugfixes**\n\n- Fix comma separated serialization of array in query #186\n- Fix validation of basic types in some complex scenario #189\n\nThanks to catatonicprime for the contribution\n\n2019-09-04 Version 0.6.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode now supports OpenAPI additional properties # 174\n\n**Bugfixes**\n\n- Accept \"is_xml\" kwargs to force XML serialization #178\n- Disable XML deserialization if received element is not an ElementTree #178\n- A \"null\" enum deserialize as None, and not \"None\" anymore #173\n- Fix some UTF8 encoding issue in Python 2.7 and XML mode #172\n\n\n2019-07-24 Version 0.6.9\n++++++++++++++++++++++++\n\n**Features**\n\n- Accept extensions of JSON mimetype as valid JSON #167\n\n2019-06-24 Version 0.6.8\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Impossible to serialize XML if model contains UTF8 characters on Python 2.7 #165\n- Impossible to deserialize a HTTP response as XML if body contains UTF8 characters on Python 2.7 #165\n- Loading a serialized configuration fails with NameError on NoOptionError #162\n\nThanks to cclauss for the contribution\n\n2019-06-12 Version 0.6.7\n++++++++++++++++++++++++\n\n**Features**\n\n- Add DomainCredentials credentials for EventGrid\n\nThanks to kalyanaj for the contribution\n\n2019-03-21 Version 0.6.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Make 0.6.x series compatible with pyinstaller again\n- sdist now includes tests\n\nThanks to dotlambda for the contribution\n\n2019-03-11 Version 0.6.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix list of integers serialization if div is provided #151\n- Fix parsing of UTF8 with BOM #145\n\nThanks to eduardomourar for the contribution\n\n2019-01-09 Version 0.6.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression on credentials configuration if used outside of Autorest scope #135\n\n2019-01-08 Version 0.6.3\n++++++++++++++++++++++++\n\n**Features**\n\n- Updated **experimental** async support. Requires Autorest.Python 4.0.64.\n\n2018-11-19 Version 0.6.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix circular dependency in TYPE_CHECKING mode #128\n\n2018-10-15 Version 0.6.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove unnecessary verbose \"warnings\" log #126\n\n2018-10-02 Version 0.6.0\n++++++++++++++++++++++++\n\n**Features**\n\n- The environment variable AZURE_HTTP_USER_AGENT, if present, is now injected part of the UserAgent\n- New **preview** msrest.universal_http module. Provide tools to generic HTTP management (sync/async, requests/aiohttp, etc.)\n- New **preview** msrest.pipeline implementation:\n\n - A Pipeline is an ordered list of Policies than can process an HTTP request and response in a generic way.\n - More details in the wiki page about Pipeline: https://github.com/Azure/msrest-for-python/wiki/msrest-0.6.0---Pipeline\n\n- Adding new attributes to Configuration instance:\n\n - http_logger_policy - Policy to handle HTTP logging\n - user_agent_policy - Policy to handle UserAgent\n - pipeline - The current pipeline used by the SDK client\n - async_pipeline - The current async pipeline used by the async SDK client\n\n- Installing \"msrest[async]\" now installs the **experimental** async support. Works ONLY for Autorest.Python 4.0.63.\n\n**Breaking changes**\n\n- The HTTPDriver API introduced in 0.5.0 has been replaced by the Pipeline implementation.\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http\":\n\n - ClientRedirectPolicy\n - ClientProxies\n - ClientConnection\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http.requests\":\n\n - ClientRetryPolicy\n\n**Bugfixes**\n\n- Fix \"long\" on Python 2 if used with the \"object\" type #121\n\nThanks to robgolding for the contribution\n\n2018-09-04 Version 0.5.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix a serialization issue if additional_properties is declared, and \"automatic model\" syntax is used\n (\"automatic model\" being the ability to pass a dict to command and have the model auto-created) # 120\n\n2018-07-12 Version 0.5.4\n++++++++++++++++++++++++\n\n**Features**\n\n- Support additionalProperties and XML\n\n**BugFixes**\n\n- Better parse empty node and not string types\n- Improve \"object\" XML parsing\n\n2018-07-10 Version 0.5.3\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Fix some XML serialization subtle scenarios\n\n2018-07-09 Version 0.5.2\n++++++++++++++++++++++++\n\n**Features**\n\n- deserialize/from_dict now accepts a content-type parameter to parse XML strings\n\n**Bugfixes**\n\n- Fix some complex XML Swagger definitions.\n\nThis release likely breaks already generated XML SDKs, that needs to be regenerated with autorest.python 3.0.58\n\n2018-06-21 Version 0.5.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Lower Accept header overwrite logging message #110\n- Fix 'object' type and XML format\n\nThanks to dharmab for the contribution\n\n2018-06-12 Version 0.5.0\n++++++++++++++++++++++++\n\n**Disclaimer**\n\nThis released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring\nand new features to continue with 0.4.x versioning\n\n**Features**\n\n- Add XML support\n- Add many type hints, and MyPY testing on CI.\n- HTTP calls are made through a HTTPDriver API. Only implementation is `requests` for now. This driver API is *not* considered stable\n and you should pin your msrest version if you want to provide a personal implementation.\n\n**Bugfixes**\n\n- Incorrect milliseconds serialization for some datetime object #94\n\n**Deprecation**\n\nThat will trigger a DeprecationWarning if an old Autorest generated code is used.\n\n- _client.add_header is deprecated, and config.headers should be used instead\n- _client.send_formdata is deprecated, and _client.put/get/delete/post + _client.send should be used instead\n\n2018-04-30 Version 0.4.29\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Improve `SDKClient.__exit__` to take exc_details as optional parameters and not required #93\n- refresh_session should also use the permanent HTTP session if available #91\n\n2018-04-18 Version 0.4.28\n+++++++++++++++++++++++++\n\n**Features**\n\n- msrest is now able to keep the \"requests.Session\" alive for performance. To activate this behavior:\n\n - Use the final Client as a context manager (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and `client.close()` (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and client._client.close() (not recommended, but available in old releases of SDK)\n\n- All Authentication classes now define `signed_session` and `refresh_session` with an optional `session` parameter.\n To take benefits of the session improvement, a subclass of Authentication *MUST* add this optional parameter\n and use it if it's not `None`:\n\n def signed_session(self, session=None):\n session = session or requests.Session()\n\n # As usual from here.\n\n2018-03-07 Version 0.4.27\n+++++++++++++++++++++++++\n\n**Features**\n\n- Disable HTTP log by default (security), add `enable_http_log` to restore it #86\n\n**BugFixes**\n\n- Fix incorrect date parsing if ms precision is over 6 digits #82\n\n2018-01-30 Version 0.4.26\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add TopicCredentials for EventGrid client\n\n**Bugfixes**\n\n- Fix minimal dependency of isodate\n- Fix serialisation from dict if datetime provided\n\n2018-01-08 Version 0.4.25\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add LROPoller class. This is a customizable LRO engine.\n This is the poller engine of Autorest.Python 3.0, and is not used by code generated by previous Autorest version.\n\n2018-01-03 Version 0.4.24\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Date parsing is now compliant with Autorest / Swagger 2.0 specification (less lenient)\n\n**Internal optimisation**\n\n- Call that does not return a streamable object are now executed in requests stream mode False (was True whatever the type of the call).\n This should reduce the number of leaked opened session and allow urllib3 to manage connection pooling more efficiently.\n Only clients generated with Autorest.Python >= 2.1.31 (not impacted otherwise, fully backward compatible)\n\n2017-12-21 Version 0.4.23\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept to deserialize enum of different type if content string match #75\n- Stop failing on deserialization if enum string is unkwon. Return the string instead.\n\n**Features**\n\n- Model now accept kwargs in constructor for future kwargs models\n\n2017-12-15 Version 0.4.22\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Do not validate additional_properties #73\n- Improve validation error if expected type is dict, but actual type is not #73\n\n2017-12-14 Version 0.4.21\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix additional_properties if Swagger was flatten #72\n\n2017-12-13 Version 0.4.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for additional_properties\n\n - By default, all additional_properties are kept.\n - Additional properties are sent to the server only if it was specified in the Swagger,\n or if \"enable_additional_properties_sending\" is called on the model we want it.\n This is a class method that enables it for all instance of this model.\n\n2017-11-20 Version 0.4.19\n+++++++++++++++++++++++++\n\n**Features**\n\n- The interpretation of Swagger 2.0 \"discriminator\" is now lenient. This means for these two scenarios:\n\n - Discriminator value is missing from the received payload\n - Discriminator value is not defined in the Swagger\n\n Instead of failing with an exception, this now returns the base type for this \"discriminator\".\n\n Note that this is not a contradiction of the Swagger 2.0 spec, that specifies\n \"validation SHOULD fail [...] there may exist valid reasons in particular circumstances to ignore a particular item,\n but the full implications must be understood and carefully weighed before choosing a different course.\"\n\n This cannot be configured for now and is the new default behvaior, but can be in the future if needed.\n\n**Bugfixes**\n\n- Optional formdata parameters were raising an exception (#65)\n- \"application/x-www-form-urlencoded\" form was sent using \"multipart/form-data\".\n This causes problems if the server does not support \"multipart/form-data\" (#66)\n\n2017-10-26 Version 0.4.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add ApiKeyCredentials class. This can be used to support OpenAPI ApiKey feature.\n- Add CognitiveServicesAuthentication class. Pre-declared ApiKeyCredentials class for Cognitive Services.\n\n2017-10-12 Version 0.4.17\n+++++++++++++++++++++++++\n\n**Features**\n\nThis make Authentication classes more consistent:\n\n- OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)\n- BasicTokenAuthentication has now a \"set_token\" methods that does nothing.\n\nThis allows test like \"isintance(o, BasicTokenAuthentication)\" to be guaranteed that the following attributes exists:\n\n- token\n- set_token()\n- signed_session()\n\nThis means for users of \"msrestazure\", that they are guaranteed that all AD classes somehow inherits from \"BasicTokenAuthentication\"\n\n2017-10-05 Version 0.4.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression: accept \"set\" as a valid \"[str]\" (#60)\n\n2017-09-28 Version 0.4.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Always log response body (#16)\n- Improved exception message if error JSON is Odata v4 (#55)\n- Refuse \"str\" as a valid \"[str]\" type (#41)\n- Better exception handling if input from server is not JSON valid\n\n**Features**\n\n- Add Configuration.session_configuration_callback to customize the requests.Session if necessary (#52)\n- Add a flag to Serializer to disable client-side-validation (#51)\n- Remove \"import requests\" from \"exceptions.py\" for apps that require fast loading time (#23)\n\nThank you to jayden-at-arista for the contribution\n\n2017-08-23 Version 0.4.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax with enum modeled as string and enum used\n\n2017-08-22 Version 0.4.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax using isodate.Duration (#42)\n\n2017-08-21 Version 0.4.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Input is now more lenient\n- Model have a \"validate\" method to check content constraints\n- Model have now 4 new methods:\n\n - \"serialize\" that gives the RestAPI that will be sent\n - \"as_dict\" that returns a dict version of the Model. Callbacks are available.\n - \"deserialize\" the parses the RestAPI JSON into a Model\n - \"from_dict\" that parses several dict syntax into a Model. Callbacks are available.\n\nMore details and examples in the Wiki article on Github:\nhttps://github.com/Azure/msrest-for-python/wiki/msrest-0.4.12---Serialization-change\n\n**Bugfixes**\n\n- Better Enum checking (#38)\n\n2017-06-21 Version 0.4.11\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix incorrect dependency to \"requests\" 2.14.x, instead of 2.x meant in 0.4.8\n\n2017-06-15 Version 0.4.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add requests hooks to configuration\n\n2017-06-08 Version 0.4.9\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept \"null\" value for paging array as an empty list and do not raise (#30)\n\n2017-05-22 Version 0.4.8\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix random \"pool is closed\" error (#29)\n- Fix requests dependency to version 2.x, since version 3.x is annunced to be breaking.\n\n2017-04-04 Version 0.4.7\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Refactor paging #22:\n\n - \"next\" is renamed \"advance_page\" and \"next\" returns only 1 element (Python 2 expected behavior)\n - paging objects are now real generator and support the \"next()\" built-in function without need for \"iter()\"\n\n- Raise accurate DeserialisationError on incorrect RestAPI discriminator usage #27\n- Fix discriminator usage of the base class name #27\n- Remove default mutable arguments in Clients #20\n- Fix object comparison in some scenarios #24\n\n2017-03-06 Version 0.4.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Allow Model sub-classes to be serialized if type is \"object\"\n\n2017-02-13 Version 0.4.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix polymorphic deserialization #11\n- Fix regexp validation if '\\\\w' is used in Python 2.7 #13\n- Fix dict deserialization if keys are unicode in Python 2.7\n\n**Improvements**\n\n- Add polymorphic serialisation from dict objects\n- Remove chardet and use HTTP charset declaration (fallback to utf8)\n\n2016-09-14 Version 0.4.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove paging URL validation, part of fix https://github.com/Azure/autorest/pull/1420\n\n**Disclaimer**\n\nIn order to get paging fixes for impacted clients, you need this package and Autorest > 0.17.0 Nightly 20160913\n\n2016-09-01 Version 0.4.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Better exception message (https://github.com/Azure/autorest/pull/1300)\n\n2016-08-15 Version 0.4.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization if \"object\" type contains None (https://github.com/Azure/autorest/issues/1353)\n\n2016-08-08 Version 0.4.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix compatibility issues with requests 2.11.0 (https://github.com/Azure/autorest/issues/1337)\n- Allow url of ClientRequest to have parameters (https://github.com/Azure/autorest/issues/1217)\n\n2016-05-25 Version 0.4.0\n++++++++++++++++++++++++\n\nThis version has no bug fixes, but implements new features of Autorest:\n- Base64 url type\n- unixtime type\n- x-ms-enum modelAsString flag\n\n**Behaviour changes**\n\n- Add Platform information in UserAgent\n- Needs Autorest > 0.17.0 Nightly 20160525\n\n2016-04-26 Version 0.3.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Read only values are no longer in __init__ or sent to the server (https://github.com/Azure/autorest/pull/959)\n- Useless kwarg removed\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160426\n\n\n2016-03-25 Version 0.2.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Manage integer enum values (https://github.com/Azure/autorest/pull/879)\n- Add missing application/json Accept HTTP header (https://github.com/Azure/azure-sdk-for-python/issues/553)\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160324\n\n\n2016-03-21 Version 0.1.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Deserialisation of generic resource if null in JSON (https://github.com/Azure/azure-sdk-for-python/issues/544)\n\n\n2016-03-14 Version 0.1.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- urllib3 side effect (https://github.com/Azure/autorest/issues/824)\n\n\n2016-03-04 Version 0.1.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/799)\n\n2016-03-04 Version 0.1.0\n+++++++++++++++++++++++++\n\n**Behavioural Changes**\n\n- Removed custom logging set up and configuration. All loggers are now children of the root logger 'msrest' with no pre-defined configurations.\n- Replaced _required attribute in Model class with more extensive _validation dict.\n\n**Improvement**\n\n- Removed hierarchy scanning for attribute maps from base Model class - relies on generator to populate attribute\n maps according to hierarchy.\n- Base class Paged now inherits from collections.Iterable.\n- Data validation during serialization using custom parameters (e.g. max, min etc).\n- Added ValidationError to be raised if invalid data encountered during serialization.\n\n2016-02-29 Version 0.0.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/718)\n\n2016-02-19 Version 0.0.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fixed bug in exception logging before logger configured.\n\n2016-02-19 Version 0.0.1\n++++++++++++++++++++++++\n\n- Initial release.", - "release_date": "2022-06-13T22:41:25", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": "https://github.com/Azure/msrest-for-python", - "download_url": "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip", - "size": 175332, - "sha1": null, - "md5": "3079617446a011d4fc0098687609671e", - "sha256": "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/msrest/0.7.1/json", - "datasource_id": null, - "purl": "pkg:pypi/msrest@0.7.1" - }, { "type": "pypi", "namespace": null, @@ -1634,82 +917,6 @@ "datasource_id": null, "purl": "pkg:pypi/oauthlib@3.2.2" }, - { - "type": "pypi", - "namespace": null, - "name": "oauthlib", - "version": "3.2.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic\nOAuthLib - Python Framework for OAuth1 & OAuth2\n===============================================\n\n*A generic, spec-compliant, thorough implementation of the OAuth request-signing\nlogic for Python 3.6+.*\n\n.. image:: https://app.travis-ci.com/oauthlib/oauthlib.svg?branch=master\n :target: https://app.travis-ci.com/oauthlib/oauthlib\n :alt: Travis\n.. image:: https://coveralls.io/repos/oauthlib/oauthlib/badge.svg?branch=master\n :target: https://coveralls.io/r/oauthlib/oauthlib\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/pyversions/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: Download from PyPI\n.. image:: https://img.shields.io/pypi/l/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: License\n.. image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib.svg?type=shield\n :target: https://app.fossa.io/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib?ref=badge_shield\n :alt: FOSSA Status\n.. image:: https://img.shields.io/readthedocs/oauthlib.svg\n :target: https://oauthlib.readthedocs.io/en/latest/index.html\n :alt: Read the Docs\n.. image:: https://badges.gitter.im/oauthlib/oauthlib.svg\n :target: https://gitter.im/oauthlib/Lobby\n :alt: Chat on Gitter\n\n\n.. image:: https://raw.githubusercontent.com/oauthlib/oauthlib/8d71b161fd145d11c40d55c9ab66ac134a303253/docs/logo/oauthlib-banner-700x192.png\n :target: https://github.com/oauthlib/oauthlib/\n :alt: OAuth + Python = OAuthlib Python Framework\n\n\nOAuth often seems complicated and difficult-to-implement. There are several\nprominent libraries for handling OAuth requests, but they all suffer from one or\nboth of the following:\n\n1. They predate the `OAuth 1.0 spec`_, AKA RFC 5849.\n2. They predate the `OAuth 2.0 spec`_, AKA RFC 6749.\n3. They assume the usage of a specific HTTP request library.\n\n.. _`OAuth 1.0 spec`: https://tools.ietf.org/html/rfc5849\n.. _`OAuth 2.0 spec`: https://tools.ietf.org/html/rfc6749\n\nOAuthLib is a framework which implements the logic of OAuth1 or OAuth2 without\nassuming a specific HTTP request object or web framework. Use it to graft OAuth\nclient support onto your favorite HTTP library, or provide support onto your\nfavourite web framework. If you're a maintainer of such a library, write a thin\nveneer on top of OAuthLib and get OAuth support for very little effort.\n\n\nDocumentation\n--------------\n\nFull documentation is available on `Read the Docs`_. All contributions are very\nwelcome! The documentation is still quite sparse, please open an issue for what\nyou'd like to know, or discuss it in our `Gitter community`_, or even better, send a\npull request!\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n.. _`Read the Docs`: https://oauthlib.readthedocs.io/en/latest/index.html\n\nInterested in making OAuth requests?\n------------------------------------\n\nThen you might be more interested in using `requests`_ which has OAuthLib\npowered OAuth support provided by the `requests-oauthlib`_ library.\n\n.. _`requests`: https://github.com/requests/requests\n.. _`requests-oauthlib`: https://github.com/requests/requests-oauthlib\n\nWhich web frameworks are supported?\n-----------------------------------\n\nThe following packages provide OAuth support using OAuthLib.\n\n- For Django there is `django-oauth-toolkit`_, which includes `Django REST framework`_ support.\n- For Flask there is `flask-oauthlib`_ and `Flask-Dance`_.\n- For Pyramid there is `pyramid-oauthlib`_.\n- For Bottle there is `bottle-oauthlib`_.\n\nIf you have written an OAuthLib package that supports your favorite framework,\nplease open a Pull Request, updating the documentation.\n\n.. _`django-oauth-toolkit`: https://github.com/evonove/django-oauth-toolkit\n.. _`flask-oauthlib`: https://github.com/lepture/flask-oauthlib\n.. _`Django REST framework`: http://django-rest-framework.org\n.. _`Flask-Dance`: https://github.com/singingwolfboy/flask-dance\n.. _`pyramid-oauthlib`: https://github.com/tilgovi/pyramid-oauthlib\n.. _`bottle-oauthlib`: https://github.com/thomsonreuters/bottle-oauthlib\n\nUsing OAuthLib? Please get in touch!\n------------------------------------\nPatching OAuth support onto an http request framework? Creating an OAuth\nprovider extension for a web framework? Simply using OAuthLib to Get Things Done\nor to learn?\n\nNo matter which we'd love to hear from you in our `Gitter community`_ or if you have\nanything in particular you would like to have, change or comment on don't\nhesitate for a second to send a pull request or open an issue. We might be quite\nbusy and therefore slow to reply but we love feedback!\n\nChances are you have run into something annoying that you wish there was\ndocumentation for, if you wish to gain eternal fame and glory, and a drink if we\nhave the pleasure to run into each other, please send a docs pull request =)\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n\nLicense\n-------\n\nOAuthLib is yours to use and abuse according to the terms of the BSD license.\nCheck the LICENSE file for full details.\n\nCredits\n-------\n\nOAuthLib has been started and maintained several years by Idan Gazit and other\namazing `AUTHORS`_. Thanks to their wonderful work, the open-source `community`_\ncreation has been possible and the project can stay active and reactive to users\nrequests.\n\n\n.. _`AUTHORS`: https://github.com/oauthlib/oauthlib/blob/master/AUTHORS\n.. _`community`: https://github.com/oauthlib/\n\nChangelog\n---------\n\n*OAuthLib is in active development, with the core of both OAuth1 and OAuth2\ncompleted, for providers as well as clients.* See `supported features`_ for\ndetails.\n\n.. _`supported features`: https://oauthlib.readthedocs.io/en/latest/feature_matrix.html\n\nFor a full changelog see ``CHANGELOG.rst``.", - "release_date": "2022-10-17T20:04:27", - "parties": [ - { - "type": "person", - "role": "author", - "name": "The OAuthlib Community", - "email": "idan@gazit.me", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Ib Lundgren", - "email": "ib.lundgren@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/oauthlib/oauthlib", - "download_url": "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz", - "size": 177352, - "sha1": null, - "md5": "2f7b898cc1af8c1409cc329e8843ea8f", - "sha256": "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved", - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/oauthlib/3.2.2/json", - "datasource_id": null, - "purl": "pkg:pypi/oauthlib@3.2.2" - }, { "type": "pypi", "namespace": null, @@ -1743,210 +950,14 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", - "size": 117552, - "sha1": null, - "md5": "e9bf4a92f270e6482393bd716406ff85", - "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "pycparser", - "version": "2.22", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", - "release_date": "2024-03-30T13:22:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Eli Bendersky", - "email": "eliben@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Eli Bendersky", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", - "size": 172736, - "sha1": null, - "md5": "8922b0b1b53b419e3a38fba4aa43a348", - "sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", - "size": 24179, - "sha1": null, - "md5": "68df2f3e274ac34fb2c5f32b15374156", - "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ISC", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", - "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:29", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" + "Programming Language :: Python :: 3.9" ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz", - "size": 55650, + "homepage_url": "https://github.com/eliben/pycparser", + "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", + "size": 117552, "sha1": null, - "md5": "713dc7856f9ff625d75335c10d332a1b", - "sha256": "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9", + "md5": "e9bf4a92f270e6482393bd716406ff85", + "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1954,7 +965,7 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "ISC", + "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1966,64 +977,63 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", + "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" + "purl": "pkg:pypi/pycparser@2.22" }, { "type": "pypi", "namespace": null, - "name": "requests", - "version": "2.32.3", + "name": "requests-oauthlib", + "version": "2.0.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:47", + "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", + "release_date": "2024-03-22T20:32:28", "parties": [ { "type": "person", "role": "author", "name": "Kenneth Reitz", - "email": "me@kennethreitz.org", + "email": "me@kennethreitz.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Natural Language :: English", - "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", - "size": 64928, + "homepage_url": "https://github.com/requests/requests-oauthlib", + "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", + "size": 24179, "sha1": null, - "md5": "83d50f7980b330c48f3bfe86372adcca", - "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", + "md5": "68df2f3e274ac34fb2c5f32b15374156", + "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/psf/requests", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0", + "license": "ISC", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -2033,9 +1043,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests/2.32.3/json", + "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", "datasource_id": null, - "purl": "pkg:pypi/requests@2.32.3" + "purl": "pkg:pypi/requests-oauthlib@2.0.0" }, { "type": "pypi", @@ -2046,7 +1056,7 @@ "subpath": null, "primary_language": "Python", "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:49", + "release_date": "2024-05-29T15:37:47", "parties": [ { "type": "person", @@ -2076,11 +1086,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", - "size": 131218, + "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", + "size": 64928, "sha1": null, - "md5": "fa3ee5ac3f1b3f4368bd74ab530d3f0f", - "sha256": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "md5": "83d50f7980b330c48f3bfe86372adcca", + "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/psf/requests", @@ -2160,142 +1170,16 @@ "datasource_id": null, "purl": "pkg:pypi/six@1.17.0" }, - { - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", - "release_date": "2024-12-04T17:35:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/benjaminp/six", - "download_url": "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", - "size": 34031, - "sha1": null, - "md5": "a0387fe15662c71057b4fb2b7aa9056a", - "sha256": "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", - "datasource_id": null, - "purl": "pkg:pypi/six@1.17.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "typing-extensions", - "version": "4.13.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:40", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Michael Lee\" ", - "url": null - } - ], - "keywords": [ - "annotations", - "backport", - "checker", - "checking", - "function", - "hinting", - "hints", - "type", - "typechecking", - "typehinting", - "typehints", - "typing", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", - "size": 45683, - "sha1": null, - "md5": "7ff271e4526b7cd1c260bdcc610b11c4", - "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", - "sha512": null, - "bug_tracking_url": "https://github.com/python/typing_extensions/issues", - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "PSF-2.0", - "declared_license": {}, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", - "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" - }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.0", + "version": "4.13.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:41", + "release_date": "2025-04-03T16:11:19", "parties": [ { "type": "person", @@ -2333,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", - "size": 106520, + "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", + "size": 45739, "sha1": null, - "md5": "f53b1a7955332b9c74fdbfb847399edb", - "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", + "md5": "88648ecb0c5e2dfdb72097ec846b87c8", + "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2352,9 +1236,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" + "purl": "pkg:pypi/typing-extensions@4.13.1" }, { "type": "pypi", @@ -2434,94 +1318,15 @@ "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", "datasource_id": null, "purl": "pkg:pypi/urllib3@2.3.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "urllib3", - "version": "2.3.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-12-22T07:47:30", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Andrey Petrov ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Seth Michael Larson , Quentin Pradet , Illia Volochii ", - "url": null - } - ], - "keywords": [ - "filepost", - "http", - "httplib", - "https", - "pooling", - "ssl", - "threadsafe", - "urllib", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", - "size": 307268, - "sha1": null, - "md5": "6388afd062cf2e1ef27843738629dbc1", - "sha256": "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/urllib3/urllib3", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", - "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.3.0" } ], "resolved_dependencies_graph": [ { - "package": "pkg:pypi/azure-core@1.32.0", + "package": "pkg:pypi/azure-core@1.33.0", "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2533,10 +1338,10 @@ { "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2574,7 +1379,7 @@ { "package": "pkg:pypi/msrest@0.7.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/certifi@2025.1.31", "pkg:pypi/isodate@0.7.2", "pkg:pypi/requests-oauthlib@2.0.0", @@ -2610,7 +1415,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.0", + "package": "pkg:pypi/typing-extensions@4.13.1", "dependencies": [] }, { diff --git a/tests/data/azure-devops.req-313-expected.json b/tests/data/azure-devops.req-313-expected.json index 832b9258..ca55f388 100644 --- a/tests/data/azure-devops.req-313-expected.json +++ b/tests/data/azure-devops.req-313-expected.json @@ -126,73 +126,12 @@ "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.32.0", + "version": "1.33.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:19", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "azpysdkhelp@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/39/83/325bf5e02504dbd8b4faa98197a44cdf8a325ef259b48326a2b6f17f8383/azure_core-1.32.0-py3-none-any.whl", - "size": 198855, - "sha1": null, - "md5": "63590a499bd095f8ca407464df434dd5", - "sha256": "eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "azure-core", - "version": "1.32.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:17", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://learn.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.33.0 (2025-04-03)\n\n### Features Added\n\n- Added native OpenTelemetry tracing to Azure Core which enables users to use OpenTelemetry to trace Azure SDK operations without needing to install a plugin. #39563\n - To enable native OpenTelemetry tracing, users need to:\n 1. Have `opentelemetry-api` installed.\n 2. Ensure that `settings.tracing_implementation` is not set.\n 3. Ensure that `settings.tracing_enabled` is set to `True`.\n - If `setting.tracing_implementation` is set, the tracing plugin will be used instead of the native tracing.\n - If `settings.tracing_enabled` is set to `False`, tracing will be disabled.\n - The `OpenTelemetryTracer` class was added to the `azure.core.tracing.opentelemetry` module. This is a wrapper around the OpenTelemetry tracer that is used to create spans for Azure SDK operations.\n - Added a `get_tracer` method to the new `azure.core.instrumentation` module. This method returns an instance of the `OpenTelemetryTracer` class if OpenTelemetry is available.\n - A `TracingOptions` TypedDict class was added to define the options that SDK users can use to configure tracing per-operation. These options include the ability to enable or disable tracing and set additional attributes on spans.\n - Example usage: `client.method(tracing_options={\"enabled\": True, \"attributes\": {\"foo\": \"bar\"}})`\n - The `DistributedTracingPolicy` and `distributed_trace`/`distributed_trace_async` decorators now uses the OpenTelemetry tracer if it is available and native tracing is enabled.\n - SDK clients can define an `_instrumentation_config` class variable to configure the OpenTelemetry tracer used in method span creation. Possible configuration options are `library_name`, `library_version`, `schema_url`, and `attributes`.\n - `DistributedTracingPolicy` now accepts a `instrumentation_config` keyword argument to configure the OpenTelemetry tracer used in HTTP span creation.\n\n### Breaking Changes\n\n- Removed automatic tracing enablement for the OpenTelemetry plugin if `opentelemetry` was imported. To enable tracing with the plugin, please import `azure.core.settings.settings` and set `settings.tracing_implementation` to `\"opentelemetry\"`. #39563\n- In `DistributedTracingPolicy`, the default span name is now just the HTTP method (e.g., \"GET\", \"POST\") and no longer includes the URL path. This change was made to converge with the OpenTelemetry HTTP semantic conventions. The full URL is still included in the span attributes.\n- Renamed span attributes in `DistributedTracingPolicy`:\n - \"x-ms-client-request-id\" is now \"az.client_request_id\"\n - \"x-ms-request-id\" is now \"az.service_request_id\"\n\n### Bugs Fixed\n\n- Fixed an issue where the `traceparent` header was not being set correctly in the `DistributedTracingPolicy`. The `traceparent` header will now set based on the context of the HTTP client span. #40074\n\n### Other Changes\n\n- Added `opentelemetry-api` as an optional dependency for tracing. This can be installed with `pip install azure-core[tracing]`. #39563\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2025-04-03T23:51:03", "parties": [ { "type": "person", @@ -212,15 +151,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/cc/ee/668328306a9e963a5ad9f152cd98c7adad86c822729fd1d2a01613ad1e67/azure_core-1.32.0.tar.gz", - "size": 279128, + "download_url": "https://files.pythonhosted.org/packages/07/b7/76b7e144aa53bd206bf1ce34fa75350472c3f69bf30e5c8c18bc9881035d/azure_core-1.33.0-py3-none-any.whl", + "size": 207071, "sha1": null, - "md5": "eac67c509ddce142eadef1e384e1f631", - "sha256": "22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5", + "md5": "ddd17415a5573ca4c435d7db0ff5631f", + "sha256": "9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -240,9 +180,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.33.0/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" + "purl": "pkg:pypi/azure-core@1.33.0" }, { "type": "pypi", @@ -312,74 +252,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-devops@7.1.0b4" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-devops", - "version": "7.1.0b4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python wrapper around the Azure DevOps 7.x APIs\nAzure DevOps Python clients", - "release_date": "2023-11-20T14:38:06", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Microsoft", - "VSTS", - "Team Services", - "SDK", - "AzureTfs", - "AzureDevOps", - "DevOps", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/microsoft/azure-devops-python-api", - "download_url": "https://files.pythonhosted.org/packages/e1/f9/495982345252dc7a15ac632e038be1f975ca0d2f25abfe8f8d908569141d/azure-devops-7.1.0b4.tar.gz", - "size": 1336261, - "sha1": null, - "md5": "bf401acf6533d4a2dcfd2106ffcbc86a", - "sha256": "f04ba939112579f3d530cfecc044a74ef9e9339ba23c9ee1ece248241f07ff85", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-devops/7.1.0b4/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-devops@7.1.0b4" - }, { "type": "pypi", "namespace": null, @@ -441,67 +313,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-storage-blob", - "version": "12.25.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-27T17:13:05", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "ascl@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", - "size": 570541, - "sha1": null, - "md5": "0e0be21e8fd942300ba335049912d4a2", - "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.1" - }, { "type": "pypi", "namespace": null, @@ -566,70 +377,6 @@ "datasource_id": null, "purl": "pkg:pypi/certifi@2025.1.31" }, - { - "type": "pypi", - "namespace": null, - "name": "certifi", - "version": "2025.1.31", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python package for providing Mozilla's CA Bundle.\nCertifi: Python SSL Certificates\n================================\n\nCertifi provides Mozilla's carefully curated collection of Root Certificates for\nvalidating the trustworthiness of SSL certificates while verifying the identity\nof TLS hosts. It has been extracted from the `Requests`_ project.\n\nInstallation\n------------\n\n``certifi`` is available on PyPI. Simply install it with ``pip``::\n\n $ pip install certifi\n\nUsage\n-----\n\nTo reference the installed certificate authority (CA) bundle, you can use the\nbuilt-in function::\n\n >>> import certifi\n\n >>> certifi.where()\n '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'\n\nOr from the command line::\n\n $ python -m certifi\n /usr/local/lib/python3.7/site-packages/certifi/cacert.pem\n\nEnjoy!\n\n.. _`Requests`: https://requests.readthedocs.io/en/master/\n\nAddition/Removal of Certificates\n--------------------------------\n\nCertifi does not support any addition/removal or other modification of the\nCA trust store content. This project is intended to provide a reliable and\nhighly portable root of trust to python deployments. Look to upstream projects\nfor methods to use alternate trust.", - "release_date": "2025-01-31T02:16:47", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/certifi/python-certifi", - "download_url": "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", - "size": 167577, - "sha1": null, - "md5": "6d326c5b0649c4dee817837c192f3824", - "sha256": "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/certifi/python-certifi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MPL-2.0", - "classifiers": [ - "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/certifi/2025.1.31/json", - "datasource_id": null, - "purl": "pkg:pypi/certifi@2025.1.31" - }, { "type": "pypi", "namespace": null, @@ -693,86 +440,26 @@ { "type": "pypi", "namespace": null, - "name": "cffi", - "version": "1.17.1", + "name": "charset-normalizer", + "version": "3.4.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "CFFI\n====\n\nForeign Function Interface for Python calling C code.\nPlease see the `Documentation `_.\n\nContact\n-------\n\n`Mailing list `_", - "release_date": "2024-09-04T20:45:21", + "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", + "release_date": "2024-12-24T18:11:22", "parties": [ { "type": "person", "role": "author", - "name": "Armin Rigo, Maciej Fijalkowski", - "email": "python-cffi@googlegroups.com", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "http://cffi.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", - "size": 516621, - "sha1": null, - "md5": "4336ca58b2df0cc3b163884d5fa2e5e2", - "sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", - "sha512": null, - "bug_tracking_url": "https://github.com/python-cffi/cffi/issues", - "code_view_url": "https://github.com/python-cffi/cffi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cffi/1.17.1/json", - "datasource_id": null, - "purl": "pkg:pypi/cffi@1.17.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:11:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", "url": null } ], @@ -833,89 +520,6 @@ "datasource_id": null, "purl": "pkg:pypi/charset-normalizer@3.4.1" }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:12:35", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - } - ], - "keywords": [ - "encoding", - "charset", - "charset-detector", - "detector", - "normalization", - "unicode", - "chardet", - "detect", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Linguistic", - "Topic :: Utilities", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz", - "size": 123188, - "sha1": null, - "md5": "1d808eb9efaf70bf0ec3b800f3c7dca8", - "sha256": "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/jawah/charset_normalizer", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/charset-normalizer/3.4.1/json", - "datasource_id": null, - "purl": "pkg:pypi/charset-normalizer@3.4.1" - }, { "type": "pypi", "namespace": null, @@ -970,60 +574,6 @@ "datasource_id": null, "purl": "pkg:pypi/click@8.1.8" }, - { - "type": "pypi", - "namespace": null, - "name": "click", - "version": "8.1.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Composable command line interface toolkit\n# $ click_\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\n## A Simple Example\n\n```python\nimport click\n\n@click.command()\n@click.option(\"--count\", default=1, help=\"Number of greetings.\")\n@click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\ndef hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\nif __name__ == '__main__':\n hello()\n```\n\n```\n$ python hello.py --count=3\nYour name: Click\nHello, Click!\nHello, Click!\nHello, Click!\n```\n\n\n## Donate\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, [please\ndonate today][].\n\n[please donate today]: https://palletsprojects.com/donate", - "release_date": "2024-12-21T18:38:44", - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Pallets ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", - "size": 226593, - "sha1": null, - "md5": "b52ee8e6c33d88a2b4626e6a6002245d", - "sha256": "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/click/", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.8/json", - "datasource_id": null, - "purl": "pkg:pypi/click@8.1.8" - }, { "type": "pypi", "namespace": null, @@ -1099,31 +649,27 @@ { "type": "pypi", "namespace": null, - "name": "cryptography", - "version": "44.0.2", + "name": "idna", + "version": "3.10", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.11+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2025-03-02T00:01:37", + "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", + "release_date": "2024-09-15T18:07:37", "parties": [ { "type": "person", "role": "author", - "name": "The cryptography developers ", - "email": "The Python Cryptographic Authority and individual contributors ", + "name": null, + "email": "Kim Davies ", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: POSIX :: BSD", - "Operating System :: POSIX :: Linux", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", @@ -1131,29 +677,30 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Security :: Cryptography" + "Topic :: Internet :: Name Service (DNS)", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/cd/25/4ce80c78963834b8a9fd1cc1266be5ed8d1840785c0f2e1b73b8d128d505/cryptography-44.0.2.tar.gz", - "size": 710807, + "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", + "size": 70442, "sha1": null, - "md5": "9cb2411324687347a27d349d3e74eb7c", - "sha256": "c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "md5": "ce22685f1b296fb33e5fda362870685d", + "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/kjd/idna", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0 OR BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: BSD License" ] }, @@ -1164,64 +711,61 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/44.0.2/json", + "api_data_url": "https://pypi.org/pypi/idna/3.10/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@44.0.2" + "purl": "pkg:pypi/idna@3.10" }, { "type": "pypi", "namespace": null, - "name": "idna", - "version": "3.10", + "name": "isodate", + "version": "0.7.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:37", + "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", + "release_date": "2024-10-08T23:04:09", "parties": [ { "type": "person", "role": "author", - "name": null, - "email": "Kim Davies ", + "name": "Gerhard Weis", + "email": null, "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", - "size": 70442, + "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", + "size": 22320, "sha1": null, - "md5": "ce22685f1b296fb33e5fda362870685d", - "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", + "md5": "f94e527b847362a79a455d0b55134579", + "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { + "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1233,210 +777,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", + "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "idna", - "version": "3.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:39", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Kim Davies ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", - "size": 190490, - "sha1": null, - "md5": "28448b00665099117b6daa9887812cc4", - "sha256": "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", - "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:09", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", - "size": 22320, - "sha1": null, - "md5": "f94e527b847362a79a455d0b55134579", - "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:11", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", - "size": 29705, - "sha1": null, - "md5": "5ce182fd7f6152cda19ec605b6740687", - "sha256": "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" + "purl": "pkg:pypi/isodate@0.7.2" }, { "type": "pypi", @@ -1498,66 +841,6 @@ "datasource_id": null, "purl": "pkg:pypi/msrest@0.7.1" }, - { - "type": "pypi", - "namespace": null, - "name": "msrest", - "version": "0.7.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "AutoRest swagger generator Python client runtime.\nAutoRest: Python Client Runtime\n===============================\n\n.. image:: https://travis-ci.org/Azure/msrest-for-python.svg?branch=master\n :target: https://travis-ci.org/Azure/msrest-for-python\n\n.. image:: https://codecov.io/gh/azure/msrest-for-python/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/azure/msrest-for-python\n\nInstallation\n------------\n\nTo install:\n\n.. code-block:: bash\n\n $ pip install msrest\n\n\nRelease History\n---------------\n\n2022-06-10 Version 0.7.1\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Declare correctly msrest as Python 3.6 and more only for clarity #251\n\n\n2022-06-07 Version 0.7.0\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `azure-core` as installation requirement #247\n- Replace `SerializationError` and `DeserializationError` in `msrest.exceptions` with those in `azure.core` #247\n\n**Bugfixes**\n\n- Typing annotation in LROPoller (thanks to akx) #242\n\nThanks to kianmeng for typo fixes in the documentation.\n\n2021-01-26 Version 0.6.21\n+++++++++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixes `failsafe_deserialize` introduced in `0.6.20` #232\n\n2021-01-25 Version 0.6.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `failsafe_deserialize` method to the `Deserializer` object. #232\n- Serialize `datetime`, `date`, `time`, `timedelta` and `Decimal` correctly when serializing `object` . #224\n\n2020-09-08 Version 0.6.19\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization of random Model object #220\n- Fix serialization of unicode string in Py2 and object mode #221\n\n\n2020-07-27 Version 0.6.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for attributes/text in the same XML node #218\n\n\n2020-06-25 Version 0.6.17\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML and discriminator #214\n\n\n2020-06-09 Version 0.6.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML parsing with namespaces and attributes #209\n\n**Features**\n\n- Add py.typed for mypy support\n\n\n2020-06-04 Version 0.6.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix RFC regression introduced in 0.6.14 (RFC parse date are no longer pickable) #208\n- Fix XML parsing with namespaces #206\n\nThanks to ivanst0 for the contribution\n\n\n2020-05-18 Version 0.6.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix \"from_dict\" in some complex flattening scenario #204\n- Fix RFC date parsing if machine locale is not English #201\n\n\n2020-04-07 Version 0.6.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix deserializer and flattening if intermediate node is None #198\n- Fix validation exception message for minimum/maximum checks #199\n\n\n2020-04-06 Version 0.6.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add \"time\" serializer/deserializer #196\n\n2020-01-30 Version 0.6.11\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode can now be enabled even if the given Model has no XML metadata #184\n- Add Kerberos Authentication #186\n- Improve error message if expected type is dictionary and something else is provided #188\n\n**Bugfixes**\n\n- Fix comma separated serialization of array in query #186\n- Fix validation of basic types in some complex scenario #189\n\nThanks to catatonicprime for the contribution\n\n2019-09-04 Version 0.6.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode now supports OpenAPI additional properties # 174\n\n**Bugfixes**\n\n- Accept \"is_xml\" kwargs to force XML serialization #178\n- Disable XML deserialization if received element is not an ElementTree #178\n- A \"null\" enum deserialize as None, and not \"None\" anymore #173\n- Fix some UTF8 encoding issue in Python 2.7 and XML mode #172\n\n\n2019-07-24 Version 0.6.9\n++++++++++++++++++++++++\n\n**Features**\n\n- Accept extensions of JSON mimetype as valid JSON #167\n\n2019-06-24 Version 0.6.8\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Impossible to serialize XML if model contains UTF8 characters on Python 2.7 #165\n- Impossible to deserialize a HTTP response as XML if body contains UTF8 characters on Python 2.7 #165\n- Loading a serialized configuration fails with NameError on NoOptionError #162\n\nThanks to cclauss for the contribution\n\n2019-06-12 Version 0.6.7\n++++++++++++++++++++++++\n\n**Features**\n\n- Add DomainCredentials credentials for EventGrid\n\nThanks to kalyanaj for the contribution\n\n2019-03-21 Version 0.6.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Make 0.6.x series compatible with pyinstaller again\n- sdist now includes tests\n\nThanks to dotlambda for the contribution\n\n2019-03-11 Version 0.6.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix list of integers serialization if div is provided #151\n- Fix parsing of UTF8 with BOM #145\n\nThanks to eduardomourar for the contribution\n\n2019-01-09 Version 0.6.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression on credentials configuration if used outside of Autorest scope #135\n\n2019-01-08 Version 0.6.3\n++++++++++++++++++++++++\n\n**Features**\n\n- Updated **experimental** async support. Requires Autorest.Python 4.0.64.\n\n2018-11-19 Version 0.6.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix circular dependency in TYPE_CHECKING mode #128\n\n2018-10-15 Version 0.6.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove unnecessary verbose \"warnings\" log #126\n\n2018-10-02 Version 0.6.0\n++++++++++++++++++++++++\n\n**Features**\n\n- The environment variable AZURE_HTTP_USER_AGENT, if present, is now injected part of the UserAgent\n- New **preview** msrest.universal_http module. Provide tools to generic HTTP management (sync/async, requests/aiohttp, etc.)\n- New **preview** msrest.pipeline implementation:\n\n - A Pipeline is an ordered list of Policies than can process an HTTP request and response in a generic way.\n - More details in the wiki page about Pipeline: https://github.com/Azure/msrest-for-python/wiki/msrest-0.6.0---Pipeline\n\n- Adding new attributes to Configuration instance:\n\n - http_logger_policy - Policy to handle HTTP logging\n - user_agent_policy - Policy to handle UserAgent\n - pipeline - The current pipeline used by the SDK client\n - async_pipeline - The current async pipeline used by the async SDK client\n\n- Installing \"msrest[async]\" now installs the **experimental** async support. Works ONLY for Autorest.Python 4.0.63.\n\n**Breaking changes**\n\n- The HTTPDriver API introduced in 0.5.0 has been replaced by the Pipeline implementation.\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http\":\n\n - ClientRedirectPolicy\n - ClientProxies\n - ClientConnection\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http.requests\":\n\n - ClientRetryPolicy\n\n**Bugfixes**\n\n- Fix \"long\" on Python 2 if used with the \"object\" type #121\n\nThanks to robgolding for the contribution\n\n2018-09-04 Version 0.5.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix a serialization issue if additional_properties is declared, and \"automatic model\" syntax is used\n (\"automatic model\" being the ability to pass a dict to command and have the model auto-created) # 120\n\n2018-07-12 Version 0.5.4\n++++++++++++++++++++++++\n\n**Features**\n\n- Support additionalProperties and XML\n\n**BugFixes**\n\n- Better parse empty node and not string types\n- Improve \"object\" XML parsing\n\n2018-07-10 Version 0.5.3\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Fix some XML serialization subtle scenarios\n\n2018-07-09 Version 0.5.2\n++++++++++++++++++++++++\n\n**Features**\n\n- deserialize/from_dict now accepts a content-type parameter to parse XML strings\n\n**Bugfixes**\n\n- Fix some complex XML Swagger definitions.\n\nThis release likely breaks already generated XML SDKs, that needs to be regenerated with autorest.python 3.0.58\n\n2018-06-21 Version 0.5.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Lower Accept header overwrite logging message #110\n- Fix 'object' type and XML format\n\nThanks to dharmab for the contribution\n\n2018-06-12 Version 0.5.0\n++++++++++++++++++++++++\n\n**Disclaimer**\n\nThis released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring\nand new features to continue with 0.4.x versioning\n\n**Features**\n\n- Add XML support\n- Add many type hints, and MyPY testing on CI.\n- HTTP calls are made through a HTTPDriver API. Only implementation is `requests` for now. This driver API is *not* considered stable\n and you should pin your msrest version if you want to provide a personal implementation.\n\n**Bugfixes**\n\n- Incorrect milliseconds serialization for some datetime object #94\n\n**Deprecation**\n\nThat will trigger a DeprecationWarning if an old Autorest generated code is used.\n\n- _client.add_header is deprecated, and config.headers should be used instead\n- _client.send_formdata is deprecated, and _client.put/get/delete/post + _client.send should be used instead\n\n2018-04-30 Version 0.4.29\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Improve `SDKClient.__exit__` to take exc_details as optional parameters and not required #93\n- refresh_session should also use the permanent HTTP session if available #91\n\n2018-04-18 Version 0.4.28\n+++++++++++++++++++++++++\n\n**Features**\n\n- msrest is now able to keep the \"requests.Session\" alive for performance. To activate this behavior:\n\n - Use the final Client as a context manager (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and `client.close()` (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and client._client.close() (not recommended, but available in old releases of SDK)\n\n- All Authentication classes now define `signed_session` and `refresh_session` with an optional `session` parameter.\n To take benefits of the session improvement, a subclass of Authentication *MUST* add this optional parameter\n and use it if it's not `None`:\n\n def signed_session(self, session=None):\n session = session or requests.Session()\n\n # As usual from here.\n\n2018-03-07 Version 0.4.27\n+++++++++++++++++++++++++\n\n**Features**\n\n- Disable HTTP log by default (security), add `enable_http_log` to restore it #86\n\n**BugFixes**\n\n- Fix incorrect date parsing if ms precision is over 6 digits #82\n\n2018-01-30 Version 0.4.26\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add TopicCredentials for EventGrid client\n\n**Bugfixes**\n\n- Fix minimal dependency of isodate\n- Fix serialisation from dict if datetime provided\n\n2018-01-08 Version 0.4.25\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add LROPoller class. This is a customizable LRO engine.\n This is the poller engine of Autorest.Python 3.0, and is not used by code generated by previous Autorest version.\n\n2018-01-03 Version 0.4.24\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Date parsing is now compliant with Autorest / Swagger 2.0 specification (less lenient)\n\n**Internal optimisation**\n\n- Call that does not return a streamable object are now executed in requests stream mode False (was True whatever the type of the call).\n This should reduce the number of leaked opened session and allow urllib3 to manage connection pooling more efficiently.\n Only clients generated with Autorest.Python >= 2.1.31 (not impacted otherwise, fully backward compatible)\n\n2017-12-21 Version 0.4.23\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept to deserialize enum of different type if content string match #75\n- Stop failing on deserialization if enum string is unkwon. Return the string instead.\n\n**Features**\n\n- Model now accept kwargs in constructor for future kwargs models\n\n2017-12-15 Version 0.4.22\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Do not validate additional_properties #73\n- Improve validation error if expected type is dict, but actual type is not #73\n\n2017-12-14 Version 0.4.21\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix additional_properties if Swagger was flatten #72\n\n2017-12-13 Version 0.4.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for additional_properties\n\n - By default, all additional_properties are kept.\n - Additional properties are sent to the server only if it was specified in the Swagger,\n or if \"enable_additional_properties_sending\" is called on the model we want it.\n This is a class method that enables it for all instance of this model.\n\n2017-11-20 Version 0.4.19\n+++++++++++++++++++++++++\n\n**Features**\n\n- The interpretation of Swagger 2.0 \"discriminator\" is now lenient. This means for these two scenarios:\n\n - Discriminator value is missing from the received payload\n - Discriminator value is not defined in the Swagger\n\n Instead of failing with an exception, this now returns the base type for this \"discriminator\".\n\n Note that this is not a contradiction of the Swagger 2.0 spec, that specifies\n \"validation SHOULD fail [...] there may exist valid reasons in particular circumstances to ignore a particular item,\n but the full implications must be understood and carefully weighed before choosing a different course.\"\n\n This cannot be configured for now and is the new default behvaior, but can be in the future if needed.\n\n**Bugfixes**\n\n- Optional formdata parameters were raising an exception (#65)\n- \"application/x-www-form-urlencoded\" form was sent using \"multipart/form-data\".\n This causes problems if the server does not support \"multipart/form-data\" (#66)\n\n2017-10-26 Version 0.4.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add ApiKeyCredentials class. This can be used to support OpenAPI ApiKey feature.\n- Add CognitiveServicesAuthentication class. Pre-declared ApiKeyCredentials class for Cognitive Services.\n\n2017-10-12 Version 0.4.17\n+++++++++++++++++++++++++\n\n**Features**\n\nThis make Authentication classes more consistent:\n\n- OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)\n- BasicTokenAuthentication has now a \"set_token\" methods that does nothing.\n\nThis allows test like \"isintance(o, BasicTokenAuthentication)\" to be guaranteed that the following attributes exists:\n\n- token\n- set_token()\n- signed_session()\n\nThis means for users of \"msrestazure\", that they are guaranteed that all AD classes somehow inherits from \"BasicTokenAuthentication\"\n\n2017-10-05 Version 0.4.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression: accept \"set\" as a valid \"[str]\" (#60)\n\n2017-09-28 Version 0.4.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Always log response body (#16)\n- Improved exception message if error JSON is Odata v4 (#55)\n- Refuse \"str\" as a valid \"[str]\" type (#41)\n- Better exception handling if input from server is not JSON valid\n\n**Features**\n\n- Add Configuration.session_configuration_callback to customize the requests.Session if necessary (#52)\n- Add a flag to Serializer to disable client-side-validation (#51)\n- Remove \"import requests\" from \"exceptions.py\" for apps that require fast loading time (#23)\n\nThank you to jayden-at-arista for the contribution\n\n2017-08-23 Version 0.4.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax with enum modeled as string and enum used\n\n2017-08-22 Version 0.4.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax using isodate.Duration (#42)\n\n2017-08-21 Version 0.4.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Input is now more lenient\n- Model have a \"validate\" method to check content constraints\n- Model have now 4 new methods:\n\n - \"serialize\" that gives the RestAPI that will be sent\n - \"as_dict\" that returns a dict version of the Model. Callbacks are available.\n - \"deserialize\" the parses the RestAPI JSON into a Model\n - \"from_dict\" that parses several dict syntax into a Model. Callbacks are available.\n\nMore details and examples in the Wiki article on Github:\nhttps://github.com/Azure/msrest-for-python/wiki/msrest-0.4.12---Serialization-change\n\n**Bugfixes**\n\n- Better Enum checking (#38)\n\n2017-06-21 Version 0.4.11\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix incorrect dependency to \"requests\" 2.14.x, instead of 2.x meant in 0.4.8\n\n2017-06-15 Version 0.4.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add requests hooks to configuration\n\n2017-06-08 Version 0.4.9\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept \"null\" value for paging array as an empty list and do not raise (#30)\n\n2017-05-22 Version 0.4.8\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix random \"pool is closed\" error (#29)\n- Fix requests dependency to version 2.x, since version 3.x is annunced to be breaking.\n\n2017-04-04 Version 0.4.7\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Refactor paging #22:\n\n - \"next\" is renamed \"advance_page\" and \"next\" returns only 1 element (Python 2 expected behavior)\n - paging objects are now real generator and support the \"next()\" built-in function without need for \"iter()\"\n\n- Raise accurate DeserialisationError on incorrect RestAPI discriminator usage #27\n- Fix discriminator usage of the base class name #27\n- Remove default mutable arguments in Clients #20\n- Fix object comparison in some scenarios #24\n\n2017-03-06 Version 0.4.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Allow Model sub-classes to be serialized if type is \"object\"\n\n2017-02-13 Version 0.4.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix polymorphic deserialization #11\n- Fix regexp validation if '\\\\w' is used in Python 2.7 #13\n- Fix dict deserialization if keys are unicode in Python 2.7\n\n**Improvements**\n\n- Add polymorphic serialisation from dict objects\n- Remove chardet and use HTTP charset declaration (fallback to utf8)\n\n2016-09-14 Version 0.4.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove paging URL validation, part of fix https://github.com/Azure/autorest/pull/1420\n\n**Disclaimer**\n\nIn order to get paging fixes for impacted clients, you need this package and Autorest > 0.17.0 Nightly 20160913\n\n2016-09-01 Version 0.4.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Better exception message (https://github.com/Azure/autorest/pull/1300)\n\n2016-08-15 Version 0.4.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization if \"object\" type contains None (https://github.com/Azure/autorest/issues/1353)\n\n2016-08-08 Version 0.4.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix compatibility issues with requests 2.11.0 (https://github.com/Azure/autorest/issues/1337)\n- Allow url of ClientRequest to have parameters (https://github.com/Azure/autorest/issues/1217)\n\n2016-05-25 Version 0.4.0\n++++++++++++++++++++++++\n\nThis version has no bug fixes, but implements new features of Autorest:\n- Base64 url type\n- unixtime type\n- x-ms-enum modelAsString flag\n\n**Behaviour changes**\n\n- Add Platform information in UserAgent\n- Needs Autorest > 0.17.0 Nightly 20160525\n\n2016-04-26 Version 0.3.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Read only values are no longer in __init__ or sent to the server (https://github.com/Azure/autorest/pull/959)\n- Useless kwarg removed\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160426\n\n\n2016-03-25 Version 0.2.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Manage integer enum values (https://github.com/Azure/autorest/pull/879)\n- Add missing application/json Accept HTTP header (https://github.com/Azure/azure-sdk-for-python/issues/553)\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160324\n\n\n2016-03-21 Version 0.1.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Deserialisation of generic resource if null in JSON (https://github.com/Azure/azure-sdk-for-python/issues/544)\n\n\n2016-03-14 Version 0.1.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- urllib3 side effect (https://github.com/Azure/autorest/issues/824)\n\n\n2016-03-04 Version 0.1.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/799)\n\n2016-03-04 Version 0.1.0\n+++++++++++++++++++++++++\n\n**Behavioural Changes**\n\n- Removed custom logging set up and configuration. All loggers are now children of the root logger 'msrest' with no pre-defined configurations.\n- Replaced _required attribute in Model class with more extensive _validation dict.\n\n**Improvement**\n\n- Removed hierarchy scanning for attribute maps from base Model class - relies on generator to populate attribute\n maps according to hierarchy.\n- Base class Paged now inherits from collections.Iterable.\n- Data validation during serialization using custom parameters (e.g. max, min etc).\n- Added ValidationError to be raised if invalid data encountered during serialization.\n\n2016-02-29 Version 0.0.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/718)\n\n2016-02-19 Version 0.0.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fixed bug in exception logging before logger configured.\n\n2016-02-19 Version 0.0.1\n++++++++++++++++++++++++\n\n- Initial release.", - "release_date": "2022-06-13T22:41:25", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": "https://github.com/Azure/msrest-for-python", - "download_url": "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip", - "size": 175332, - "sha1": null, - "md5": "3079617446a011d4fc0098687609671e", - "sha256": "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/msrest/0.7.1/json", - "datasource_id": null, - "purl": "pkg:pypi/msrest@0.7.1" - }, { "type": "pypi", "namespace": null, @@ -1634,82 +917,6 @@ "datasource_id": null, "purl": "pkg:pypi/oauthlib@3.2.2" }, - { - "type": "pypi", - "namespace": null, - "name": "oauthlib", - "version": "3.2.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic\nOAuthLib - Python Framework for OAuth1 & OAuth2\n===============================================\n\n*A generic, spec-compliant, thorough implementation of the OAuth request-signing\nlogic for Python 3.6+.*\n\n.. image:: https://app.travis-ci.com/oauthlib/oauthlib.svg?branch=master\n :target: https://app.travis-ci.com/oauthlib/oauthlib\n :alt: Travis\n.. image:: https://coveralls.io/repos/oauthlib/oauthlib/badge.svg?branch=master\n :target: https://coveralls.io/r/oauthlib/oauthlib\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/pyversions/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: Download from PyPI\n.. image:: https://img.shields.io/pypi/l/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: License\n.. image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib.svg?type=shield\n :target: https://app.fossa.io/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib?ref=badge_shield\n :alt: FOSSA Status\n.. image:: https://img.shields.io/readthedocs/oauthlib.svg\n :target: https://oauthlib.readthedocs.io/en/latest/index.html\n :alt: Read the Docs\n.. image:: https://badges.gitter.im/oauthlib/oauthlib.svg\n :target: https://gitter.im/oauthlib/Lobby\n :alt: Chat on Gitter\n\n\n.. image:: https://raw.githubusercontent.com/oauthlib/oauthlib/8d71b161fd145d11c40d55c9ab66ac134a303253/docs/logo/oauthlib-banner-700x192.png\n :target: https://github.com/oauthlib/oauthlib/\n :alt: OAuth + Python = OAuthlib Python Framework\n\n\nOAuth often seems complicated and difficult-to-implement. There are several\nprominent libraries for handling OAuth requests, but they all suffer from one or\nboth of the following:\n\n1. They predate the `OAuth 1.0 spec`_, AKA RFC 5849.\n2. They predate the `OAuth 2.0 spec`_, AKA RFC 6749.\n3. They assume the usage of a specific HTTP request library.\n\n.. _`OAuth 1.0 spec`: https://tools.ietf.org/html/rfc5849\n.. _`OAuth 2.0 spec`: https://tools.ietf.org/html/rfc6749\n\nOAuthLib is a framework which implements the logic of OAuth1 or OAuth2 without\nassuming a specific HTTP request object or web framework. Use it to graft OAuth\nclient support onto your favorite HTTP library, or provide support onto your\nfavourite web framework. If you're a maintainer of such a library, write a thin\nveneer on top of OAuthLib and get OAuth support for very little effort.\n\n\nDocumentation\n--------------\n\nFull documentation is available on `Read the Docs`_. All contributions are very\nwelcome! The documentation is still quite sparse, please open an issue for what\nyou'd like to know, or discuss it in our `Gitter community`_, or even better, send a\npull request!\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n.. _`Read the Docs`: https://oauthlib.readthedocs.io/en/latest/index.html\n\nInterested in making OAuth requests?\n------------------------------------\n\nThen you might be more interested in using `requests`_ which has OAuthLib\npowered OAuth support provided by the `requests-oauthlib`_ library.\n\n.. _`requests`: https://github.com/requests/requests\n.. _`requests-oauthlib`: https://github.com/requests/requests-oauthlib\n\nWhich web frameworks are supported?\n-----------------------------------\n\nThe following packages provide OAuth support using OAuthLib.\n\n- For Django there is `django-oauth-toolkit`_, which includes `Django REST framework`_ support.\n- For Flask there is `flask-oauthlib`_ and `Flask-Dance`_.\n- For Pyramid there is `pyramid-oauthlib`_.\n- For Bottle there is `bottle-oauthlib`_.\n\nIf you have written an OAuthLib package that supports your favorite framework,\nplease open a Pull Request, updating the documentation.\n\n.. _`django-oauth-toolkit`: https://github.com/evonove/django-oauth-toolkit\n.. _`flask-oauthlib`: https://github.com/lepture/flask-oauthlib\n.. _`Django REST framework`: http://django-rest-framework.org\n.. _`Flask-Dance`: https://github.com/singingwolfboy/flask-dance\n.. _`pyramid-oauthlib`: https://github.com/tilgovi/pyramid-oauthlib\n.. _`bottle-oauthlib`: https://github.com/thomsonreuters/bottle-oauthlib\n\nUsing OAuthLib? Please get in touch!\n------------------------------------\nPatching OAuth support onto an http request framework? Creating an OAuth\nprovider extension for a web framework? Simply using OAuthLib to Get Things Done\nor to learn?\n\nNo matter which we'd love to hear from you in our `Gitter community`_ or if you have\nanything in particular you would like to have, change or comment on don't\nhesitate for a second to send a pull request or open an issue. We might be quite\nbusy and therefore slow to reply but we love feedback!\n\nChances are you have run into something annoying that you wish there was\ndocumentation for, if you wish to gain eternal fame and glory, and a drink if we\nhave the pleasure to run into each other, please send a docs pull request =)\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n\nLicense\n-------\n\nOAuthLib is yours to use and abuse according to the terms of the BSD license.\nCheck the LICENSE file for full details.\n\nCredits\n-------\n\nOAuthLib has been started and maintained several years by Idan Gazit and other\namazing `AUTHORS`_. Thanks to their wonderful work, the open-source `community`_\ncreation has been possible and the project can stay active and reactive to users\nrequests.\n\n\n.. _`AUTHORS`: https://github.com/oauthlib/oauthlib/blob/master/AUTHORS\n.. _`community`: https://github.com/oauthlib/\n\nChangelog\n---------\n\n*OAuthLib is in active development, with the core of both OAuth1 and OAuth2\ncompleted, for providers as well as clients.* See `supported features`_ for\ndetails.\n\n.. _`supported features`: https://oauthlib.readthedocs.io/en/latest/feature_matrix.html\n\nFor a full changelog see ``CHANGELOG.rst``.", - "release_date": "2022-10-17T20:04:27", - "parties": [ - { - "type": "person", - "role": "author", - "name": "The OAuthlib Community", - "email": "idan@gazit.me", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Ib Lundgren", - "email": "ib.lundgren@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/oauthlib/oauthlib", - "download_url": "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz", - "size": 177352, - "sha1": null, - "md5": "2f7b898cc1af8c1409cc329e8843ea8f", - "sha256": "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved", - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/oauthlib/3.2.2/json", - "datasource_id": null, - "purl": "pkg:pypi/oauthlib@3.2.2" - }, { "type": "pypi", "namespace": null, @@ -1743,210 +950,14 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", - "size": 117552, - "sha1": null, - "md5": "e9bf4a92f270e6482393bd716406ff85", - "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "pycparser", - "version": "2.22", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", - "release_date": "2024-03-30T13:22:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Eli Bendersky", - "email": "eliben@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Eli Bendersky", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", - "size": 172736, - "sha1": null, - "md5": "8922b0b1b53b419e3a38fba4aa43a348", - "sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", - "size": 24179, - "sha1": null, - "md5": "68df2f3e274ac34fb2c5f32b15374156", - "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ISC", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", - "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:29", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" + "Programming Language :: Python :: 3.9" ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz", - "size": 55650, + "homepage_url": "https://github.com/eliben/pycparser", + "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", + "size": 117552, "sha1": null, - "md5": "713dc7856f9ff625d75335c10d332a1b", - "sha256": "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9", + "md5": "e9bf4a92f270e6482393bd716406ff85", + "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1954,7 +965,7 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "ISC", + "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1966,64 +977,63 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", + "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" + "purl": "pkg:pypi/pycparser@2.22" }, { "type": "pypi", "namespace": null, - "name": "requests", - "version": "2.32.3", + "name": "requests-oauthlib", + "version": "2.0.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:47", + "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", + "release_date": "2024-03-22T20:32:28", "parties": [ { "type": "person", "role": "author", "name": "Kenneth Reitz", - "email": "me@kennethreitz.org", + "email": "me@kennethreitz.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Natural Language :: English", - "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", - "size": 64928, + "homepage_url": "https://github.com/requests/requests-oauthlib", + "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", + "size": 24179, "sha1": null, - "md5": "83d50f7980b330c48f3bfe86372adcca", - "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", + "md5": "68df2f3e274ac34fb2c5f32b15374156", + "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/psf/requests", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0", + "license": "ISC", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -2033,9 +1043,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests/2.32.3/json", + "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", "datasource_id": null, - "purl": "pkg:pypi/requests@2.32.3" + "purl": "pkg:pypi/requests-oauthlib@2.0.0" }, { "type": "pypi", @@ -2046,7 +1056,7 @@ "subpath": null, "primary_language": "Python", "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:49", + "release_date": "2024-05-29T15:37:47", "parties": [ { "type": "person", @@ -2076,11 +1086,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", - "size": 131218, + "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", + "size": 64928, "sha1": null, - "md5": "fa3ee5ac3f1b3f4368bd74ab530d3f0f", - "sha256": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "md5": "83d50f7980b330c48f3bfe86372adcca", + "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/psf/requests", @@ -2160,142 +1170,16 @@ "datasource_id": null, "purl": "pkg:pypi/six@1.17.0" }, - { - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", - "release_date": "2024-12-04T17:35:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/benjaminp/six", - "download_url": "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", - "size": 34031, - "sha1": null, - "md5": "a0387fe15662c71057b4fb2b7aa9056a", - "sha256": "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", - "datasource_id": null, - "purl": "pkg:pypi/six@1.17.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "typing-extensions", - "version": "4.13.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:40", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Michael Lee\" ", - "url": null - } - ], - "keywords": [ - "annotations", - "backport", - "checker", - "checking", - "function", - "hinting", - "hints", - "type", - "typechecking", - "typehinting", - "typehints", - "typing", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", - "size": 45683, - "sha1": null, - "md5": "7ff271e4526b7cd1c260bdcc610b11c4", - "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", - "sha512": null, - "bug_tracking_url": "https://github.com/python/typing_extensions/issues", - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "PSF-2.0", - "declared_license": {}, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", - "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" - }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.0", + "version": "4.13.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:41", + "release_date": "2025-04-03T16:11:19", "parties": [ { "type": "person", @@ -2333,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", - "size": 106520, + "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", + "size": 45739, "sha1": null, - "md5": "f53b1a7955332b9c74fdbfb847399edb", - "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", + "md5": "88648ecb0c5e2dfdb72097ec846b87c8", + "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2352,9 +1236,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" + "purl": "pkg:pypi/typing-extensions@4.13.1" }, { "type": "pypi", @@ -2434,94 +1318,15 @@ "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", "datasource_id": null, "purl": "pkg:pypi/urllib3@2.3.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "urllib3", - "version": "2.3.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-12-22T07:47:30", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Andrey Petrov ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Seth Michael Larson , Quentin Pradet , Illia Volochii ", - "url": null - } - ], - "keywords": [ - "filepost", - "http", - "httplib", - "https", - "pooling", - "ssl", - "threadsafe", - "urllib", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", - "size": 307268, - "sha1": null, - "md5": "6388afd062cf2e1ef27843738629dbc1", - "sha256": "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/urllib3/urllib3", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", - "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.3.0" } ], "resolved_dependencies_graph": [ { - "package": "pkg:pypi/azure-core@1.32.0", + "package": "pkg:pypi/azure-core@1.33.0", "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2533,10 +1338,10 @@ { "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2574,7 +1379,7 @@ { "package": "pkg:pypi/msrest@0.7.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/certifi@2025.1.31", "pkg:pypi/isodate@0.7.2", "pkg:pypi/requests-oauthlib@2.0.0", @@ -2610,7 +1415,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.0", + "package": "pkg:pypi/typing-extensions@4.13.1", "dependencies": [] }, { diff --git a/tests/data/azure-devops.req-38-expected.json b/tests/data/azure-devops.req-38-expected.json index c2f4c0cf..29f6d6ed 100644 --- a/tests/data/azure-devops.req-38-expected.json +++ b/tests/data/azure-devops.req-38-expected.json @@ -126,73 +126,12 @@ "type": "pypi", "namespace": null, "name": "azure-core", - "version": "1.32.0", + "version": "1.33.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:19", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "azpysdkhelp@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/39/83/325bf5e02504dbd8b4faa98197a44cdf8a325ef259b48326a2b6f17f8383/azure_core-1.32.0-py3-none-any.whl", - "size": 198855, - "sha1": null, - "md5": "63590a499bd095f8ca407464df434dd5", - "sha256": "eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "azure-core", - "version": "1.32.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", - "release_date": "2024-10-31T17:45:17", + "description": "Microsoft Azure Core Library for Python\n# Azure Core shared client library for Python\n\nAzure core provides shared exceptions and modules for Python SDK client libraries.\nThese libraries follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/index.html) .\n\nIf you are a client library developer, please reference [client library developer reference](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md) for more information.\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/)\n| [Package (Pypi)][package]\n| [Package (Conda)](https://anaconda.org/microsoft/azure-core/)\n| [API reference documentation](https://learn.microsoft.com/python/api/overview/azure/core-readme)\n\n## Getting started\n\nTypically, you will not need to install azure core;\nit will be installed when you install one of the client libraries using it.\nIn case you want to install it explicitly (to implement your own client library, for example),\nyou can find it [here](https://pypi.org/project/azure-core/).\n\n## Key concepts\n\n### Azure Core Library Exceptions\n\n#### AzureError\n\nAzureError is the base exception for all errors.\n\n```python\nclass AzureError(Exception):\n def __init__(self, message, *args, **kwargs):\n self.inner_exception = kwargs.get(\"error\")\n self.exc_type, self.exc_value, self.exc_traceback = sys.exc_info()\n self.exc_type = self.exc_type.__name__ if self.exc_type else type(self.inner_exception)\n self.exc_msg = \"{}, {}: {}\".format(message, self.exc_type, self.exc_value) # type: ignore\n self.message = str(message)\n self.continuation_token = kwargs.get(\"continuation_token\")\n super(AzureError, self).__init__(self.message, *args)\n```\n\n*message* is any message (str) to be associated with the exception.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception. Use the keyword *error* to pass in an internal exception and *continuation_token* for a token reference to continue an incomplete operation.\n\n**The following exceptions inherit from AzureError:**\n\n#### ServiceRequestError\n\nAn error occurred while attempt to make a request to the service. No request was sent.\n\n#### ServiceResponseError\n\nThe request was sent, but the client failed to understand the response.\nThe connection may have timed out. These errors can be retried for idempotent or safe operations.\n\n#### HttpResponseError\n\nA request was made, and a non-success status code was received from the service.\n\n```python\nclass HttpResponseError(AzureError):\n def __init__(self, message=None, response=None, **kwargs):\n self.reason = None\n self.response = response\n if response:\n self.reason = response.reason\n self.status_code = response.status_code\n self.error = self._parse_odata_body(ODataV4Format, response) # type: Optional[ODataV4Format]\n if self.error:\n message = str(self.error)\n else:\n message = message or \"Operation returned an invalid status '{}'\".format(\n self.reason\n )\n\n super(HttpResponseError, self).__init__(message=message, **kwargs)\n```\n\n*message* is the HTTP response error message (optional)\n\n*response* is the HTTP response (optional).\n\n*kwargs* are keyword arguments to include with the exception.\n\n**The following exceptions inherit from HttpResponseError:**\n\n#### DecodeError\n\nAn error raised during response de-serialization.\n\n#### IncompleteReadError\n\nAn error raised if peer closes the connection before we have received the complete message body.\n\n#### ResourceExistsError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotFoundError\n\nAn error response, typically triggered by a 412 response (for update) or 404 (for get/post).\n\n#### ResourceModifiedError\n\nAn error response with status code 4xx, typically 412 Conflict. This will not be raised directly by the Azure core pipeline.\n\n#### ResourceNotModifiedError\n\nAn error response with status code 304. This will not be raised directly by the Azure core pipeline.\n\n#### ClientAuthenticationError\n\nAn error response with status code 4xx. This will not be raised directly by the Azure core pipeline.\n\n#### TooManyRedirectsError\n\nAn error raised when the maximum number of redirect attempts is reached. The maximum amount of redirects can be configured in the RedirectPolicy.\n\n```python\nclass TooManyRedirectsError(HttpResponseError):\n def __init__(self, history, *args, **kwargs):\n self.history = history\n message = \"Reached maximum redirect attempts.\"\n super(TooManyRedirectsError, self).__init__(message, *args, **kwargs)\n```\n\n*history* is used to document the requests/responses that resulted in redirected requests.\n\n*args* are any additional args to be included with exception.\n\n*kwargs* are keyword arguments to include with the exception.\n\n#### StreamConsumedError\n\nAn error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been consumed.\n\n#### StreamClosedError\n\nAn error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once\nthe response stream has been closed.\n\n#### ResponseNotReadError\n\nAn error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before\nreading in the response's bytes first.\n\n### Configurations\n\nWhen calling the methods, some properties can be configured by passing in as kwargs arguments.\n\n| Parameters | Description |\n| --- | --- |\n| headers | The HTTP Request headers. |\n| request_id | The request id to be added into header. |\n| user_agent | If specified, this will be added in front of the user agent string. |\n| logging_enable| Use to enable per operation. Defaults to `False`. |\n| logger | If specified, it will be used to log information. |\n| response_encoding | The encoding to use if known for this service (will disable auto-detection). |\n| raw_request_hook | Callback function. Will be invoked on request. |\n| raw_response_hook | Callback function. Will be invoked on response. |\n| network_span_namer | A callable to customize the span name. |\n| tracing_attributes | Attributes to set on all created spans. |\n| permit_redirects | Whether the client allows redirects. Defaults to `True`. |\n| redirect_max | The maximum allowed redirects. Defaults to `30`. |\n| retry_total | Total number of retries to allow. Takes precedence over other counts. Default value is `10`. |\n| retry_connect | How many connection-related errors to retry on. These are errors raised before the request is sent to the remote server, which we assume has not triggered the server to process the request. Default value is `3`. |\n| retry_read | How many times to retry on read errors. These errors are raised after the request was sent to the server, so the request may have side-effects. Default value is `3`. |\n| retry_status | How many times to retry on bad status codes. Default value is `3`. |\n| retry_backoff_factor | A backoff factor to apply between attempts after the second try (most errors are resolved immediately by a second try without a delay). Retry policy will sleep for: `{backoff factor} * (2 ** ({number of total retries} - 1))` seconds. If the backoff_factor is 0.1, then the retry will sleep for [0.0s, 0.2s, 0.4s, ...] between retries. The default value is `0.8`. |\n| retry_backoff_max | The maximum back off time. Default value is `120` seconds (2 minutes). |\n| retry_mode | Fixed or exponential delay between attempts, default is `Exponential`. |\n| timeout | Timeout setting for the operation in seconds, default is `604800`s (7 days). |\n| connection_timeout | A single float in seconds for the connection timeout. Defaults to `300` seconds. |\n| read_timeout | A single float in seconds for the read timeout. Defaults to `300` seconds. |\n| connection_verify | SSL certificate verification. Enabled by default. Set to False to disable, alternatively can be set to the path to a CA_BUNDLE file or directory with certificates of trusted CAs. |\n| connection_cert | Client-side certificates. You can specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files' paths. |\n| proxies | Dictionary mapping protocol or protocol and hostname to the URL of the proxy. |\n| cookies | Dict or CookieJar object to send with the `Request`. |\n| connection_data_block_size | The block size of data sent over the connection. Defaults to `4096` bytes. |\n\n### Async transport\n\nThe async transport is designed to be opt-in. [AioHttp](https://pypi.org/project/aiohttp/) is one of the supported implementations of async transport. It is not installed by default. You need to install it separately.\n\n### Shared modules\n\n#### MatchConditions\n\nMatchConditions is an enum to describe match conditions.\n\n```python\nclass MatchConditions(Enum):\n Unconditionally = 1 # Matches any condition\n IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=\n IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=\n IfPresent = 4 # If the target object exists. Usually it maps to etag='*'\n IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'\n```\n\n#### CaseInsensitiveEnumMeta\n\nA metaclass to support case-insensitive enums.\n\n```python\nfrom enum import Enum\n\nfrom azure.core import CaseInsensitiveEnumMeta\n\nclass MyCustomEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n FOO = 'foo'\n BAR = 'bar'\n```\n\n#### Null Sentinel Value\n\nA falsy sentinel object which is supposed to be used to specify attributes\nwith no data. This gets serialized to `null` on the wire.\n\n```python\nfrom azure.core.serialization import NULL\n\nassert bool(NULL) is False\n\nfoo = Foo(\n attr=NULL\n)\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit [https://cla.microsoft.com](https://cla.microsoft.com).\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information, see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any\nadditional questions or comments.\n\n\n[package]: https://pypi.org/project/azure-core/\n\n\n# Release History\n\n## 1.33.0 (2025-04-03)\n\n### Features Added\n\n- Added native OpenTelemetry tracing to Azure Core which enables users to use OpenTelemetry to trace Azure SDK operations without needing to install a plugin. #39563\n - To enable native OpenTelemetry tracing, users need to:\n 1. Have `opentelemetry-api` installed.\n 2. Ensure that `settings.tracing_implementation` is not set.\n 3. Ensure that `settings.tracing_enabled` is set to `True`.\n - If `setting.tracing_implementation` is set, the tracing plugin will be used instead of the native tracing.\n - If `settings.tracing_enabled` is set to `False`, tracing will be disabled.\n - The `OpenTelemetryTracer` class was added to the `azure.core.tracing.opentelemetry` module. This is a wrapper around the OpenTelemetry tracer that is used to create spans for Azure SDK operations.\n - Added a `get_tracer` method to the new `azure.core.instrumentation` module. This method returns an instance of the `OpenTelemetryTracer` class if OpenTelemetry is available.\n - A `TracingOptions` TypedDict class was added to define the options that SDK users can use to configure tracing per-operation. These options include the ability to enable or disable tracing and set additional attributes on spans.\n - Example usage: `client.method(tracing_options={\"enabled\": True, \"attributes\": {\"foo\": \"bar\"}})`\n - The `DistributedTracingPolicy` and `distributed_trace`/`distributed_trace_async` decorators now uses the OpenTelemetry tracer if it is available and native tracing is enabled.\n - SDK clients can define an `_instrumentation_config` class variable to configure the OpenTelemetry tracer used in method span creation. Possible configuration options are `library_name`, `library_version`, `schema_url`, and `attributes`.\n - `DistributedTracingPolicy` now accepts a `instrumentation_config` keyword argument to configure the OpenTelemetry tracer used in HTTP span creation.\n\n### Breaking Changes\n\n- Removed automatic tracing enablement for the OpenTelemetry plugin if `opentelemetry` was imported. To enable tracing with the plugin, please import `azure.core.settings.settings` and set `settings.tracing_implementation` to `\"opentelemetry\"`. #39563\n- In `DistributedTracingPolicy`, the default span name is now just the HTTP method (e.g., \"GET\", \"POST\") and no longer includes the URL path. This change was made to converge with the OpenTelemetry HTTP semantic conventions. The full URL is still included in the span attributes.\n- Renamed span attributes in `DistributedTracingPolicy`:\n - \"x-ms-client-request-id\" is now \"az.client_request_id\"\n - \"x-ms-request-id\" is now \"az.service_request_id\"\n\n### Bugs Fixed\n\n- Fixed an issue where the `traceparent` header was not being set correctly in the `DistributedTracingPolicy`. The `traceparent` header will now set based on the context of the HTTP client span. #40074\n\n### Other Changes\n\n- Added `opentelemetry-api` as an optional dependency for tracing. This can be installed with `pip install azure-core[tracing]`. #39563\n\n## 1.32.0 (2024-10-31)\n\n### Features Added\n\n- Added a default implementation to handle token challenges in `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy`.\n\n### Bugs Fixed\n\n- Fixed an issue where the `tracing_attributes` keyword argument wasn't being handled at the request/method level. #38164\n\n### Other Changes\n\n- Log \"x-vss-e2eid\" and \"x-msedge-ref\" headers in `HttpLoggingPolicy`.\n\n## 1.31.0 (2024-09-12)\n\n### Features Added\n\n- Added azure.core.AzureClouds enum to represent the different Azure clouds.\n- Added two new credential protocol classes, `SupportsTokenInfo` and `AsyncSupportsTokenInfo`, to offer more extensibility in supporting various token acquisition scenarios. #36565\n - Each new protocol class defines a `get_token_info` method that returns an `AccessTokenInfo` object.\n- Added a new `TokenRequestOptions` class, which is a `TypedDict` with optional parameters, that can be used to define options for token requests through the `get_token_info` method. #36565\n- Added a new `AccessTokenInfo` class, which is returned by `get_token_info` implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now first check if a credential has the `get_token_info` method defined. If so, the `get_token_info` method is used to acquire a token. Otherwise, the `get_token` method is used. #36565\n - These policies now also check the `refresh_on` attribute when determining if a new token request should be made.\n\n### Other Changes\n\n- The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and `opentelemetry` is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050\n\n## 1.30.2 (2024-06-06)\n\n### Features Added\n\n- Tracing: `DistributedTracingPolicy` will now set an attribute, `http.request.resend_count`, on HTTP spans for resent requests to indicate the resend attempt number. #35069\n\n### Bugs Fixed\n\n- Raise correct exception if transport is used while already closed #35559\n\n### Other Changes\n\n- HTTP tracing spans will now include an `error.type` attribute if an error status code is returned. #34619\n- Minimum required Python version is now 3.8\n\n## 1.30.1 (2024-02-29)\n\n### Other Changes\n\n- Accept float for `retry_after` header. #34203\n\n## 1.30.0 (2024-02-01)\n\n### Features Added\n\n- Support tuple input for file values to `azure.core.rest.HttpRequest` #33948\n- Support tuple input to `files` with duplicate field names `azure.core.rest.HttpRequest` #34021\n\n## 1.29.7 (2024-01-18)\n\n### Other Changes\n\n- Removed dependency on `anyio`. #33282\n\n## 1.29.6 (2023-12-14)\n\n### Bugs Fixed\n\n- Adjusted `AsyncBearerTokenCredentialPolicy` to work properly with `trio` concurrency mechanisms. ([#33307](https://github.com/Azure/azure-sdk-for-python/pull/33307))\n\n### Other Changes\n\n- Added dependency on `anyio` >=3.0,<5.0\n- Bumped minimum dependency on `requests` to 2.21.0.\n\n## 1.29.5 (2023-10-19)\n\n### Bugs Fixed\n\n- Fixed an issue with `multipart/form-data` in the async transport where `data` was not getting encoded into the request body. #32473\n\n### Other Changes\n\n- Use ssl context from aiohttp by default.\n\n## 1.29.4 (2023-09-07)\n\n### Bugs Fixed\n\n- Fixed the issue that some urls trigger an infinite loop. #31346\n- Fixed issue where IndexError was raised if multipart responses did not match the number of requests. #31471\n- Fixed issue unbound variable exception if dict is invalid in CloudEvent.from_dict. #31835\n- Fixed issue asyncBearerTokenCredentialPolicy is not backward compatible with SansIOHTTPPolicy. #31836\n- Fixed issue mypy complains with new version of azure-core. #31564\n\n## 1.29.3 (2023-08-22)\n\n### Bugs Fixed\n\n- Typing fix: `message` cannot be `None` in `AzureError`. #31564\n\n## 1.29.2 (2023-08-14)\n\n### Bugs Fixed\n\n- Added a default implementation for `AsyncTokenCredential.__aexit__()` #31573\n\n### Other Changes\n\n- Bumped `typing-extensions` version to 4.6.0.\n\n## 1.29.1 (2023-08-09)\n\n### Bugs Fixed\n\n- Not pass `enabled_cae` unless it is explicitly enabled.\n\n## 1.29.0 (2023-08-03)\n\n### Features Added\n\n- A keyword argument `enable_cae` was added to the `get_token` method of the `TokenCredential` protocol. #31012\n- `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` now accept `enable_cae` keyword arguments in their constructors. This is used in determining if [Continuous Access Evaluation (CAE)](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) should be enabled for each `get_token` request. #31012\n\n## 1.28.0 (2023-07-06)\n\n### Features Added\n\n- Added header name parameter to `RequestIdPolicy`. #30772\n- Added `SensitiveHeaderCleanupPolicy` that cleans up sensitive headers if a redirect happens and the new destination is in another domain. #28349\n\n### Other Changes\n\n- Catch aiohttp errors and translate them into azure-core errors.\n\n## 1.27.1 (2023-06-13)\n\n### Bugs Fixed\n\n- Fix url building for some complex query parameters scenarios #30707\n\n## 1.27.0 (2023-06-01)\n\n### Features Added\n\n- Added support to use sync credentials in `AsyncBearerTokenCredentialPolicy`. #30381\n- Added \"prefix\" parameter to AzureKeyCredentialPolicy #29901\n\n### Bugs Fixed\n\n- Improve error message when providing the wrong credential type for AzureKeyCredential #30380\n\n## 1.26.4 (2023-04-06)\n\n### Features Added\n\n- Updated settings to include OpenTelemetry as a tracer provider. #29095\n\n### Other Changes\n\n- Improved typing\n\n## 1.26.3 (2023-02-02)\n\n### Bugs Fixed\n\n- Fixed deflate decompression for aiohttp #28483\n\n## 1.26.2 (2023-01-05)\n\n### Bugs Fixed\n\n- Fix 'ClientSession' object has no attribute 'auto_decompress' (thanks to @mghextreme for the contribution)\n\n### Other Changes\n\n- Add \"x-ms-error-code\" as secure header to log\n- Rename \"DEFAULT_HEADERS_WHITELIST\" to \"DEFAULT_HEADERS_ALLOWLIST\". Added a backward compatible alias.\n\n## 1.26.1 (2022-11-03)\n\n### Other Changes\n\n- Added example of RequestsTransport with custom session. (thanks to @inirudebwoy for the contribution) #26768\n- Added Python 3.11 support.\n\n## 1.26.0 (2022-10-06)\n\n### Other Changes\n\n- LRO polling will not wait anymore before doing the first status check #26376\n- Added extra dependency for [aio]. pip install azure-core[aio] installs aiohttp too.\n\n## 1.25.1 (2022-09-01)\n\n### Bugs Fixed\n\n- Added @runtime_checkable to `TokenCredential` protocol definitions #25187\n\n## 1.25.0 (2022-08-04)\n\nAzure-core is supported on Python 3.7 or later. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n\n### Features Added\n\n- Added `CaseInsensitiveDict` implementation in `azure.core.utils` removing dependency on `requests` and `aiohttp`\n\n## 1.24.2 (2022-06-30)\n\n### Bugs Fixed\n\n- Fixed the bug that azure-core could not be imported under Python 3.11.0b3 #24928\n- `ContentDecodePolicy` can now correctly deserialize more JSON bodies with different mime types #22410\n\n## 1.24.1 (2022-06-01)\n\n### Bugs Fixed\n\n- Declare method level span as INTERNAL by default #24492\n- Fixed type hints for `azure.core.paging.ItemPaged` #24548\n\n## 1.24.0 (2022-05-06)\n\n### Features Added\n\n- Add `SerializationError` and `DeserializationError` in `azure.core.exceptions` for errors raised during serialization / deserialization #24312\n\n## 1.23.1 (2022-03-31)\n\n### Bugs Fixed\n\n- Allow stream inputs to the `content` kwarg of `azure.core.rest.HttpRequest` from objects with a `read` method #23578\n\n## 1.23.0 (2022-03-03)\n\n### Features Added\n\n- Improve intellisense type hinting for service client methods. #22891\n\n- Add a case insensitive dict `case_insensitive_dict` in `azure.core.utils`. #23206\n\n### Bugs Fixed\n\n- Use \"\\n\" rather than \"/n\" for new line in log. #23261\n\n### Other Changes\n\n- Log \"WWW-Authenticate\" header in `HttpLoggingPolicy` #22990\n- Added dependency on `typing-extensions` >= 4.0.1\n\n## 1.22.1 (2022-02-09)\n\n### Bugs Fixed\n\n- Limiting `final-state-via` scope to POST until consuming SDKs has been fixed to use this option properly on PUT. #22989\n\n## 1.22.0 (2022-02-03)\n_[**This version is deprecated.**]_\n\n### Features Added\n\n- Add support for `final-state-via` LRO option in core. #22713\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #22302\n- Raise `AttributeError` when calling azure.core.pipeline.transport.\\_\\_bases__ #22469\n\n### Other Changes\n\n- Python 2.7 is no longer supported. Please use Python version 3.6 or later.\n\n## 1.21.1 (2021-12-06)\n\n### Other Changes\n\n- Revert change in str method #22023\n\n## 1.21.0 (2021-12-02)\n\n### Breaking Changes\n\n- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError`\n\n### Bugs Fixed\n\n- Add response body to string representation of `HttpResponseError` if we're not able to parse out information #21800\n\n## 1.20.1 (2021-11-08)\n\n### Bugs Fixed\n\n- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620\n\n## 1.20.0 (2021-11-04)\n\n### Features Added\n\n- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the `azure.core.rest` module\n- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529\n- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504\n- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body.\n\n### Breaking Changes\n\n- SansIOHTTPPolicy.on_exception returns None instead of bool.\n\n### Bugs Fixed\n\n- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body,\n rather than silently truncating data in case the underlying tcp connection is closed prematurely.\n (thanks to @jochen-ott-by for the contribution) #20412\n- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222\n- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550\n\n## 1.19.1 (2021-11-01)\n\n### Bugs Fixed\n\n- respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796\n- Fix \"coroutine x.read() was never awaited\" warning from `ContentDecodePolicy` #21318\n- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341\n- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes.\n\n### Other Changes\n\n- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028\n\n## 1.19.0 (2021-09-30)\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` are now abstract base classes. They should not be initialized directly, instead\nyour transport responses should inherit from them and implement them.\n- The properties of the `azure.core.rest` responses are now all read-only\n\n- HttpLoggingPolicy integrates logs into one record #19925\n\n## 1.18.0 (2021-09-02)\n\n### Features Added\n\n- `azure.core.serialization.AzureJSONEncoder` (introduced in 1.17.0) serializes `datetime.datetime` objects in ISO 8601 format, conforming to RFC 3339's specification. #20190\n- We now use `azure.core.serialization.AzureJSONEncoder` to serialize `json` input to `azure.core.rest.HttpRequest`.\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- The `text` property on `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse` has changed to a method, which also takes\nan `encoding` parameter.\n- Removed `iter_text` and `iter_lines` from `azure.core.rest.HttpResponse` and `azure.core.rest.AsyncHttpResponse`\n\n### Bugs Fixed\n\n- The behaviour of the headers returned in `azure.core.rest` responses now aligns across sync and async. Items can now be checked case-insensitively and without raising an error for format.\n\n## 1.17.0 (2021-08-05)\n\n### Features Added\n\n- Cut hard dependency on requests library\n- Added a `from_json` method which now accepts storage QueueMessage, eventhub's EventData or ServiceBusMessage or simply json bytes to return a `CloudEvent`\n\n### Fixed\n\n- Not override \"x-ms-client-request-id\" if it already exists in the header. #17757\n\n### Breaking Changes in the Provisional `azure.core.rest` package\n\n- `azure.core.rest` will not try to guess the `charset` anymore if it was impossible to extract it from `HttpResponse` analysis. This removes our dependency on `charset`.\n\n## 1.16.0 (2021-07-01)\n\n### Features Added\n\n- Add new ***provisional*** methods `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in\nrequests and sends them through our pipelines.\n- Add new ***provisional*** module `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses.\n- Add new ***provisional*** errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors\nare thrown if you mishandle streamed responses from the provisional `azure.core.rest` module\n\n### Fixed\n\n- Improved error message in the `from_dict` method of `CloudEvent` when a wrong schema is sent.\n\n## 1.15.0 (2021-06-04)\n\n### New Features\n\n- Added `BearerTokenCredentialPolicy.on_challenge` and `.authorize_request` to allow subclasses to optionally handle authentication challenges\n\n### Bug Fixes\n\n- Retry policies don't sleep after operations time out\n- The `from_dict` methhod in the `CloudEvent` can now convert a datetime string to datetime object when microsecond exceeds the python limitation\n\n## 1.14.0 (2021-05-13)\n\n### New Features\n\n- Added `azure.core.credentials.AzureNamedKeyCredential` credential #17548.\n- Added `decompress` parameter for `stream_download` method. If it is set to `False`, will not do decompression upon the stream. #17920\n\n## 1.13.0 (2021-04-02)\n\nAzure core requires Python 2.7 or Python 3.6+ since this release.\n\n### New Features\n\n- Added `azure.core.utils.parse_connection_string` function to parse connection strings across SDKs, with common validation and support for case insensitive keys.\n- Supported adding custom policies #16519\n- Added `~azure.core.tracing.Link` that should be used while passing `Links` to `AbstractSpan`.\n- `AbstractSpan` constructor can now take in additional keyword only args.\n\n### Bug fixes\n\n- Make NetworkTraceLoggingPolicy show the auth token in plain text. #14191\n- Fixed RetryPolicy overriding default connection timeout with an extreme value #17481\n\n## 1.12.0 (2021-03-08)\n\nThis version will be the last version to officially support Python 3.5, future versions will require Python 2.7 or Python 3.6+.\n\n### Features\n\n- Added `azure.core.messaging.CloudEvent` model that follows the cloud event spec.\n- Added `azure.core.serialization.NULL` sentinel value\n- Improve `repr`s for `HttpRequest` and `HttpResponse`s #16972\n\n### Bug Fixes\n\n- Disable retry in stream downloading. (thanks to @jochen-ott-by @hoffmann for the contribution) #16723\n\n## 1.11.0 (2021-02-08)\n\n### Features\n\n- Added `CaseInsensitiveEnumMeta` class for case-insensitive enums. #16316\n- Add `raise_for_status` method onto `HttpResponse`. Calling `response.raise_for_status()` on a response with an error code\nwill raise an `HttpResponseError`. Calling it on a good response will do nothing #16399\n\n### Bug Fixes\n\n- Update conn.conn_kw rather than overriding it when setting block size. (thanks for @jiasli for the contribution) #16587\n\n## 1.10.0 (2021-01-11)\n\n### Features\n\n- Added `AzureSasCredential` and its respective policy. #15946\n\n## 1.9.0 (2020-11-09)\n\n### Features\n\n- Add a `continuation_token` attribute to the base `AzureError` exception, and set this value for errors raised\n during paged or long-running operations.\n\n### Bug Fixes\n\n- Set retry_interval to 1 second instead of 1000 seconds (thanks **vbarbaresi** for contributing) #14357\n\n\n## 1.8.2 (2020-10-05)\n\n### Bug Fixes\n\n- Fixed bug to allow polling in the case of parameterized endpoints with relative polling urls #14097\n\n\n## 1.8.1 (2020-09-08)\n\n### Bug fixes\n\n- SAS credential replicated \"/\" fix #13159\n\n## 1.8.0 (2020-08-10)\n\n### Features\n\n- Support params as list for exploding parameters #12410\n\n\n## 1.7.0 (2020-07-06)\n\n### Bug fixes\n\n- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963\n- Better error messages if passed endpoint is incorrect #12106\n- Do not JSON encore a string if content type is \"text\" #12137\n\n### Features\n\n- Added `http_logging_policy` property on the `Configuration` object, allowing users to individually\nset the http logging policy of the config #12218\n\n## 1.6.0 (2020-06-03)\n\n### Bug fixes\n\n- Fixed deadlocks in AsyncBearerTokenCredentialPolicy #11543\n- Fix AttributeException in StreamDownloadGenerator #11462\n\n### Features\n\n- Added support for changesets as part of multipart message support #10485\n- Add AsyncLROPoller in azure.core.polling #10801\n- Add get_continuation_token/from_continuation_token/polling_method methods in pollers (sync and async) #10801\n- HttpResponse and PipelineContext objects are now pickable #10801\n\n## 1.5.0 (2020-05-04)\n\n### Features\n\n- Support \"x-ms-retry-after-ms\" in response header #10743\n- `link` and `link_from_headers` now accepts attributes #10765\n\n### Bug fixes\n\n- Not retry if the status code is less than 400 #10778\n- \"x-ms-request-id\" is not considered safe header for logging #10967\n\n## 1.4.0 (2020-04-06)\n\n### Features\n\n- Support a default error type in map_error #9773\n- Added `AzureKeyCredential` and its respective policy. #10509\n- Added `azure.core.polling.base_polling` module with a \"Microsoft One API\" polling implementation #10090\n Also contains the async version in `azure.core.polling.async_base_polling`\n- Support kwarg `enforce_https` to disable HTTPS check on authentication #9821\n- Support additional kwargs in `HttpRequest.set_multipart_mixed` that will be passed into pipeline context.\n\n## 1.3.0 (2020-03-09)\n\n### Bug fixes\n\n- Appended RequestIdPolicy to the default pipeline #9841\n- Rewind the body position in async_retry #10117\n\n### Features\n\n- Add raw_request_hook support in custom_hook_policy #9958\n- Add timeout support in retry_policy #10011\n- Add OdataV4 error format auto-parsing in all exceptions ('error' attribute) #9738\n\n## 1.2.2 (2020-02-10)\n\n### Bug fixes\n\n- Fixed a bug that sends None as request_id #9545\n- Enable mypy for customers #9572\n- Handle TypeError in deep copy #9620\n- Fix text/plain content-type in decoder #9589\n\n## 1.2.1 (2020-01-14)\n\n### Bug fixes\n\n- Fixed a regression in 1.2.0 that was incompatible with azure-keyvault-* 4.0.0\n[#9462](https://github.com/Azure/azure-sdk-for-python/issues/9462)\n\n\n## 1.2.0 (2020-01-14)\n\n### Features\n\n- Add user_agent & sdk_moniker kwargs in UserAgentPolicy init #9355\n- Support OPTIONS HTTP verb #9322\n- Add tracing_attributes to tracing decorator #9297\n- Support auto_request_id in RequestIdPolicy #9163\n- Support fixed retry #6419\n- Support \"retry-after-ms\" in response header #9240\n\n### Bug fixes\n\n- Removed `__enter__` and `__exit__` from async context managers #9313\n\n## 1.1.1 (2019-12-03)\n\n### Bug fixes\n\n- Bearer token authorization requires HTTPS\n- Rewind the body position in retry #8307\n\n## 1.1.0 (2019-11-25)\n\n### Features\n\n- New RequestIdPolicy #8437\n- Enable logging policy in default pipeline #8053\n- Normalize transport timeout. #8000\n Now we have:\n * 'connection_timeout' - a single float in seconds for the connection timeout. Default 5min\n * 'read_timeout' - a single float in seconds for the read timeout. Default 5min\n\n### Bug fixes\n\n- RequestHistory: deepcopy fails if request contains a stream #7732\n- Retry: retry raises error if response does not have http_response #8629\n- Client kwargs are now passed to DistributedTracingPolicy correctly #8051\n- NetworkLoggingPolicy now logs correctly all requests in case of retry #8262\n\n## 1.0.0 (2019-10-29)\n\n### Features\n\n- Tracing: DistributedTracingPolicy now accepts kwargs network_span_namer to change network span name #7773\n- Tracing: Implementation of AbstractSpan can now use the mixin HttpSpanMixin to get HTTP span update automatically #7773\n- Tracing: AbstractSpan contract \"change_context\" introduced #7773\n- Introduce new policy HttpLoggingPolicy #7988\n\n### Bug fixes\n\n- Fix AsyncioRequestsTransport if input stream is an async generator #7743\n- Fix form-data with aiohttp transport #7749\n\n### Breaking changes\n\n- Tracing: AbstractSpan.set_current_span is longer supported. Use change_context instead. #7773\n- azure.core.pipeline.policies.ContentDecodePolicy.deserialize_from_text changed\n\n## 1.0.0b4 (2019-10-07)\n\n### Features\n\n- Tracing: network span context is available with the TRACING_CONTEXT in pipeline response #7252\n- Tracing: Span contract now has `kind`, `traceparent` and is a context manager #7252\n- SansIOHTTPPolicy methods can now be coroutines #7497\n- Add multipart/mixed support #7083:\n\n - HttpRequest now has a \"set_multipart_mixed\" method to set the parts of this request\n - HttpRequest now has a \"prepare_multipart_body\" method to build final body.\n - HttpResponse now has a \"parts\" method to return an iterator of parts\n - AsyncHttpResponse now has a \"parts\" methods to return an async iterator of parts\n - Note that multipart/mixed is a Python 3.x only feature\n\n### Bug fixes\n\n- Tracing: policy cannot fail the pipeline, even in the worst condition #7252\n- Tracing: policy pass correctly status message if exception #7252\n- Tracing: incorrect span if exception raised from decorated function #7133\n- Fixed urllib3 ConnectTimeoutError being raised by Requests during a socket timeout. Now this exception is caught and wrapped as a `ServiceRequestError` #7542\n\n### Breaking changes\n\n- Tracing: `azure.core.tracing.context` removed\n- Tracing: `azure.core.tracing.context.tracing_context.with_current_context` renamed to `azure.core.tracing.common.with_current_context` #7252\n- Tracing: `link` renamed `link_from_headers` and `link` takes now a string\n- Tracing: opencensus implementation has been moved to the package `azure-core-tracing-opencensus`\n- Some modules and classes that were importables from several different places have been removed:\n\n - `azure.core.HttpResponseError` is now only `azure.core.exceptions.HttpResponseError`\n - `azure.core.Configuration` is now only `azure.core.configuration.Configuration`\n - `azure.core.HttpRequest` is now only `azure.core.pipeline.transport.HttpRequest`\n - `azure.core.version` module has been removed. Use `azure.core.__version__` to get version number.\n - `azure.core.pipeline_client` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline_client_async` has been removed. Import from `azure.core` instead.\n - `azure.core.pipeline.base` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.base_async` has been removed. Import from `azure.core.pipeline` instead.\n - `azure.core.pipeline.policies.base` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.base_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.authentication_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.custom_hook` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.redirect_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.retry_async` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.distributed_tracing` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.pipeline.policies.universal` has been removed. Import from `azure.core.pipeline.policies` instead.\n - `azure.core.tracing.abstract_span` has been removed. Import from `azure.core.tracing` instead.\n - `azure.core.pipeline.transport.base` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.base_async` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_basic` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_asyncio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.requests_trio` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.pipeline.transport.aiohttp` has been removed. Import from `azure.core.pipeline.transport` instead.\n - `azure.core.polling.poller` has been removed. Import from `azure.core.polling` instead.\n - `azure.core.polling.async_poller` has been removed. Import from `azure.core.polling` instead.\n\n## 1.0.0b3 (2019-09-09)\n\n### Bug fixes\n\n- Fix aiohttp auto-headers #6992\n- Add tracing to policies module init #6951\n\n## 1.0.0b2 (2019-08-05)\n\n### Breaking changes\n\n- Transport classes don't take `config` parameter anymore (use kwargs instead) #6372\n- `azure.core.paging` has been completely refactored #6420\n- HttpResponse.content_type attribute is now a string (was a list) #6490\n- For `StreamDownloadGenerator` subclasses, `response` is now an `HttpResponse`, and not a transport response like `aiohttp.ClientResponse` or `requests.Response`. The transport response is available in `internal_response` attribute #6490\n\n### Bug fixes\n\n- aiohttp is not required to import async pipelines classes #6496\n- `AsyncioRequestsTransport.sleep` is now a coroutine as expected #6490\n- `RequestsTransport` is not tight to `ProxyPolicy` implementation details anymore #6372\n- `AiohttpTransport` does not raise on unexpected kwargs #6355\n\n### Features\n\n- New paging base classes that support `continuation_token` and `by_page()` #6420\n- Proxy support for `AiohttpTransport` #6372\n\n## 1.0.0b1 (2019-06-26)\n\n- Preview 1 release", + "release_date": "2025-04-03T23:51:03", "parties": [ { "type": "person", @@ -212,15 +151,16 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ], "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core", - "download_url": "https://files.pythonhosted.org/packages/cc/ee/668328306a9e963a5ad9f152cd98c7adad86c822729fd1d2a01613ad1e67/azure_core-1.32.0.tar.gz", - "size": 279128, + "download_url": "https://files.pythonhosted.org/packages/07/b7/76b7e144aa53bd206bf1ce34fa75350472c3f69bf30e5c8c18bc9881035d/azure_core-1.33.0-py3-none-any.whl", + "size": 207071, "sha1": null, - "md5": "eac67c509ddce142eadef1e384e1f631", - "sha256": "22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5", + "md5": "ddd17415a5573ca4c435d7db0ff5631f", + "sha256": "9b5b6d0223a1d38c37500e6971118c1e0f13f54951e6893968b38910bc9cda8f", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -240,9 +180,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-core/1.32.0/json", + "api_data_url": "https://pypi.org/pypi/azure-core/1.33.0/json", "datasource_id": null, - "purl": "pkg:pypi/azure-core@1.32.0" + "purl": "pkg:pypi/azure-core@1.33.0" }, { "type": "pypi", @@ -312,74 +252,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-devops@7.1.0b4" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-devops", - "version": "7.1.0b4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python wrapper around the Azure DevOps 7.x APIs\nAzure DevOps Python clients", - "release_date": "2023-11-20T14:38:06", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Microsoft", - "VSTS", - "Team Services", - "SDK", - "AzureTfs", - "AzureDevOps", - "DevOps", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/microsoft/azure-devops-python-api", - "download_url": "https://files.pythonhosted.org/packages/e1/f9/495982345252dc7a15ac632e038be1f975ca0d2f25abfe8f8d908569141d/azure-devops-7.1.0b4.tar.gz", - "size": 1336261, - "sha1": null, - "md5": "bf401acf6533d4a2dcfd2106ffcbc86a", - "sha256": "f04ba939112579f3d530cfecc044a74ef9e9339ba23c9ee1ece248241f07ff85", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-devops/7.1.0b4/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-devops@7.1.0b4" - }, { "type": "pypi", "namespace": null, @@ -441,67 +313,6 @@ "datasource_id": null, "purl": "pkg:pypi/azure-storage-blob@12.25.1" }, - { - "type": "pypi", - "namespace": null, - "name": "azure-storage-blob", - "version": "12.25.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Microsoft Azure Blob Storage Client Library for Python\n# Azure Storage Blobs client library for Python\nAzure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.\n\nBlob storage is ideal for:\n\n* Serving images or documents directly to a browser\n* Storing files for distributed access\n* Streaming video and audio\n* Storing data for backup and restore, disaster recovery, and archiving\n* Storing data for analysis by an on-premises or Azure-hosted service\n\n[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/azure/storage/blob)\n| [Package (PyPI)](https://pypi.org/project/azure-storage-blob/)\n| [Package (Conda)](https://anaconda.org/microsoft/azure-storage/)\n| [API reference documentation](https://aka.ms/azsdk-python-storage-blob-ref)\n| [Product documentation](https://learn.microsoft.com/azure/storage/)\n| [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples)\n\n\n## Getting started\n\n### Prerequisites\n* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).\n* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an\n[Azure storage account](https://learn.microsoft.com/azure/storage/common/storage-account-overview) to use this package.\n\n### Install the package\nInstall the Azure Storage Blobs client library for Python with [pip](https://pypi.org/project/pip/):\n\n```bash\npip install azure-storage-blob\n```\n\n### Create a storage account\nIf you wish to create a new storage account, you can use the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal),\n[Azure PowerShell](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell),\nor [Azure CLI](https://learn.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli):\n\n```bash\n# Create a new resource group to hold the storage account -\n# if using an existing resource group, skip this step\naz group create --name my-resource-group --location westus2\n\n# Create the storage account\naz storage account create -n my-storage-account-name -g my-resource-group\n```\n\n### Create the client\nThe Azure Storage Blobs client library for Python allows you to interact with three types of resources: the storage\naccount itself, blob storage containers, and blobs. Interaction with these resources starts with an instance of a\n[client](#clients). To create a client object, you will need the storage account's blob service account URL and a\ncredential that allows you to access the storage account:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nservice = BlobServiceClient(account_url=\"https://.blob.core.windows.net/\", credential=credential)\n```\n\n#### Looking up the account URL\nYou can find the storage account's blob service URL using the\n[Azure Portal](https://learn.microsoft.com/azure/storage/common/storage-account-overview#storage-account-endpoints),\n[Azure PowerShell](https://learn.microsoft.com/powershell/module/az.storage/get-azstorageaccount),\nor [Azure CLI](https://learn.microsoft.com/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-show):\n\n```bash\n# Get the blob service account url for the storage account\naz storage account show -n my-storage-account-name -g my-resource-group --query \"primaryEndpoints.blob\"\n```\n\n#### Types of credentials\nThe `credential` parameter may be provided in a number of different forms, depending on the type of\n[authorization](https://learn.microsoft.com/azure/storage/common/storage-auth) you wish to use:\n1. To use an [Azure Active Directory (AAD) token credential](https://learn.microsoft.com/azure/storage/common/storage-auth-aad),\n provide an instance of the desired credential type obtained from the\n [azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials) library.\n For example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential)\n can be used to authenticate the client.\n\n This requires some initial setup:\n * [Install azure-identity](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#install-the-package)\n * [Register a new AAD application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) and give permissions to access Azure Storage\n * [Grant access](https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal) to Azure Blob data with RBAC in the Azure Portal\n * Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:\n AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET\n\n Use the returned token credential to authenticate the client:\n ```python\n from azure.identity import DefaultAzureCredential\n from azure.storage.blob import BlobServiceClient\n token_credential = DefaultAzureCredential()\n\n blob_service_client = BlobServiceClient(\n account_url=\"https://.blob.core.windows.net\",\n credential=token_credential\n )\n ```\n\n2. To use a [shared access signature (SAS) token](https://learn.microsoft.com/azure/storage/common/storage-sas-overview),\n provide the token as a string. If your account URL includes the SAS token, omit the credential parameter.\n You can generate a SAS token from the Azure Portal under \"Shared access signature\" or use one of the `generate_sas()`\n functions to create a sas token for the storage account, container, or blob:\n\n ```python\n from datetime import datetime, timedelta\n from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions\n\n sas_token = generate_account_sas(\n account_name=\"\",\n account_key=\"\",\n resource_types=ResourceTypes(service=True),\n permission=AccountSasPermissions(read=True),\n expiry=datetime.utcnow() + timedelta(hours=1)\n )\n\n blob_service_client = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=sas_token)\n ```\n\n3. To use a storage account [shared key](https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key/)\n (aka account key or access key), provide the key as a string. This can be found in the Azure Portal under the \"Access Keys\"\n section or by running the following Azure CLI command:\n\n ```az storage account keys list -g MyResourceGroup -n MyStorageAccount```\n\n Use the key as the credential parameter to authenticate the client:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", credential=\"\")\n ```\n \n If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`),\n please instantiate the client using the credential below:\n ```python\n from azure.storage.blob import BlobServiceClient\n service = BlobServiceClient(account_url=\"https://.blob.core.windows.net\", \n credential={\"account_name\": \"\", \"account_key\":\"\"})\n ```\n\n4. To use [anonymous public read access](https://learn.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources),\n simply omit the credential parameter.\n\n#### Creating the client from a connection string\nDepending on your use case and authorization method, you may prefer to initialize a client instance with a storage\nconnection string instead of providing the account URL and credential separately. To do this, pass the storage\nconnection string to the client's `from_connection_string` class method:\n\n```python\nfrom azure.storage.blob import BlobServiceClient\n\nconnection_string = \"DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=xxxx;EndpointSuffix=core.windows.net\"\nservice = BlobServiceClient.from_connection_string(conn_str=connection_string)\n```\n\nThe connection string to your storage account can be found in the Azure Portal under the \"Access Keys\" section or by running the following CLI command:\n\n```bash\naz storage account show-connection-string -g MyResourceGroup -n MyStorageAccount\n```\n\n## Key concepts\nThe following components make up the Azure Blob Service:\n* The storage account itself\n* A container within the storage account\n* A blob within a container\n\nThe Azure Storage Blobs client library for Python allows you to interact with each of these components through the\nuse of a dedicated client object.\n\n### Clients\nFour different clients are provided to interact with the various components of the Blob Service:\n1. [BlobServiceClient](https://aka.ms/azsdk-python-storage-blob-blobserviceclient) -\n this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured\n client instances to access the containers and blobs within. It provides operations to retrieve and configure the\n account properties as well as list, create, and delete containers within the account. To perform operations on a\n specific container or blob, retrieve a client using the `get_container_client` or `get_blob_client` methods.\n2. [ContainerClient](https://aka.ms/azsdk-python-storage-blob-containerclient) -\n this client represents interaction with a specific container (which need not exist yet), and allows you to acquire\n preconfigured client instances to access the blobs within. It provides operations to create, delete, or configure a\n container and includes operations to list, upload, and delete the blobs within it. To perform operations on a\n specific blob within the container, retrieve a client using the `get_blob_client` method.\n3. [BlobClient](https://aka.ms/azsdk-python-storage-blob-blobclient) -\n this client represents interaction with a specific blob (which need not exist yet). It provides operations to\n upload, download, delete, and create snapshots of a blob, as well as specific operations per blob type.\n4. [BlobLeaseClient](https://aka.ms/azsdk-python-storage-blob-blobleaseclient) -\n this client represents lease interactions with a `ContainerClient` or `BlobClient`. It provides operations to\n acquire, renew, release, change, and break a lease on a specified resource.\n\n### Async Clients \nThis library includes a complete async API supported on Python 3.5+. To use it, you must\nfirst install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).\nSee\n[azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport)\nfor more information.\n\nAsync clients and credentials should be closed when they're no longer needed. These\nobjects are async context managers and define async `close` methods.\n\n### Blob Types\nOnce you've initialized a Client, you can choose from the different types of blobs:\n* [Block blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs)\n store text and binary data, up to approximately 4.75 TiB. Block blobs are made up of blocks of data that can be\n managed individually\n* [Append blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-append-blobs)\n are made up of blocks like block blobs, but are optimized for append operations. Append blobs are ideal for scenarios\n such as logging data from virtual machines\n* [Page blobs](https://learn.microsoft.com/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-page-blobs)\n store random access files up to 8 TiB in size. Page blobs store virtual hard drive (VHD) files and serve as disks for\n Azure virtual machines\n\n## Examples\nThe following sections provide several code snippets covering some of the most common Storage Blob tasks, including:\n\n* [Create a container](#create-a-container \"Create a container\")\n* [Uploading a blob](#uploading-a-blob \"Uploading a blob\")\n* [Downloading a blob](#downloading-a-blob \"Downloading a blob\")\n* [Enumerating blobs](#enumerating-blobs \"Enumerating blobs\")\n\nNote that a container must be created before to upload or download a blob.\n\n### Create a container\n\nCreate a container from where you can upload or download blobs.\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\ncontainer_client.create_container()\n```\n\nUse the async client to create a container\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer_client = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nawait container_client.create_container()\n```\n\n### Uploading a blob\nUpload a blob to your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n blob.upload_blob(data)\n```\n\nUse the async client to upload a blob\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./SampleSource.txt\", \"rb\") as data:\n await blob.upload_blob(data)\n```\n\n### Downloading a blob\nDownload a blob from your container\n\n```python\nfrom azure.storage.blob import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n blob_data = blob.download_blob()\n blob_data.readinto(my_blob)\n```\n\nDownload a blob asynchronously\n\n```python\nfrom azure.storage.blob.aio import BlobClient\n\nblob = BlobClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\", blob_name=\"my_blob\")\n\nwith open(\"./BlockDestination.txt\", \"wb\") as my_blob:\n stream = await blob.download_blob()\n data = await stream.readall()\n my_blob.write(data)\n```\n\n### Enumerating blobs\nList the blobs in your container\n\n```python\nfrom azure.storage.blob import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = container.list_blobs()\nfor blob in blob_list:\n print(blob.name + '\\n')\n```\n\nList the blobs asynchronously\n\n```python\nfrom azure.storage.blob.aio import ContainerClient\n\ncontainer = ContainerClient.from_connection_string(conn_str=\"\", container_name=\"mycontainer\")\n\nblob_list = []\nasync for blob in container.list_blobs():\n blob_list.append(blob)\nprint(blob_list)\n```\n\n## Optional Configuration\n\nOptional keyword arguments that can be passed in at the client and per-operation level.\n\n### Retry Policy configuration\n\nUse the following keyword arguments when instantiating a client to configure the retry policy:\n\n* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts.\nPass in `retry_total=0` if you do not want to retry on requests. Defaults to 10.\n* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3.\n* __retry_read__ (int): How many times to retry on read errors. Defaults to 3.\n* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3.\n* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able.\nThis should only be enabled of RA-GRS accounts are used and potentially stale data can be handled.\nDefaults to `False`.\n\n### Encryption configuration\n\nUse the following keyword arguments when instantiating a client to configure encryption:\n\n* __require_encryption__ (bool): If set to True, will enforce that objects are encrypted and decrypt them.\n* __encryption_version__ (str): Specifies the version of encryption to use. Current options are `'2.0'` or `'1.0'` and\nthe default value is `'1.0'`. Version 1.0 is deprecated, and it is **highly recommended** to use version 2.0.\n* __key_encryption_key__ (object): The user-provided key-encryption-key. The instance must implement the following methods:\n - `wrap_key(key)`--wraps the specified key using an algorithm of the user's choice.\n - `get_key_wrap_algorithm()`--returns the algorithm used to wrap the specified symmetric key.\n - `get_kid()`--returns a string key id for this key-encryption-key.\n* __key_resolver_function__ (callable): The user-provided key resolver. Uses the kid string to return a key-encryption-key\nimplementing the interface defined above.\n\n### Other client / per-operation configuration\n\nOther optional configuration keyword arguments that can be specified on the client or per-operation.\n\n**Client keyword arguments:**\n\n* __connection_timeout__ (int): The number of seconds the client will wait to establish a connection to the server.\nDefaults to 20 seconds.\n* __read_timeout__ (int): The number of seconds the client will wait, between consecutive read operations, for a\nresponse from the server. This is a socket level timeout and is not affected by overall data size. Client-side read \ntimeouts will be automatically retried. Defaults to 60 seconds.\n* __transport__ (Any): User-provided transport to send the HTTP request.\n\n**Per-operation keyword arguments:**\n\n* __raw_response_hook__ (callable): The given callback uses the response returned from the service.\n* __raw_request_hook__ (callable): The given callback uses the request before being sent to service.\n* __client_request_id__ (str): Optional user specified identification of the request.\n* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request.\n* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at\nthe client level to enable it for all requests.\n* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}`\n\n## Troubleshooting\n### General\nStorage Blob clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md).\n\nThis list can be used for reference to catch thrown exceptions. To get the specific error code of the exception, use the `error_code` attribute, i.e, `exception.error_code`.\n\n### Logging\nThis library uses the standard\n[logging](https://docs.python.org/3/library/logging.html) library for logging.\nBasic information about HTTP sessions (URLs, headers, etc.) is logged at INFO\nlevel.\n\nDetailed DEBUG level logging, including request/response bodies and unredacted\nheaders, can be enabled on a client with the `logging_enable` argument:\n```python\nimport sys\nimport logging\nfrom azure.storage.blob import BlobServiceClient\n\n# Create a logger for the 'azure.storage.blob' SDK\nlogger = logging.getLogger('azure.storage.blob')\nlogger.setLevel(logging.DEBUG)\n\n# Configure a console output\nhandler = logging.StreamHandler(stream=sys.stdout)\nlogger.addHandler(handler)\n\n# This client will log detailed information about its HTTP sessions, at DEBUG level\nservice_client = BlobServiceClient.from_connection_string(\"your_connection_string\", logging_enable=True)\n```\n\nSimilarly, `logging_enable` can enable detailed logging for a single operation,\neven when it isn't enabled for the client:\n```python\nservice_client.get_service_stats(logging_enable=True)\n```\n\n## Next steps\n\n### More sample code\n\nGet started with our [Blob samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples).\n\nSeveral Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:\n\n* [blob_samples_container_access_policy.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_container_access_policy_async.py)) - Examples to set Access policies:\n * Set up Access Policy for container\n\n* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world_async.py)) - Examples for common Storage Blob tasks:\n * Set up a container\n * Create a block, page, or append blob\n * Upload blobs\n * Download blobs\n * Delete blobs\n\n* [blob_samples_authentication.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_authentication_async.py)) - Examples for authenticating and creating the client:\n * From a connection string\n * From a shared access key\n * From a shared access signature token\n * From active directory\n\n* [blob_samples_service.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py)) - Examples for interacting with the blob service:\n * Get account information\n * Get and set service properties\n * Get service statistics\n * Create, list, and delete containers\n * Get the Blob or Container client\n\n* [blob_samples_containers.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_containers_async.py)) - Examples for interacting with containers:\n * Create a container and delete containers\n * Set metadata on containers\n * Get container properties\n * Acquire a lease on container\n * Set an access policy on a container\n * Upload, list, delete blobs in container\n * Get the blob client to interact with a specific blob\n\n* [blob_samples_common.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_common_async.py)) - Examples common to all types of blobs:\n * Create a snapshot\n * Delete a blob snapshot\n * Soft delete a blob\n * Undelete a blob\n * Acquire a lease on a blob\n * Copy a blob from a URL\n\n* [blob_samples_directory_interface.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples/blob_samples_directory_interface.py) - Examples for interfacing with Blob storage as if it were a directory on a filesystem:\n * Copy (upload or download) a single file or directory\n * List files or directories at a single level or recursively\n * Delete a single file or recursively delete a directory\n\n### Additional documentation\nFor more extensive documentation on Azure Blob storage, see the [Azure Blob storage documentation](https://learn.microsoft.com/azure/storage/blobs/) on learn.microsoft.com.\n\n## Contributing\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.", - "release_date": "2025-03-27T17:13:05", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": "ascl@microsoft.com", - "url": null - } - ], - "keywords": [ - "azure", - "azure sdk", - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob", - "download_url": "https://files.pythonhosted.org/packages/8b/f3/f764536c25cc3829d36857167f03933ce9aee2262293179075439f3cd3ad/azure_storage_blob-12.25.1.tar.gz", - "size": 570541, - "sha1": null, - "md5": "0e0be21e8fd942300ba335049912d4a2", - "sha256": "4f294ddc9bc47909ac66b8934bd26b50d2000278b10ad82cc109764fdc6e0e3b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/azure-storage-blob/12.25.1/json", - "datasource_id": null, - "purl": "pkg:pypi/azure-storage-blob@12.25.1" - }, { "type": "pypi", "namespace": null, @@ -566,70 +377,6 @@ "datasource_id": null, "purl": "pkg:pypi/certifi@2025.1.31" }, - { - "type": "pypi", - "namespace": null, - "name": "certifi", - "version": "2025.1.31", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python package for providing Mozilla's CA Bundle.\nCertifi: Python SSL Certificates\n================================\n\nCertifi provides Mozilla's carefully curated collection of Root Certificates for\nvalidating the trustworthiness of SSL certificates while verifying the identity\nof TLS hosts. It has been extracted from the `Requests`_ project.\n\nInstallation\n------------\n\n``certifi`` is available on PyPI. Simply install it with ``pip``::\n\n $ pip install certifi\n\nUsage\n-----\n\nTo reference the installed certificate authority (CA) bundle, you can use the\nbuilt-in function::\n\n >>> import certifi\n\n >>> certifi.where()\n '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem'\n\nOr from the command line::\n\n $ python -m certifi\n /usr/local/lib/python3.7/site-packages/certifi/cacert.pem\n\nEnjoy!\n\n.. _`Requests`: https://requests.readthedocs.io/en/master/\n\nAddition/Removal of Certificates\n--------------------------------\n\nCertifi does not support any addition/removal or other modification of the\nCA trust store content. This project is intended to provide a reliable and\nhighly portable root of trust to python deployments. Look to upstream projects\nfor methods to use alternate trust.", - "release_date": "2025-01-31T02:16:47", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/certifi/python-certifi", - "download_url": "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", - "size": 167577, - "sha1": null, - "md5": "6d326c5b0649c4dee817837c192f3824", - "sha256": "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/certifi/python-certifi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MPL-2.0", - "classifiers": [ - "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/certifi/2025.1.31/json", - "datasource_id": null, - "purl": "pkg:pypi/certifi@2025.1.31" - }, { "type": "pypi", "namespace": null, @@ -693,86 +440,26 @@ { "type": "pypi", "namespace": null, - "name": "cffi", - "version": "1.17.1", + "name": "charset-normalizer", + "version": "3.4.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "CFFI\n====\n\nForeign Function Interface for Python calling C code.\nPlease see the `Documentation `_.\n\nContact\n-------\n\n`Mailing list `_", - "release_date": "2024-09-04T20:45:21", + "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", + "release_date": "2024-12-24T18:12:06", "parties": [ { "type": "person", "role": "author", - "name": "Armin Rigo, Maciej Fijalkowski", - "email": "python-cffi@googlegroups.com", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "http://cffi.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", - "size": 516621, - "sha1": null, - "md5": "4336ca58b2df0cc3b163884d5fa2e5e2", - "sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", - "sha512": null, - "bug_tracking_url": "https://github.com/python-cffi/cffi/issues", - "code_view_url": "https://github.com/python-cffi/cffi", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cffi/1.17.1/json", - "datasource_id": null, - "purl": "pkg:pypi/cffi@1.17.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:12:06", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "\"Ahmed R. TAHRI\" ", "url": null } ], @@ -833,89 +520,6 @@ "datasource_id": null, "purl": "pkg:pypi/charset-normalizer@3.4.1" }, - { - "type": "pypi", - "namespace": null, - "name": "charset-normalizer", - "version": "3.4.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.\n

Charset Detection, for Everyone \ud83d\udc4b

\n\n

\n The Real First Universal Charset Detector
\n \n \n \n \n \"Download\n \n \n \n \n

\n

\n Featured Packages
\n \n \"Static\n \n \n \"Static\n \n

\n

\n In other language (unofficial port - by the community)
\n \n \"Static\n \n

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

\n >>>>> \ud83d\udc49 Try Me Online Now, Then Adopt Me \ud83d\udc48 <<<<<\n

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

\n\"Reading\"Cat\n

\n\n*\\*\\* : They are clearly using specific code for a specific encoding even if covering most of used one*
\n\n## \u26a1 Performance\n\nThis package offer better performance than its counterpart Chardet. Here are some numbers.\n\n| Package | Accuracy | Mean per file (ms) | File per sec (est) |\n|-----------------------------------------------|:--------:|:------------------:|:------------------:|\n| [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |\n| charset-normalizer | **98 %** | **10 ms** | 100 file/sec |\n\n| Package | 99th percentile | 95th percentile | 50th percentile |\n|-----------------------------------------------|:---------------:|:---------------:|:---------------:|\n| [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |\n| charset-normalizer | 100 ms | 50 ms | 5 ms |\n\n_updated as of december 2024 using CPython 3.12_\n\nChardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.\n\n> Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.\n> And yes, these results might change at any time. The dataset can be updated to include more files.\n> The actual delays heavily depends on your CPU capabilities. The factors should remain the same.\n> Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability\n> (e.g. Supported Encoding) Challenge-them if you want.\n\n## \u2728 Installation\n\nUsing pip:\n\n```sh\npip install charset-normalizer -U\n```\n\n## \ud83d\ude80 Basic Usage\n\n### CLI\nThis package comes with a CLI.\n\n```\nusage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]\n file [file ...]\n\nThe Real First Universal Charset Detector. Discover originating encoding used\non text file. Normalize text to unicode.\n\npositional arguments:\n files File(s) to be analysed\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --verbose Display complementary information about file if any.\n Stdout will contain logs about the detection process.\n -a, --with-alternative\n Output complementary possibilities if any. Top-level\n JSON WILL be a list.\n -n, --normalize Permit to normalize input file. If not set, program\n does not write anything.\n -m, --minimal Only output the charset detected to STDOUT. Disabling\n JSON output.\n -r, --replace Replace file when trying to normalize it instead of\n creating a new one.\n -f, --force Replace file without asking if you are sure, use this\n flag with caution.\n -t THRESHOLD, --threshold THRESHOLD\n Define a custom maximum amount of chaos allowed in\n decoded content. 0. <= chaos <= 1.\n --version Show version information and exit.\n```\n\n```bash\nnormalizer ./data/sample.1.fr.srt\n```\n\nor\n\n```bash\npython -m charset_normalizer ./data/sample.1.fr.srt\n```\n\n\ud83c\udf89 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.\n\n```json\n{\n \"path\": \"/home/default/projects/charset_normalizer/data/sample.1.fr.srt\",\n \"encoding\": \"cp1252\",\n \"encoding_aliases\": [\n \"1252\",\n \"windows_1252\"\n ],\n \"alternative_encodings\": [\n \"cp1254\",\n \"cp1256\",\n \"cp1258\",\n \"iso8859_14\",\n \"iso8859_15\",\n \"iso8859_16\",\n \"iso8859_3\",\n \"iso8859_9\",\n \"latin_1\",\n \"mbcs\"\n ],\n \"language\": \"French\",\n \"alphabets\": [\n \"Basic Latin\",\n \"Latin-1 Supplement\"\n ],\n \"has_sig_or_bom\": false,\n \"chaos\": 0.149,\n \"coherence\": 97.152,\n \"unicode_path\": null,\n \"is_preferred\": true\n}\n```\n\n### Python\n*Just print out normalized text*\n```python\nfrom charset_normalizer import from_path\n\nresults = from_path('./my_subtitle.srt')\n\nprint(str(results.best()))\n```\n\n*Upgrade your code without effort*\n```python\nfrom charset_normalizer import detect\n```\n\nThe above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.\n\nSee the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)\n\n## \ud83d\ude07 Why\n\nWhen I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a\nreliable alternative using a completely different method. Also! I never back down on a good challenge!\n\nI **don't care** about the **originating charset** encoding, because **two different tables** can\nproduce **two identical rendered string.**\nWhat I want is to get readable text, the best I can.\n\nIn a way, **I'm brute forcing text decoding.** How cool is that ? \ud83d\ude0e\n\nDon'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.\n\n## \ud83c\udf70 How\n\n - Discard all charset encoding table that could not fit the binary content.\n - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.\n - Extract matches with the lowest mess detected.\n - Additionally, we measure coherence / probe for a language.\n\n**Wait a minute**, what is noise/mess and coherence according to **YOU ?**\n\n*Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then\n**I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).\n I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to\n improve or rewrite it.\n\n*Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought\nthat intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.\n\n## \u26a1 Known limitations\n\n - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))\n - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.\n\n## \u26a0\ufe0f About Python EOLs\n\n**If you are running:**\n\n- Python >=2.7,<3.5: Unsupported\n- Python 3.5: charset-normalizer < 2.1\n- Python 3.6: charset-normalizer < 3.1\n- Python 3.7: charset-normalizer < 4.0\n\nUpgrade your Python interpreter as soon as possible.\n\n## \ud83d\udc64 Contributing\n\nContributions, issues and feature requests are very much welcome.
\nFeel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.\n\n## \ud83d\udcdd License\n\nCopyright \u00a9 [Ahmed TAHRI @Ousret](https://github.com/Ousret).
\nThis project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.\n\nCharacters frequencies used in this project \u00a9 2012 [Denny Vrande\u010di\u0107](http://simia.net/letters/)\n\n## \ud83d\udcbc For Enterprise\n\nProfessional support for charset-normalizer is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)\n\n# Changelog\nAll 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).\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)\n\n### Changed\n- Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.\n- Enforce annotation delayed loading for a simpler and consistent types in the project.\n- Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8\n\n### Added\n- pre-commit configuration.\n- noxfile.\n\n### Removed\n- `build-requirements.txt` as per using `pyproject.toml` native build configuration.\n- `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).\n- `setup.cfg` in favor of `pyproject.toml` metadata configuration.\n- Unused `utils.range_scan` function.\n\n### Fixed\n- Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)\n- Deprecation warning \"'count' is passed as positional argument\" when converting to Unicode bytes on Python 3.13+\n\n## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)\n\n### Added\n- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.\n- Support for Python 3.13 (#512)\n\n### Fixed\n- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.\n- Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)\n- Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)\n\n## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)\n\n### Fixed\n- Unintentional memory usage regression when using large payload that match several encoding (#376)\n- Regression on some detection case showcased in the documentation (#371)\n\n### Added\n- Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)\n\n## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)\n\n### Changed\n- Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8\n- Improved the general detection reliability based on reports from the community\n\n## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)\n\n### Added\n- Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`\n- Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)\n\n### Removed\n- (internal) Redundant utils.is_ascii function and unused function is_private_use_only\n- (internal) charset_normalizer.assets is moved inside charset_normalizer.constant\n\n### Changed\n- (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection\n- Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8\n\n### Fixed\n- Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \\_\\_lt\\_\\_ (#350)\n\n## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)\n\n### Changed\n- Typehint for function `from_path` no longer enforce `PathLike` as its first argument\n- Minor improvement over the global detection reliability\n\n### Added\n- Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries\n- Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)\n- Explicit support for Python 3.12\n\n### Fixed\n- Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)\n\n## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)\n\n### Added\n- Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)\n\n### Removed\n- Support for Python 3.6 (PR #260)\n\n### Changed\n- Optional speedup provided by mypy/c 1.0.1\n\n## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)\n\n### Fixed\n- Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)\n\n### Changed\n- Speedup provided by mypy/c 0.990 on Python >= 3.7\n\n## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n- Sphinx warnings when generating the documentation\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)\n\n### Added\n- 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\n- Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES\n- Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio\n\n### Changed\n- Build with static metadata using 'build' frontend\n- Make the language detection stricter\n\n### Fixed\n- CLI with opt --normalize fail when using full path for files\n- TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it\n\n### Removed\n- Coherence detector no longer return 'Simple English' instead return 'English'\n- Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'\n\n## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)\n\n### Added\n- `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)\n\n### Removed\n- Breaking: Method `first()` and `best()` from CharsetMatch\n- UTF-7 will no longer appear as \"detected\" without a recognized SIG/mark (is unreliable/conflict with ASCII)\n\n### Fixed\n- Sphinx warnings when generating the documentation\n\n## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)\n\n### Changed\n- Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1\n\n### Removed\n- Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches\n- Breaking: Top-level function `normalize`\n- Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch\n- Support for the backport `unicodedata2`\n\n## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)\n\n### Deprecated\n- Function `normalize` scheduled for removal in 3.0\n\n### Changed\n- Removed useless call to decode in fn is_unprintable (#206)\n\n### Fixed\n- Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)\n\n## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)\n\n### Added\n- Output the Unicode table version when running the CLI with `--version` (PR #194)\n\n### Changed\n- Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)\n- Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)\n\n### Fixed\n- 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)\n- CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)\n\n### Removed\n- Support for Python 3.5 (PR #192)\n\n### Deprecated\n- Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)\n\n## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)\n\n### Fixed\n- ASCII miss-detection on rare cases (PR #170)\n\n## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)\n\n### Added\n- Explicit support for Python 3.11 (PR #164)\n\n### Changed\n- The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)\n\n## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)\n\n### Fixed\n- Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)\n\n### Changed\n- Skipping the language-detection (CD) on ASCII (PR #155)\n\n## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)\n\n### Changed\n- Moderating the logging impact (since 2.0.8) for specific environments (PR #147)\n\n### Fixed\n- Wrong logging level applied when setting kwarg `explain` to True (PR #146)\n\n## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)\n### Changed\n- Improvement over Vietnamese detection (PR #126)\n- MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)\n- Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)\n- call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)\n- Code style as refactored by Sourcery-AI (PR #131)\n- Minor adjustment on the MD around european words (PR #133)\n- Remove and replace SRTs from assets / tests (PR #139)\n- Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)\n\n### Fixed\n- Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)\n- Avoid using too insignificant chunk (PR #137)\n\n### Added\n- Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)\n- Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)\n\n## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)\n### Added\n- Add support for Kazakh (Cyrillic) language detection (PR #109)\n\n### Changed\n- Further, improve inferring the language from a given single-byte code page (PR #112)\n- Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)\n- Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)\n- Various detection improvement (MD+CD) (PR #117)\n\n### Removed\n- Remove redundant logging entry about detected language(s) (PR #115)\n\n### Fixed\n- Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)\n\n## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)\n### Fixed\n- Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)\n- Fix CLI crash when using --minimal output in certain cases (PR #103)\n\n### Changed\n- Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)\n\n## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)\n### Changed\n- The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)\n- The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)\n- The Unicode detection is slightly improved (PR #93)\n- Add syntax sugar \\_\\_bool\\_\\_ for results CharsetMatches list-container (PR #91)\n\n### Removed\n- The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)\n\n### Fixed\n- 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)\n- Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)\n- The MANIFEST.in was not exhaustive (PR #78)\n\n## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)\n### Fixed\n- The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)\n- Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)\n- The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)\n- Submatch factoring could be wrong in rare edge cases (PR #72)\n- Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)\n- Fix line endings from CRLF to LF for certain project files (PR #67)\n\n### Changed\n- Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)\n- Allow fallback on specified encoding if any (PR #71)\n\n## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)\n### Changed\n- Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)\n- According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)\n\n## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)\n### Fixed\n- Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)\n\n### Changed\n- Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)\n\n## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)\n### Fixed\n- Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)\n- Using explain=False permanently disable the verbose output in the current runtime (PR #47)\n- One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)\n- Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)\n\n### Changed\n- Public function normalize default args values were not aligned with from_bytes (PR #53)\n\n### Added\n- You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)\n\n## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)\n### Changed\n- 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.\n- Accent has been made on UTF-8 detection, should perform rather instantaneous.\n- The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.\n- The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)\n- The program has been rewritten to ease the readability and maintainability. (+Using static typing)+\n- utf_7 detection has been reinstated.\n\n### Removed\n- This package no longer require anything when used with Python 3.5 (Dropped cached_property)\n- Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volap\u00fck, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.\n- The exception hook on UnicodeDecodeError has been removed.\n\n### Deprecated\n- Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0\n\n### Fixed\n- The CLI output used the relative path of the file(s). Should be absolute.\n\n## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)\n### Fixed\n- Logger configuration/usage no longer conflict with others (PR #44)\n\n## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)\n### Removed\n- Using standard logging instead of using the package loguru.\n- Dropping nose test framework in favor of the maintained pytest.\n- Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.\n- Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.\n- Stop support for UTF-7 that does not contain a SIG.\n- Dropping PrettyTable, replaced with pure JSON output in CLI.\n\n### Fixed\n- BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.\n- Not searching properly for the BOM when trying utf32/16 parent codec.\n\n### Changed\n- Improving the package final size by compressing frequencies.json.\n- Huge improvement over the larges payload.\n\n### Added\n- CLI now produces JSON consumable output.\n- Return ASCII if given sequences fit. Given reasonable confidence.\n\n## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)\n\n### Fixed\n- In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)\n\n## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)\n\n### Fixed\n- Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)\n\n## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)\n\n### Fixed\n- The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)\n\n## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)\n\n### Changed\n- Amend the previous release to allow prettytable 2.0 (PR #35)\n\n## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)\n\n### Fixed\n- Fix error while using the package with a python pre-release interpreter (PR #33)\n\n### Changed\n- Dependencies refactoring, constraints revised.\n\n### Added\n- Add python 3.9 and 3.10 to the supported interpreters\n\nMIT License\n\nCopyright (c) 2025 TAHRI Ahmed R.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", - "release_date": "2024-12-24T18:12:35", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "\"Ahmed R. TAHRI\" ", - "url": null - } - ], - "keywords": [ - "encoding", - "charset", - "charset-detector", - "detector", - "normalization", - "unicode", - "chardet", - "detect", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Linguistic", - "Topic :: Utilities", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz", - "size": 123188, - "sha1": null, - "md5": "1d808eb9efaf70bf0ec3b800f3c7dca8", - "sha256": "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/jawah/charset_normalizer", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/charset-normalizer/3.4.1/json", - "datasource_id": null, - "purl": "pkg:pypi/charset-normalizer@3.4.1" - }, { "type": "pypi", "namespace": null, @@ -970,60 +574,6 @@ "datasource_id": null, "purl": "pkg:pypi/click@8.1.8" }, - { - "type": "pypi", - "namespace": null, - "name": "click", - "version": "8.1.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Composable command line interface toolkit\n# $ click_\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\n## A Simple Example\n\n```python\nimport click\n\n@click.command()\n@click.option(\"--count\", default=1, help=\"Number of greetings.\")\n@click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\ndef hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\nif __name__ == '__main__':\n hello()\n```\n\n```\n$ python hello.py --count=3\nYour name: Click\nHello, Click!\nHello, Click!\nHello, Click!\n```\n\n\n## Donate\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, [please\ndonate today][].\n\n[please donate today]: https://palletsprojects.com/donate", - "release_date": "2024-12-21T18:38:44", - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Pallets ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Typing :: Typed" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", - "size": 226593, - "sha1": null, - "md5": "b52ee8e6c33d88a2b4626e6a6002245d", - "sha256": "ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/click/", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/8.1.8/json", - "datasource_id": null, - "purl": "pkg:pypi/click@8.1.8" - }, { "type": "pypi", "namespace": null, @@ -1099,31 +649,27 @@ { "type": "pypi", "namespace": null, - "name": "cryptography", - "version": "44.0.2", + "name": "idna", + "version": "3.10", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "cryptography is a package which provides cryptographic recipes and primitives to Python developers.\npyca/cryptography\n=================\n\n.. image:: https://img.shields.io/pypi/v/cryptography.svg\n :target: https://pypi.org/project/cryptography/\n :alt: Latest Version\n\n.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest\n :target: https://cryptography.io\n :alt: Latest Docs\n\n.. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main\n :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain\n\n\n``cryptography`` is a package which provides cryptographic recipes and\nprimitives to Python developers. Our goal is for it to be your \"cryptographic\nstandard library\". It supports Python 3.7+ and PyPy3 7.3.11+.\n\n``cryptography`` includes both high level recipes and low level interfaces to\ncommon cryptographic algorithms such as symmetric ciphers, message digests, and\nkey derivation functions. For example, to encrypt something with\n``cryptography``'s high level symmetric encryption recipe:\n\n.. code-block:: pycon\n\n >>> from cryptography.fernet import Fernet\n >>> # Put this somewhere safe!\n >>> key = Fernet.generate_key()\n >>> f = Fernet(key)\n >>> token = f.encrypt(b\"A really secret message. Not for prying eyes.\")\n >>> token\n b'...'\n >>> f.decrypt(token)\n b'A really secret message. Not for prying eyes.'\n\nYou can find more information in the `documentation`_.\n\nYou can install ``cryptography`` with:\n\n.. code-block:: console\n\n $ pip install cryptography\n\nFor full details see `the installation documentation`_.\n\nDiscussion\n~~~~~~~~~~\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nWe maintain a `cryptography-dev`_ mailing list for development discussion.\n\nYou can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get\ninvolved.\n\nSecurity\n~~~~~~~~\n\nNeed to report a security issue? Please consult our `security reporting`_\ndocumentation.\n\n\n.. _`documentation`: https://cryptography.io/\n.. _`the installation documentation`: https://cryptography.io/en/latest/installation/\n.. _`issue tracker`: https://github.com/pyca/cryptography/issues\n.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev\n.. _`security reporting`: https://cryptography.io/en/latest/security/", - "release_date": "2025-03-02T00:01:37", + "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", + "release_date": "2024-09-15T18:07:37", "parties": [ { "type": "person", "role": "author", - "name": "The cryptography developers ", - "email": "The Python Cryptographic Authority and individual contributors ", + "name": null, + "email": "Kim Davies ", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Operating System :: POSIX :: BSD", - "Operating System :: POSIX :: Linux", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", @@ -1131,29 +677,30 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Security :: Cryptography" + "Topic :: Internet :: Name Service (DNS)", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/cd/25/4ce80c78963834b8a9fd1cc1266be5ed8d1840785c0f2e1b73b8d128d505/cryptography-44.0.2.tar.gz", - "size": 710807, + "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", + "size": 70442, "sha1": null, - "md5": "9cb2411324687347a27d349d3e74eb7c", - "sha256": "c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "md5": "ce22685f1b296fb33e5fda362870685d", + "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/kjd/idna", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0 OR BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: BSD License" ] }, @@ -1164,64 +711,61 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cryptography/44.0.2/json", + "api_data_url": "https://pypi.org/pypi/idna/3.10/json", "datasource_id": null, - "purl": "pkg:pypi/cryptography@44.0.2" + "purl": "pkg:pypi/idna@3.10" }, { "type": "pypi", "namespace": null, - "name": "idna", - "version": "3.10", + "name": "isodate", + "version": "0.7.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:37", + "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", + "release_date": "2024-10-08T23:04:09", "parties": [ { "type": "person", "role": "author", - "name": null, - "email": "Kim Davies ", + "name": "Gerhard Weis", + "email": null, "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", - "size": 70442, + "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", + "size": 22320, "sha1": null, - "md5": "ce22685f1b296fb33e5fda362870685d", - "sha256": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", + "md5": "f94e527b847362a79a455d0b55134579", + "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { + "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1233,210 +777,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", + "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "idna", - "version": "3.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Internationalized Domain Names in Applications (IDNA)\n=====================================================\n\nSupport for the Internationalized Domain Names in\nApplications (IDNA) protocol as specified in `RFC 5891\n`_. This is the latest version of\nthe protocol and is sometimes referred to as \u201cIDNA 2008\u201d.\n\nThis library also provides support for Unicode Technical\nStandard 46, `Unicode IDNA Compatibility Processing\n`_.\n\nThis acts as a suitable replacement for the \u201cencodings.idna\u201d\nmodule that comes with the Python standard library, but which\nonly supports the older superseded IDNA specification (`RFC 3490\n`_).\n\nBasic functions are simply executed:\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\n\nInstallation\n------------\n\nThis package is available for installation from PyPI:\n\n.. code-block:: bash\n\n $ python3 -m pip install idna\n\n\nUsage\n-----\n\nFor typical usage, the ``encode`` and ``decode`` functions will take a\ndomain name argument and perform a conversion to A-labels or U-labels\nrespectively.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('\u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8')\n b'xn--eckwd4c7c.xn--zckzah'\n >>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))\n \u30c9\u30e1\u30a4\u30f3.\u30c6\u30b9\u30c8\n\nYou may use the codec encoding and decoding methods using the\n``idna.codec`` module:\n\n.. code-block:: pycon\n\n >>> import idna.codec\n >>> print('\u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435'.encode('idna2008'))\n b'xn--d1acufc.xn--80akhbyknj4f'\n >>> print(b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008'))\n \u0434\u043e\u043c\u0435\u043d.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435\n\nConversions can be applied at a per-label basis using the ``ulabel`` or\n``alabel`` functions if necessary:\n\n.. code-block:: pycon\n\n >>> idna.alabel('\u6d4b\u8bd5')\n b'xn--0zwm56d'\n\nCompatibility Mapping (UTS #46)\n+++++++++++++++++++++++++++++++\n\nAs described in `RFC 5895 `_, the\nIDNA specification does not normalize input from different potential\nways a user may input a domain name. This functionality, known as\na \u201cmapping\u201d, is considered by the specification to be a local\nuser-interface issue distinct from IDNA conversion functionality.\n\nThis library provides one such mapping that was developed by the\nUnicode Consortium. Known as `Unicode IDNA Compatibility Processing\n`_, it provides for both a regular\nmapping for typical applications, as well as a transitional mapping to\nhelp migrate from older IDNA 2003 applications. Strings are\npreprocessed according to Section 4.4 \u201cPreprocessing for IDNA2008\u201d\nprior to the IDNA operations.\n\nFor example, \u201cK\u00f6nigsg\u00e4\u00dfchen\u201d is not a permissible label as *LATIN\nCAPITAL LETTER K* is not allowed (nor are capital letters in general).\nUTS 46 will convert this into lower case prior to applying the IDNA\nconversion.\n\n.. code-block:: pycon\n\n >>> import idna\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen')\n ...\n idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'K\u00f6nigsg\u00e4\u00dfchen' not allowed\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True)\n b'xn--knigsgchen-b4a3dun'\n >>> print(idna.decode('xn--knigsgchen-b4a3dun'))\n k\u00f6nigsg\u00e4\u00dfchen\n\nTransitional processing provides conversions to help transition from\nthe older 2003 standard to the current standard. For example, in the\noriginal IDNA specification, the *LATIN SMALL LETTER SHARP S* (\u00df) was\nconverted into two *LATIN SMALL LETTER S* (ss), whereas in the current\nIDNA specification this conversion is not performed.\n\n.. code-block:: pycon\n\n >>> idna.encode('K\u00f6nigsg\u00e4\u00dfchen', uts46=True, transitional=True)\n 'xn--knigsgsschen-lcb0w'\n\nImplementers should use transitional processing with caution, only in\nrare cases where conversion from legacy labels to current labels must be\nperformed (i.e. IDNA implementations that pre-date 2008). For typical\napplications that just need to convert labels, transitional processing\nis unlikely to be beneficial and could produce unexpected incompatible\nresults.\n\n``encodings.idna`` Compatibility\n++++++++++++++++++++++++++++++++\n\nFunction calls from the Python built-in ``encodings.idna`` module are\nmapped to their IDNA 2008 equivalents using the ``idna.compat`` module.\nSimply substitute the ``import`` clause in your code to refer to the new\nmodule name.\n\nExceptions\n----------\n\nAll errors raised during the conversion following the specification\nshould raise an exception derived from the ``idna.IDNAError`` base\nclass.\n\nMore specific exceptions that may be generated as ``idna.IDNABidiError``\nwhen the error reflects an illegal combination of left-to-right and\nright-to-left characters in a label; ``idna.InvalidCodepoint`` when\na specific codepoint is an illegal character in an IDN label (i.e.\nINVALID); and ``idna.InvalidCodepointContext`` when the codepoint is\nillegal based on its positional context (i.e. it is CONTEXTO or CONTEXTJ\nbut the contextual requirements are not satisfied.)\n\nBuilding and Diagnostics\n------------------------\n\nThe IDNA and UTS 46 functionality relies upon pre-calculated lookup\ntables for performance. These tables are derived from computing against\neligibility criteria in the respective standards. These tables are\ncomputed using the command-line script ``tools/idna-data``.\n\nThis tool will fetch relevant codepoint data from the Unicode repository\nand perform the required calculations to identify eligibility. There are\nthree main modes:\n\n* ``idna-data make-libdata``. Generates ``idnadata.py`` and\n ``uts46data.py``, the pre-calculated lookup tables used for IDNA and\n UTS 46 conversions. Implementers who wish to track this library against\n a different Unicode version may use this tool to manually generate a\n different version of the ``idnadata.py`` and ``uts46data.py`` files.\n\n* ``idna-data make-table``. Generate a table of the IDNA disposition\n (e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix\n B.1 of RFC 5892 and the pre-computed tables published by `IANA\n `_.\n\n* ``idna-data U+0061``. Prints debugging output on the various\n properties associated with an individual Unicode codepoint (in this\n case, U+0061), that are used to assess the IDNA and UTS 46 status of a\n codepoint. This is helpful in debugging or analysis.\n\nThe tool accepts a number of arguments, described using ``idna-data\n-h``. Most notably, the ``--version`` argument allows the specification\nof the version of Unicode to be used in computing the table data. For\nexample, ``idna-data --version 9.0.0 make-libdata`` will generate\nlibrary data against Unicode 9.0.0.\n\n\nAdditional Notes\n----------------\n\n* **Packages**. The latest tagged release version is published in the\n `Python Package Index `_.\n\n* **Version support**. This library supports Python 3.6 and higher.\n As this library serves as a low-level toolkit for a variety of\n applications, many of which strive for broad compatibility with older\n Python versions, there is no rush to remove older interpreter support.\n Removing support for older versions should be well justified in that the\n maintenance burden has become too high.\n\n* **Python 2**. Python 2 is supported by version 2.x of this library.\n Use \"idna<3\" in your requirements file if you need this library for\n a Python 2 application. Be advised that these versions are no longer\n actively developed.\n\n* **Testing**. The library has a test suite based on each rule of the\n IDNA specification, as well as tests that are provided as part of the\n Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing\n `_.\n\n* **Emoji**. It is an occasional request to support emoji domains in\n this library. Encoding of symbols like emoji is expressly prohibited by\n the technical standard IDNA 2008 and emoji domains are broadly phased\n out across the domain industry due to associated security risks. For\n now, applications that need to support these non-compliant labels\n may wish to consider trying the encode/decode operation in this library\n first, and then falling back to using `encodings.idna`. See `the Github\n project `_ for more discussion.", - "release_date": "2024-09-15T18:07:39", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Kim Davies ", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: Name Service (DNS)", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", - "size": 190490, - "sha1": null, - "md5": "28448b00665099117b6daa9887812cc4", - "sha256": "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/kjd/idna", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/idna/3.10/json", - "datasource_id": null, - "purl": "pkg:pypi/idna@3.10" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:09", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", - "size": 22320, - "sha1": null, - "md5": "f94e527b847362a79a455d0b55134579", - "sha256": "28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "isodate", - "version": "0.7.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An ISO 8601 date/time/duration parser and formatter\nISO 8601 date/time parser\n=========================\n\n.. image:: https://travis-ci.org/gweis/isodate.svg?branch=master\n :target: https://travis-ci.org/gweis/isodate\n :alt: Travis-CI\n.. image:: https://coveralls.io/repos/gweis/isodate/badge.svg?branch=master\n :target: https://coveralls.io/r/gweis/isodate?branch=master\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/v/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: Latest Version\n.. image:: https://img.shields.io/pypi/l/isodate.svg\n :target: https://pypi.python.org/pypi/isodate/\n :alt: License\n\n\nThis module implements ISO 8601 date, time and duration parsing.\nThe implementation follows ISO8601:2004 standard, and implements only\ndate/time representations mentioned in the standard. If something is not\nmentioned there, then it is treated as non existent, and not as an allowed\noption.\n\nFor instance, ISO8601:2004 never mentions 2 digit years. So, it is not\nintended by this module to support 2 digit years. (while it may still\nbe valid as ISO date, because it is not explicitly forbidden.)\nAnother example is, when no time zone information is given for a time,\nthen it should be interpreted as local time, and not UTC.\n\nAs this module maps ISO 8601 dates/times to standard Python data types, like\n*date*, *time*, *datetime* and *timedelta*, it is not possible to convert\nall possible ISO 8601 dates/times. For instance, dates before 0001-01-01 are\nnot allowed by the Python *date* and *datetime* classes. Additionally\nfractional seconds are limited to microseconds. That means if the parser finds\nfor instance nanoseconds it will round it down to microseconds.\n\nDocumentation\n-------------\n\nThe following parsing methods are available.\n * parse_time:\n parses an ISO 8601 time string into a *time* object\n * parse_date:\n parses an ISO 8601 date string into a *date* object\n * parse_datetime:\n parses an ISO 8601 date-time string into a *datetime* object\n * parse_duration:\n parses an ISO 8601 duration string into a *timedelta* or *Duration*\n object.\n * parse_tzinfo:\n parses the time zone info part of an ISO 8601 string into a\n *tzinfo* object.\n\nAs ISO 8601 allows to define durations in years and months, and *timedelta*\ndoes not handle years and months, this module provides a *Duration* class,\nwhich can be used almost like a *timedelta* object (with some limitations).\nHowever, a *Duration* object can be converted into a *timedelta* object.\n\nThere are also ISO formatting methods for all supported data types. Each\n*xxx_isoformat* method accepts a format parameter. The default format is\nalways the ISO 8601 expanded format. This is the same format used by\n*datetime.isoformat*:\n\n * time_isoformat:\n Intended to create ISO time strings with default format\n *hh:mm:ssZ*.\n * date_isoformat:\n Intended to create ISO date strings with default format\n *yyyy-mm-dd*.\n * datetime_isoformat:\n Intended to create ISO date-time strings with default format\n *yyyy-mm-ddThh:mm:ssZ*.\n * duration_isoformat:\n Intended to create ISO duration strings with default format\n *PnnYnnMnnDTnnHnnMnnS*.\n * tz_isoformat:\n Intended to create ISO time zone strings with default format\n *hh:mm*.\n * strftime:\n A re-implementation mostly compatible with Python's *strftime*, but\n supports only those format strings, which can also be used for dates\n prior 1900. This method also understands how to format *datetime* and\n *Duration* instances.\n\nInstallation\n------------\n\nThis module can easily be installed with Python standard installation methods.\n\nUse *pip install isodate*.\n\nLimitations\n-----------\n\n * The parser accepts several date/time representation which should be invalid\n according to ISO 8601 standard.\n\n 1. for date and time together, this parser accepts a mixture of basic and extended format.\n e.g. the date could be in basic format, while the time is accepted in extended format.\n It also allows short dates and times in date-time strings.\n 2. For incomplete dates, the first day is chosen. e.g. 19th century results in a date of\n 1901-01-01.\n 3. negative *Duration* and *timedelta* value are not fully supported yet.\n\nFurther information\n-------------------\n\nThe doc strings and unit tests should provide rather detailed information about\nthe methods and their limitations.\n\nThe source release provides a *setup.py* script,\nwhich can be used to run the unit tests included.\n\nSource code is available at ``_.\n\n\nCHANGES\n=======\n\n0.7.3 (unreleased)\n------------------\n\n- no changes yet\n\n\n0.7.2 (2024-10-08)\n------------------\n\n- drop end of life python versions\n- Don't match garbage characters at the end of parsed strings #16 (Gabriel de Perthuis)\n\n\nPotentially breaking changes:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Fractional seconds are cut off to microseconds (always round down)\n- Allow control over return type of parse_duration #64 (Felix Claessen)\n- Python >= 3.7 required\n\n\n0.6.1 (2021-12-13)\n------------------\n\n- support python 3.10 (Hugo van Kemenade)\n- last version to support py 2.7\n\n\n0.6.0 (2017-10-13)\n------------------\n\n- support incomplete month date (Fabien Loffredo)\n- rely on duck typing when doing duration maths\n- support ':' as separator in fractional time zones (usrenmae)\n\n\n0.5.4 (2015-08-06)\n------------------\n\n- Fix parsing of Periods (Fabien Bochu)\n- Make Duration objects hashable (Geoffrey Fairchild)\n- Add multiplication to duration (Reinoud Elhorst)\n\n\n0.5.1 (2014-11-07)\n------------------\n\n- fixed pickling of Duration objects\n- raise ISO8601Error when there is no 'T' separator in datetime strings (Adrian Coveney)\n\n\n0.5.0 (2014-02-23)\n------------------\n\n- ISO8601Error are subclasses of ValueError now (Michael Hrivnak)\n- improve compatibility across various python variants and versions\n- raise exceptions when using fractional years and months in date\n maths with durations\n- renamed method todatetime on Duraction objects to totimedelta\n\n\n0.4.9 (2012-10-30)\n------------------\n\n- support pickling FixedOffset instances\n- make sure parsed fractional seconds are in microseconds\n- add leading zeros when formattig microseconds (Jarom Loveridge)\n\n\n0.4.8 (2012-05-04)\n------------------\n\n- fixed incompatibility of unittests with python 2.5 and 2.6 (runs fine on 2.7\n and 3.2)\n\n\n0.4.7 (2012-01-26)\n------------------\n\n- fixed tzinfo formatting (never pass None into tzinfo.utcoffset())\n\n\n0.4.6 (2012-01-06)\n------------------\n\n- added Python 3 compatibility via 2to3\n\n0.4.5 (2012-01-06)\n------------------\n\n- made setuptools dependency optional\n\n0.4.4 (2011-04-16)\n------------------\n\n- Fixed formatting of microseconds for datetime objects\n\n0.4.3 (2010-10-29)\n------------------\n\n- Fixed problem with %P formatting and fractions (supplied by David Brooks)\n\n0.4.2 (2010-10-28)\n------------------\n\n- Implemented unary - for Duration (supplied by David Brooks)\n- Output fractional seconds with '%P' format. (partly supplied by David Brooks)\n\n0.4.1 (2010-10-13)\n------------------\n\n- fixed bug in comparison between timedelta and Duration.\n- fixed precision problem with microseconds (reported by Tommi Virtanen)\n\n0.4.0 (2009-02-09)\n------------------\n\n- added method to parse ISO 8601 time zone strings\n- added methods to create ISO 8601 conforming strings\n\n0.3.0 (2009-1-05)\n------------------\n\n- Initial release\n\n\nTODOs\n=====\n\nThis to do list contains some thoughts and ideas about missing features, and\nparts to think about, whether to implement them or not. This list is probably\nnot complete.\n\nMissing features:\n-----------------\n\n * time formatting does not allow to create fractional representations.\n * parser for ISO intervals.\n * currently microseconds are always padded to a length of 6 characters.\n trailing 0s should be optional\n\nDocumentation:\n--------------\n\n * parse_datetime:\n - complete documentation to show what this function allows, but ISO forbids.\n and vice verse.\n - support other separators between date and time than 'T'\n\n * parse_date:\n - yeardigits should be always greater than 4\n - dates before 0001-01-01 are not supported\n\n * parse_duration:\n - alternative formats are not fully supported due to parse_date restrictions\n - standard duration format is fully supported but not very restrictive.\n\n * Duration:\n - support fractional years and month in calculations\n - implement w3c order relation? (``_)\n - refactor to have duration mathematics only at one place.\n - localize __str__ method (does timedelta do this?)\n - when is a Duration negative?\n - normalize Durations. months [00-12] and years ]-inf,+inf[", - "release_date": "2024-10-08T23:04:11", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Gerhard Weis", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", - "size": 29705, - "sha1": null, - "md5": "5ce182fd7f6152cda19ec605b6740687", - "sha256": "4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Copyright (c) 2021, Hugo van Kemenade and contributors Copyright (c) 2009-2018, Gerhard Weis and contributors Copyright (c) 2009, Gerhard Weis All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/isodate/0.7.2/json", - "datasource_id": null, - "purl": "pkg:pypi/isodate@0.7.2" + "purl": "pkg:pypi/isodate@0.7.2" }, { "type": "pypi", @@ -1498,66 +841,6 @@ "datasource_id": null, "purl": "pkg:pypi/msrest@0.7.1" }, - { - "type": "pypi", - "namespace": null, - "name": "msrest", - "version": "0.7.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "AutoRest swagger generator Python client runtime.\nAutoRest: Python Client Runtime\n===============================\n\n.. image:: https://travis-ci.org/Azure/msrest-for-python.svg?branch=master\n :target: https://travis-ci.org/Azure/msrest-for-python\n\n.. image:: https://codecov.io/gh/azure/msrest-for-python/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/azure/msrest-for-python\n\nInstallation\n------------\n\nTo install:\n\n.. code-block:: bash\n\n $ pip install msrest\n\n\nRelease History\n---------------\n\n2022-06-10 Version 0.7.1\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Declare correctly msrest as Python 3.6 and more only for clarity #251\n\n\n2022-06-07 Version 0.7.0\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `azure-core` as installation requirement #247\n- Replace `SerializationError` and `DeserializationError` in `msrest.exceptions` with those in `azure.core` #247\n\n**Bugfixes**\n\n- Typing annotation in LROPoller (thanks to akx) #242\n\nThanks to kianmeng for typo fixes in the documentation.\n\n2021-01-26 Version 0.6.21\n+++++++++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixes `failsafe_deserialize` introduced in `0.6.20` #232\n\n2021-01-25 Version 0.6.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add `failsafe_deserialize` method to the `Deserializer` object. #232\n- Serialize `datetime`, `date`, `time`, `timedelta` and `Decimal` correctly when serializing `object` . #224\n\n2020-09-08 Version 0.6.19\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization of random Model object #220\n- Fix serialization of unicode string in Py2 and object mode #221\n\n\n2020-07-27 Version 0.6.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for attributes/text in the same XML node #218\n\n\n2020-06-25 Version 0.6.17\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML and discriminator #214\n\n\n2020-06-09 Version 0.6.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix XML parsing with namespaces and attributes #209\n\n**Features**\n\n- Add py.typed for mypy support\n\n\n2020-06-04 Version 0.6.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix RFC regression introduced in 0.6.14 (RFC parse date are no longer pickable) #208\n- Fix XML parsing with namespaces #206\n\nThanks to ivanst0 for the contribution\n\n\n2020-05-18 Version 0.6.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix \"from_dict\" in some complex flattening scenario #204\n- Fix RFC date parsing if machine locale is not English #201\n\n\n2020-04-07 Version 0.6.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix deserializer and flattening if intermediate node is None #198\n- Fix validation exception message for minimum/maximum checks #199\n\n\n2020-04-06 Version 0.6.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add \"time\" serializer/deserializer #196\n\n2020-01-30 Version 0.6.11\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode can now be enabled even if the given Model has no XML metadata #184\n- Add Kerberos Authentication #186\n- Improve error message if expected type is dictionary and something else is provided #188\n\n**Bugfixes**\n\n- Fix comma separated serialization of array in query #186\n- Fix validation of basic types in some complex scenario #189\n\nThanks to catatonicprime for the contribution\n\n2019-09-04 Version 0.6.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- XML mode now supports OpenAPI additional properties # 174\n\n**Bugfixes**\n\n- Accept \"is_xml\" kwargs to force XML serialization #178\n- Disable XML deserialization if received element is not an ElementTree #178\n- A \"null\" enum deserialize as None, and not \"None\" anymore #173\n- Fix some UTF8 encoding issue in Python 2.7 and XML mode #172\n\n\n2019-07-24 Version 0.6.9\n++++++++++++++++++++++++\n\n**Features**\n\n- Accept extensions of JSON mimetype as valid JSON #167\n\n2019-06-24 Version 0.6.8\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Impossible to serialize XML if model contains UTF8 characters on Python 2.7 #165\n- Impossible to deserialize a HTTP response as XML if body contains UTF8 characters on Python 2.7 #165\n- Loading a serialized configuration fails with NameError on NoOptionError #162\n\nThanks to cclauss for the contribution\n\n2019-06-12 Version 0.6.7\n++++++++++++++++++++++++\n\n**Features**\n\n- Add DomainCredentials credentials for EventGrid\n\nThanks to kalyanaj for the contribution\n\n2019-03-21 Version 0.6.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Make 0.6.x series compatible with pyinstaller again\n- sdist now includes tests\n\nThanks to dotlambda for the contribution\n\n2019-03-11 Version 0.6.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix list of integers serialization if div is provided #151\n- Fix parsing of UTF8 with BOM #145\n\nThanks to eduardomourar for the contribution\n\n2019-01-09 Version 0.6.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression on credentials configuration if used outside of Autorest scope #135\n\n2019-01-08 Version 0.6.3\n++++++++++++++++++++++++\n\n**Features**\n\n- Updated **experimental** async support. Requires Autorest.Python 4.0.64.\n\n2018-11-19 Version 0.6.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix circular dependency in TYPE_CHECKING mode #128\n\n2018-10-15 Version 0.6.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove unnecessary verbose \"warnings\" log #126\n\n2018-10-02 Version 0.6.0\n++++++++++++++++++++++++\n\n**Features**\n\n- The environment variable AZURE_HTTP_USER_AGENT, if present, is now injected part of the UserAgent\n- New **preview** msrest.universal_http module. Provide tools to generic HTTP management (sync/async, requests/aiohttp, etc.)\n- New **preview** msrest.pipeline implementation:\n\n - A Pipeline is an ordered list of Policies than can process an HTTP request and response in a generic way.\n - More details in the wiki page about Pipeline: https://github.com/Azure/msrest-for-python/wiki/msrest-0.6.0---Pipeline\n\n- Adding new attributes to Configuration instance:\n\n - http_logger_policy - Policy to handle HTTP logging\n - user_agent_policy - Policy to handle UserAgent\n - pipeline - The current pipeline used by the SDK client\n - async_pipeline - The current async pipeline used by the async SDK client\n\n- Installing \"msrest[async]\" now installs the **experimental** async support. Works ONLY for Autorest.Python 4.0.63.\n\n**Breaking changes**\n\n- The HTTPDriver API introduced in 0.5.0 has been replaced by the Pipeline implementation.\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http\":\n\n - ClientRedirectPolicy\n - ClientProxies\n - ClientConnection\n\n- The following classes have been moved from \"msrest.pipeline\" to \"msrest.universal_http.requests\":\n\n - ClientRetryPolicy\n\n**Bugfixes**\n\n- Fix \"long\" on Python 2 if used with the \"object\" type #121\n\nThanks to robgolding for the contribution\n\n2018-09-04 Version 0.5.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix a serialization issue if additional_properties is declared, and \"automatic model\" syntax is used\n (\"automatic model\" being the ability to pass a dict to command and have the model auto-created) # 120\n\n2018-07-12 Version 0.5.4\n++++++++++++++++++++++++\n\n**Features**\n\n- Support additionalProperties and XML\n\n**BugFixes**\n\n- Better parse empty node and not string types\n- Improve \"object\" XML parsing\n\n2018-07-10 Version 0.5.3\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Fix some XML serialization subtle scenarios\n\n2018-07-09 Version 0.5.2\n++++++++++++++++++++++++\n\n**Features**\n\n- deserialize/from_dict now accepts a content-type parameter to parse XML strings\n\n**Bugfixes**\n\n- Fix some complex XML Swagger definitions.\n\nThis release likely breaks already generated XML SDKs, that needs to be regenerated with autorest.python 3.0.58\n\n2018-06-21 Version 0.5.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Lower Accept header overwrite logging message #110\n- Fix 'object' type and XML format\n\nThanks to dharmab for the contribution\n\n2018-06-12 Version 0.5.0\n++++++++++++++++++++++++\n\n**Disclaimer**\n\nThis released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring\nand new features to continue with 0.4.x versioning\n\n**Features**\n\n- Add XML support\n- Add many type hints, and MyPY testing on CI.\n- HTTP calls are made through a HTTPDriver API. Only implementation is `requests` for now. This driver API is *not* considered stable\n and you should pin your msrest version if you want to provide a personal implementation.\n\n**Bugfixes**\n\n- Incorrect milliseconds serialization for some datetime object #94\n\n**Deprecation**\n\nThat will trigger a DeprecationWarning if an old Autorest generated code is used.\n\n- _client.add_header is deprecated, and config.headers should be used instead\n- _client.send_formdata is deprecated, and _client.put/get/delete/post + _client.send should be used instead\n\n2018-04-30 Version 0.4.29\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Improve `SDKClient.__exit__` to take exc_details as optional parameters and not required #93\n- refresh_session should also use the permanent HTTP session if available #91\n\n2018-04-18 Version 0.4.28\n+++++++++++++++++++++++++\n\n**Features**\n\n- msrest is now able to keep the \"requests.Session\" alive for performance. To activate this behavior:\n\n - Use the final Client as a context manager (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and `client.close()` (requires generation with Autorest.Python 3.0.50 at least)\n - Use `client.config.keep_alive = True` and client._client.close() (not recommended, but available in old releases of SDK)\n\n- All Authentication classes now define `signed_session` and `refresh_session` with an optional `session` parameter.\n To take benefits of the session improvement, a subclass of Authentication *MUST* add this optional parameter\n and use it if it's not `None`:\n\n def signed_session(self, session=None):\n session = session or requests.Session()\n\n # As usual from here.\n\n2018-03-07 Version 0.4.27\n+++++++++++++++++++++++++\n\n**Features**\n\n- Disable HTTP log by default (security), add `enable_http_log` to restore it #86\n\n**BugFixes**\n\n- Fix incorrect date parsing if ms precision is over 6 digits #82\n\n2018-01-30 Version 0.4.26\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add TopicCredentials for EventGrid client\n\n**Bugfixes**\n\n- Fix minimal dependency of isodate\n- Fix serialisation from dict if datetime provided\n\n2018-01-08 Version 0.4.25\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add LROPoller class. This is a customizable LRO engine.\n This is the poller engine of Autorest.Python 3.0, and is not used by code generated by previous Autorest version.\n\n2018-01-03 Version 0.4.24\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Date parsing is now compliant with Autorest / Swagger 2.0 specification (less lenient)\n\n**Internal optimisation**\n\n- Call that does not return a streamable object are now executed in requests stream mode False (was True whatever the type of the call).\n This should reduce the number of leaked opened session and allow urllib3 to manage connection pooling more efficiently.\n Only clients generated with Autorest.Python >= 2.1.31 (not impacted otherwise, fully backward compatible)\n\n2017-12-21 Version 0.4.23\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept to deserialize enum of different type if content string match #75\n- Stop failing on deserialization if enum string is unkwon. Return the string instead.\n\n**Features**\n\n- Model now accept kwargs in constructor for future kwargs models\n\n2017-12-15 Version 0.4.22\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Do not validate additional_properties #73\n- Improve validation error if expected type is dict, but actual type is not #73\n\n2017-12-14 Version 0.4.21\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix additional_properties if Swagger was flatten #72\n\n2017-12-13 Version 0.4.20\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add support for additional_properties\n\n - By default, all additional_properties are kept.\n - Additional properties are sent to the server only if it was specified in the Swagger,\n or if \"enable_additional_properties_sending\" is called on the model we want it.\n This is a class method that enables it for all instance of this model.\n\n2017-11-20 Version 0.4.19\n+++++++++++++++++++++++++\n\n**Features**\n\n- The interpretation of Swagger 2.0 \"discriminator\" is now lenient. This means for these two scenarios:\n\n - Discriminator value is missing from the received payload\n - Discriminator value is not defined in the Swagger\n\n Instead of failing with an exception, this now returns the base type for this \"discriminator\".\n\n Note that this is not a contradiction of the Swagger 2.0 spec, that specifies\n \"validation SHOULD fail [...] there may exist valid reasons in particular circumstances to ignore a particular item,\n but the full implications must be understood and carefully weighed before choosing a different course.\"\n\n This cannot be configured for now and is the new default behvaior, but can be in the future if needed.\n\n**Bugfixes**\n\n- Optional formdata parameters were raising an exception (#65)\n- \"application/x-www-form-urlencoded\" form was sent using \"multipart/form-data\".\n This causes problems if the server does not support \"multipart/form-data\" (#66)\n\n2017-10-26 Version 0.4.18\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add ApiKeyCredentials class. This can be used to support OpenAPI ApiKey feature.\n- Add CognitiveServicesAuthentication class. Pre-declared ApiKeyCredentials class for Cognitive Services.\n\n2017-10-12 Version 0.4.17\n+++++++++++++++++++++++++\n\n**Features**\n\nThis make Authentication classes more consistent:\n\n- OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)\n- BasicTokenAuthentication has now a \"set_token\" methods that does nothing.\n\nThis allows test like \"isintance(o, BasicTokenAuthentication)\" to be guaranteed that the following attributes exists:\n\n- token\n- set_token()\n- signed_session()\n\nThis means for users of \"msrestazure\", that they are guaranteed that all AD classes somehow inherits from \"BasicTokenAuthentication\"\n\n2017-10-05 Version 0.4.16\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression: accept \"set\" as a valid \"[str]\" (#60)\n\n2017-09-28 Version 0.4.15\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Always log response body (#16)\n- Improved exception message if error JSON is Odata v4 (#55)\n- Refuse \"str\" as a valid \"[str]\" type (#41)\n- Better exception handling if input from server is not JSON valid\n\n**Features**\n\n- Add Configuration.session_configuration_callback to customize the requests.Session if necessary (#52)\n- Add a flag to Serializer to disable client-side-validation (#51)\n- Remove \"import requests\" from \"exceptions.py\" for apps that require fast loading time (#23)\n\nThank you to jayden-at-arista for the contribution\n\n2017-08-23 Version 0.4.14\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax with enum modeled as string and enum used\n\n2017-08-22 Version 0.4.13\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix regression introduced in msrest 0.4.12 - dict syntax using isodate.Duration (#42)\n\n2017-08-21 Version 0.4.12\n+++++++++++++++++++++++++\n\n**Features**\n\n- Input is now more lenient\n- Model have a \"validate\" method to check content constraints\n- Model have now 4 new methods:\n\n - \"serialize\" that gives the RestAPI that will be sent\n - \"as_dict\" that returns a dict version of the Model. Callbacks are available.\n - \"deserialize\" the parses the RestAPI JSON into a Model\n - \"from_dict\" that parses several dict syntax into a Model. Callbacks are available.\n\nMore details and examples in the Wiki article on Github:\nhttps://github.com/Azure/msrest-for-python/wiki/msrest-0.4.12---Serialization-change\n\n**Bugfixes**\n\n- Better Enum checking (#38)\n\n2017-06-21 Version 0.4.11\n+++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix incorrect dependency to \"requests\" 2.14.x, instead of 2.x meant in 0.4.8\n\n2017-06-15 Version 0.4.10\n+++++++++++++++++++++++++\n\n**Features**\n\n- Add requests hooks to configuration\n\n2017-06-08 Version 0.4.9\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Accept \"null\" value for paging array as an empty list and do not raise (#30)\n\n2017-05-22 Version 0.4.8\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix random \"pool is closed\" error (#29)\n- Fix requests dependency to version 2.x, since version 3.x is annunced to be breaking.\n\n2017-04-04 Version 0.4.7\n++++++++++++++++++++++++\n\n**BugFixes**\n\n- Refactor paging #22:\n\n - \"next\" is renamed \"advance_page\" and \"next\" returns only 1 element (Python 2 expected behavior)\n - paging objects are now real generator and support the \"next()\" built-in function without need for \"iter()\"\n\n- Raise accurate DeserialisationError on incorrect RestAPI discriminator usage #27\n- Fix discriminator usage of the base class name #27\n- Remove default mutable arguments in Clients #20\n- Fix object comparison in some scenarios #24\n\n2017-03-06 Version 0.4.6\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Allow Model sub-classes to be serialized if type is \"object\"\n\n2017-02-13 Version 0.4.5\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix polymorphic deserialization #11\n- Fix regexp validation if '\\\\w' is used in Python 2.7 #13\n- Fix dict deserialization if keys are unicode in Python 2.7\n\n**Improvements**\n\n- Add polymorphic serialisation from dict objects\n- Remove chardet and use HTTP charset declaration (fallback to utf8)\n\n2016-09-14 Version 0.4.4\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Remove paging URL validation, part of fix https://github.com/Azure/autorest/pull/1420\n\n**Disclaimer**\n\nIn order to get paging fixes for impacted clients, you need this package and Autorest > 0.17.0 Nightly 20160913\n\n2016-09-01 Version 0.4.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Better exception message (https://github.com/Azure/autorest/pull/1300)\n\n2016-08-15 Version 0.4.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix serialization if \"object\" type contains None (https://github.com/Azure/autorest/issues/1353)\n\n2016-08-08 Version 0.4.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fix compatibility issues with requests 2.11.0 (https://github.com/Azure/autorest/issues/1337)\n- Allow url of ClientRequest to have parameters (https://github.com/Azure/autorest/issues/1217)\n\n2016-05-25 Version 0.4.0\n++++++++++++++++++++++++\n\nThis version has no bug fixes, but implements new features of Autorest:\n- Base64 url type\n- unixtime type\n- x-ms-enum modelAsString flag\n\n**Behaviour changes**\n\n- Add Platform information in UserAgent\n- Needs Autorest > 0.17.0 Nightly 20160525\n\n2016-04-26 Version 0.3.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Read only values are no longer in __init__ or sent to the server (https://github.com/Azure/autorest/pull/959)\n- Useless kwarg removed\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160426\n\n\n2016-03-25 Version 0.2.0\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Manage integer enum values (https://github.com/Azure/autorest/pull/879)\n- Add missing application/json Accept HTTP header (https://github.com/Azure/azure-sdk-for-python/issues/553)\n\n**Behaviour changes**\n\n- Needs Autorest > 0.16.0 Nightly 20160324\n\n\n2016-03-21 Version 0.1.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Deserialisation of generic resource if null in JSON (https://github.com/Azure/azure-sdk-for-python/issues/544)\n\n\n2016-03-14 Version 0.1.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- urllib3 side effect (https://github.com/Azure/autorest/issues/824)\n\n\n2016-03-04 Version 0.1.1\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/799)\n\n2016-03-04 Version 0.1.0\n+++++++++++++++++++++++++\n\n**Behavioural Changes**\n\n- Removed custom logging set up and configuration. All loggers are now children of the root logger 'msrest' with no pre-defined configurations.\n- Replaced _required attribute in Model class with more extensive _validation dict.\n\n**Improvement**\n\n- Removed hierarchy scanning for attribute maps from base Model class - relies on generator to populate attribute\n maps according to hierarchy.\n- Base class Paged now inherits from collections.Iterable.\n- Data validation during serialization using custom parameters (e.g. max, min etc).\n- Added ValidationError to be raised if invalid data encountered during serialization.\n\n2016-02-29 Version 0.0.3\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Source package corrupted in Pypi (https://github.com/Azure/autorest/issues/718)\n\n2016-02-19 Version 0.0.2\n++++++++++++++++++++++++\n\n**Bugfixes**\n\n- Fixed bug in exception logging before logger configured.\n\n2016-02-19 Version 0.0.1\n++++++++++++++++++++++++\n\n- Initial release.", - "release_date": "2022-06-13T22:41:25", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": "https://github.com/Azure/msrest-for-python", - "download_url": "https://files.pythonhosted.org/packages/68/77/8397c8fb8fc257d8ea0fa66f8068e073278c65f05acb17dcb22a02bfdc42/msrest-0.7.1.zip", - "size": 175332, - "sha1": null, - "md5": "3079617446a011d4fc0098687609671e", - "sha256": "6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/msrest/0.7.1/json", - "datasource_id": null, - "purl": "pkg:pypi/msrest@0.7.1" - }, { "type": "pypi", "namespace": null, @@ -1634,82 +917,6 @@ "datasource_id": null, "purl": "pkg:pypi/oauthlib@3.2.2" }, - { - "type": "pypi", - "namespace": null, - "name": "oauthlib", - "version": "3.2.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic\nOAuthLib - Python Framework for OAuth1 & OAuth2\n===============================================\n\n*A generic, spec-compliant, thorough implementation of the OAuth request-signing\nlogic for Python 3.6+.*\n\n.. image:: https://app.travis-ci.com/oauthlib/oauthlib.svg?branch=master\n :target: https://app.travis-ci.com/oauthlib/oauthlib\n :alt: Travis\n.. image:: https://coveralls.io/repos/oauthlib/oauthlib/badge.svg?branch=master\n :target: https://coveralls.io/r/oauthlib/oauthlib\n :alt: Coveralls\n.. image:: https://img.shields.io/pypi/pyversions/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: Download from PyPI\n.. image:: https://img.shields.io/pypi/l/oauthlib.svg\n :target: https://pypi.org/project/oauthlib/\n :alt: License\n.. image:: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib.svg?type=shield\n :target: https://app.fossa.io/projects/git%2Bgithub.com%2Foauthlib%2Foauthlib?ref=badge_shield\n :alt: FOSSA Status\n.. image:: https://img.shields.io/readthedocs/oauthlib.svg\n :target: https://oauthlib.readthedocs.io/en/latest/index.html\n :alt: Read the Docs\n.. image:: https://badges.gitter.im/oauthlib/oauthlib.svg\n :target: https://gitter.im/oauthlib/Lobby\n :alt: Chat on Gitter\n\n\n.. image:: https://raw.githubusercontent.com/oauthlib/oauthlib/8d71b161fd145d11c40d55c9ab66ac134a303253/docs/logo/oauthlib-banner-700x192.png\n :target: https://github.com/oauthlib/oauthlib/\n :alt: OAuth + Python = OAuthlib Python Framework\n\n\nOAuth often seems complicated and difficult-to-implement. There are several\nprominent libraries for handling OAuth requests, but they all suffer from one or\nboth of the following:\n\n1. They predate the `OAuth 1.0 spec`_, AKA RFC 5849.\n2. They predate the `OAuth 2.0 spec`_, AKA RFC 6749.\n3. They assume the usage of a specific HTTP request library.\n\n.. _`OAuth 1.0 spec`: https://tools.ietf.org/html/rfc5849\n.. _`OAuth 2.0 spec`: https://tools.ietf.org/html/rfc6749\n\nOAuthLib is a framework which implements the logic of OAuth1 or OAuth2 without\nassuming a specific HTTP request object or web framework. Use it to graft OAuth\nclient support onto your favorite HTTP library, or provide support onto your\nfavourite web framework. If you're a maintainer of such a library, write a thin\nveneer on top of OAuthLib and get OAuth support for very little effort.\n\n\nDocumentation\n--------------\n\nFull documentation is available on `Read the Docs`_. All contributions are very\nwelcome! The documentation is still quite sparse, please open an issue for what\nyou'd like to know, or discuss it in our `Gitter community`_, or even better, send a\npull request!\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n.. _`Read the Docs`: https://oauthlib.readthedocs.io/en/latest/index.html\n\nInterested in making OAuth requests?\n------------------------------------\n\nThen you might be more interested in using `requests`_ which has OAuthLib\npowered OAuth support provided by the `requests-oauthlib`_ library.\n\n.. _`requests`: https://github.com/requests/requests\n.. _`requests-oauthlib`: https://github.com/requests/requests-oauthlib\n\nWhich web frameworks are supported?\n-----------------------------------\n\nThe following packages provide OAuth support using OAuthLib.\n\n- For Django there is `django-oauth-toolkit`_, which includes `Django REST framework`_ support.\n- For Flask there is `flask-oauthlib`_ and `Flask-Dance`_.\n- For Pyramid there is `pyramid-oauthlib`_.\n- For Bottle there is `bottle-oauthlib`_.\n\nIf you have written an OAuthLib package that supports your favorite framework,\nplease open a Pull Request, updating the documentation.\n\n.. _`django-oauth-toolkit`: https://github.com/evonove/django-oauth-toolkit\n.. _`flask-oauthlib`: https://github.com/lepture/flask-oauthlib\n.. _`Django REST framework`: http://django-rest-framework.org\n.. _`Flask-Dance`: https://github.com/singingwolfboy/flask-dance\n.. _`pyramid-oauthlib`: https://github.com/tilgovi/pyramid-oauthlib\n.. _`bottle-oauthlib`: https://github.com/thomsonreuters/bottle-oauthlib\n\nUsing OAuthLib? Please get in touch!\n------------------------------------\nPatching OAuth support onto an http request framework? Creating an OAuth\nprovider extension for a web framework? Simply using OAuthLib to Get Things Done\nor to learn?\n\nNo matter which we'd love to hear from you in our `Gitter community`_ or if you have\nanything in particular you would like to have, change or comment on don't\nhesitate for a second to send a pull request or open an issue. We might be quite\nbusy and therefore slow to reply but we love feedback!\n\nChances are you have run into something annoying that you wish there was\ndocumentation for, if you wish to gain eternal fame and glory, and a drink if we\nhave the pleasure to run into each other, please send a docs pull request =)\n\n.. _`Gitter community`: https://gitter.im/oauthlib/Lobby\n\nLicense\n-------\n\nOAuthLib is yours to use and abuse according to the terms of the BSD license.\nCheck the LICENSE file for full details.\n\nCredits\n-------\n\nOAuthLib has been started and maintained several years by Idan Gazit and other\namazing `AUTHORS`_. Thanks to their wonderful work, the open-source `community`_\ncreation has been possible and the project can stay active and reactive to users\nrequests.\n\n\n.. _`AUTHORS`: https://github.com/oauthlib/oauthlib/blob/master/AUTHORS\n.. _`community`: https://github.com/oauthlib/\n\nChangelog\n---------\n\n*OAuthLib is in active development, with the core of both OAuth1 and OAuth2\ncompleted, for providers as well as clients.* See `supported features`_ for\ndetails.\n\n.. _`supported features`: https://oauthlib.readthedocs.io/en/latest/feature_matrix.html\n\nFor a full changelog see ``CHANGELOG.rst``.", - "release_date": "2022-10-17T20:04:27", - "parties": [ - { - "type": "person", - "role": "author", - "name": "The OAuthlib Community", - "email": "idan@gazit.me", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Ib Lundgren", - "email": "ib.lundgren@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/oauthlib/oauthlib", - "download_url": "https://files.pythonhosted.org/packages/6d/fa/fbf4001037904031639e6bfbfc02badfc7e12f137a8afa254df6c4c8a670/oauthlib-3.2.2.tar.gz", - "size": 177352, - "sha1": null, - "md5": "2f7b898cc1af8c1409cc329e8843ea8f", - "sha256": "9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved", - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/oauthlib/3.2.2/json", - "datasource_id": null, - "purl": "pkg:pypi/oauthlib@3.2.2" - }, { "type": "pypi", "namespace": null, @@ -1736,217 +943,21 @@ "url": null } ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", - "size": 117552, - "sha1": null, - "md5": "e9bf4a92f270e6482393bd716406ff85", - "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "pycparser", - "version": "2.22", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", - "release_date": "2024-03-30T13:22:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Eli Bendersky", - "email": "eliben@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Eli Bendersky", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", - "size": 172736, - "sha1": null, - "md5": "8922b0b1b53b419e3a38fba4aa43a348", - "sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.22" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", - "size": 24179, - "sha1": null, - "md5": "68df2f3e274ac34fb2c5f32b15374156", - "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ISC", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", - "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "requests-oauthlib", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", - "release_date": "2024-03-22T20:32:29", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kenneth Reitz", - "email": "me@kennethreitz.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", + "keywords": [ + "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" + "Programming Language :: Python :: 3.9" ], - "homepage_url": "https://github.com/requests/requests-oauthlib", - "download_url": "https://files.pythonhosted.org/packages/42/f2/05f29bc3913aea15eb670be136045bf5c5bbf4b99ecb839da9b422bb2c85/requests-oauthlib-2.0.0.tar.gz", - "size": 55650, + "homepage_url": "https://github.com/eliben/pycparser", + "download_url": "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", + "size": 117552, "sha1": null, - "md5": "713dc7856f9ff625d75335c10d332a1b", - "sha256": "b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9", + "md5": "e9bf4a92f270e6482393bd716406ff85", + "sha256": "c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1954,7 +965,7 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "ISC", + "license": "BSD-3-Clause", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -1966,64 +977,63 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", + "api_data_url": "https://pypi.org/pypi/pycparser/2.22/json", "datasource_id": null, - "purl": "pkg:pypi/requests-oauthlib@2.0.0" + "purl": "pkg:pypi/pycparser@2.22" }, { "type": "pypi", "namespace": null, - "name": "requests", - "version": "2.32.3", + "name": "requests-oauthlib", + "version": "2.0.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:47", + "description": "OAuthlib authentication support for Requests.\nRequests-OAuthlib |build-status| |coverage-status| |docs|\n=========================================================\n\nThis project provides first-class OAuth library support for `Requests `_.\n\nThe OAuth 1 workflow\n--------------------\n\nOAuth 1 can seem overly complicated and it sure has its quirks. Luckily,\nrequests_oauthlib hides most of these and let you focus at the task at hand.\n\nAccessing protected resources using requests_oauthlib is as simple as:\n\n.. code-block:: pycon\n\n >>> from requests_oauthlib import OAuth1Session\n >>> twitter = OAuth1Session('client_key',\n client_secret='client_secret',\n resource_owner_key='resource_owner_key',\n resource_owner_secret='resource_owner_secret')\n >>> url = 'https://api.twitter.com/1/account/settings.json'\n >>> r = twitter.get(url)\n\nBefore accessing resources you will need to obtain a few credentials from your\nprovider (e.g. Twitter) and authorization from the user for whom you wish to\nretrieve resources for. You can read all about this in the full\n`OAuth 1 workflow guide on RTD `_.\n\nThe OAuth 2 workflow\n--------------------\n\nOAuth 2 is generally simpler than OAuth 1 but comes in more flavours. The most\ncommon being the Authorization Code Grant, also known as the WebApplication\nflow.\n\nFetching a protected resource after obtaining an access token can be extremely\nsimple. However, before accessing resources you will need to obtain a few\ncredentials from your provider (e.g. Google) and authorization from the user\nfor whom you wish to retrieve resources for. You can read all about this in the\nfull `OAuth 2 workflow guide on RTD `_.\n\nInstallation\n-------------\n\nTo install requests and requests_oauthlib you can use pip:\n\n.. code-block:: bash\n\n pip install requests requests-oauthlib\n\n.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg\n :target: https://github.com/requests/requests-oauthlib/actions\n.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg\n :target: https://coveralls.io/r/requests/requests-oauthlib\n.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/\n :alt: Documentation Status\n :scale: 100%\n :target: https://requests-oauthlib.readthedocs.io/\n\n\nHistory\n-------\n\nv2.0.0 (22 March 2024)\n++++++++++++++++++++++++\n\nFull set of changes are in [github](https://github.com/requests/requests-oauthlib/milestone/4?closed=1).\n\nAdditions & changes:\n\n- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``\n is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404\n `_.\n- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``\n is provided and ``scope`` is not overridden. Fixes `#408\n `_\n- Add ``refresh_token_request`` and ``access_token_request`` compliance hooks\n- Add PKCE support and Auth0 example\n- Add support for Python 3.8-3.12\n- Remove support of Python 2.x, <3.7\n- Migrated to Github Action\n- Updated dependencies\n- Cleanup some docs and examples\n\nv1.4.0 (27 Feb 2024)\n++++++++++++++++++++++++\n\n- Version 2.0.0 published initially as 1.4.0, it was yanked eventually.\n\nv1.3.1 (21 January 2022)\n++++++++++++++++++++++++\n\n- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)\n- Removed outdated LinkedIn Compliance Fixes\n- Add eBay compliance fix\n- Add Spotify OAuth 2 Tutorial\n- Add support for python 3.8, 3.9\n- Fixed LinkedIn Compliance Fixes\n- Fixed ReadTheDocs Documentation and sphinx errors\n- Moved pipeline to GitHub Actions\n\nv1.3.0 (6 November 2019)\n++++++++++++++++++++++++\n\n- Instagram compliance fix\n- Added ``force_querystring`` argument to fetch_token() method on OAuth2Session\n\nv1.2.0 (14 January 2019)\n++++++++++++++++++++++++\n\n- This project now depends on OAuthlib 3.0.0 and above. It does **not** support\n versions of OAuthlib before 3.0.0.\n- Updated oauth2 tests to use 'sess' for an OAuth2Session instance instead of `auth`\n because OAuth2Session objects and methods acceept an `auth` paramether which is\n typically an instance of `requests.auth.HTTPBasicAuth`\n- `OAuth2Session.fetch_token` previously tried to guess how and where to provide\n \"client\" and \"user\" credentials incorrectly. This was incompatible with some\n OAuth servers and incompatible with breaking changes in oauthlib that seek to\n correctly provide the `client_id`. The older implementation also did not raise\n the correct exceptions when username and password are not present on Legacy\n clients.\n- Avoid automatic netrc authentication for OAuth2Session.\n\nv1.1.0 (9 January 2019)\n+++++++++++++++++++++++\n\n- Adjusted version specifier for ``oauthlib`` dependency: this project is\n not yet compatible with ``oauthlib`` 3.0.0.\n- Dropped dependency on ``nose``.\n- Minor changes to clean up the code and make it more readable/maintainable.\n\nv1.0.0 (4 June 2018)\n++++++++++++++++++++\n\n- **Removed support for Python 2.6 and Python 3.3.**\n This project now supports Python 2.7, and Python 3.4 and above.\n- Added several examples to the documentation.\n- Added plentymarkets compliance fix.\n- Added a ``token`` property to OAuth1Session, to match the corresponding\n ``token`` property on OAuth2Session.\n\nv0.8.0 (14 February 2017)\n+++++++++++++++++++++++++\n\n- Added Fitbit compliance fix.\n- Fixed an issue where newlines in the response body for the access token\n request would cause errors when trying to extract the token.\n- Fixed an issue introduced in v0.7.0 where users passing ``auth`` to several\n methods would encounter conflicts with the ``client_id`` and\n ``client_secret``-derived auth. The user-supplied ``auth`` argument is now\n used in preference to those options.\n\nv0.7.0 (22 September 2016)\n++++++++++++++++++++++++++\n\n- Allowed ``OAuth2Session.request`` to take the ``client_id`` and\n ``client_secret`` parameters for the purposes of automatic token refresh,\n which may need them.\n\nv0.6.2 (12 July 2016)\n+++++++++++++++++++++\n\n- Use ``client_id`` and ``client_secret`` for the Authorization header if\n provided.\n- Allow explicit bypass of the Authorization header by setting ``auth=False``.\n- Pass through the ``proxies`` kwarg when refreshing tokens.\n- Miscellaneous cleanups.\n\nv0.6.1 (19 February 2016)\n+++++++++++++++++++++++++\n\n- Fixed a bug when sending authorization in headers with no username and\n password present.\n- Make sure we clear the session token before obtaining a new one.\n- Some improvements to the Slack compliance fix.\n- Avoid timing problems around token refresh.\n- Allow passing arbitrary arguments to requests when calling\n ``fetch_request_token`` and ``fetch_access_token``.\n\nv0.6.0 (14 December 2015)\n+++++++++++++++++++++++++\n\n- Add compliance fix for Slack.\n- Add compliance fix for Mailchimp.\n- ``TokenRequestDenied`` exceptions now carry the entire response, not just the\n status code.\n- Pass through keyword arguments when refreshing tokens automatically.\n- Send authorization in headers, not just body, to maximize compatibility.\n- More getters/setters available for OAuth2 session client values.\n- Allow sending custom headers when refreshing tokens, and set some defaults.\n\n\nv0.5.0 (4 May 2015)\n+++++++++++++++++++\n- Fix ``TypeError`` being raised instead of ``TokenMissing`` error.\n- Raise requests exceptions on 4XX and 5XX responses in the OAuth2 flow.\n- Avoid ``AttributeError`` when initializing the ``OAuth2Session`` class\n without complete client information.\n\nv0.4.2 (16 October 2014)\n++++++++++++++++++++++++\n- New ``authorized`` property on OAuth1Session and OAuth2Session, which allows\n you to easily determine if the session is already authorized with OAuth tokens\n or not.\n- New ``TokenMissing`` and ``VerifierMissing`` exception classes for OAuth1Session:\n this will make it easier to catch and identify these exceptions.\n\nv0.4.1 (6 June 2014)\n++++++++++++++++++++\n- New install target ``[rsa]`` for people using OAuth1 RSA-SHA1 signature\n method.\n- Fixed bug in OAuth2 where supplied state param was not used in auth url.\n- OAuth2 HTTPS checking can be disabled by setting environment variable\n ``OAUTHLIB_INSECURE_TRANSPORT``.\n- OAuth1 now re-authorize upon redirects.\n- OAuth1 token fetching now raise a detailed error message when the\n response body is incorrectly encoded or the request was denied.\n- Added support for custom OAuth1 clients.\n- OAuth2 compliance fix for Sina Weibo.\n- Multiple fixes to facebook compliance fix.\n- Compliance fixes now re-encode body properly as bytes in Python 3.\n- Logging now properly done under ``requests_oauthlib`` namespace instead\n of piggybacking on oauthlib namespace.\n- Logging introduced for OAuth1 auth and session.\n\nv0.4.0 (29 September 2013)\n++++++++++++++++++++++++++\n- OAuth1Session methods only return unicode strings. #55.\n- Renamed requests_oauthlib.core to requests_oauthlib.oauth1_auth for consistency. #79.\n- Added Facebook compliance fix and access_token_response hook to OAuth2Session. #63.\n- Added LinkedIn compliance fix.\n- Added refresh_token_response compliance hook, invoked before parsing the refresh token.\n- Correctly limit compliance hooks to running only once!\n- Content type guessing should only be done when no content type is given\n- OAuth1 now updates r.headers instead of replacing it with non case insensitive dict\n- Remove last use of Response.content (in OAuth1Session). #44.\n- State param can now be supplied in OAuth2Session.authorize_url", + "release_date": "2024-03-22T20:32:28", "parties": [ { "type": "person", "role": "author", "name": "Kenneth Reitz", - "email": "me@kennethreitz.org", + "email": "me@kennethreitz.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Natural Language :: English", - "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", - "size": 64928, + "homepage_url": "https://github.com/requests/requests-oauthlib", + "download_url": "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", + "size": 24179, "sha1": null, - "md5": "83d50f7980b330c48f3bfe86372adcca", - "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", + "md5": "68df2f3e274ac34fb2c5f32b15374156", + "sha256": "7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/psf/requests", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache-2.0", + "license": "ISC", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -2033,9 +1043,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/requests/2.32.3/json", + "api_data_url": "https://pypi.org/pypi/requests-oauthlib/2.0.0/json", "datasource_id": null, - "purl": "pkg:pypi/requests@2.32.3" + "purl": "pkg:pypi/requests-oauthlib@2.0.0" }, { "type": "pypi", @@ -2046,7 +1056,7 @@ "subpath": null, "primary_language": "Python", "description": "Python HTTP for Humans.\n# Requests\n\n**Requests** is a simple, yet elegant, HTTP library.\n\n```python\n>>> import requests\n>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))\n>>> r.status_code\n200\n>>> r.headers['content-type']\n'application/json; charset=utf8'\n>>> r.encoding\n'utf-8'\n>>> r.text\n'{\"authenticated\": true, ...'\n>>> r.json()\n{'authenticated': True, ...}\n```\n\nRequests allows you to send HTTP/1.1 requests extremely easily. There\u2019s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data \u2014 but nowadays, just use the `json` method!\n\nRequests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`\u2014 according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.\n\n[![Downloads](https://static.pepy.tech/badge/requests/month)](https://pepy.tech/project/requests)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/requests.svg)](https://pypi.org/project/requests)\n[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/psf/requests/graphs/contributors)\n\n## Installing Requests and Supported Versions\n\nRequests is available on PyPI:\n\n```console\n$ python -m pip install requests\n```\n\nRequests officially supports Python 3.8+.\n\n## Supported Features & Best\u2013Practices\n\nRequests is ready for the demands of building robust and reliable HTTP\u2013speaking applications, for the needs of today.\n\n- Keep-Alive & Connection Pooling\n- International Domains and URLs\n- Sessions with Cookie Persistence\n- Browser-style TLS/SSL Verification\n- Basic & Digest Authentication\n- Familiar `dict`\u2013like Cookies\n- Automatic Content Decompression and Decoding\n- Multi-part File Uploads\n- SOCKS Proxy Support\n- Connection Timeouts\n- Streaming Downloads\n- Automatic honoring of `.netrc`\n- Chunked HTTP Requests\n\n## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)\n\n[![Read the Docs](https://raw.githubusercontent.com/psf/requests/main/ext/ss.png)](https://requests.readthedocs.io)\n\n## Cloning the repository\n\nWhen cloning the Requests repository, you may need to add the `-c\nfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see\n[this issue](https://github.com/psf/requests/issues/2690) for more background):\n\n```shell\ngit clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git\n```\n\nYou can also apply this setting to your global Git config:\n\n```shell\ngit config --global fetch.fsck.badTimezone ignore\n```\n\n---\n\n[![Kenneth Reitz](https://raw.githubusercontent.com/psf/requests/main/ext/kr.png)](https://kennethreitz.org) [![Python Software Foundation](https://raw.githubusercontent.com/psf/requests/main/ext/psf.png)](https://www.python.org/psf)", - "release_date": "2024-05-29T15:37:49", + "release_date": "2024-05-29T15:37:47", "parties": [ { "type": "person", @@ -2076,11 +1086,11 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": "https://requests.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", - "size": 131218, + "download_url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", + "size": 64928, "sha1": null, - "md5": "fa3ee5ac3f1b3f4368bd74ab530d3f0f", - "sha256": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "md5": "83d50f7980b330c48f3bfe86372adcca", + "sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/psf/requests", @@ -2160,142 +1170,16 @@ "datasource_id": null, "purl": "pkg:pypi/six@1.17.0" }, - { - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", - "release_date": "2024-12-04T17:35:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/benjaminp/six", - "download_url": "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", - "size": 34031, - "sha1": null, - "md5": "a0387fe15662c71057b4fb2b7aa9056a", - "sha256": "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", - "datasource_id": null, - "purl": "pkg:pypi/six@1.17.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "typing-extensions", - "version": "4.13.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:40", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "\"Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Michael Lee\" ", - "url": null - } - ], - "keywords": [ - "annotations", - "backport", - "checker", - "checking", - "function", - "hinting", - "hints", - "type", - "typechecking", - "typehinting", - "typehints", - "typing", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", - "size": 45683, - "sha1": null, - "md5": "7ff271e4526b7cd1c260bdcc610b11c4", - "sha256": "c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", - "sha512": null, - "bug_tracking_url": "https://github.com/python/typing_extensions/issues", - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "PSF-2.0", - "declared_license": {}, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", - "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" - }, { "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.0", + "version": "4.13.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-03-26T03:49:41", + "release_date": "2025-04-03T16:11:19", "parties": [ { "type": "person", @@ -2333,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", - "size": 106520, + "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", + "size": 45739, "sha1": null, - "md5": "f53b1a7955332b9c74fdbfb847399edb", - "sha256": "0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", + "md5": "88648ecb0c5e2dfdb72097ec846b87c8", + "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -2352,9 +1236,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.0/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.0" + "purl": "pkg:pypi/typing-extensions@4.13.1" }, { "type": "pypi", @@ -2435,95 +1319,15 @@ "api_data_url": "https://pypi.org/pypi/urllib3/2.2.3/json", "datasource_id": null, "purl": "pkg:pypi/urllib3@2.2.3" - }, - { - "type": "pypi", - "namespace": null, - "name": "urllib3", - "version": "2.2.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-09-12T10:52:18", - "parties": [ - { - "type": "person", - "role": "author", - "name": null, - "email": "Andrey Petrov ", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Seth Michael Larson , Quentin Pradet , Illia Volochii ", - "url": null - } - ], - "keywords": [ - "filepost", - "http", - "httplib", - "https", - "pooling", - "ssl", - "threadsafe", - "urllib", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz", - "size": 300677, - "sha1": null, - "md5": "d65de4f0effae2b52669246f0aab0a91", - "sha256": "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/urllib3/urllib3", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.2.3/json", - "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.2.3" } ], "resolved_dependencies_graph": [ { - "package": "pkg:pypi/azure-core@1.32.0", + "package": "pkg:pypi/azure-core@1.33.0", "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2535,10 +1339,10 @@ { "package": "pkg:pypi/azure-storage-blob@12.25.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.0" + "pkg:pypi/typing-extensions@4.13.1" ] }, { @@ -2576,7 +1380,7 @@ { "package": "pkg:pypi/msrest@0.7.1", "dependencies": [ - "pkg:pypi/azure-core@1.32.0", + "pkg:pypi/azure-core@1.33.0", "pkg:pypi/certifi@2025.1.31", "pkg:pypi/isodate@0.7.2", "pkg:pypi/requests-oauthlib@2.0.0", @@ -2612,7 +1416,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.0", + "package": "pkg:pypi/typing-extensions@4.13.1", "dependencies": [] }, { diff --git a/tests/data/insecure-setup-2/setup.py-expected.json b/tests/data/insecure-setup-2/setup.py-expected.json index af67bb99..f300166e 100644 --- a/tests/data/insecure-setup-2/setup.py-expected.json +++ b/tests/data/insecure-setup-2/setup.py-expected.json @@ -179,75 +179,6 @@ "datasource_id": null, "purl": "pkg:pypi/amqp@2.6.1" }, - { - "type": "pypi", - "namespace": null, - "name": "amqp", - "version": "2.6.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Low-level AMQP client for Python (fork of amqplib).", - "release_date": "2020-07-31T16:32:31", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Barry Pederson", - "email": "pyamqp@celeryproject.org", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Asif Saif Uddin, Matus Valo", - "email": null, - "url": null - } - ], - "keywords": [ - "amqp rabbitmq cloudamqp messaging", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8" - ], - "homepage_url": "http://github.com/celery/py-amqp", - "download_url": "https://files.pythonhosted.org/packages/37/9f/d54494a157d0dcd1673fe7a1bcce7ac70d3eb6d5d6149749450c87a2c959/amqp-2.6.1.tar.gz", - "size": 119956, - "sha1": null, - "md5": "c8cf9c75d7cd2e747fa49f3e3c47b3b1", - "sha256": "70cdb10628468ff14e57ec2f751c7aa9e48e7e3651cfd62d431213c0c4e58f21", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/amqp/2.6.1/json", - "datasource_id": null, - "purl": "pkg:pypi/amqp@2.6.1" - }, { "type": "pypi", "namespace": null, @@ -313,71 +244,6 @@ "datasource_id": null, "purl": "pkg:pypi/babel@2.9.1" }, - { - "type": "pypi", - "namespace": null, - "name": "babel", - "version": "2.9.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Internationalization utilities\nA collection of tools for internationalizing Python applications.", - "release_date": "2021-04-28T19:31:41", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "http://babel.pocoo.org/", - "download_url": "https://files.pythonhosted.org/packages/17/e6/ec9aa6ac3d00c383a5731cc97ed7c619d3996232c977bb8326bcbb6c687e/Babel-2.9.1.tar.gz", - "size": 8683505, - "sha1": null, - "md5": "7166099733d78aa857d74fa50d8ff58c", - "sha256": "bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/babel/2.9.1/json", - "datasource_id": null, - "purl": "pkg:pypi/babel@2.9.1" - }, { "type": "pypi", "namespace": null, @@ -439,67 +305,6 @@ "datasource_id": null, "purl": "pkg:pypi/backports-functools-lru-cache@1.6.6" }, - { - "type": "pypi", - "namespace": null, - "name": "backports-functools-lru-cache", - "version": "1.6.6", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": ".. image:: https://img.shields.io/pypi/v/backports.functools_lru_cache.svg\n :target: https://pypi.org/project/backports.functools_lru_cache\n\n.. image:: https://img.shields.io/pypi/pyversions/backports.functools_lru_cache.svg\n\n.. image:: https://github.com/jaraco/backports.functools_lru_cache/workflows/tests/badge.svg\n :target: https://github.com/jaraco/backports.functools_lru_cache/actions?query=workflow%3A%22tests%22\n :alt: tests\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\n :target: https://github.com/astral-sh/ruff\n :alt: Ruff\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code style: Black\n\n.. image:: https://readthedocs.org/projects/backportsfunctools_lru_cache/badge/?version=latest\n :target: https://backportsfunctools_lru_cache.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2023-informational\n :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/backports.functools_lru_cache\n :target: https://tidelift.com/subscription/pkg/pypi-backports.functools_lru_cache?utm_source=pypi-backports.functools_lru_cache&utm_medium=readme\n\nBackport of functools.lru_cache from Python 3.3 as published at `ActiveState\n`_.\n\nUsage\n=====\n\nConsider using this technique for importing the 'lru_cache' function::\n\n try:\n from functools import lru_cache\n except ImportError:\n from backports.functools_lru_cache import lru_cache\n\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more `_.", - "release_date": "2023-07-09T20:41:51", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Raymond Hettinger", - "email": "raymond.hettinger@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Jason R. Coombs", - "email": "jaraco@jaraco.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3" - ], - "homepage_url": "https://github.com/jaraco/backports.functools_lru_cache", - "download_url": "https://files.pythonhosted.org/packages/97/ea/a7519e2ea83afe9e7fd845c0279dfe7052be8f3277a259d8a35eae8ce461/backports.functools_lru_cache-1.6.6.tar.gz", - "size": 10582, - "sha1": null, - "md5": "1a407cf2874f17522f38f85c391fc7b4", - "sha256": "7b70e701ba4db58c0ed8671a9d3391b0abb9bd1bc24d4e90c3480f4baafcc2dc", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/backports-functools-lru-cache/1.6.6/json", - "datasource_id": null, - "purl": "pkg:pypi/backports-functools-lru-cache@1.6.6" - }, { "type": "pypi", "namespace": null, @@ -554,60 +359,6 @@ "datasource_id": null, "purl": "pkg:pypi/backports-shutil-get-terminal-size@1.0.0" }, - { - "type": "pypi", - "namespace": null, - "name": "backports-shutil-get-terminal-size", - "version": "1.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A backport of the get_terminal_size function from Python 3.3's shutil.\nbackports.shutil_get_terminal_size\r\n==================================\r\n\r\nA backport of the `get_terminal_size`_ function from Python 3.3's shutil.\r\n\r\nUnlike the original version it is written in pure Python rather than C,\r\nso it might be a tiny bit slower.\r\n\r\n.. _get_terminal_size: https://docs.python.org/3/library/shutil.html#shutil.get_terminal_size\r\n\r\n\r\nExample usage\r\n-------------\r\n\r\n::\r\n\r\n >>> from backports.shutil_get_terminal_size import get_terminal_size\r\n >>> get_terminal_size()\r\n terminal_size(columns=105, lines=33)\r\n\r\n\r\nHistory\r\n=======\r\n\r\n1.0.0 (2014-08-19)\r\n------------------\r\n\r\nFirst release.", - "release_date": "2014-08-19T18:42:49", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Christopher Rosell", - "email": "chrippa@tanuki.se", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.2" - ], - "homepage_url": "https://github.com/chrippa/backports.shutil_get_terminal_size", - "download_url": "https://files.pythonhosted.org/packages/ec/9c/368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/backports.shutil_get_terminal_size-1.0.0.tar.gz", - "size": 4279, - "sha1": null, - "md5": "03267762480bd86b50580dc19dff3c66", - "sha256": "713e7a8228ae80341c70586d1cc0a8caa5207346927e23d09dcbcaf18eadec80", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/backports-shutil-get-terminal-size/1.0.0/json", - "datasource_id": null, - "purl": "pkg:pypi/backports-shutil-get-terminal-size@1.0.0" - }, { "type": "pypi", "namespace": null, @@ -750,91 +501,28 @@ { "type": "pypi", "namespace": null, - "name": "blinker", - "version": "1.5", + "name": "cairocffi", + "version": "0.9.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Fast, simple object-to-object and broadcast signaling\nBlinker\n=======\n\nBlinker provides a fast dispatching system that allows any number of\ninterested parties to subscribe to events, or \"signals\".\n\nSignal receivers can subscribe to specific senders or receive signals\nsent by any sender.\n\n.. code-block:: pycon\n\n >>> from blinker import signal\n >>> started = signal('round-started')\n >>> def each(round):\n ... print \"Round %s!\" % round\n ...\n >>> started.connect(each)\n\n >>> def round_two(round):\n ... print \"This is round two.\"\n ...\n >>> started.connect(round_two, sender=2)\n\n >>> for round in range(1, 4):\n ... started.send(round)\n ...\n Round 1!\n Round 2!\n This is round two.\n Round 3!\n\n\nLinks\n-----\n\n- Documentation: https://blinker.readthedocs.io/\n- Changes: https://blinker.readthedocs.io/#changes\n- PyPI Releases: https://pypi.org/project/blinker/\n- Source Code: https://github.com/pallets-eco/blinker/\n- Issue Tracker: https://github.com/pallets-eco/blinker/issues/", - "release_date": "2022-07-17T17:40:05", + "description": "cffi-based cairo bindings for Python\ncairocffi\n=========\n\ncairocffi is a `CFFI`_-based drop-in replacement for Pycairo_,\na set of Python bindings and object-oriented API for cairo_.\nCairo is a 2D vector graphics library with support for multiple backends\nincluding image buffers, PNG, PostScript, PDF, and SVG file output.\n\nAdditionally, the :mod:`cairocffi.pixbuf` module uses GDK-PixBuf_\nto decode various image formats for use in cairo.\n\n.. _CFFI: https://cffi.readthedocs.org/\n.. _Pycairo: https://pycairo.readthedocs.io/\n.. _cairo: http://cairographics.org/\n.. _GDK-PixBuf: https://gitlab.gnome.org/GNOME/gdk-pixbuf\n\n* `Latest documentation `_\n* `Source code and issue tracker `_\n on GitHub.\n* Install with ``pip install cairocffi``\n* Python 2.6, 2.7 and 3.4+. `Tested with CPython, PyPy and PyPy3\n `_.\n* API partially compatible with Pycairo.\n* Works with any version of cairo.", + "release_date": "2018-08-06T15:48:20", "parties": [ { "type": "person", "role": "author", - "name": "Jason Kirtland", - "email": "jek@discorporate.us", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Pallets Ecosystem", - "email": "contact@palletsprojects.com", + "name": "Simon Sapin", + "email": "simon.sapin@exyr.org", "url": null } ], "keywords": [ - "signal emit events broadcast", - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": "https://blinker.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/2b/12/82786486cefb68685bb1c151730f510b0f4e5d621d77f245bc0daf9a6c64/blinker-1.5.tar.gz", - "size": 27022, - "sha1": null, - "md5": "e1c3eec8e52210f69ef59d299c6cca07", - "sha256": "923e5e2f69c155f2cc42dafbbd70e16e3fde24d2d4aa2ab72fbe386238892462", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets-eco/blinker", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/blinker/1.5/json", - "datasource_id": null, - "purl": "pkg:pypi/blinker@1.5" - }, - { - "type": "pypi", - "namespace": null, - "name": "cairocffi", - "version": "0.9.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "cffi-based cairo bindings for Python\ncairocffi\n=========\n\ncairocffi is a `CFFI`_-based drop-in replacement for Pycairo_,\na set of Python bindings and object-oriented API for cairo_.\nCairo is a 2D vector graphics library with support for multiple backends\nincluding image buffers, PNG, PostScript, PDF, and SVG file output.\n\nAdditionally, the :mod:`cairocffi.pixbuf` module uses GDK-PixBuf_\nto decode various image formats for use in cairo.\n\n.. _CFFI: https://cffi.readthedocs.org/\n.. _Pycairo: https://pycairo.readthedocs.io/\n.. _cairo: http://cairographics.org/\n.. _GDK-PixBuf: https://gitlab.gnome.org/GNOME/gdk-pixbuf\n\n* `Latest documentation `_\n* `Source code and issue tracker `_\n on GitHub.\n* Install with ``pip install cairocffi``\n* Python 2.6, 2.7 and 3.4+. `Tested with CPython, PyPy and PyPy3\n `_.\n* API partially compatible with Pycairo.\n* Works with any version of cairo.", - "release_date": "2018-08-06T15:48:20", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Simon Sapin", - "email": "simon.sapin@exyr.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Multimedia :: Graphics" + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Topic :: Multimedia :: Graphics" ], "homepage_url": "https://github.com/SimonSapin/cairocffi", "download_url": "https://files.pythonhosted.org/packages/62/be/ad4d422b6f38d99b09ad6d046ab725e8ccac5fefd9ca256ca35a80dbf3c6/cairocffi-0.9.0.tar.gz", @@ -997,71 +685,6 @@ "datasource_id": null, "purl": "pkg:pypi/celery@4.4.7" }, - { - "type": "pypi", - "namespace": null, - "name": "celery", - "version": "4.4.7", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Distributed Task Queue.\n.. image:: http://docs.celeryproject.org/en/latest/_images/celery-banner-small.png\n\n|build-status| |coverage| |license| |wheel| |pyversion| |pyimp| |ocbackerbadge| |ocsponsorbadge|\n\n:Version: 4.4.7 (cliffs)\n:Web: http://celeryproject.org/\n:Download: https://pypi.org/project/celery/\n:Source: https://github.com/celery/celery/\n:Keywords: task, queue, job, async, rabbitmq, amqp, redis,\n python, distributed, actors\n\nDonations\n=========\n\nThis project relies on your generous donations.\n\nIf you are using Celery to create a commercial product, please consider becoming our `backer`_ or our `sponsor`_ to ensure Celery's future.\n\n.. _`backer`: https://opencollective.com/celery#backer\n.. _`sponsor`: https://opencollective.com/celery#sponsor\n\nFor enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of ``celery`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_\n\nWhat's a Task Queue?\n====================\n\nTask queues are used as a mechanism to distribute work across threads or\nmachines.\n\nA task queue's input is a unit of work, called a task, dedicated worker\nprocesses then constantly monitor the queue for new work to perform.\n\nCelery communicates via messages, usually using a broker\nto mediate between clients and workers. To initiate a task a client puts a\nmessage on the queue, the broker then delivers the message to a worker.\n\nA Celery system can consist of multiple workers and brokers, giving way\nto high availability and horizontal scaling.\n\nCelery is written in Python, but the protocol can be implemented in any\nlanguage. In addition to Python there's node-celery_ for Node.js,\na `PHP client`_, `gocelery`_ for golang, and rusty-celery_ for Rust.\n\nLanguage interoperability can also be achieved by using webhooks\nin such a way that the client enqueues an URL to be requested by a worker.\n\n.. _node-celery: https://github.com/mher/node-celery\n.. _`PHP client`: https://github.com/gjedeer/celery-php\n.. _`gocelery`: https://github.com/gocelery/gocelery\n.. _rusty-celery: https://github.com/rusty-celery/rusty-celery\n\nWhat do I need?\n===============\n\nCelery version 4.4.0 runs on,\n\n- Python (2.7, 3.5, 3.6, 3.7, 3.8)\n- PyPy2.7 (7.2)\n- PyPy3.5 (7.1)\n- PyPy3.6 (7.6)\n\n\n4.x.x is the last version to support Python 2.7,\nand from the next major version (Celery 5.x) Python 3.6 or newer is required.\n\nIf you're running an older version of Python, you need to be running\nan older version of Celery:\n\n- Python 2.6: Celery series 3.1 or earlier.\n- Python 2.5: Celery series 3.0 or earlier.\n- Python 2.4 was Celery series 2.2 or earlier.\n\nCelery is a project with minimal funding,\nso we don't support Microsoft Windows.\nPlease don't open any issues related to that platform.\n\n*Celery* is usually used with a message broker to send and receive messages.\nThe RabbitMQ, Redis transports are feature complete,\nbut there's also experimental support for a myriad of other solutions, including\nusing SQLite for local development.\n\n*Celery* can run on a single machine, on multiple machines, or even\nacross datacenters.\n\nGet Started\n===========\n\nIf this is the first time you're trying to use Celery, or you're\nnew to Celery 4.4 coming from previous versions then you should read our\ngetting started tutorials:\n\n- `First steps with Celery`_\n\n Tutorial teaching you the bare minimum needed to get started with Celery.\n\n- `Next steps`_\n\n A more complete overview, showing more features.\n\n.. _`First steps with Celery`:\n http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html\n\n.. _`Next steps`:\n http://docs.celeryproject.org/en/latest/getting-started/next-steps.html\n\nCelery is...\n=============\n\n- **Simple**\n\n Celery is easy to use and maintain, and does *not need configuration files*.\n\n It has an active, friendly community you can talk to for support,\n like at our `mailing-list`_, or the IRC channel.\n\n Here's one of the simplest applications you can make::\n\n from celery import Celery\n\n app = Celery('hello', broker='amqp://guest@localhost//')\n\n @app.task\n def hello():\n return 'hello world'\n\n- **Highly Available**\n\n Workers and clients will automatically retry in the event\n of connection loss or failure, and some brokers support\n HA in way of *Primary/Primary* or *Primary/Replica* replication.\n\n- **Fast**\n\n A single Celery process can process millions of tasks a minute,\n with sub-millisecond round-trip latency (using RabbitMQ,\n py-librabbitmq, and optimized settings).\n\n- **Flexible**\n\n Almost every part of *Celery* can be extended or used on its own,\n Custom pool implementations, serializers, compression schemes, logging,\n schedulers, consumers, producers, broker transports, and much more.\n\nIt supports...\n================\n\n - **Message Transports**\n\n - RabbitMQ_, Redis_, Amazon SQS\n\n - **Concurrency**\n\n - Prefork, Eventlet_, gevent_, single threaded (``solo``)\n\n - **Result Stores**\n\n - AMQP, Redis\n - memcached\n - SQLAlchemy, Django ORM\n - Apache Cassandra, IronCache, Elasticsearch\n\n - **Serialization**\n\n - *pickle*, *json*, *yaml*, *msgpack*.\n - *zlib*, *bzip2* compression.\n - Cryptographic message signing.\n\n.. _`Eventlet`: http://eventlet.net/\n.. _`gevent`: http://gevent.org/\n\n.. _RabbitMQ: https://rabbitmq.com\n.. _Redis: https://redis.io\n.. _SQLAlchemy: http://sqlalchemy.org\n\nFramework Integration\n=====================\n\nCelery is easy to integrate with web frameworks, some of which even have\nintegration packages:\n\n +--------------------+------------------------+\n | `Django`_ | not needed |\n +--------------------+------------------------+\n | `Pyramid`_ | `pyramid_celery`_ |\n +--------------------+------------------------+\n | `Pylons`_ | `celery-pylons`_ |\n +--------------------+------------------------+\n | `Flask`_ | not needed |\n +--------------------+------------------------+\n | `web2py`_ | `web2py-celery`_ |\n +--------------------+------------------------+\n | `Tornado`_ | `tornado-celery`_ |\n +--------------------+------------------------+\n\nThe integration packages aren't strictly necessary, but they can make\ndevelopment easier, and sometimes they add important hooks like closing\ndatabase connections at ``fork``.\n\n.. _`Django`: https://djangoproject.com/\n.. _`Pylons`: http://pylonsproject.org/\n.. _`Flask`: http://flask.pocoo.org/\n.. _`web2py`: http://web2py.com/\n.. _`Bottle`: https://bottlepy.org/\n.. _`Pyramid`: http://docs.pylonsproject.org/en/latest/docs/pyramid.html\n.. _`pyramid_celery`: https://pypi.org/project/pyramid_celery/\n.. _`celery-pylons`: https://pypi.org/project/celery-pylons/\n.. _`web2py-celery`: https://code.google.com/p/web2py-celery/\n.. _`Tornado`: http://www.tornadoweb.org/\n.. _`tornado-celery`: https://github.com/mher/tornado-celery/\n\n.. _celery-documentation:\n\nDocumentation\n=============\n\nThe `latest documentation`_ is hosted at Read The Docs, containing user guides,\ntutorials, and an API reference.\n\n\u6700\u65b0\u7684\u4e2d\u6587\u6587\u6863\u6258\u7ba1\u5728 https://www.celerycn.io/ \u4e2d\uff0c\u5305\u542b\u7528\u6237\u6307\u5357\u3001\u6559\u7a0b\u3001API\u63a5\u53e3\u7b49\u3002\n\n.. _`latest documentation`: http://docs.celeryproject.org/en/latest/\n\n.. _celery-installation:\n\nInstallation\n============\n\nYou can install Celery either via the Python Package Index (PyPI)\nor from source.\n\nTo install using ``pip``:\n\n::\n\n\n $ pip install -U Celery\n\n.. _bundles:\n\nBundles\n-------\n\nCelery also defines a group of bundles that can be used\nto install Celery and the dependencies for a given feature.\n\nYou can specify these in your requirements or on the ``pip``\ncommand-line by using brackets. Multiple bundles can be specified by\nseparating them by commas.\n\n::\n\n\n $ pip install \"celery[librabbitmq]\"\n\n $ pip install \"celery[librabbitmq,redis,auth,msgpack]\"\n\nThe following bundles are available:\n\nSerializers\n~~~~~~~~~~~\n\n:``celery[auth]``:\n for using the ``auth`` security serializer.\n\n:``celery[msgpack]``:\n for using the msgpack serializer.\n\n:``celery[yaml]``:\n for using the yaml serializer.\n\nConcurrency\n~~~~~~~~~~~\n\n:``celery[eventlet]``:\n for using the ``eventlet`` pool.\n\n:``celery[gevent]``:\n for using the ``gevent`` pool.\n\nTransports and Backends\n~~~~~~~~~~~~~~~~~~~~~~~\n\n:``celery[librabbitmq]``:\n for using the librabbitmq C library.\n\n:``celery[redis]``:\n for using Redis as a message transport or as a result backend.\n\n:``celery[sqs]``:\n for using Amazon SQS as a message transport.\n\n:``celery[tblib``]:\n for using the ``task_remote_tracebacks`` feature.\n\n:``celery[memcache]``:\n for using Memcached as a result backend (using ``pylibmc``)\n\n:``celery[pymemcache]``:\n for using Memcached as a result backend (pure-Python implementation).\n\n:``celery[cassandra]``:\n for using Apache Cassandra as a result backend with DataStax driver.\n\n:``celery[azureblockblob]``:\n for using Azure Storage as a result backend (using ``azure-storage``)\n\n:``celery[s3]``:\n for using S3 Storage as a result backend.\n\n:``celery[couchbase]``:\n for using Couchbase as a result backend.\n\n:``celery[arangodb]``:\n for using ArangoDB as a result backend.\n\n:``celery[elasticsearch]``:\n for using Elasticsearch as a result backend.\n\n:``celery[riak]``:\n for using Riak as a result backend.\n\n:``celery[cosmosdbsql]``:\n for using Azure Cosmos DB as a result backend (using ``pydocumentdb``)\n\n:``celery[zookeeper]``:\n for using Zookeeper as a message transport.\n\n:``celery[sqlalchemy]``:\n for using SQLAlchemy as a result backend (*supported*).\n\n:``celery[pyro]``:\n for using the Pyro4 message transport (*experimental*).\n\n:``celery[slmq]``:\n for using the SoftLayer Message Queue transport (*experimental*).\n\n:``celery[consul]``:\n for using the Consul.io Key/Value store as a message transport or result backend (*experimental*).\n\n:``celery[django]``:\n specifies the lowest version possible for Django support.\n\n You should probably not use this in your requirements, it's here\n for informational purposes only.\n\n\n.. _celery-installing-from-source:\n\nDownloading and installing from source\n--------------------------------------\n\nDownload the latest version of Celery from PyPI:\n\nhttps://pypi.org/project/celery/\n\nYou can install it by doing the following,:\n\n::\n\n\n $ tar xvfz celery-0.0.0.tar.gz\n $ cd celery-0.0.0\n $ python setup.py build\n # python setup.py install\n\nThe last command must be executed as a privileged user if\nyou aren't currently using a virtualenv.\n\n.. _celery-installing-from-git:\n\nUsing the development version\n-----------------------------\n\nWith pip\n~~~~~~~~\n\nThe Celery development version also requires the development\nversions of ``kombu``, ``amqp``, ``billiard``, and ``vine``.\n\nYou can install the latest snapshot of these using the following\npip commands:\n\n::\n\n\n $ pip install https://github.com/celery/celery/zipball/master#egg=celery\n $ pip install https://github.com/celery/billiard/zipball/master#egg=billiard\n $ pip install https://github.com/celery/py-amqp/zipball/master#egg=amqp\n $ pip install https://github.com/celery/kombu/zipball/master#egg=kombu\n $ pip install https://github.com/celery/vine/zipball/master#egg=vine\n\nWith git\n~~~~~~~~\n\nPlease see the Contributing section.\n\n.. _getting-help:\n\nGetting Help\n============\n\n.. _mailing-list:\n\nMailing list\n------------\n\nFor discussions about the usage, development, and future of Celery,\nplease join the `celery-users`_ mailing list.\n\n.. _`celery-users`: https://groups.google.com/group/celery-users/\n\n.. _irc-channel:\n\nIRC\n---\n\nCome chat with us on IRC. The **#celery** channel is located at the `Freenode`_\nnetwork.\n\n.. _`Freenode`: https://freenode.net\n\n.. _bug-tracker:\n\nBug tracker\n===========\n\nIf you have any suggestions, bug reports, or annoyances please report them\nto our issue tracker at https://github.com/celery/celery/issues/\n\n.. _wiki:\n\nWiki\n====\n\nhttps://github.com/celery/celery/wiki\n\nCredits\n=======\n\n.. _contributing-short:\n\nContributors\n------------\n\nThis project exists thanks to all the people who contribute. Development of\n`celery` happens at GitHub: https://github.com/celery/celery\n\nYou're highly encouraged to participate in the development\nof `celery`. If you don't like GitHub (for some reason) you're welcome\nto send regular patches.\n\nBe sure to also read the `Contributing to Celery`_ section in the\ndocumentation.\n\n.. _`Contributing to Celery`:\n http://docs.celeryproject.org/en/master/contributing.html\n\n|oc-contributors|\n\n.. |oc-contributors| image:: https://opencollective.com/celery/contributors.svg?width=890&button=false\n :target: https://github.com/celery/celery/graphs/contributors\n\nBackers\n-------\n\nThank you to all our backers! \ud83d\ude4f [`Become a backer`_]\n\n.. _`Become a backer`: https://opencollective.com/celery#backer\n\n|oc-backers|\n\n.. |oc-backers| image:: https://opencollective.com/celery/backers.svg?width=890\n :target: https://opencollective.com/celery#backers\n\nSponsors\n--------\n\nSupport this project by becoming a sponsor. Your logo will show up here with a\nlink to your website. [`Become a sponsor`_]\n\n.. _`Become a sponsor`: https://opencollective.com/celery#sponsor\n\n|oc-sponsors|\n\n.. |oc-sponsors| image:: https://opencollective.com/celery/sponsor/0/avatar.svg\n :target: https://opencollective.com/celery/sponsor/0/website\n\n.. _license:\n\nLicense\n=======\n\nThis software is licensed under the `New BSD License`. See the ``LICENSE``\nfile in the top distribution directory for the full license text.\n\n.. # vim: syntax=rst expandtab tabstop=4 shiftwidth=4 shiftround\n\n.. |build-status| image:: https://secure.travis-ci.org/celery/celery.png?branch=master\n :alt: Build status\n :target: https://travis-ci.org/celery/celery\n\n.. |coverage| image:: https://codecov.io/github/celery/celery/coverage.svg?branch=master\n :target: https://codecov.io/github/celery/celery?branch=master\n\n.. |license| image:: https://img.shields.io/pypi/l/celery.svg\n :alt: BSD License\n :target: https://opensource.org/licenses/BSD-3-Clause\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/celery.svg\n :alt: Celery can be installed via wheel\n :target: https://pypi.org/project/celery/\n\n.. |pyversion| image:: https://img.shields.io/pypi/pyversions/celery.svg\n :alt: Supported Python versions.\n :target: https://pypi.org/project/celery/\n\n.. |pyimp| image:: https://img.shields.io/pypi/implementation/celery.svg\n :alt: Support Python implementations.\n :target: https://pypi.org/project/celery/\n\n.. |ocbackerbadge| image:: https://opencollective.com/celery/backers/badge.svg\n :alt: Backers on Open Collective\n :target: #backers\n\n.. |ocsponsorbadge| image:: https://opencollective.com/celery/sponsors/badge.svg\n :alt: Sponsors on Open Collective\n :target: #sponsors\n\n.. |downloads| image:: https://pepy.tech/badge/celery\n :alt: Downloads\n :target: https://pepy.tech/project/celery", - "release_date": "2020-07-31T17:42:18", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ask Solem", - "email": "auvipy@gmail.com", - "url": null - } - ], - "keywords": [ - "task job queue distributed messaging actor", - "Development Status :: 5 - Production/Stable", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Object Brokering", - "Topic :: System :: Distributed Computing" - ], - "homepage_url": "http://celeryproject.org", - "download_url": "https://files.pythonhosted.org/packages/fe/58/c7ced9705c2cedf526e183e428d1b145910cb8bc7ea537a2ec9a6552c056/celery-4.4.7.tar.gz", - "size": 1469812, - "sha1": null, - "md5": "62906067bd50c4e7e97f0b27f44f6bac", - "sha256": "d220b13a8ed57c78149acf82c006785356071844afe0b27012a4991d44026f9f", - "sha512": null, - "bug_tracking_url": "https://github.com/celery/celery/issues", - "code_view_url": "https://github.com/celery/celery", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/celery/4.4.7/json", - "datasource_id": null, - "purl": "pkg:pypi/celery@4.4.7" - }, { "type": "pypi", "namespace": null, @@ -1123,67 +746,6 @@ "datasource_id": null, "purl": "pkg:pypi/cffi@1.15.1" }, - { - "type": "pypi", - "namespace": null, - "name": "cffi", - "version": "1.15.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "CFFI\n====\n\nForeign Function Interface for Python calling C code.\nPlease see the `Documentation `_.\n\nContact\n-------\n\n`Mailing list `_", - "release_date": "2022-06-30T18:18:32", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Rigo, Maciej Fijalkowski", - "email": "python-cffi@googlegroups.com", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "http://cffi.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz", - "size": 508501, - "sha1": null, - "md5": "f493860a6e98cd0c4178149568a6b4f6", - "sha256": "d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/cffi/1.15.1/json", - "datasource_id": null, - "purl": "pkg:pypi/cffi@1.15.1" - }, { "type": "pypi", "namespace": null, @@ -1240,62 +802,6 @@ "datasource_id": null, "purl": "pkg:pypi/click@7.1.2" }, - { - "type": "pypi", - "namespace": null, - "name": "click", - "version": "7.1.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Composable command line interface toolkit\n\\$ click\\_\n==========\n\nClick is a Python package for creating beautiful command line interfaces\nin a composable way with as little code as necessary. It's the \"Command\nLine Interface Creation Kit\". It's highly configurable but comes with\nsensible defaults out of the box.\n\nIt aims to make the process of writing command line tools quick and fun\nwhile also preventing any frustration caused by the inability to\nimplement an intended CLI API.\n\nClick in three points:\n\n- Arbitrary nesting of commands\n- Automatic help page generation\n- Supports lazy loading of subcommands at runtime\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U click\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n import click\n\n @click.command()\n @click.option(\"--count\", default=1, help=\"Number of greetings.\")\n @click.option(\"--name\", prompt=\"Your name\", help=\"The person to greet.\")\n def hello(count, name):\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\n for _ in range(count):\n click.echo(f\"Hello, {name}!\")\n\n if __name__ == '__main__':\n hello()\n\n.. code-block:: text\n\n $ python hello.py --count=3\n Your name: Click\n Hello, Click!\n Hello, Click!\n Hello, Click!\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Click and other popular\npackages. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Website: https://palletsprojects.com/p/click/\n- Documentation: https://click.palletsprojects.com/\n- Releases: https://pypi.org/project/click/\n- Code: https://github.com/pallets/click\n- Issue tracker: https://github.com/pallets/click/issues\n- Test status: https://dev.azure.com/pallets/click/_build\n- Official chat: https://discord.gg/t6rrQZH", - "release_date": "2020-04-27T20:22:45", - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": "Pallets", - "email": "contact@palletsprojects.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3" - ], - "homepage_url": "https://palletsprojects.com/p/click/", - "download_url": "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz", - "size": 297279, - "sha1": null, - "md5": "53692f62cb99a1a10c59248f1776d9c0", - "sha256": "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/click", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/click/7.1.2/json", - "datasource_id": null, - "purl": "pkg:pypi/click@7.1.2" - }, { "type": "pypi", "namespace": null, @@ -1360,42 +866,38 @@ { "type": "pypi", "namespace": null, - "name": "configparser", - "version": "4.0.2", + "name": "contextlib2", + "version": "0.6.0.post1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Updated configparser from Python 3.7 for Python 2.6+.\n.. image:: https://img.shields.io/pypi/v/configparser.svg\n :target: https://pypi.org/project/configparser\n\n.. image:: https://img.shields.io/pypi/pyversions/configparser.svg\n\n.. image:: https://img.shields.io/travis/jaraco/configparser/master.svg\n :target: https://travis-ci.org/jaraco/configparser\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n :alt: Code style: Black\n\n.. .. image:: https://img.shields.io/appveyor/ci/jaraco/configparser/master.svg\n.. :target: https://ci.appveyor.com/project/jaraco/configparser/branch/master\n\n.. image:: https://readthedocs.org/projects/configparser/badge/?version=latest\n :target: https://configparser.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://tidelift.com/badges/package/pypi/configparser\n :target: https://tidelift.com/subscription/pkg/pypi-configparser?utm_source=pypi-configparser&utm_medium=readme\n\n\nThe ancient ``ConfigParser`` module available in the standard library 2.x has\nseen a major update in Python 3.2. This is a backport of those changes so that\nthey can be used directly in Python 2.6 - 3.5.\n\nTo use the ``configparser`` backport instead of the built-in version on both\nPython 2 and Python 3, simply import it explicitly as a backport::\n\n from backports import configparser\n\nIf you'd like to use the backport on Python 2 and the built-in version on\nPython 3, use that invocation instead::\n\n import configparser\n\nFor detailed documentation consult the vanilla version at\nhttp://docs.python.org/3/library/configparser.html.\n\nWhy you'll love ``configparser``\n--------------------------------\n\nWhereas almost completely compatible with its older brother, ``configparser``\nsports a bunch of interesting new features:\n\n* full mapping protocol access (`more info\n `_)::\n\n >>> parser = ConfigParser()\n >>> parser.read_string(\"\"\"\n [DEFAULT]\n location = upper left\n visible = yes\n editable = no\n color = blue\n\n [main]\n title = Main Menu\n color = green\n\n [options]\n title = Options\n \"\"\")\n >>> parser['main']['color']\n 'green'\n >>> parser['main']['editable']\n 'no'\n >>> section = parser['options']\n >>> section['title']\n 'Options'\n >>> section['title'] = 'Options (editable: %(editable)s)'\n >>> section['title']\n 'Options (editable: no)'\n\n* there's now one default ``ConfigParser`` class, which basically is the old\n ``SafeConfigParser`` with a bunch of tweaks which make it more predictable for\n users. Don't need interpolation? Simply use\n ``ConfigParser(interpolation=None)``, no need to use a distinct\n ``RawConfigParser`` anymore.\n\n* the parser is highly `customizable upon instantiation\n `__\n supporting things like changing option delimiters, comment characters, the\n name of the DEFAULT section, the interpolation syntax, etc.\n\n* you can easily create your own interpolation syntax but there are two powerful\n implementations built-in (`more info\n `__):\n\n * the classic ``%(string-like)s`` syntax (called ``BasicInterpolation``)\n\n * a new ``${buildout:like}`` syntax (called ``ExtendedInterpolation``)\n\n* fallback values may be specified in getters (`more info\n `__)::\n\n >>> config.get('closet', 'monster',\n ... fallback='No such things as monsters')\n 'No such things as monsters'\n\n* ``ConfigParser`` objects can now read data directly `from strings\n `__\n and `from dictionaries\n `__.\n That means importing configuration from JSON or specifying default values for\n the whole configuration (multiple sections) is now a single line of code. Same\n goes for copying data from another ``ConfigParser`` instance, thanks to its\n mapping protocol support.\n\n* many smaller tweaks, updates and fixes\n\nA few words about Unicode\n-------------------------\n\n``configparser`` comes from Python 3 and as such it works well with Unicode.\nThe library is generally cleaned up in terms of internal data storage and\nreading/writing files. There are a couple of incompatibilities with the old\n``ConfigParser`` due to that. However, the work required to migrate is well\nworth it as it shows the issues that would likely come up during migration of\nyour project to Python 3.\n\nThe design assumes that Unicode strings are used whenever possible [1]_. That\ngives you the certainty that what's stored in a configuration object is text.\nOnce your configuration is read, the rest of your application doesn't have to\ndeal with encoding issues. All you have is text [2]_. The only two phases when\nyou should explicitly state encoding is when you either read from an external\nsource (e.g. a file) or write back.\n\nVersioning\n----------\n\nThis project uses `semver `_ to\ncommunicate the impact of various releases while periodically syncing\nwith the upstream implementation in CPython.\n`The changelog `_\nserves as a reference indicating which versions incorporate\nwhich upstream functionality.\n\nPrior to the ``4.0.0`` release, `another scheme\n`_\nwas used to associate the CPython and backports releases.\n\nMaintenance\n-----------\n\nThis backport was originally authored by \u0141ukasz Langa, the current vanilla\n``configparser`` maintainer for CPython and is currently maintained by\nJason R. Coombs:\n\n* `configparser repository `_\n\n* `configparser issue tracker `_\n\nSecurity Contact\n----------------\n\nTo report a security vulnerability, please use the\n`Tidelift security contact `_.\nTidelift will coordinate the fix and disclosure.\n\nConversion Process\n------------------\n\nThis section is technical and should bother you only if you are wondering how\nthis backport is produced. If the implementation details of this backport are\nnot important for you, feel free to ignore the following content.\n\n``configparser`` is converted using `python-future\n`_. The project takes the following\nbranching approach:\n\n* the ``3.x`` branch holds unchanged files synchronized from the upstream\n CPython repository. The synchronization is currently done by manually copying\n the required files and stating from which CPython changeset they come from.\n\n* the ``master`` branch holds a version of the ``3.x`` code with some tweaks\n that make it independent from libraries and constructions unavailable on 2.x.\n Code on this branch still *must* work on the corresponding Python 3.x but\n will also work on Python 2.6 and 2.7 (including PyPy). You can check this\n running the supplied unit tests with ``tox``.\n\nThe process works like this:\n\n1. In the ``3.x`` branch, run ``pip-run -- sync-upstream.py``, which\n downloads the latest stable release of Python and copies the relevant\n files from there into their new locations here and then commits those\n changes with a nice reference to the relevant upstream commit hash.\n\n2. I check for new names in ``__all__`` and update imports in\n ``configparser.py`` accordingly. I run the tests on Python 3. Commit.\n\n3. I merge the new commit to ``master``. I run ``tox``. Commit.\n\n4. If there are necessary changes, I do them now (on ``master``). Note that\n the changes should be written in the syntax subset supported by Python\n 2.6.\n\n5. I run ``tox``. If it works, I update the docs and release the new version.\n Otherwise, I go back to point 3. I might use ``pasteurize`` to suggest me\n required changes but usually I do them manually to keep resulting code in\n a nicer form.\n\n\nFootnotes\n---------\n\n.. [1] To somewhat ease migration, passing bytestrings is still supported but\n they are converted to Unicode for internal storage anyway. This means\n that for the vast majority of strings used in configuration files, it\n won't matter if you pass them as bytestrings or Unicode. However, if you\n pass a bytestring that cannot be converted to Unicode using the naive\n ASCII codec, a ``UnicodeDecodeError`` will be raised. This is purposeful\n and helps you manage proper encoding for all content you store in\n memory, read from various sources and write back.\n\n.. [2] Life gets much easier when you understand that you basically manage\n **text** in your application. You don't care about bytes but about\n letters. In that regard the concept of content encoding is meaningless.\n The only time when you deal with raw bytes is when you write the data to\n a file. Then you have to specify how your text should be encoded. On\n the other end, to get meaningful text from a file, the application\n reading it has to know which encoding was used during its creation. But\n once the bytes are read and properly decoded, all you have is text. This\n is especially powerful when you start interacting with multiple data\n sources. Even if each of them uses a different encoding, inside your\n application data is held in abstract text form. You can program your\n business logic without worrying about which data came from which source.\n You can freely exchange the data you store between sources. Only\n reading/writing files requires encoding your text to bytes.", - "release_date": "2019-09-12T07:46:40", + "description": "Backports and enhancements for the contextlib module\n.. image:: https://jazzband.co/static/img/badge.svg\n :target: https://jazzband.co/\n :alt: Jazzband\n\n.. image:: https://readthedocs.org/projects/contextlib2/badge/?version=latest\n :target: https://contextlib2.readthedocs.org/\n :alt: Latest Docs\n\n.. image:: https://img.shields.io/travis/jazzband/contextlib2/master.svg\n :target: http://travis-ci.org/jazzband/contextlib2\n\n.. image:: https://coveralls.io/repos/github/jazzband/contextlib2/badge.svg?branch=master\n :target: https://coveralls.io/github/jazzband/contextlib2?branch=master\n\n.. image:: https://landscape.io/github/jazzband/contextlib2/master/landscape.svg\n :target: https://landscape.io/github/jazzband/contextlib2/\n\ncontextlib2 is a backport of the `standard library's contextlib\nmodule `_ to\nearlier Python versions.\n\nIt also serves as a real world proving ground for possible future\nenhancements to the standard library version.\n\nDevelopment\n-----------\n\ncontextlib2 has no runtime dependencies, but requires ``unittest2`` for testing\non Python 2.x, as well as ``setuptools`` and ``wheel`` to generate universal\nwheel archives.\n\nLocal testing is just a matter of running ``python test_contextlib2.py``.\n\nYou can test against multiple versions of Python with\n`tox `_::\n\n pip install tox\n tox\n\nVersions currently tested in both tox and Travis CI are:\n\n* CPython 2.7\n* CPython 3.4\n* CPython 3.5\n* CPython 3.6\n* CPython 3.7\n* PyPy\n* PyPy3", + "release_date": "2019-10-10T12:47:48", "parties": [ { "type": "person", "role": "author", - "name": "\u0141ukasz Langa", - "email": "lukasz@langa.pl", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Jason R. Coombs", - "email": "jaraco@jaraco.com", + "name": "Nick Coghlan", + "email": "ncoghlan@gmail.com", "url": null } ], "keywords": [ - "configparser ini parsing conf cfg configuration file", "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3" + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7" ], - "homepage_url": "https://github.com/jaraco/configparser/", - "download_url": "https://files.pythonhosted.org/packages/16/4f/48975536bd488d3a272549eb795ac4a13a5f7fcdc8995def77fbef3532ee/configparser-4.0.2.tar.gz", - "size": 72498, + "homepage_url": "http://contextlib2.readthedocs.org", + "download_url": "https://files.pythonhosted.org/packages/85/60/370352f7ef6aa96c52fb001831622f50f923c1d575427d021b8ab3311236/contextlib2-0.6.0.post1-py2.py3-none-any.whl", + "size": 9770, "sha1": null, - "md5": "35926cc4b9133f1f9ca70a1fd2fdf237", - "sha256": "c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df", + "md5": "3cbfdffaa11f340df1ea6345013bcbd4", + "sha256": "3355078a159fbb44ee60ea80abd0d87b80b78c248643b49aa6d94673b413609b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1403,8 +905,9 @@ "copyright": null, "license_expression": null, "declared_license": { + "license": "PSF License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Python Software Foundation License" ] }, "notice_text": null, @@ -1414,123 +917,7 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/configparser/4.0.2/json", - "datasource_id": null, - "purl": "pkg:pypi/configparser@4.0.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "contextlib2", - "version": "0.6.0.post1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backports and enhancements for the contextlib module\n.. image:: https://jazzband.co/static/img/badge.svg\n :target: https://jazzband.co/\n :alt: Jazzband\n\n.. image:: https://readthedocs.org/projects/contextlib2/badge/?version=latest\n :target: https://contextlib2.readthedocs.org/\n :alt: Latest Docs\n\n.. image:: https://img.shields.io/travis/jazzband/contextlib2/master.svg\n :target: http://travis-ci.org/jazzband/contextlib2\n\n.. image:: https://coveralls.io/repos/github/jazzband/contextlib2/badge.svg?branch=master\n :target: https://coveralls.io/github/jazzband/contextlib2?branch=master\n\n.. image:: https://landscape.io/github/jazzband/contextlib2/master/landscape.svg\n :target: https://landscape.io/github/jazzband/contextlib2/\n\ncontextlib2 is a backport of the `standard library's contextlib\nmodule `_ to\nearlier Python versions.\n\nIt also serves as a real world proving ground for possible future\nenhancements to the standard library version.\n\nDevelopment\n-----------\n\ncontextlib2 has no runtime dependencies, but requires ``unittest2`` for testing\non Python 2.x, as well as ``setuptools`` and ``wheel`` to generate universal\nwheel archives.\n\nLocal testing is just a matter of running ``python test_contextlib2.py``.\n\nYou can test against multiple versions of Python with\n`tox `_::\n\n pip install tox\n tox\n\nVersions currently tested in both tox and Travis CI are:\n\n* CPython 2.7\n* CPython 3.4\n* CPython 3.5\n* CPython 3.6\n* CPython 3.7\n* PyPy\n* PyPy3", - "release_date": "2019-10-10T12:47:48", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Nick Coghlan", - "email": "ncoghlan@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" - ], - "homepage_url": "http://contextlib2.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/85/60/370352f7ef6aa96c52fb001831622f50f923c1d575427d021b8ab3311236/contextlib2-0.6.0.post1-py2.py3-none-any.whl", - "size": 9770, - "sha1": null, - "md5": "3cbfdffaa11f340df1ea6345013bcbd4", - "sha256": "3355078a159fbb44ee60ea80abd0d87b80b78c248643b49aa6d94673b413609b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "PSF License", - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/contextlib2/0.6.0.post1/json", - "datasource_id": null, - "purl": "pkg:pypi/contextlib2@0.6.0.post1" - }, - { - "type": "pypi", - "namespace": null, - "name": "contextlib2", - "version": "0.6.0.post1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backports and enhancements for the contextlib module\n.. image:: https://jazzband.co/static/img/badge.svg\n :target: https://jazzband.co/\n :alt: Jazzband\n\n.. image:: https://readthedocs.org/projects/contextlib2/badge/?version=latest\n :target: https://contextlib2.readthedocs.org/\n :alt: Latest Docs\n\n.. image:: https://img.shields.io/travis/jazzband/contextlib2/master.svg\n :target: http://travis-ci.org/jazzband/contextlib2\n\n.. image:: https://coveralls.io/repos/github/jazzband/contextlib2/badge.svg?branch=master\n :target: https://coveralls.io/github/jazzband/contextlib2?branch=master\n\n.. image:: https://landscape.io/github/jazzband/contextlib2/master/landscape.svg\n :target: https://landscape.io/github/jazzband/contextlib2/\n\ncontextlib2 is a backport of the `standard library's contextlib\nmodule `_ to\nearlier Python versions.\n\nIt also serves as a real world proving ground for possible future\nenhancements to the standard library version.\n\nDevelopment\n-----------\n\ncontextlib2 has no runtime dependencies, but requires ``unittest2`` for testing\non Python 2.x, as well as ``setuptools`` and ``wheel`` to generate universal\nwheel archives.\n\nLocal testing is just a matter of running ``python test_contextlib2.py``.\n\nYou can test against multiple versions of Python with\n`tox `_::\n\n pip install tox\n tox\n\nVersions currently tested in both tox and Travis CI are:\n\n* CPython 2.7\n* CPython 3.4\n* CPython 3.5\n* CPython 3.6\n* CPython 3.7\n* PyPy\n* PyPy3", - "release_date": "2019-10-10T12:48:44", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Nick Coghlan", - "email": "ncoghlan@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" - ], - "homepage_url": "http://contextlib2.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/02/54/669207eb72e3d8ae8b38aa1f0703ee87a0e9f88f30d3c0a47bebdb6de242/contextlib2-0.6.0.post1.tar.gz", - "size": 29670, - "sha1": null, - "md5": "d634281c2e61e575d8a68b9c56f8303a", - "sha256": "01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "PSF License", - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/contextlib2/0.6.0.post1/json", + "api_data_url": "https://pypi.org/pypi/contextlib2/0.6.0.post1/json", "datasource_id": null, "purl": "pkg:pypi/contextlib2@0.6.0.post1" }, @@ -1603,75 +990,6 @@ "datasource_id": null, "purl": "pkg:pypi/decorator@4.4.2" }, - { - "type": "pypi", - "namespace": null, - "name": "decorator", - "version": "4.4.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Decorators for Humans\n=====================\n\nThe goal of the decorator module is to make it easy to define\nsignature-preserving function decorators and decorator factories.\nIt also includes an implementation of multiple dispatch and other niceties\n(please check the docs). It is released under a two-clauses\nBSD license, i.e. basically you can do whatever you want with it but I am not\nresponsible.\n\nInstallation\n-------------\n\nIf you are lazy, just perform\n\n ``$ pip install decorator``\n\nwhich will install just the module on your system.\n\nIf you prefer to install the full distribution from source, including\nthe documentation, clone the `GitHub repo`_ or download the tarball_, unpack it and run\n\n ``$ pip install .``\n\nin the main directory, possibly as superuser.\n\n.. _tarball: https://pypi.org/project/decorator/#files\n.. _GitHub repo: https://github.com/micheles/decorator\n\nTesting\n--------\n\nIf you have the source code installation you can run the tests with\n\n `$ python src/tests/test.py -v`\n\nor (if you have setuptools installed)\n\n `$ python setup.py test`\n\nNotice that you may run into trouble if in your system there\nis an older version of the decorator module; in such a case remove the\nold version. It is safe even to copy the module `decorator.py` over\nan existing one, since we kept backward-compatibility for a long time.\n\nRepository\n---------------\n\nThe project is hosted on GitHub. You can look at the source here:\n\n https://github.com/micheles/decorator\n\nDocumentation\n---------------\n\nThe documentation has been moved to https://github.com/micheles/decorator/blob/master/docs/documentation.md\n\nFrom there you can get a PDF version by simply using the print\nfunctionality of your browser.\n\nHere is the documentation for previous versions of the module:\n\nhttps://github.com/micheles/decorator/blob/4.3.2/docs/tests.documentation.rst\nhttps://github.com/micheles/decorator/blob/4.2.1/docs/tests.documentation.rst\nhttps://github.com/micheles/decorator/blob/4.1.2/docs/tests.documentation.rst\nhttps://github.com/micheles/decorator/blob/4.0.0/documentation.rst\nhttps://github.com/micheles/decorator/blob/3.4.2/documentation.rst\n\nFor the impatient\n-----------------\n\nHere is an example of how to define a family of decorators tracing slow\noperations:\n\n.. code-block:: python\n\n from decorator import decorator\n\n @decorator\n def warn_slow(func, timelimit=60, *args, **kw):\n t0 = time.time()\n result = func(*args, **kw)\n dt = time.time() - t0\n if dt > timelimit:\n logging.warn('%s took %d seconds', func.__name__, dt)\n else:\n logging.info('%s took %d seconds', func.__name__, dt)\n return result\n\n @warn_slow # warn if it takes more than 1 minute\n def preprocess_input_files(inputdir, tempdir):\n ...\n\n @warn_slow(timelimit=600) # warn if it takes more than 10 minutes\n def run_calculation(tempdir, outdir):\n ...\n\nEnjoy!", - "release_date": "2020-02-29T05:24:43", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Michele Simionato", - "email": "michele.simionato@gmail.com", - "url": null - } - ], - "keywords": [ - "decorators generic utility", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/micheles/decorator", - "download_url": "https://files.pythonhosted.org/packages/da/93/84fa12f2dc341f8cf5f022ee09e109961055749df2d0c75c5f98746cfe6c/decorator-4.4.2.tar.gz", - "size": 33629, - "sha1": null, - "md5": "d83c624cce93e6bdfab144821b526e1d", - "sha256": "e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "new BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/decorator/4.4.2/json", - "datasource_id": null, - "purl": "pkg:pypi/decorator@4.4.2" - }, { "type": "pypi", "namespace": null, @@ -1731,65 +1049,6 @@ "datasource_id": null, "purl": "pkg:pypi/enum34@1.1.10" }, - { - "type": "pypi", - "namespace": null, - "name": "enum34", - "version": "1.1.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4\nenum --- support for enumerations\n========================================\n\nAn enumeration is a set of symbolic names (members) bound to unique, constant\nvalues. Within an enumeration, the members can be compared by identity, and\nthe enumeration itself can be iterated over.\n\n from enum import Enum\n\n class Fruit(Enum):\n apple = 1\n banana = 2\n orange = 3\n\n list(Fruit)\n # [, , ]\n\n len(Fruit)\n # 3\n\n Fruit.banana\n # \n\n Fruit['banana']\n # \n\n Fruit(2)\n # \n\n Fruit.banana is Fruit['banana'] is Fruit(2)\n # True\n\n Fruit.banana.name\n # 'banana'\n\n Fruit.banana.value\n # 2\n\nRepository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.", - "release_date": "2020-03-10T17:48:00", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ethan Furman", - "email": "ethan@stoneleaf.us", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 2.4", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.3", - "Topic :: Software Development" - ], - "homepage_url": "https://bitbucket.org/stoneleaf/enum34", - "download_url": "https://files.pythonhosted.org/packages/11/c4/2da1f4952ba476677a42f25cd32ab8aaf0e1c0d0e00b89822b835c7e654c/enum34-1.1.10.tar.gz", - "size": 28187, - "sha1": null, - "md5": "b5ac0bb5ea9e830029599e410d09d3b5", - "sha256": "cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/enum34/1.1.10/json", - "datasource_id": null, - "purl": "pkg:pypi/enum34@1.1.10" - }, { "type": "pypi", "namespace": null, @@ -1911,40 +1170,44 @@ { "type": "pypi", "namespace": null, - "name": "flask-caching", - "version": "1.9.0", + "name": "flask-celeryext", + "version": "0.3.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Adds caching support to your Flask application\nFlask-Caching\n=============\n\nAdds easy cache support to Flask.\n\nSetup\n-----\n\nThe Cache Extension can either be initialized directly:\n\n.. code:: python\n\n from flask import Flask\n from flask_caching import Cache\n\n app = Flask(__name__)\n # For more configuration options, check out the documentation\n cache = Cache(app, config={\"CACHE_TYPE\": \"simple\"})\n\nOr through the factory method:\n\n.. code:: python\n\n cache = Cache(config={\"CACHE_TYPE\": \"simple\"})\n\n app = Flask(__name__)\n cache.init_app(app)\n\nLinks\n=====\n\n* `Documentation `_\n* `Source Code `_\n* `Issues `_\n* `original Flask-Cache Extension `_", - "release_date": "2020-06-02T16:01:52", + "description": "=================\n Flask-CeleryExt\n=================\n\n.. image:: https://img.shields.io/travis/inveniosoftware/flask-celeryext.svg\n :target: https://travis-ci.org/inveniosoftware/flask-celeryext\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/flask-celeryext.svg\n :target: https://coveralls.io/r/inveniosoftware/flask-celeryext\n\n.. image:: https://img.shields.io/github/tag/inveniosoftware/flask-celeryext.svg\n :target: https://github.com/inveniosoftware/flask-celeryext/releases\n\n.. image:: https://img.shields.io/pypi/dm/flask-celeryext.svg\n :target: https://pypi.python.org/pypi/flask-celeryext\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/flask-celeryext.svg\n :target: https://github.com/inveniosoftware/flask-celeryext/blob/master/LICENSE\n\nAbout\n=====\n\nFlask-CeleryExt is a simple integration layer between Celery and Flask.\n\nInstallation\n============\n\nFlask-CeleryExt is on PyPI so all you need is: ::\n\n pip install flask-celeryext\n\nDocumentation\n=============\n\nDocumentation is readable at https://flask-celeryext.readthedocs.io/ or can be\nbuild using Sphinx: ::\n\n pip install Sphinx\n python setup.py build_sphinx\n\nTesting\n=======\n\nRunning the test suite is as simple as: ::\n\n python setup.py test\n\n\nChanges\n=======\n\nVersion 0.3.4 (released 2020-02-17)\n\n- Adds support for Python 3.8\n- Fixes pin for Celery on Python <3.7.\n\nVersion 0.3.3 (released 2020-02-13)\n\n- Fix celery version for Python < 3.7\n\nVersion 0.3.2 (released 2019-06-25)\n\n- Uses correct Celery version for Python 3.7.\n- Prevents multiple creation and pushing of Flask application contexts.\n\nVersion 0.3.1 (released 2018-03-26)\n\n- Accounts for non-strict Celery versions.\n\nVersion 0.3.0 (released 2017-03-24)\n\n- Adds support for Celery v4.\n\nVersion 0.2.2 (released 2016-11-07)\n\n- Forces celery version to v3.1-4.0 due to problem with 4.x.\n\nVersion 0.2.1 (released 2016-07-25)\n\nImproved features\n\n- Improves documentation structure and its automatic generation.\n\nVersion 0.2.0 (released 2016-02-02)\n\nIncompatible changes\n\n- Changes celery application creation to use the default current\n celery application instead creating a new celery application. This\n addresses an issue with tasks using the shared_task decorator and\n having Flask-CeleryExt initialized multiple times.\n\nVersion 0.1.0 (released 2015-08-17)\n\n- Initial public release", + "release_date": "2020-02-17T10:27:20", "parties": [ { "type": "person", "role": "author", - "name": "Peter Justin", - "email": "peter.justin@outlook.com", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ + "flask celery", "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Object Brokering", + "Topic :: System :: Distributed Computing" ], - "homepage_url": "https://github.com/sh4nks/flask-caching", - "download_url": "https://files.pythonhosted.org/packages/41/c9/472486c62f22a1dad273a132b9484189e1a22eb8358883249e4955f8e464/Flask-Caching-1.9.0.tar.gz", - "size": 71618, + "homepage_url": "https://github.com/inveniosoftware/flask-celeryext", + "download_url": "https://files.pythonhosted.org/packages/70/a0/74c30a11f96be5ad3bf5609b00fe91755b9eee2ce6cc0bba59c32614afe8/Flask_CeleryExt-0.3.4-py2.py3-none-any.whl", + "size": 10210, "sha1": null, - "md5": "49eea208256c63947ecd33de273afac3", - "sha256": "a0356ad868b1d8ec2d0e675a6fe891c41303128f8904d5d79e180d8b3f952aff", + "md5": "a2711529816648eaffbfd6934e7c9e74", + "sha256": "1c84b35462d41d1317800d256b2ce30031b7d3d20dd8dc680ce4f4cc88029867", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -1964,51 +1227,47 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-caching/1.9.0/json", + "api_data_url": "https://pypi.org/pypi/flask-celeryext/0.3.4/json", "datasource_id": null, - "purl": "pkg:pypi/flask-caching@1.9.0" + "purl": "pkg:pypi/flask-celeryext@0.3.4" }, { "type": "pypi", "namespace": null, - "name": "flask-celeryext", - "version": "0.3.4", + "name": "flask-limiter", + "version": "1.1.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "=================\n Flask-CeleryExt\n=================\n\n.. image:: https://img.shields.io/travis/inveniosoftware/flask-celeryext.svg\n :target: https://travis-ci.org/inveniosoftware/flask-celeryext\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/flask-celeryext.svg\n :target: https://coveralls.io/r/inveniosoftware/flask-celeryext\n\n.. image:: https://img.shields.io/github/tag/inveniosoftware/flask-celeryext.svg\n :target: https://github.com/inveniosoftware/flask-celeryext/releases\n\n.. image:: https://img.shields.io/pypi/dm/flask-celeryext.svg\n :target: https://pypi.python.org/pypi/flask-celeryext\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/flask-celeryext.svg\n :target: https://github.com/inveniosoftware/flask-celeryext/blob/master/LICENSE\n\nAbout\n=====\n\nFlask-CeleryExt is a simple integration layer between Celery and Flask.\n\nInstallation\n============\n\nFlask-CeleryExt is on PyPI so all you need is: ::\n\n pip install flask-celeryext\n\nDocumentation\n=============\n\nDocumentation is readable at https://flask-celeryext.readthedocs.io/ or can be\nbuild using Sphinx: ::\n\n pip install Sphinx\n python setup.py build_sphinx\n\nTesting\n=======\n\nRunning the test suite is as simple as: ::\n\n python setup.py test\n\n\nChanges\n=======\n\nVersion 0.3.4 (released 2020-02-17)\n\n- Adds support for Python 3.8\n- Fixes pin for Celery on Python <3.7.\n\nVersion 0.3.3 (released 2020-02-13)\n\n- Fix celery version for Python < 3.7\n\nVersion 0.3.2 (released 2019-06-25)\n\n- Uses correct Celery version for Python 3.7.\n- Prevents multiple creation and pushing of Flask application contexts.\n\nVersion 0.3.1 (released 2018-03-26)\n\n- Accounts for non-strict Celery versions.\n\nVersion 0.3.0 (released 2017-03-24)\n\n- Adds support for Celery v4.\n\nVersion 0.2.2 (released 2016-11-07)\n\n- Forces celery version to v3.1-4.0 due to problem with 4.x.\n\nVersion 0.2.1 (released 2016-07-25)\n\nImproved features\n\n- Improves documentation structure and its automatic generation.\n\nVersion 0.2.0 (released 2016-02-02)\n\nIncompatible changes\n\n- Changes celery application creation to use the default current\n celery application instead creating a new celery application. This\n addresses an issue with tasks using the shared_task decorator and\n having Flask-CeleryExt initialized multiple times.\n\nVersion 0.1.0 (released 2015-08-17)\n\n- Initial public release", - "release_date": "2020-02-17T10:27:20", + "description": "Rate limiting for flask applications\n.. |travis-ci| image:: https://img.shields.io/travis/alisaifee/flask-limiter/master.svg?style=flat-square\n :target: https://travis-ci.org/#!/alisaifee/flask-limiter?branch=master\n.. |coveralls| image:: https://img.shields.io/coveralls/alisaifee/flask-limiter/master.svg?style=flat-square\n :target: https://coveralls.io/r/alisaifee/flask-limiter?branch=master\n.. |pypi| image:: https://img.shields.io/pypi/v/Flask-Limiter.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Flask-Limiter\n.. |license| image:: https://img.shields.io/pypi/l/Flask-Limiter.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Flask-Limiter\n.. |hound| image:: https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg?style=flat-square&longCache=true\n :target: https://houndci.com\n\n*************\nFlask-Limiter\n*************\n|travis-ci| |coveralls| |pypi| |license| |hound|\n\nFlask-Limiter provides rate limiting features to flask routes.\nIt has support for a configurable backend for storage\nwith current implementations for in-memory, redis and memcache.\n\nQuickstart\n===========\n\nAdd the rate limiter to your flask app. The following example uses the default\nin memory implementation for storage.\n\n.. code-block:: python\n\n from flask import Flask\n from flask_limiter import Limiter\n from flask_limiter.util import get_remote_address\n\n app = Flask(__name__)\n limiter = Limiter(\n app,\n key_func=get_remote_address,\n default_limits=[\"2 per minute\", \"1 per second\"],\n )\n\n @app.route(\"/slow\")\n @limiter.limit(\"1 per day\")\n def slow():\n return \"24\"\n\n @app.route(\"/fast\")\n def fast():\n return \"42\"\n\n @app.route(\"/ping\")\n @limiter.exempt\n def ping():\n return 'PONG'\n\n app.run()\n\n\n\nTest it out. The ``fast`` endpoint respects the default rate limit while the\n``slow`` endpoint uses the decorated one. ``ping`` has no rate limit associated\nwith it.\n\n.. code-block:: bash\n\n $ curl localhost:5000/fast\n 42\n $ curl localhost:5000/fast\n 42\n $ curl localhost:5000/fast\n \n 429 Too Many Requests\n

Too Many Requests

\n

2 per 1 minute

\n $ curl localhost:5000/slow\n 24\n $ curl localhost:5000/slow\n \n 429 Too Many Requests\n

Too Many Requests

\n

1 per 1 day

\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n\n\n\n\n`Read the docs `_\n\n\n\n\n\n.. :changelog:\n\nChangelog\n=========\n\n1.1.0 2019-10-02\n----------------\n* Provide Rate limit information with Exception (`Pull Request 202 `_)\n* Respect existing Retry-After header values (`Pull Request 143 `_)\n* Documentation improvements\n\n1.0.1 2017-12-08\n----------------\n* Bug fix\n\n * Duplicate rate limits applied via application limits (`Issue 108 `_)\n\n1.0.0 2017-11-06\n----------------\n* Improved documentation for handling ip addresses for applications behind proxiues (`Issue 41 `_)\n* Execute rate limits for decorated routes in decorator instead of `before_request` (`Issue 67 `_)\n* Bug Fix\n\n * Python 3.5 Errors (`Issue 82 `_)\n * RATELIMIT_KEY_PREFIX configuration constant not used (`Issue 88 `_)\n * Can't use dynamic limit in `default_limits` (`Issue 94 `_)\n * Retry-After header always zero when using key prefix (`Issue 99 `_)\n\n0.9.5.1 2017-08-18\n------------------\n* Upgrade versioneer\n\n0.9.5 2017-07-26\n----------------\n* Add support for key prefixes\n\n0.9.4 2017-05-01\n----------------\n* Implemented application wide shared limits\n\n0.9.3 2016-03-14\n----------------\n* Allow `reset` of limiter storage if available\n\n0.9.2 2016-03-04\n----------------\n* Deprecation warning for default `key_func` `get_ipaddr`\n* Support for `Retry-After` header\n\n0.9.1 2015-11-21\n----------------\n* Re-expose `enabled` property on `Limiter` instance.\n\n0.9 2015-11-13\n--------------\n* In-memory fallback option for unresponsive storage\n* Rate limit exemption option per limit\n\n0.8.5 2015-10-05\n----------------\n* Bug fix for reported issues of missing (limits) dependency upon installation.\n\n0.8.4 2015-10-03\n----------------\n* Documentation tweaks.\n\n0.8.2 2015-09-17\n----------------\n* Remove outdated files from egg\n\n0.8.1 2015-08-06\n----------------\n* Fixed compatibility with latest version of **Flask-Restful**\n\n0.8 2015-06-07\n--------------\n* No functional change\n\n0.7.9 2015-04-02\n----------------\n* Bug fix for case sensitive `methods` whitelist for `limits` decorator\n\n0.7.8 2015-03-20\n----------------\n* Hotfix for dynamic limits with blueprints\n* Undocumented feature to pass storage options to underlying storage backend.\n\n0.7.6 2015-03-02\n----------------\n* `methods` keyword argument for `limits` decorator to specify specific http\n methods to apply the rate limit to.\n\n0.7.5 2015-02-16\n----------------\n* `Custom error messages `_.\n\n0.7.4 2015-02-03\n----------------\n* Use Werkzeug TooManyRequests as the exception raised when available.\n\n0.7.3 2015-01-30\n----------------\n* Bug Fix\n\n * Fix for version comparison when monkey patching Werkzeug\n (`Issue 24 `_)\n\n0.7.1 2015-01-09\n----------------\n* Refactor core storage & ratelimiting strategy out into the `limits `_ package.\n* Remove duplicate hits when stacked rate limits are in use and a rate limit is hit.\n\n0.7 2015-01-09\n--------------\n* Refactoring of RedisStorage for extensibility (`Issue 18 `_)\n* Bug fix: Correct default setting for enabling rate limit headers. (`Issue 22 `_)\n\n0.6.6 2014-10-21\n----------------\n* Bug fix\n\n * Fix for responses slower than rate limiting window.\n (`Issue 17 `_.)\n\n0.6.5 2014-10-01\n----------------\n* Bug fix: in memory storage thread safety\n\n0.6.4 2014-08-31\n----------------\n* Support for manually triggering rate limit check\n\n0.6.3 2014-08-26\n----------------\n* Header name overrides\n\n0.6.2 2014-07-13\n----------------\n* `Rate limiting for blueprints\n `_\n\n0.6.1 2014-07-11\n----------------\n* per http method rate limit separation (`Recipe\n `_)\n* documentation improvements\n\n0.6 2014-06-24\n--------------\n* `Shared limits between routes\n `_\n\n0.5 2014-06-13\n--------------\n* `Request Filters\n `_\n\n0.4.4 2014-06-13\n----------------\n* Bug fix\n\n * Werkzeug < 0.9 Compatibility\n (`Issue 6 `_.)\n\n0.4.3 2014-06-12\n----------------\n* Hotfix : use HTTPException instead of abort to play well with other\n extensions.\n\n0.4.2 2014-06-12\n----------------\n* Allow configuration overrides via extension constructor\n\n0.4.1 2014-06-04\n----------------\n* Improved implementation of moving-window X-RateLimit-Reset value.\n\n0.4 2014-05-28\n--------------\n* `Rate limiting headers\n `_\n\n0.3.2 2014-05-26\n----------------\n* Bug fix\n\n * Memory leak when using ``Limiter.storage.MemoryStorage``\n (`Issue 4 `_.)\n* Improved test coverage\n\n0.3.1 2014-02-20\n----------------\n* Strict version requirement on six\n* documentation tweaks\n\n0.3.0 2014-02-19\n----------------\n* improved logging support for multiple handlers\n* allow callables to be passed to ``Limiter.limit`` decorator to dynamically\n load rate limit strings.\n* add a global kill switch in flask config for all rate limits.\n* Bug fixes\n\n * default key function for rate limit domain wasn't accounting for\n X-Forwarded-For header.\n\n\n\n0.2.2 2014-02-18\n----------------\n* add new decorator to exempt routes from limiting.\n* Bug fixes\n\n * versioneer.py wasn't included in manifest.\n * configuration string for strategy was out of sync with docs.\n\n0.2.1 2014-02-15\n----------------\n* python 2.6 support via counter backport\n* source docs.\n\n0.2 2014-02-15\n--------------\n* Implemented configurable strategies for rate limiting.\n* Bug fixes\n\n * better locking for in-memory storage\n * multi threading support for memcached storage\n\n\n0.1.1 2014-02-14\n----------------\n* Bug fixes\n\n * fix initializing the extension without an app\n * don't rate limit static files\n\n\n0.1.0 2014-02-13\n----------------\n* first release.", + "release_date": "2019-10-03T02:10:17", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Ali-Akber Saifee", + "email": "ali@indydevs.org", "url": null } ], "keywords": [ - "flask celery", "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", + "Operating System :: MacOS", "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", + "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Object Brokering", - "Topic :: System :: Distributed Computing" + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://github.com/inveniosoftware/flask-celeryext", - "download_url": "https://files.pythonhosted.org/packages/70/a0/74c30a11f96be5ad3bf5609b00fe91755b9eee2ce6cc0bba59c32614afe8/Flask_CeleryExt-0.3.4-py2.py3-none-any.whl", - "size": 10210, + "homepage_url": "https://flask-limiter.readthedocs.org", + "download_url": "https://files.pythonhosted.org/packages/72/f3/68596cb061e1c7d5a7dfb3694de3f8845b908ea16296e762136f34727a65/Flask_Limiter-1.1.0-py2-none-any.whl", + "size": 13815, "sha1": null, - "md5": "a2711529816648eaffbfd6934e7c9e74", - "sha256": "1c84b35462d41d1317800d256b2ce30031b7d3d20dd8dc680ce4f4cc88029867", + "md5": "cba11edf61a190167e225aafeacedb33", + "sha256": "9087984ae7eeb862f93bf5b18477a5e5b1e0c907647ae74fba1c7e3f1de63d6f", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2016,9 +1275,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2028,51 +1287,44 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-celeryext/0.3.4/json", + "api_data_url": "https://pypi.org/pypi/flask-limiter/1.1.0/json", "datasource_id": null, - "purl": "pkg:pypi/flask-celeryext@0.3.4" + "purl": "pkg:pypi/flask-limiter@1.1.0" }, { "type": "pypi", "namespace": null, - "name": "flask-celeryext", - "version": "0.3.4", + "name": "flask-shell-ipython", + "version": "0.4.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "=================\n Flask-CeleryExt\n=================\n\n.. image:: https://img.shields.io/travis/inveniosoftware/flask-celeryext.svg\n :target: https://travis-ci.org/inveniosoftware/flask-celeryext\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/flask-celeryext.svg\n :target: https://coveralls.io/r/inveniosoftware/flask-celeryext\n\n.. image:: https://img.shields.io/github/tag/inveniosoftware/flask-celeryext.svg\n :target: https://github.com/inveniosoftware/flask-celeryext/releases\n\n.. image:: https://img.shields.io/pypi/dm/flask-celeryext.svg\n :target: https://pypi.python.org/pypi/flask-celeryext\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/flask-celeryext.svg\n :target: https://github.com/inveniosoftware/flask-celeryext/blob/master/LICENSE\n\nAbout\n=====\n\nFlask-CeleryExt is a simple integration layer between Celery and Flask.\n\nInstallation\n============\n\nFlask-CeleryExt is on PyPI so all you need is: ::\n\n pip install flask-celeryext\n\nDocumentation\n=============\n\nDocumentation is readable at https://flask-celeryext.readthedocs.io/ or can be\nbuild using Sphinx: ::\n\n pip install Sphinx\n python setup.py build_sphinx\n\nTesting\n=======\n\nRunning the test suite is as simple as: ::\n\n python setup.py test\n\n\nChanges\n=======\n\nVersion 0.3.4 (released 2020-02-17)\n\n- Adds support for Python 3.8\n- Fixes pin for Celery on Python <3.7.\n\nVersion 0.3.3 (released 2020-02-13)\n\n- Fix celery version for Python < 3.7\n\nVersion 0.3.2 (released 2019-06-25)\n\n- Uses correct Celery version for Python 3.7.\n- Prevents multiple creation and pushing of Flask application contexts.\n\nVersion 0.3.1 (released 2018-03-26)\n\n- Accounts for non-strict Celery versions.\n\nVersion 0.3.0 (released 2017-03-24)\n\n- Adds support for Celery v4.\n\nVersion 0.2.2 (released 2016-11-07)\n\n- Forces celery version to v3.1-4.0 due to problem with 4.x.\n\nVersion 0.2.1 (released 2016-07-25)\n\nImproved features\n\n- Improves documentation structure and its automatic generation.\n\nVersion 0.2.0 (released 2016-02-02)\n\nIncompatible changes\n\n- Changes celery application creation to use the default current\n celery application instead creating a new celery application. This\n addresses an issue with tasks using the shared_task decorator and\n having Flask-CeleryExt initialized multiple times.\n\nVersion 0.1.0 (released 2015-08-17)\n\n- Initial public release", - "release_date": "2020-02-17T10:27:22", + "description": "# flask-shell-ipython\n\nReplace default `flask shell` command by similar command running IPython.\n\n## Usage\n\nJust install:\n\n pip install flask-shell-ipython\n\nAnd here are you go:\n\n > flask shell\n Python 3.5.1 (default, Mar 3 2016, 09:29:07)\n [GCC 5.3.0] on linux\n IPython: 5.0.0\n App: discharges [debug]\n Instance: /home/ei-grad/repos/discharges/instance\n\n In [1]:", + "release_date": "2019-05-06T07:59:29", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Andrew Grigorev", + "email": "andrew@ei-grad.ru", "url": null } ], "keywords": [ - "flask celery", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Environment :: Console", + "Framework :: Flask", + "Framework :: IPython", "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Object Brokering", - "Topic :: System :: Distributed Computing" + "Programming Language :: Python :: 3" ], - "homepage_url": "https://github.com/inveniosoftware/flask-celeryext", - "download_url": "https://files.pythonhosted.org/packages/3f/67/a048930d1c6349b7cc038738140a258c443c5b8f83043311972a53364833/Flask-CeleryExt-0.3.4.tar.gz", - "size": 17861, + "homepage_url": "http://github.com/ei-grad/flask-shell-ipython", + "download_url": "https://files.pythonhosted.org/packages/10/6b/a45278cbff711cc7b8904bd38679a8cc249c4db825a76ae332302f59d398/flask_shell_ipython-0.4.1-py2.py3-none-any.whl", + "size": 3493, "sha1": null, - "md5": "519373a4ec1742ae8295bccb0056590b", - "sha256": "47d5d18daebad300b215faca0d1c6da24625f333020482e27591634c05792c98", + "md5": "11e90b76846c933d8b752ccb1cd10c90", + "sha256": "f212b4fad6831edf652799c719cd05fd0716edfaa5506eb41ff9ef09109890d3", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2080,9 +1332,8 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2092,47 +1343,53 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-celeryext/0.3.4/json", + "api_data_url": "https://pypi.org/pypi/flask-shell-ipython/0.4.1/json", "datasource_id": null, - "purl": "pkg:pypi/flask-celeryext@0.3.4" + "purl": "pkg:pypi/flask-shell-ipython@0.4.1" }, { "type": "pypi", "namespace": null, - "name": "flask-limiter", - "version": "1.1.0", + "name": "flask-talisman", + "version": "0.8.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Rate limiting for flask applications\n.. |travis-ci| image:: https://img.shields.io/travis/alisaifee/flask-limiter/master.svg?style=flat-square\n :target: https://travis-ci.org/#!/alisaifee/flask-limiter?branch=master\n.. |coveralls| image:: https://img.shields.io/coveralls/alisaifee/flask-limiter/master.svg?style=flat-square\n :target: https://coveralls.io/r/alisaifee/flask-limiter?branch=master\n.. |pypi| image:: https://img.shields.io/pypi/v/Flask-Limiter.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Flask-Limiter\n.. |license| image:: https://img.shields.io/pypi/l/Flask-Limiter.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Flask-Limiter\n.. |hound| image:: https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg?style=flat-square&longCache=true\n :target: https://houndci.com\n\n*************\nFlask-Limiter\n*************\n|travis-ci| |coveralls| |pypi| |license| |hound|\n\nFlask-Limiter provides rate limiting features to flask routes.\nIt has support for a configurable backend for storage\nwith current implementations for in-memory, redis and memcache.\n\nQuickstart\n===========\n\nAdd the rate limiter to your flask app. The following example uses the default\nin memory implementation for storage.\n\n.. code-block:: python\n\n from flask import Flask\n from flask_limiter import Limiter\n from flask_limiter.util import get_remote_address\n\n app = Flask(__name__)\n limiter = Limiter(\n app,\n key_func=get_remote_address,\n default_limits=[\"2 per minute\", \"1 per second\"],\n )\n\n @app.route(\"/slow\")\n @limiter.limit(\"1 per day\")\n def slow():\n return \"24\"\n\n @app.route(\"/fast\")\n def fast():\n return \"42\"\n\n @app.route(\"/ping\")\n @limiter.exempt\n def ping():\n return 'PONG'\n\n app.run()\n\n\n\nTest it out. The ``fast`` endpoint respects the default rate limit while the\n``slow`` endpoint uses the decorated one. ``ping`` has no rate limit associated\nwith it.\n\n.. code-block:: bash\n\n $ curl localhost:5000/fast\n 42\n $ curl localhost:5000/fast\n 42\n $ curl localhost:5000/fast\n \n 429 Too Many Requests\n

Too Many Requests

\n

2 per 1 minute

\n $ curl localhost:5000/slow\n 24\n $ curl localhost:5000/slow\n \n 429 Too Many Requests\n

Too Many Requests

\n

1 per 1 day

\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n\n\n\n\n`Read the docs `_\n\n\n\n\n\n.. :changelog:\n\nChangelog\n=========\n\n1.1.0 2019-10-02\n----------------\n* Provide Rate limit information with Exception (`Pull Request 202 `_)\n* Respect existing Retry-After header values (`Pull Request 143 `_)\n* Documentation improvements\n\n1.0.1 2017-12-08\n----------------\n* Bug fix\n\n * Duplicate rate limits applied via application limits (`Issue 108 `_)\n\n1.0.0 2017-11-06\n----------------\n* Improved documentation for handling ip addresses for applications behind proxiues (`Issue 41 `_)\n* Execute rate limits for decorated routes in decorator instead of `before_request` (`Issue 67 `_)\n* Bug Fix\n\n * Python 3.5 Errors (`Issue 82 `_)\n * RATELIMIT_KEY_PREFIX configuration constant not used (`Issue 88 `_)\n * Can't use dynamic limit in `default_limits` (`Issue 94 `_)\n * Retry-After header always zero when using key prefix (`Issue 99 `_)\n\n0.9.5.1 2017-08-18\n------------------\n* Upgrade versioneer\n\n0.9.5 2017-07-26\n----------------\n* Add support for key prefixes\n\n0.9.4 2017-05-01\n----------------\n* Implemented application wide shared limits\n\n0.9.3 2016-03-14\n----------------\n* Allow `reset` of limiter storage if available\n\n0.9.2 2016-03-04\n----------------\n* Deprecation warning for default `key_func` `get_ipaddr`\n* Support for `Retry-After` header\n\n0.9.1 2015-11-21\n----------------\n* Re-expose `enabled` property on `Limiter` instance.\n\n0.9 2015-11-13\n--------------\n* In-memory fallback option for unresponsive storage\n* Rate limit exemption option per limit\n\n0.8.5 2015-10-05\n----------------\n* Bug fix for reported issues of missing (limits) dependency upon installation.\n\n0.8.4 2015-10-03\n----------------\n* Documentation tweaks.\n\n0.8.2 2015-09-17\n----------------\n* Remove outdated files from egg\n\n0.8.1 2015-08-06\n----------------\n* Fixed compatibility with latest version of **Flask-Restful**\n\n0.8 2015-06-07\n--------------\n* No functional change\n\n0.7.9 2015-04-02\n----------------\n* Bug fix for case sensitive `methods` whitelist for `limits` decorator\n\n0.7.8 2015-03-20\n----------------\n* Hotfix for dynamic limits with blueprints\n* Undocumented feature to pass storage options to underlying storage backend.\n\n0.7.6 2015-03-02\n----------------\n* `methods` keyword argument for `limits` decorator to specify specific http\n methods to apply the rate limit to.\n\n0.7.5 2015-02-16\n----------------\n* `Custom error messages `_.\n\n0.7.4 2015-02-03\n----------------\n* Use Werkzeug TooManyRequests as the exception raised when available.\n\n0.7.3 2015-01-30\n----------------\n* Bug Fix\n\n * Fix for version comparison when monkey patching Werkzeug\n (`Issue 24 `_)\n\n0.7.1 2015-01-09\n----------------\n* Refactor core storage & ratelimiting strategy out into the `limits `_ package.\n* Remove duplicate hits when stacked rate limits are in use and a rate limit is hit.\n\n0.7 2015-01-09\n--------------\n* Refactoring of RedisStorage for extensibility (`Issue 18 `_)\n* Bug fix: Correct default setting for enabling rate limit headers. (`Issue 22 `_)\n\n0.6.6 2014-10-21\n----------------\n* Bug fix\n\n * Fix for responses slower than rate limiting window.\n (`Issue 17 `_.)\n\n0.6.5 2014-10-01\n----------------\n* Bug fix: in memory storage thread safety\n\n0.6.4 2014-08-31\n----------------\n* Support for manually triggering rate limit check\n\n0.6.3 2014-08-26\n----------------\n* Header name overrides\n\n0.6.2 2014-07-13\n----------------\n* `Rate limiting for blueprints\n `_\n\n0.6.1 2014-07-11\n----------------\n* per http method rate limit separation (`Recipe\n `_)\n* documentation improvements\n\n0.6 2014-06-24\n--------------\n* `Shared limits between routes\n `_\n\n0.5 2014-06-13\n--------------\n* `Request Filters\n `_\n\n0.4.4 2014-06-13\n----------------\n* Bug fix\n\n * Werkzeug < 0.9 Compatibility\n (`Issue 6 `_.)\n\n0.4.3 2014-06-12\n----------------\n* Hotfix : use HTTPException instead of abort to play well with other\n extensions.\n\n0.4.2 2014-06-12\n----------------\n* Allow configuration overrides via extension constructor\n\n0.4.1 2014-06-04\n----------------\n* Improved implementation of moving-window X-RateLimit-Reset value.\n\n0.4 2014-05-28\n--------------\n* `Rate limiting headers\n `_\n\n0.3.2 2014-05-26\n----------------\n* Bug fix\n\n * Memory leak when using ``Limiter.storage.MemoryStorage``\n (`Issue 4 `_.)\n* Improved test coverage\n\n0.3.1 2014-02-20\n----------------\n* Strict version requirement on six\n* documentation tweaks\n\n0.3.0 2014-02-19\n----------------\n* improved logging support for multiple handlers\n* allow callables to be passed to ``Limiter.limit`` decorator to dynamically\n load rate limit strings.\n* add a global kill switch in flask config for all rate limits.\n* Bug fixes\n\n * default key function for rate limit domain wasn't accounting for\n X-Forwarded-For header.\n\n\n\n0.2.2 2014-02-18\n----------------\n* add new decorator to exempt routes from limiting.\n* Bug fixes\n\n * versioneer.py wasn't included in manifest.\n * configuration string for strategy was out of sync with docs.\n\n0.2.1 2014-02-15\n----------------\n* python 2.6 support via counter backport\n* source docs.\n\n0.2 2014-02-15\n--------------\n* Implemented configurable strategies for rate limiting.\n* Bug fixes\n\n * better locking for in-memory storage\n * multi threading support for memcached storage\n\n\n0.1.1 2014-02-14\n----------------\n* Bug fixes\n\n * fix initializing the extension without an app\n * don't rate limit static files\n\n\n0.1.0 2014-02-13\n----------------\n* first release.", - "release_date": "2019-10-03T02:10:17", + "description": "HTTP security headers for Flask.\nTalisman: HTTP security headers for Flask\n=========================================\n\n|PyPI Version|\n\nTalisman is a small Flask extension that handles setting HTTP headers\nthat can help protect against a few common web application security\nissues.\n\nThe default configuration:\n\n- Forces all connects to ``https``, unless running with debug enabled.\n- Enables `HTTP Strict Transport\n Security `_.\n- Sets Flask's session cookie to ``secure``, so it will never be set if\n your application is somehow accessed via a non-secure connection.\n- Sets Flask's session cookie to ``httponly``, preventing JavaScript\n from being able to access its content. CSRF via Ajax uses a separate\n cookie and should be unaffected.\n- Sets Flask's session cookie to ``Lax``, preventing the cookie to be leaked\n in CSRF-prone request methods.\n- Sets\n `X-Frame-Options `_\n to ``SAMEORIGIN`` to avoid\n `clickjacking `_.\n- Sets `X-XSS-Protection\n `_\n to enable a cross site scripting filter for IE and Safari (note Chrome has\n removed this and Firefox never supported it).\n- Sets `X-Content-Type-Options\n `_\n to prevent content type sniffing.\n- Sets a strict `Content Security\n Policy `__\n of ``default-src: 'self'``. This is intended to almost completely\n prevent Cross Site Scripting (XSS) attacks. This is probably the only\n setting that you should reasonably change. See the\n `Content Security Policy`_ section.\n- Sets a strict `Referrer-Policy `_\n of ``strict-origin-when-cross-origin`` that governs which referrer information should be included with\n requests made.\n- Disables interest-cohort by default in the `Permissions-Policy `_\n like `Drupal `_ to enhance privacy protection.\n\n\nIn addition to Talisman, you **should always use a cross-site request\nforgery (CSRF) library**. It's highly recommended to use\n`Flask-SeaSurf `_,\nwhich is based on Django's excellent library.\n\nInstallation & Basic Usage\n--------------------------\n\nInstall via `pip `_:\n\n::\n\n pip install flask-talisman\n\nAfter installing, wrap your Flask app with a ``Talisman``:\n\n.. code:: python\n\n from flask import Flask\n from flask_talisman import Talisman\n\n app = Flask(__name__)\n Talisman(app)\n\n\nThere is also a full `Example App `_.\n\nOptions\n-------\n\n- ``force_https``, default ``True``, forces all non-debug connects to\n ``https`` (`about HTTPS `_).\n- ``force_https_permanent``, default ``False``, uses ``301`` instead of\n ``302`` for ``https`` redirects.\n\n- ``frame_options``, default ``SAMEORIGIN``, can be ``SAMEORIGIN``,\n ``DENY``, or ``ALLOWFROM`` (`about Frame Options `_).\n- ``frame_options_allow_from``, default ``None``, a string indicating\n the domains that are allowed to embed the site via iframe.\n\n- ``strict_transport_security``, default ``True``, whether to send HSTS\n headers (`about HSTS `_).\n- ``strict_transport_security_preload``, default ``False``, enables HSTS\n preloading. If you register your application with\n `Google's HSTS preload list `_,\n Firefox and Chrome will never load your site over a non-secure\n connection.\n- ``strict_transport_security_max_age``, default ``ONE_YEAR_IN_SECS``,\n length of time the browser will respect the HSTS header.\n- ``strict_transport_security_include_subdomains``, default ``True``,\n whether subdomains should also use HSTS.\n\n- ``content_security_policy``, default ``default-src: 'self'``, see the\n `Content Security Policy`_ section (`about Content Security Policy `_).\n- ``content_security_policy_nonce_in``, default ``[]``. Adds a per-request nonce\n value to the flask request object and also to the specified CSP header section.\n I.e. ``['script-src', 'style-src']``\n- ``content_security_policy_report_only``, default ``False``, whether to set\n the CSP header as \"report-only\" (as `Content-Security-Policy-Report-Only`)\n to ease deployment by disabling the policy enforcement by the browser,\n requires passing a value with the ``content_security_policy_report_uri``\n parameter\n- ``content_security_policy_report_uri``, default ``None``, a string\n indicating the report URI used for `CSP violation reports\n `_\n\n- ``referrer_policy``, default ``strict-origin-when-cross-origin``, a string\n that sets the Referrer Policy header to send a full URL when performing a same-origin\n request, only send the origin of the document to an equally secure destination\n (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP) (`about Referrer Policy `_).\n\n- ``feature_policy``, default ``{}``, see the `Feature Policy`_ section (`about Feature Policy `_).\n\n- ``permissions_policy``, default ``{'interest-cohort': '()'}``, see the `Permissions Policy`_ section (`about Permissions Policy `_).\n- ``document_policy``, default ``{}``, see the `Document Policy`_ section (`about Document Policy `_).\n\n- ``session_cookie_secure``, default ``True``, set the session cookie\n to ``secure``, preventing it from being sent over plain ``http`` (`about cookies (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)_`).\n- ``session_cookie_http_only``, default ``True``, set the session\n cookie to ``httponly``, preventing it from being read by JavaScript.\n- ``session_cookie_samesite``, default ``Lax``, set this to ``Strict`` to prevent the cookie from being sent by the browser to the target site in all cross-site browsing context, even when following a regular link.\n\n\n- ``force_file_save``, default ``False``, whether to set the\n `X-Download-Options `_\n header to ``noopen`` to prevent IE >= 8 to from opening file downloads\n directly and only save them instead.\n\n- ``x_content_type_options``, default ``True``, Protects against MIME sniffing vulnerabilities (`about Content Type Options `_).\n- ``x_xss_protection``, default ``True``, Protects against cross-site scripting (XSS) attacks (`about XSS Protection `_).\n\nFor a full list of (security) headers, check out: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers.\n\nPer-view options\n~~~~~~~~~~~~~~~~\n\nSometimes you want to change the policy for a specific view. The\n``force_https``, ``frame_options``, ``frame_options_allow_from``,\n`content_security_policy``, ``feature_policy``, ``permissions_policy``\nand ``document_policy`` options can be changed on a per-view basis.\n\n.. code:: python\n\n from flask import Flask\n from flask_talisman import Talisman, ALLOW_FROM\n\n app = Flask(__name__)\n talisman = Talisman(app)\n\n @app.route('/normal')\n def normal():\n return 'Normal'\n\n @app.route('/embeddable')\n @talisman(frame_options=ALLOW_FROM, frame_options_allow_from='*')\n def embeddable():\n return 'Embeddable'\n\nContent Security Policy\n-----------------------\n\nThe default content security policy is extremely strict and will\nprevent loading any resources that are not in the same domain as the\napplication. Most web applications will need to change this policy.\n\nA slightly more permissive policy is available at\n``flask_talisman.GOOGLE_CSP_POLICY``, which allows loading Google-hosted JS\nlibraries, fonts, and embeding media from YouTube and Maps.\n\nYou can and should create your own policy to suit your site's needs.\nHere's a few examples adapted from\n`MDN `_:\n\nExample 1\n~~~~~~~~~\n\nThis is the default policy. A web site administrator wants all content\nto come from the site's own origin (this excludes subdomains.)\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\''\n }\n talisman = Talisman(app, content_security_policy=csp)\n\nExample 2\n~~~~~~~~~\n\nA web site administrator wants to allow content from a trusted domain\nand all its subdomains (it doesn't have to be the same domain that the\nCSP is set on.)\n\n.. code:: python\n\n csp = {\n 'default-src': [\n '\\'self\\'',\n '*.trusted.com'\n ]\n }\n\nExample 3\n~~~~~~~~~\n\nA web site administrator wants to allow users of a web application to\ninclude images from any origin in their own content, but to restrict\naudio or video media to trusted providers, and all scripts only to a\nspecific server that hosts trusted code.\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\'',\n 'img-src': '*',\n 'media-src': [\n 'media1.com',\n 'media2.com',\n ],\n 'script-src': 'userscripts.example.com'\n }\n\nIn this example content is only permitted from the document's origin\nwith the following exceptions:\n\n- Images may loaded from anywhere (note the ``*`` wildcard).\n- Media is only allowed from media1.com and media2.com (and not from\n subdomains of those sites).\n- Executable script is only allowed from userscripts.example.com.\n\nExample 4\n~~~~~~~~~\n\nA web site administrator for an online banking site wants to ensure that\nall its content is loaded using SSL, in order to prevent attackers from\neavesdropping on requests.\n\n.. code:: python\n\n csp = {\n 'default-src': 'https://onlinebanking.jumbobank.com'\n }\n\nThe server only permits access to documents being loaded specifically\nover HTTPS through the single origin onlinebanking.jumbobank.com.\n\nExample 5\n~~~~~~~~~\n\nA web site administrator of a web mail site wants to allow HTML in\nemail, as well as images loaded from anywhere, but not JavaScript or\nother potentially dangerous content.\n\n.. code:: python\n\n csp = {\n 'default-src': [\n '\\'self\\'',\n '*.mailsite.com',\n ],\n 'img-src': '*'\n }\n\nNote that this example doesn't specify a ``script-src``; with the\nexample CSP, this site uses the setting specified by the ``default-src``\ndirective, which means that scripts can be loaded only from the\noriginating server.\n\nExample 6\n~~~~~~~~~\n\nA web site administrator wants to allow embedded scripts (which might\nbe generated dynamicially).\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\'',\n 'script-src': '\\'self\\'',\n }\n talisman = Talisman(\n app,\n content_security_policy=csp,\n content_security_policy_nonce_in=['script-src']\n )\n\nThe nonce needs to be added to the script tag in the template:\n\n.. code:: html\n\n \n\nNote that the CSP directive (`script-src` in the example) to which the `nonce-...`\nsource should be added needs to be defined explicitly.\n\nExample 7\n~~~~~~~~~\n\nA web site adminstrator wants to override the CSP directives via an\nenvironment variable which doesn't support specifying the policy as\na Python dictionary, e.g.:\n\n.. code:: bash\n\n export CSP_DIRECTIVES=\"default-src 'self'; image-src *\"\n python app.py\n\nThen in the app code you can read the CSP directives from the environment:\n\n.. code:: python\n\n import os\n from flask_talisman import Talisman, DEFAULT_CSP_POLICY\n\n talisman = Talisman(\n app,\n content_security_policy=os.environ.get(\"CSP_DIRECTIVES\", DEFAULT_CSP_POLICY),\n )\n\nAs you can see above the policy can be defined simply just like the official\nspecification requires the HTTP header to be set: As a semicolon separated\nlist of individual CSP directives.\n\nFeature Policy\n--------------\n\n**Note:** Feature Policy has largely been `renamed Permissions Policy `_\nin the latest draft and some features are likely to move to Document Policy.\nAt this writing, most browsers support the ``Feature-Policy`` HTTP Header name.\nSee the `Permissions Policy`_ and `Document Policy`_ sections below should you wish\nto set these.\n\nAlso note that the Feature Policy specification did not progress beyond the `draft https://wicg.github.io/feature-policy/`\nstage before being renamed, but is `supported in some form in most browsers\n`_.\n\nThe default feature policy is empty, as this is the default expected behaviour.\n\nGeolocation Example\n~~~~~~~~~~~~~~~~~~~\n\nDisable access to Geolocation interface.\n\n.. code:: python\n\n feature_policy = {\n 'geolocation': '\\'none\\''\n }\n talisman = Talisman(app, feature_policy=feature_policy)\n\nPermissions Policy\n------------------\n\nFeature Policy has been split into Permissions Policy and Document Policy but\nat this writing `browser support of Permissions Policy is very limited `_,\nand it is recommended to still set the ``Feature-Policy`` HTTP Header.\nPermission Policy support is included in Talisman for when this becomes more\nwidely supported.\n\nNote that the `Permission Policy is still an Working Draft `_.\n\nWhen the same feature or permission is set in both Feature Policy and Permission Policy,\nthe Permission Policy setting will take precedence in browsers that support both.\n\nIt should be noted that the syntax differs between Feature Policy and Permission Policy\nas can be seen from the ``geolocation`` examples provided.\n\nThe default Permissions Policy is ``interest-cohort=()``, which opts sites out of\n`Federated Learning of Cohorts `_ an interest-based advertising initiative.\n\nPermission Policy can be set either using a dictionary, or using a string.\n\nGeolocation and Microphone Example\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDisable access to Geolocation interface and Microphone using dictionary syntax\n\n.. code:: python\n\n permission_policy = {\n 'geolocation': '()',\n 'microphone': '()'\n }\n talisman = Talisman(app, permission_policy=permission_policy)\n\nDisable access to Geolocation interface and Microphone using string syntax\n\n.. code:: python\n\n permission_policy = 'geolocation=(), microphone=()'\n talisman = Talisman(app, permission_policy=permission_policy)\n\nDocument Policy\n---------------\n\nFeature Policy has been split into Permissions Policy and Document Policy but\nat this writing `browser support of Document Policy is very limited `_,\nand it is recommended to still set the ``Feature-Policy`` HTTP Header.\nDocument Policy support is included in Talisman for when this becomes more\nwidely supported.\n\nNote that the `Document Policy is still an Unofficial Draft `_.\n\nThe default Document Policy is empty, as this is the default expected behaviour.\n\nDocument Policy can be set either using a dictionary, or using a string.\n\nOversized-Images Example\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nForbid oversized-images using dictionary syntax:\n\n.. code:: python\n\n document_policy = {\n 'oversized-images': '?0'\n }\n talisman = Talisman(app, document_policy=document_policy)\n\nForbid oversized-images using string syntax:\n\n.. code:: python\n\n document_policy = 'oversized-images=?0'\n talisman = Talisman(app, document_policy=document_policy)\n\nDisclaimer\n----------\n\nThis code originated at Google, but is not an official Google product,\nexperimental or otherwise. It was forked on June 6th, 2021 from the\nunmaintained GoogleCloudPlatform/flask-talisman.\n\nThere is no silver bullet for web application security. Talisman can\nhelp, but security is more than just setting a few headers. Any\npublic-facing web application should have a comprehensive approach to\nsecurity.\n\n\nContributing changes\n--------------------\n\n- See `CONTRIBUTING.md`_\n\nLicensing\n---------\n\n- Apache 2.0 - See `LICENSE`_\n\n.. _LICENSE: https://github.com/wntrblm/flask-talisman/blob/master/LICENSE\n.. _CONTRIBUTING.md: https://github.com/wntrblm/flask-talisman/blob/master/CONTRIBUTING.md\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/flask-talisman.svg\n :target: https://pypi.python.org/pypi/flask-talisman", + "release_date": "2021-06-14T12:28:49", "parties": [ { "type": "person", "role": "author", - "name": "Ali-Akber Saifee", - "email": "ali@indydevs.org", + "name": "Alethea Katherine Flowers", + "email": "me@thea.codes", "url": null } ], "keywords": [ + "flask security https xss", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: MacOS", - "Operating System :: OS Independent", - "Operating System :: POSIX :: Linux", + "Operating System :: POSIX", + "Operating System :: Unix", + "Programming Language :: Python", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://flask-limiter.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/72/f3/68596cb061e1c7d5a7dfb3694de3f8845b908ea16296e762136f34727a65/Flask_Limiter-1.1.0-py2-none-any.whl", - "size": 13815, + "homepage_url": "https://github.com/wntrblm/flask-talisman", + "download_url": "https://files.pythonhosted.org/packages/0a/f1/3c2a37a8053149521407bff4573cecca93d86b1f15a027e8cc4463da6261/flask_talisman-0.8.1-py2.py3-none-any.whl", + "size": 18899, "sha1": null, - "md5": "cba11edf61a190167e225aafeacedb33", - "sha256": "9087984ae7eeb862f93bf5b18477a5e5b1e0c907647ae74fba1c7e3f1de63d6f", + "md5": "dd316576c1854219466ca0b90b33c19d", + "sha256": "08a25360c771f7a79d6d4db2abfa71f7422e62a714418b671d69d6a201764d05", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2140,9 +1397,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "Apache Software License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Apache Software License" ] }, "notice_text": null, @@ -2152,57 +1409,73 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-limiter/1.1.0/json", + "api_data_url": "https://pypi.org/pypi/flask-talisman/0.8.1/json", "datasource_id": null, - "purl": "pkg:pypi/flask-limiter@1.1.0" + "purl": "pkg:pypi/flask-talisman@0.8.1" }, { "type": "pypi", "namespace": null, - "name": "flask-limiter", - "version": "1.1.0", + "name": "flask", + "version": "1.1.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Rate limiting for flask applications\n.. |travis-ci| image:: https://img.shields.io/travis/alisaifee/flask-limiter/master.svg?style=flat-square\n :target: https://travis-ci.org/#!/alisaifee/flask-limiter?branch=master\n.. |coveralls| image:: https://img.shields.io/coveralls/alisaifee/flask-limiter/master.svg?style=flat-square\n :target: https://coveralls.io/r/alisaifee/flask-limiter?branch=master\n.. |pypi| image:: https://img.shields.io/pypi/v/Flask-Limiter.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Flask-Limiter\n.. |license| image:: https://img.shields.io/pypi/l/Flask-Limiter.svg?style=flat-square\n :target: https://pypi.python.org/pypi/Flask-Limiter\n.. |hound| image:: https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg?style=flat-square&longCache=true\n :target: https://houndci.com\n\n*************\nFlask-Limiter\n*************\n|travis-ci| |coveralls| |pypi| |license| |hound|\n\nFlask-Limiter provides rate limiting features to flask routes.\nIt has support for a configurable backend for storage\nwith current implementations for in-memory, redis and memcache.\n\nQuickstart\n===========\n\nAdd the rate limiter to your flask app. The following example uses the default\nin memory implementation for storage.\n\n.. code-block:: python\n\n from flask import Flask\n from flask_limiter import Limiter\n from flask_limiter.util import get_remote_address\n\n app = Flask(__name__)\n limiter = Limiter(\n app,\n key_func=get_remote_address,\n default_limits=[\"2 per minute\", \"1 per second\"],\n )\n\n @app.route(\"/slow\")\n @limiter.limit(\"1 per day\")\n def slow():\n return \"24\"\n\n @app.route(\"/fast\")\n def fast():\n return \"42\"\n\n @app.route(\"/ping\")\n @limiter.exempt\n def ping():\n return 'PONG'\n\n app.run()\n\n\n\nTest it out. The ``fast`` endpoint respects the default rate limit while the\n``slow`` endpoint uses the decorated one. ``ping`` has no rate limit associated\nwith it.\n\n.. code-block:: bash\n\n $ curl localhost:5000/fast\n 42\n $ curl localhost:5000/fast\n 42\n $ curl localhost:5000/fast\n \n 429 Too Many Requests\n

Too Many Requests

\n

2 per 1 minute

\n $ curl localhost:5000/slow\n 24\n $ curl localhost:5000/slow\n \n 429 Too Many Requests\n

Too Many Requests

\n

1 per 1 day

\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n $ curl localhost:5000/ping\n PONG\n\n\n\n\n`Read the docs `_\n\n\n\n\n\n.. :changelog:\n\nChangelog\n=========\n\n1.1.0 2019-10-02\n----------------\n* Provide Rate limit information with Exception (`Pull Request 202 `_)\n* Respect existing Retry-After header values (`Pull Request 143 `_)\n* Documentation improvements\n\n1.0.1 2017-12-08\n----------------\n* Bug fix\n\n * Duplicate rate limits applied via application limits (`Issue 108 `_)\n\n1.0.0 2017-11-06\n----------------\n* Improved documentation for handling ip addresses for applications behind proxiues (`Issue 41 `_)\n* Execute rate limits for decorated routes in decorator instead of `before_request` (`Issue 67 `_)\n* Bug Fix\n\n * Python 3.5 Errors (`Issue 82 `_)\n * RATELIMIT_KEY_PREFIX configuration constant not used (`Issue 88 `_)\n * Can't use dynamic limit in `default_limits` (`Issue 94 `_)\n * Retry-After header always zero when using key prefix (`Issue 99 `_)\n\n0.9.5.1 2017-08-18\n------------------\n* Upgrade versioneer\n\n0.9.5 2017-07-26\n----------------\n* Add support for key prefixes\n\n0.9.4 2017-05-01\n----------------\n* Implemented application wide shared limits\n\n0.9.3 2016-03-14\n----------------\n* Allow `reset` of limiter storage if available\n\n0.9.2 2016-03-04\n----------------\n* Deprecation warning for default `key_func` `get_ipaddr`\n* Support for `Retry-After` header\n\n0.9.1 2015-11-21\n----------------\n* Re-expose `enabled` property on `Limiter` instance.\n\n0.9 2015-11-13\n--------------\n* In-memory fallback option for unresponsive storage\n* Rate limit exemption option per limit\n\n0.8.5 2015-10-05\n----------------\n* Bug fix for reported issues of missing (limits) dependency upon installation.\n\n0.8.4 2015-10-03\n----------------\n* Documentation tweaks.\n\n0.8.2 2015-09-17\n----------------\n* Remove outdated files from egg\n\n0.8.1 2015-08-06\n----------------\n* Fixed compatibility with latest version of **Flask-Restful**\n\n0.8 2015-06-07\n--------------\n* No functional change\n\n0.7.9 2015-04-02\n----------------\n* Bug fix for case sensitive `methods` whitelist for `limits` decorator\n\n0.7.8 2015-03-20\n----------------\n* Hotfix for dynamic limits with blueprints\n* Undocumented feature to pass storage options to underlying storage backend.\n\n0.7.6 2015-03-02\n----------------\n* `methods` keyword argument for `limits` decorator to specify specific http\n methods to apply the rate limit to.\n\n0.7.5 2015-02-16\n----------------\n* `Custom error messages `_.\n\n0.7.4 2015-02-03\n----------------\n* Use Werkzeug TooManyRequests as the exception raised when available.\n\n0.7.3 2015-01-30\n----------------\n* Bug Fix\n\n * Fix for version comparison when monkey patching Werkzeug\n (`Issue 24 `_)\n\n0.7.1 2015-01-09\n----------------\n* Refactor core storage & ratelimiting strategy out into the `limits `_ package.\n* Remove duplicate hits when stacked rate limits are in use and a rate limit is hit.\n\n0.7 2015-01-09\n--------------\n* Refactoring of RedisStorage for extensibility (`Issue 18 `_)\n* Bug fix: Correct default setting for enabling rate limit headers. (`Issue 22 `_)\n\n0.6.6 2014-10-21\n----------------\n* Bug fix\n\n * Fix for responses slower than rate limiting window.\n (`Issue 17 `_.)\n\n0.6.5 2014-10-01\n----------------\n* Bug fix: in memory storage thread safety\n\n0.6.4 2014-08-31\n----------------\n* Support for manually triggering rate limit check\n\n0.6.3 2014-08-26\n----------------\n* Header name overrides\n\n0.6.2 2014-07-13\n----------------\n* `Rate limiting for blueprints\n `_\n\n0.6.1 2014-07-11\n----------------\n* per http method rate limit separation (`Recipe\n `_)\n* documentation improvements\n\n0.6 2014-06-24\n--------------\n* `Shared limits between routes\n `_\n\n0.5 2014-06-13\n--------------\n* `Request Filters\n `_\n\n0.4.4 2014-06-13\n----------------\n* Bug fix\n\n * Werkzeug < 0.9 Compatibility\n (`Issue 6 `_.)\n\n0.4.3 2014-06-12\n----------------\n* Hotfix : use HTTPException instead of abort to play well with other\n extensions.\n\n0.4.2 2014-06-12\n----------------\n* Allow configuration overrides via extension constructor\n\n0.4.1 2014-06-04\n----------------\n* Improved implementation of moving-window X-RateLimit-Reset value.\n\n0.4 2014-05-28\n--------------\n* `Rate limiting headers\n `_\n\n0.3.2 2014-05-26\n----------------\n* Bug fix\n\n * Memory leak when using ``Limiter.storage.MemoryStorage``\n (`Issue 4 `_.)\n* Improved test coverage\n\n0.3.1 2014-02-20\n----------------\n* Strict version requirement on six\n* documentation tweaks\n\n0.3.0 2014-02-19\n----------------\n* improved logging support for multiple handlers\n* allow callables to be passed to ``Limiter.limit`` decorator to dynamically\n load rate limit strings.\n* add a global kill switch in flask config for all rate limits.\n* Bug fixes\n\n * default key function for rate limit domain wasn't accounting for\n X-Forwarded-For header.\n\n\n\n0.2.2 2014-02-18\n----------------\n* add new decorator to exempt routes from limiting.\n* Bug fixes\n\n * versioneer.py wasn't included in manifest.\n * configuration string for strategy was out of sync with docs.\n\n0.2.1 2014-02-15\n----------------\n* python 2.6 support via counter backport\n* source docs.\n\n0.2 2014-02-15\n--------------\n* Implemented configurable strategies for rate limiting.\n* Bug fixes\n\n * better locking for in-memory storage\n * multi threading support for memcached storage\n\n\n0.1.1 2014-02-14\n----------------\n* Bug fixes\n\n * fix initializing the extension without an app\n * don't rate limit static files\n\n\n0.1.0 2014-02-13\n----------------\n* first release.", - "release_date": "2019-10-03T02:10:24", + "description": "A simple framework for building complex web applications.\nFlask\n=====\n\nFlask is a lightweight `WSGI`_ web application framework. It is designed\nto make getting started quick and easy, with the ability to scale up to\ncomplex applications. It began as a simple wrapper around `Werkzeug`_\nand `Jinja`_ and has become one of the most popular Python web\napplication frameworks.\n\nFlask offers suggestions, but doesn't enforce any dependencies or\nproject layout. It is up to the developer to choose the tools and\nlibraries they want to use. There are many extensions provided by the\ncommunity that make adding new functionality easy.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Flask\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from flask import Flask\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def hello():\n return \"Hello, World!\"\n\n.. code-block:: text\n\n $ env FLASK_APP=hello.py flask run\n * Serving Flask app \"hello\"\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\n\nContributing\n------------\n\nFor guidance on setting up a development environment and how to make a\ncontribution to Flask, see the `contributing guidelines`_.\n\n.. _contributing guidelines: https://github.com/pallets/flask/blob/master/CONTRIBUTING.rst\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Flask and the libraries\nit uses. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/flask/\n* Documentation: https://flask.palletsprojects.com/\n* Releases: https://pypi.org/project/Flask/\n* Code: https://github.com/pallets/flask\n* Issue tracker: https://github.com/pallets/flask/issues\n* Test status: https://dev.azure.com/pallets/flask/_build\n* Official chat: https://discord.gg/t6rrQZH\n\n.. _WSGI: https://wsgi.readthedocs.io\n.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/\n.. _Jinja: https://www.palletsprojects.com/p/jinja/\n.. _pip: https://pip.pypa.io/en/stable/quickstart/", + "release_date": "2021-05-14T01:45:55", "parties": [ { "type": "person", "role": "author", - "name": "Ali-Akber Saifee", - "email": "ali@indydevs.org", + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "Pallets", + "email": "contact@palletsprojects.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", + "Framework :: Flask", "Intended Audience :: Developers", - "Operating System :: MacOS", "Operating System :: OS Independent", - "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://flask-limiter.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/96/a6/35fe99ef33b44ae33c212da20e8f545354f58cb0c77f8b6cdcfda9f5e9ad/Flask-Limiter-1.1.0.tar.gz", - "size": 92428, + "homepage_url": "https://palletsprojects.com/p/flask/", + "download_url": "https://files.pythonhosted.org/packages/e8/6d/994208daa354f68fd89a34a8bafbeaab26fda84e7af1e35bdaed02b667e6/Flask-1.1.4-py2.py3-none-any.whl", + "size": 94591, "sha1": null, - "md5": "e96f02fa9092207eaeae96cf180f479a", - "sha256": "905c35cd87bf60c92fd87922ae23fe27aa5fb31980bab31fc00807adee9f5a55", + "md5": "6e579a6228c0333dd5b61c5bd214ea05", + "sha256": "c34f04500f2cbbea882b1acb02002ad6fe6b7ffa64a6164577995657f50aed22", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/pallets/flask", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -2212,44 +1485,51 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-limiter/1.1.0/json", + "api_data_url": "https://pypi.org/pypi/flask/1.1.4/json", "datasource_id": null, - "purl": "pkg:pypi/flask-limiter@1.1.0" + "purl": "pkg:pypi/flask@1.1.4" }, { "type": "pypi", "namespace": null, - "name": "flask-shell-ipython", - "version": "0.4.1", + "name": "funcsigs", + "version": "1.0.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "# flask-shell-ipython\n\nReplace default `flask shell` command by similar command running IPython.\n\n## Usage\n\nJust install:\n\n pip install flask-shell-ipython\n\nAnd here are you go:\n\n > flask shell\n Python 3.5.1 (default, Mar 3 2016, 09:29:07)\n [GCC 5.3.0] on linux\n IPython: 5.0.0\n App: discharges [debug]\n Instance: /home/ei-grad/repos/discharges/instance\n\n In [1]:", - "release_date": "2019-05-06T07:59:29", + "description": "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+\n.. funcsigs documentation master file, created by\n sphinx-quickstart on Fri Apr 20 20:27:52 2012.\n You can adapt this file completely to your liking, but it should at least\n contain the root `toctree` directive.\n\nIntroducing funcsigs\n====================\n\nThe Funcsigs Package\n--------------------\n\n``funcsigs`` is a backport of the `PEP 362`_ function signature features from\nPython 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7\nas well as 3.3 and up. 3.2 was supported by version 0.4, but with setuptools and\npip no longer supporting 3.2, we cannot make any statement about 3.2\ncompatibility.\n\nCompatibility\n`````````````\n\nThe ``funcsigs`` backport has been tested against:\n\n* CPython 2.6\n* CPython 2.7\n* CPython 3.3\n* CPython 3.4\n* CPython 3.5\n* CPython nightlies\n* PyPy and PyPy3(currently failing CI)\n\nContinuous integration testing is provided by `Travis CI`_.\n\nUnder Python 2.x there is a compatibility issue when a function is assigned to\nthe ``__wrapped__`` property of a class after it has been constructed.\nSimiliarily there under PyPy directly passing the ``__call__`` method of a\nbuiltin is also a compatibility issues. Otherwise the functionality is\nbelieved to be uniform between both Python2 and Python3.\n\nIssues\n``````\n\nSource code for ``funcsigs`` is hosted on `GitHub`_. Any bug reports or feature\nrequests can be made using GitHub's `issues system`_. |build_status| |coverage|\n\nExample\n-------\n\nTo obtain a `Signature` object, pass the target function to the\n``funcsigs.signature`` function.\n\n.. code-block:: python\n\n >>> from funcsigs import signature\n >>> def foo(a, b=None, *args, **kwargs):\n ... pass\n ...\n >>> sig = signature(foo)\n >>> sig\n \n >>> sig.parameters\n OrderedDict([('a', ), ('b', ), ('args', ), ('kwargs', )])\n >>> sig.return_annotation\n \n\nIntrospecting callables with the Signature object\n-------------------------------------------------\n\n.. note::\n\n This section of documentation is a direct reproduction of the Python\n standard library documentation for the inspect module.\n\nThe Signature object represents the call signature of a callable object and its\nreturn annotation. To retrieve a Signature object, use the :func:`signature`\nfunction.\n\n.. function:: signature(callable)\n\n Return a :class:`Signature` object for the given ``callable``::\n\n >>> from funcsigs import signature\n >>> def foo(a, *, b:int, **kwargs):\n ... pass\n\n >>> sig = signature(foo)\n\n >>> str(sig)\n '(a, *, b:int, **kwargs)'\n\n >>> str(sig.parameters['b'])\n 'b:int'\n\n >>> sig.parameters['b'].annotation\n \n\n Accepts a wide range of python callables, from plain functions and classes to\n :func:`functools.partial` objects.\n\n .. note::\n\n Some callables may not be introspectable in certain implementations of\n Python. For example, in CPython, built-in functions defined in C provide\n no metadata about their arguments.\n\n\n.. class:: Signature\n\n A Signature object represents the call signature of a function and its return\n annotation. For each parameter accepted by the function it stores a\n :class:`Parameter` object in its :attr:`parameters` collection.\n\n Signature objects are *immutable*. Use :meth:`Signature.replace` to make a\n modified copy.\n\n .. attribute:: Signature.empty\n\n A special class-level marker to specify absence of a return annotation.\n\n .. attribute:: Signature.parameters\n\n An ordered mapping of parameters' names to the corresponding\n :class:`Parameter` objects.\n\n .. attribute:: Signature.return_annotation\n\n The \"return\" annotation for the callable. If the callable has no \"return\"\n annotation, this attribute is set to :attr:`Signature.empty`.\n\n .. method:: Signature.bind(*args, **kwargs)\n\n Create a mapping from positional and keyword arguments to parameters.\n Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the\n signature, or raises a :exc:`TypeError`.\n\n .. method:: Signature.bind_partial(*args, **kwargs)\n\n Works the same way as :meth:`Signature.bind`, but allows the omission of\n some required arguments (mimics :func:`functools.partial` behavior.)\n Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the\n passed arguments do not match the signature.\n\n .. method:: Signature.replace(*[, parameters][, return_annotation])\n\n Create a new Signature instance based on the instance replace was invoked\n on. It is possible to pass different ``parameters`` and/or\n ``return_annotation`` to override the corresponding properties of the base\n signature. To remove return_annotation from the copied Signature, pass in\n :attr:`Signature.empty`.\n\n ::\n\n >>> def test(a, b):\n ... pass\n >>> sig = signature(test)\n >>> new_sig = sig.replace(return_annotation=\"new return anno\")\n >>> str(new_sig)\n \"(a, b) -> 'new return anno'\"\n\n\n.. class:: Parameter\n\n Parameter objects are *immutable*. Instead of modifying a Parameter object,\n you can use :meth:`Parameter.replace` to create a modified copy.\n\n .. attribute:: Parameter.empty\n\n A special class-level marker to specify absence of default values and\n annotations.\n\n .. attribute:: Parameter.name\n\n The name of the parameter as a string. Must be a valid python identifier\n name (with the exception of ``POSITIONAL_ONLY`` parameters, which can have\n it set to ``None``).\n\n .. attribute:: Parameter.default\n\n The default value for the parameter. If the parameter has no default\n value, this attribute is set to :attr:`Parameter.empty`.\n\n .. attribute:: Parameter.annotation\n\n The annotation for the parameter. If the parameter has no annotation,\n this attribute is set to :attr:`Parameter.empty`.\n\n .. attribute:: Parameter.kind\n\n Describes how argument values are bound to the parameter. Possible values\n (accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):\n\n +------------------------+----------------------------------------------+\n | Name | Meaning |\n +========================+==============================================+\n | *POSITIONAL_ONLY* | Value must be supplied as a positional |\n | | argument. |\n | | |\n | | Python has no explicit syntax for defining |\n | | positional-only parameters, but many built-in|\n | | and extension module functions (especially |\n | | those that accept only one or two parameters)|\n | | accept them. |\n +------------------------+----------------------------------------------+\n | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |\n | | positional argument (this is the standard |\n | | binding behaviour for functions implemented |\n | | in Python.) |\n +------------------------+----------------------------------------------+\n | *VAR_POSITIONAL* | A tuple of positional arguments that aren't |\n | | bound to any other parameter. This |\n | | corresponds to a ``*args`` parameter in a |\n | | Python function definition. |\n +------------------------+----------------------------------------------+\n | *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|\n | | Keyword only parameters are those which |\n | | appear after a ``*`` or ``*args`` entry in a |\n | | Python function definition. |\n +------------------------+----------------------------------------------+\n | *VAR_KEYWORD* | A dict of keyword arguments that aren't bound|\n | | to any other parameter. This corresponds to a|\n | | ``**kwargs`` parameter in a Python function |\n | | definition. |\n +------------------------+----------------------------------------------+\n\n Example: print all keyword-only arguments without default values::\n\n >>> def foo(a, b, *, c, d=10):\n ... pass\n\n >>> sig = signature(foo)\n >>> for param in sig.parameters.values():\n ... if (param.kind == param.KEYWORD_ONLY and\n ... param.default is param.empty):\n ... print('Parameter:', param)\n Parameter: c\n\n .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])\n\n Create a new Parameter instance based on the instance replaced was invoked\n on. To override a :class:`Parameter` attribute, pass the corresponding\n argument. To remove a default value or/and an annotation from a\n Parameter, pass :attr:`Parameter.empty`.\n\n ::\n\n >>> from funcsigs import Parameter\n >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)\n >>> str(param)\n 'foo=42'\n\n >>> str(param.replace()) # Will create a shallow copy of 'param'\n 'foo=42'\n\n >>> str(param.replace(default=Parameter.empty, annotation='spam'))\n \"foo:'spam'\"\n\n\n.. class:: BoundArguments\n\n Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.\n Holds the mapping of arguments to the function's parameters.\n\n .. attribute:: BoundArguments.arguments\n\n An ordered, mutable mapping (:class:`collections.OrderedDict`) of\n parameters' names to arguments' values. Contains only explicitly bound\n arguments. Changes in :attr:`arguments` will reflect in :attr:`args` and\n :attr:`kwargs`.\n\n Should be used in conjunction with :attr:`Signature.parameters` for any\n argument processing purposes.\n\n .. note::\n\n Arguments for which :meth:`Signature.bind` or\n :meth:`Signature.bind_partial` relied on a default value are skipped.\n However, if needed, it is easy to include them.\n\n ::\n\n >>> def foo(a, b=10):\n ... pass\n\n >>> sig = signature(foo)\n >>> ba = sig.bind(5)\n\n >>> ba.args, ba.kwargs\n ((5,), {})\n\n >>> for param in sig.parameters.values():\n ... if param.name not in ba.arguments:\n ... ba.arguments[param.name] = param.default\n\n >>> ba.args, ba.kwargs\n ((5, 10), {})\n\n\n .. attribute:: BoundArguments.args\n\n A tuple of positional arguments values. Dynamically computed from the\n :attr:`arguments` attribute.\n\n .. attribute:: BoundArguments.kwargs\n\n A dict of keyword arguments values. Dynamically computed from the\n :attr:`arguments` attribute.\n\n The :attr:`args` and :attr:`kwargs` properties can be used to invoke\n functions::\n\n def test(a, *, b):\n ...\n\n sig = signature(test)\n ba = sig.bind(10, b=20)\n test(*ba.args, **ba.kwargs)\n\n\n.. seealso::\n\n :pep:`362` - Function Signature Object.\n The detailed specification, implementation details and examples.\n\nCopyright\n---------\n\n*funcsigs* is a derived work of CPython under the terms of the `PSF License\nAgreement`_. The original CPython inspect module, its unit tests and\ndocumentation are the copyright of the Python Software Foundation. The derived\nwork is distributed under the `Apache License Version 2.0`_.\n\n.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python\n.. _Apache License Version 2.0: http://opensource.org/licenses/Apache-2.0\n.. _GitHub: https://github.com/testing-cabal/funcsigs\n.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python\n.. _Travis CI: http://travis-ci.org/\n.. _Read The Docs: http://funcsigs.readthedocs.org/\n.. _PEP 362: http://www.python.org/dev/peps/pep-0362/\n.. _inspect: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object\n.. _issues system: https://github.com/testing-cabal/funcsigs/issues\n\n.. |build_status| image:: https://secure.travis-ci.org/aliles/funcsigs.png?branch=master\n :target: http://travis-ci.org/#!/aliles/funcsigs\n :alt: Current build status\n\n.. |coverage| image:: https://coveralls.io/repos/aliles/funcsigs/badge.png?branch=master\n :target: https://coveralls.io/r/aliles/funcsigs?branch=master\n :alt: Coverage status\n\n.. |pypi_version| image:: https://pypip.in/v/funcsigs/badge.png\n :target: https://crate.io/packages/funcsigs/\n :alt: Latest PyPI version", + "release_date": "2016-04-25T22:22:05", "parties": [ { "type": "person", "role": "author", - "name": "Andrew Grigorev", - "email": "andrew@ei-grad.ru", + "name": "Testing Cabal", + "email": "testing-in-python@lists.idyll.org", "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Framework :: Flask", - "Framework :: IPython", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3" + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://github.com/ei-grad/flask-shell-ipython", - "download_url": "https://files.pythonhosted.org/packages/10/6b/a45278cbff711cc7b8904bd38679a8cc249c4db825a76ae332302f59d398/flask_shell_ipython-0.4.1-py2.py3-none-any.whl", - "size": 3493, + "homepage_url": "http://funcsigs.readthedocs.org", + "download_url": "https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl", + "size": 17697, "sha1": null, - "md5": "11e90b76846c933d8b752ccb1cd10c90", - "sha256": "f212b4fad6831edf652799c719cd05fd0716edfaa5506eb41ff9ef09109890d3", + "md5": "701d58358171f34b6d1197de2923a35a", + "sha256": "330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2257,8 +1537,9 @@ "copyright": null, "license_expression": null, "declared_license": { + "license": "ASL", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Apache Software License" ] }, "notice_text": null, @@ -2268,44 +1549,42 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-shell-ipython/0.4.1/json", + "api_data_url": "https://pypi.org/pypi/funcsigs/1.0.2/json", "datasource_id": null, - "purl": "pkg:pypi/flask-shell-ipython@0.4.1" + "purl": "pkg:pypi/funcsigs@1.0.2" }, { "type": "pypi", "namespace": null, - "name": "flask-shell-ipython", - "version": "0.4.1", + "name": "importlib-metadata", + "version": "2.1.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "# flask-shell-ipython\n\nReplace default `flask shell` command by similar command running IPython.\n\n## Usage\n\nJust install:\n\n pip install flask-shell-ipython\n\nAnd here are you go:\n\n > flask shell\n Python 3.5.1 (default, Mar 3 2016, 09:29:07)\n [GCC 5.3.0] on linux\n IPython: 5.0.0\n App: discharges [debug]\n Instance: /home/ei-grad/repos/discharges/instance\n\n In [1]:", - "release_date": "2019-05-06T07:59:31", + "description": "Read metadata from Python packages\n=========================\n ``importlib_metadata``\n=========================\n\n``importlib_metadata`` is a library to access the metadata for a\nPython package.\n\nAs of Python 3.8, this functionality has been added to the\n`Python standard library\n`_.\nThis package supplies backports of that functionality including\nimprovements added to subsequent Python versions.\n\n\nUsage\n=====\n\nSee the `online documentation `_\nfor usage details.\n\n`Finder authors\n`_ can\nalso add support for custom package installers. See the above documentation\nfor details.\n\n\nCaveats\n=======\n\nThis project primarily supports third-party packages installed by PyPA\ntools (or other conforming packages). It does not support:\n\n- Packages in the stdlib.\n- Packages installed without metadata.\n\nProject details\n===============\n\n * Project home: https://github.com/python/importlib_metadata\n * Report bugs at: https://github.com/python/importlib_metadata/issues\n * Code hosting: https://github.com/python/importlib_metadata\n * Documentation: https://importlib_metadata.readthedocs.io/", + "release_date": "2022-01-23T15:25:17", "parties": [ { "type": "person", "role": "author", - "name": "Andrew Grigorev", - "email": "andrew@ei-grad.ru", + "name": "Jason R. Coombs", + "email": "jaraco@jaraco.com", "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Framework :: Flask", - "Framework :: IPython", + "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3" + "Programming Language :: Python :: 3", + "Topic :: Software Development :: Libraries" ], - "homepage_url": "http://github.com/ei-grad/flask-shell-ipython", - "download_url": "https://files.pythonhosted.org/packages/48/8e/ba861448b7590282519aea82ae39107c77d001fdc37b7af4c14ed0e0db77/flask-shell-ipython-0.4.1.tar.gz", - "size": 2090, + "homepage_url": "http://importlib-metadata.readthedocs.io/", + "download_url": "https://files.pythonhosted.org/packages/cf/b4/877779cd7b5a15536ecbe0655cfb35a0de0ede6d888151fd7356d278c47d/importlib_metadata-2.1.3-py2.py3-none-any.whl", + "size": 10211, "sha1": null, - "md5": "fdb3375a368f3b26e03f2aad7c659b9b", - "sha256": "fb3b390f4dc03d7a960c62c5b51ce4deca19ceff77e4db3d4670012adc529ebd", + "md5": "212b354bdd29ba0d1d32806d08b1430c", + "sha256": "52e65a0856f9ba7ea8f2c4ced253fb6c88d1a8c352cb1e916cff4eb17d5a693d", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2313,8 +1592,9 @@ "copyright": null, "license_expression": null, "declared_license": { + "license": "Apache Software License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Apache Software License" ] }, "notice_text": null, @@ -2324,53 +1604,48 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-shell-ipython/0.4.1/json", + "api_data_url": "https://pypi.org/pypi/importlib-metadata/2.1.3/json", "datasource_id": null, - "purl": "pkg:pypi/flask-shell-ipython@0.4.1" + "purl": "pkg:pypi/importlib-metadata@2.1.3" }, { "type": "pypi", "namespace": null, - "name": "flask-talisman", - "version": "0.8.1", + "name": "invenio-app", + "version": "1.3.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "HTTP security headers for Flask.\nTalisman: HTTP security headers for Flask\n=========================================\n\n|PyPI Version|\n\nTalisman is a small Flask extension that handles setting HTTP headers\nthat can help protect against a few common web application security\nissues.\n\nThe default configuration:\n\n- Forces all connects to ``https``, unless running with debug enabled.\n- Enables `HTTP Strict Transport\n Security `_.\n- Sets Flask's session cookie to ``secure``, so it will never be set if\n your application is somehow accessed via a non-secure connection.\n- Sets Flask's session cookie to ``httponly``, preventing JavaScript\n from being able to access its content. CSRF via Ajax uses a separate\n cookie and should be unaffected.\n- Sets Flask's session cookie to ``Lax``, preventing the cookie to be leaked\n in CSRF-prone request methods.\n- Sets\n `X-Frame-Options `_\n to ``SAMEORIGIN`` to avoid\n `clickjacking `_.\n- Sets `X-XSS-Protection\n `_\n to enable a cross site scripting filter for IE and Safari (note Chrome has\n removed this and Firefox never supported it).\n- Sets `X-Content-Type-Options\n `_\n to prevent content type sniffing.\n- Sets a strict `Content Security\n Policy `__\n of ``default-src: 'self'``. This is intended to almost completely\n prevent Cross Site Scripting (XSS) attacks. This is probably the only\n setting that you should reasonably change. See the\n `Content Security Policy`_ section.\n- Sets a strict `Referrer-Policy `_\n of ``strict-origin-when-cross-origin`` that governs which referrer information should be included with\n requests made.\n- Disables interest-cohort by default in the `Permissions-Policy `_\n like `Drupal `_ to enhance privacy protection.\n\n\nIn addition to Talisman, you **should always use a cross-site request\nforgery (CSRF) library**. It's highly recommended to use\n`Flask-SeaSurf `_,\nwhich is based on Django's excellent library.\n\nInstallation & Basic Usage\n--------------------------\n\nInstall via `pip `_:\n\n::\n\n pip install flask-talisman\n\nAfter installing, wrap your Flask app with a ``Talisman``:\n\n.. code:: python\n\n from flask import Flask\n from flask_talisman import Talisman\n\n app = Flask(__name__)\n Talisman(app)\n\n\nThere is also a full `Example App `_.\n\nOptions\n-------\n\n- ``force_https``, default ``True``, forces all non-debug connects to\n ``https`` (`about HTTPS `_).\n- ``force_https_permanent``, default ``False``, uses ``301`` instead of\n ``302`` for ``https`` redirects.\n\n- ``frame_options``, default ``SAMEORIGIN``, can be ``SAMEORIGIN``,\n ``DENY``, or ``ALLOWFROM`` (`about Frame Options `_).\n- ``frame_options_allow_from``, default ``None``, a string indicating\n the domains that are allowed to embed the site via iframe.\n\n- ``strict_transport_security``, default ``True``, whether to send HSTS\n headers (`about HSTS `_).\n- ``strict_transport_security_preload``, default ``False``, enables HSTS\n preloading. If you register your application with\n `Google's HSTS preload list `_,\n Firefox and Chrome will never load your site over a non-secure\n connection.\n- ``strict_transport_security_max_age``, default ``ONE_YEAR_IN_SECS``,\n length of time the browser will respect the HSTS header.\n- ``strict_transport_security_include_subdomains``, default ``True``,\n whether subdomains should also use HSTS.\n\n- ``content_security_policy``, default ``default-src: 'self'``, see the\n `Content Security Policy`_ section (`about Content Security Policy `_).\n- ``content_security_policy_nonce_in``, default ``[]``. Adds a per-request nonce\n value to the flask request object and also to the specified CSP header section.\n I.e. ``['script-src', 'style-src']``\n- ``content_security_policy_report_only``, default ``False``, whether to set\n the CSP header as \"report-only\" (as `Content-Security-Policy-Report-Only`)\n to ease deployment by disabling the policy enforcement by the browser,\n requires passing a value with the ``content_security_policy_report_uri``\n parameter\n- ``content_security_policy_report_uri``, default ``None``, a string\n indicating the report URI used for `CSP violation reports\n `_\n\n- ``referrer_policy``, default ``strict-origin-when-cross-origin``, a string\n that sets the Referrer Policy header to send a full URL when performing a same-origin\n request, only send the origin of the document to an equally secure destination\n (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP) (`about Referrer Policy `_).\n\n- ``feature_policy``, default ``{}``, see the `Feature Policy`_ section (`about Feature Policy `_).\n\n- ``permissions_policy``, default ``{'interest-cohort': '()'}``, see the `Permissions Policy`_ section (`about Permissions Policy `_).\n- ``document_policy``, default ``{}``, see the `Document Policy`_ section (`about Document Policy `_).\n\n- ``session_cookie_secure``, default ``True``, set the session cookie\n to ``secure``, preventing it from being sent over plain ``http`` (`about cookies (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)_`).\n- ``session_cookie_http_only``, default ``True``, set the session\n cookie to ``httponly``, preventing it from being read by JavaScript.\n- ``session_cookie_samesite``, default ``Lax``, set this to ``Strict`` to prevent the cookie from being sent by the browser to the target site in all cross-site browsing context, even when following a regular link.\n\n\n- ``force_file_save``, default ``False``, whether to set the\n `X-Download-Options `_\n header to ``noopen`` to prevent IE >= 8 to from opening file downloads\n directly and only save them instead.\n\n- ``x_content_type_options``, default ``True``, Protects against MIME sniffing vulnerabilities (`about Content Type Options `_).\n- ``x_xss_protection``, default ``True``, Protects against cross-site scripting (XSS) attacks (`about XSS Protection `_).\n\nFor a full list of (security) headers, check out: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers.\n\nPer-view options\n~~~~~~~~~~~~~~~~\n\nSometimes you want to change the policy for a specific view. The\n``force_https``, ``frame_options``, ``frame_options_allow_from``,\n`content_security_policy``, ``feature_policy``, ``permissions_policy``\nand ``document_policy`` options can be changed on a per-view basis.\n\n.. code:: python\n\n from flask import Flask\n from flask_talisman import Talisman, ALLOW_FROM\n\n app = Flask(__name__)\n talisman = Talisman(app)\n\n @app.route('/normal')\n def normal():\n return 'Normal'\n\n @app.route('/embeddable')\n @talisman(frame_options=ALLOW_FROM, frame_options_allow_from='*')\n def embeddable():\n return 'Embeddable'\n\nContent Security Policy\n-----------------------\n\nThe default content security policy is extremely strict and will\nprevent loading any resources that are not in the same domain as the\napplication. Most web applications will need to change this policy.\n\nA slightly more permissive policy is available at\n``flask_talisman.GOOGLE_CSP_POLICY``, which allows loading Google-hosted JS\nlibraries, fonts, and embeding media from YouTube and Maps.\n\nYou can and should create your own policy to suit your site's needs.\nHere's a few examples adapted from\n`MDN `_:\n\nExample 1\n~~~~~~~~~\n\nThis is the default policy. A web site administrator wants all content\nto come from the site's own origin (this excludes subdomains.)\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\''\n }\n talisman = Talisman(app, content_security_policy=csp)\n\nExample 2\n~~~~~~~~~\n\nA web site administrator wants to allow content from a trusted domain\nand all its subdomains (it doesn't have to be the same domain that the\nCSP is set on.)\n\n.. code:: python\n\n csp = {\n 'default-src': [\n '\\'self\\'',\n '*.trusted.com'\n ]\n }\n\nExample 3\n~~~~~~~~~\n\nA web site administrator wants to allow users of a web application to\ninclude images from any origin in their own content, but to restrict\naudio or video media to trusted providers, and all scripts only to a\nspecific server that hosts trusted code.\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\'',\n 'img-src': '*',\n 'media-src': [\n 'media1.com',\n 'media2.com',\n ],\n 'script-src': 'userscripts.example.com'\n }\n\nIn this example content is only permitted from the document's origin\nwith the following exceptions:\n\n- Images may loaded from anywhere (note the ``*`` wildcard).\n- Media is only allowed from media1.com and media2.com (and not from\n subdomains of those sites).\n- Executable script is only allowed from userscripts.example.com.\n\nExample 4\n~~~~~~~~~\n\nA web site administrator for an online banking site wants to ensure that\nall its content is loaded using SSL, in order to prevent attackers from\neavesdropping on requests.\n\n.. code:: python\n\n csp = {\n 'default-src': 'https://onlinebanking.jumbobank.com'\n }\n\nThe server only permits access to documents being loaded specifically\nover HTTPS through the single origin onlinebanking.jumbobank.com.\n\nExample 5\n~~~~~~~~~\n\nA web site administrator of a web mail site wants to allow HTML in\nemail, as well as images loaded from anywhere, but not JavaScript or\nother potentially dangerous content.\n\n.. code:: python\n\n csp = {\n 'default-src': [\n '\\'self\\'',\n '*.mailsite.com',\n ],\n 'img-src': '*'\n }\n\nNote that this example doesn't specify a ``script-src``; with the\nexample CSP, this site uses the setting specified by the ``default-src``\ndirective, which means that scripts can be loaded only from the\noriginating server.\n\nExample 6\n~~~~~~~~~\n\nA web site administrator wants to allow embedded scripts (which might\nbe generated dynamicially).\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\'',\n 'script-src': '\\'self\\'',\n }\n talisman = Talisman(\n app,\n content_security_policy=csp,\n content_security_policy_nonce_in=['script-src']\n )\n\nThe nonce needs to be added to the script tag in the template:\n\n.. code:: html\n\n \n\nNote that the CSP directive (`script-src` in the example) to which the `nonce-...`\nsource should be added needs to be defined explicitly.\n\nExample 7\n~~~~~~~~~\n\nA web site adminstrator wants to override the CSP directives via an\nenvironment variable which doesn't support specifying the policy as\na Python dictionary, e.g.:\n\n.. code:: bash\n\n export CSP_DIRECTIVES=\"default-src 'self'; image-src *\"\n python app.py\n\nThen in the app code you can read the CSP directives from the environment:\n\n.. code:: python\n\n import os\n from flask_talisman import Talisman, DEFAULT_CSP_POLICY\n\n talisman = Talisman(\n app,\n content_security_policy=os.environ.get(\"CSP_DIRECTIVES\", DEFAULT_CSP_POLICY),\n )\n\nAs you can see above the policy can be defined simply just like the official\nspecification requires the HTTP header to be set: As a semicolon separated\nlist of individual CSP directives.\n\nFeature Policy\n--------------\n\n**Note:** Feature Policy has largely been `renamed Permissions Policy `_\nin the latest draft and some features are likely to move to Document Policy.\nAt this writing, most browsers support the ``Feature-Policy`` HTTP Header name.\nSee the `Permissions Policy`_ and `Document Policy`_ sections below should you wish\nto set these.\n\nAlso note that the Feature Policy specification did not progress beyond the `draft https://wicg.github.io/feature-policy/`\nstage before being renamed, but is `supported in some form in most browsers\n`_.\n\nThe default feature policy is empty, as this is the default expected behaviour.\n\nGeolocation Example\n~~~~~~~~~~~~~~~~~~~\n\nDisable access to Geolocation interface.\n\n.. code:: python\n\n feature_policy = {\n 'geolocation': '\\'none\\''\n }\n talisman = Talisman(app, feature_policy=feature_policy)\n\nPermissions Policy\n------------------\n\nFeature Policy has been split into Permissions Policy and Document Policy but\nat this writing `browser support of Permissions Policy is very limited `_,\nand it is recommended to still set the ``Feature-Policy`` HTTP Header.\nPermission Policy support is included in Talisman for when this becomes more\nwidely supported.\n\nNote that the `Permission Policy is still an Working Draft `_.\n\nWhen the same feature or permission is set in both Feature Policy and Permission Policy,\nthe Permission Policy setting will take precedence in browsers that support both.\n\nIt should be noted that the syntax differs between Feature Policy and Permission Policy\nas can be seen from the ``geolocation`` examples provided.\n\nThe default Permissions Policy is ``interest-cohort=()``, which opts sites out of\n`Federated Learning of Cohorts `_ an interest-based advertising initiative.\n\nPermission Policy can be set either using a dictionary, or using a string.\n\nGeolocation and Microphone Example\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDisable access to Geolocation interface and Microphone using dictionary syntax\n\n.. code:: python\n\n permission_policy = {\n 'geolocation': '()',\n 'microphone': '()'\n }\n talisman = Talisman(app, permission_policy=permission_policy)\n\nDisable access to Geolocation interface and Microphone using string syntax\n\n.. code:: python\n\n permission_policy = 'geolocation=(), microphone=()'\n talisman = Talisman(app, permission_policy=permission_policy)\n\nDocument Policy\n---------------\n\nFeature Policy has been split into Permissions Policy and Document Policy but\nat this writing `browser support of Document Policy is very limited `_,\nand it is recommended to still set the ``Feature-Policy`` HTTP Header.\nDocument Policy support is included in Talisman for when this becomes more\nwidely supported.\n\nNote that the `Document Policy is still an Unofficial Draft `_.\n\nThe default Document Policy is empty, as this is the default expected behaviour.\n\nDocument Policy can be set either using a dictionary, or using a string.\n\nOversized-Images Example\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nForbid oversized-images using dictionary syntax:\n\n.. code:: python\n\n document_policy = {\n 'oversized-images': '?0'\n }\n talisman = Talisman(app, document_policy=document_policy)\n\nForbid oversized-images using string syntax:\n\n.. code:: python\n\n document_policy = 'oversized-images=?0'\n talisman = Talisman(app, document_policy=document_policy)\n\nDisclaimer\n----------\n\nThis code originated at Google, but is not an official Google product,\nexperimental or otherwise. It was forked on June 6th, 2021 from the\nunmaintained GoogleCloudPlatform/flask-talisman.\n\nThere is no silver bullet for web application security. Talisman can\nhelp, but security is more than just setting a few headers. Any\npublic-facing web application should have a comprehensive approach to\nsecurity.\n\n\nContributing changes\n--------------------\n\n- See `CONTRIBUTING.md`_\n\nLicensing\n---------\n\n- Apache 2.0 - See `LICENSE`_\n\n.. _LICENSE: https://github.com/wntrblm/flask-talisman/blob/master/LICENSE\n.. _CONTRIBUTING.md: https://github.com/wntrblm/flask-talisman/blob/master/CONTRIBUTING.md\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/flask-talisman.svg\n :target: https://pypi.python.org/pypi/flask-talisman", - "release_date": "2021-06-14T12:28:49", + "description": "..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n=============\n Invenio-App\n=============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-app.svg\n :target: https://github.com/inveniosoftware/invenio-app/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-app/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-app/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-app.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-app\n\n.. image:: https://img.shields.io/pypi/v/invenio-app.svg\n :target: https://pypi.org/pypi/invenio-app\n\nWSGI, Celery and CLI applications for Invenio flavours.\n\nFurther documentation is available on\nhttps://invenio-app.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2017-2019 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.3.3 (released 2021-12-06)\n\n- Pinned Limits library to align with Flask-Limiter.\n\nVersion 1.3.2 (released 2021-10-28)\n\n- Unpins Flask-Talisman to allow newer versions.\n\n- Removes Python 2 support.\n\nVersion 1.3.1 (released 2020-12-07)\n\n- Adds HEAD and OPTIONS HTTP verbs to the /ping endpoint as recommended\n in HAProxy documentation.\n\nVersion 1.3.0 (released 2020-05-13)\n\n- Adds new template theming via allowing Jinja to load templates from different\n theme folders via the new configuration variable ``APP_THEME``.\n\n- Removes the ChoiceLoader used to load templates from the instance folder in\n favour of using Flask instead. Invenio-App sets the application's root_path\n to the instance folder, which makes Flask create the same behavior\n previously achieved with the ChoiceLoader.\n\nVersion 1.2.6 (released 2020-05-06)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\nVersion 1.2.5 (released 2020-02-26)\n\nVersion 1.2.4 (released 2019-11-20)\n\n- Disable ratelimit for celery.\n\nVersion 1.2.3 (released 2019-10-10)\n\n- Make `static_url_path` configurable through environment variable.\n\nVersion 1.2.2 (released 2019-08-29)\n\n- Unpins Invenio packages versions.\n\nVersion 1.2.1 (released 2019-08-21)\n\n- Exempts the \"/ping\" view from rate limiting.\n\nVersion 1.2.0 (released 2019-07-29)\n\n- Fixes issue with instance_path and static_folder being globals. Depends on\n change in Invenio-Base v1.1.0\n\n- Improves rate limiting function to have limits per guest and per\n authenticated users.\n\nVersion 1.1.1 (released 2019-07-15)\n\n- Fixes a security issue where APP_ALLOWED_HOSTS was not always being checked,\n and thus could allow host header injection attacks.\n\n NOTE: you should never route requests to your application with a wrong host\n header. The APP_ALLOWED_HOSTS exists as an extra protective measure, because\n it is easy to misconfigure your web server.\n\n The root cause was that Werkzeug's trusted host feature only works when\n request.host is being evaluated. This means that for instance when only\n url_for (part of the routing system) is used, then the host header check is\n not performed.\n\nVersion 1.1.0 (released 2018-12-14)\n\n- The Flask-DebugToolbar extension is now automatically registered if\n installed.\n\nVersion 1.0.5 (released 2018-12-05)\n\n- Add health check view\n\n- Fix response headers assertion in tests\n\nVersion 1.0.4 (released 2018-10-11)\n\n- Fix Content Security Policy headers when set empty in DEBUG mode.\n\nVersion 1.0.3 (released 2018-10-08)\n\n- Fix Content Security Policy headers when running in DEBUG mode.\n\nVersion 1.0.2 (released 2018-08-24)\n\n- Allows use of Flask-DebugToolbar when running in DEBUG mode.\n\nVersion 1.0.1 (released 2018-06-29)\n\n- Pin Flask-Talisman.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2021-12-06T16:48:11", "parties": [ { "type": "person", "role": "author", - "name": "Alethea Katherine Flowers", - "email": "me@thea.codes", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "flask security https xss", + "invenio applications", "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: Unix", + "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://github.com/wntrblm/flask-talisman", - "download_url": "https://files.pythonhosted.org/packages/0a/f1/3c2a37a8053149521407bff4573cecca93d86b1f15a027e8cc4463da6261/flask_talisman-0.8.1-py2.py3-none-any.whl", - "size": 18899, + "homepage_url": "https://github.com/inveniosoftware/invenio-app", + "download_url": "https://files.pythonhosted.org/packages/25/ee/bfe28143e98e24a27ca8d6c4a464591e8006766a60fe8468a9b2061468e2/invenio_app-1.3.3-py2.py3-none-any.whl", + "size": 18908, "sha1": null, - "md5": "dd316576c1854219466ca0b90b33c19d", - "sha256": "08a25360c771f7a79d6d4db2abfa71f7422e62a714418b671d69d6a201764d05", + "md5": "623a44fc541a251d30f02763321cb730", + "sha256": "0bca343edf807896a47bd0f8e3bc61cd7f6b381f6cd720a2b6547e0d11c32853", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2378,9 +1653,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache Software License", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2390,53 +1665,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-talisman/0.8.1/json", + "api_data_url": "https://pypi.org/pypi/invenio-app/1.3.3/json", "datasource_id": null, - "purl": "pkg:pypi/flask-talisman@0.8.1" + "purl": "pkg:pypi/invenio-app@1.3.3" }, { "type": "pypi", "namespace": null, - "name": "flask-talisman", - "version": "0.8.1", + "name": "invenio-base", + "version": "1.2.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "HTTP security headers for Flask.\nTalisman: HTTP security headers for Flask\n=========================================\n\n|PyPI Version|\n\nTalisman is a small Flask extension that handles setting HTTP headers\nthat can help protect against a few common web application security\nissues.\n\nThe default configuration:\n\n- Forces all connects to ``https``, unless running with debug enabled.\n- Enables `HTTP Strict Transport\n Security `_.\n- Sets Flask's session cookie to ``secure``, so it will never be set if\n your application is somehow accessed via a non-secure connection.\n- Sets Flask's session cookie to ``httponly``, preventing JavaScript\n from being able to access its content. CSRF via Ajax uses a separate\n cookie and should be unaffected.\n- Sets Flask's session cookie to ``Lax``, preventing the cookie to be leaked\n in CSRF-prone request methods.\n- Sets\n `X-Frame-Options `_\n to ``SAMEORIGIN`` to avoid\n `clickjacking `_.\n- Sets `X-XSS-Protection\n `_\n to enable a cross site scripting filter for IE and Safari (note Chrome has\n removed this and Firefox never supported it).\n- Sets `X-Content-Type-Options\n `_\n to prevent content type sniffing.\n- Sets a strict `Content Security\n Policy `__\n of ``default-src: 'self'``. This is intended to almost completely\n prevent Cross Site Scripting (XSS) attacks. This is probably the only\n setting that you should reasonably change. See the\n `Content Security Policy`_ section.\n- Sets a strict `Referrer-Policy `_\n of ``strict-origin-when-cross-origin`` that governs which referrer information should be included with\n requests made.\n- Disables interest-cohort by default in the `Permissions-Policy `_\n like `Drupal `_ to enhance privacy protection.\n\n\nIn addition to Talisman, you **should always use a cross-site request\nforgery (CSRF) library**. It's highly recommended to use\n`Flask-SeaSurf `_,\nwhich is based on Django's excellent library.\n\nInstallation & Basic Usage\n--------------------------\n\nInstall via `pip `_:\n\n::\n\n pip install flask-talisman\n\nAfter installing, wrap your Flask app with a ``Talisman``:\n\n.. code:: python\n\n from flask import Flask\n from flask_talisman import Talisman\n\n app = Flask(__name__)\n Talisman(app)\n\n\nThere is also a full `Example App `_.\n\nOptions\n-------\n\n- ``force_https``, default ``True``, forces all non-debug connects to\n ``https`` (`about HTTPS `_).\n- ``force_https_permanent``, default ``False``, uses ``301`` instead of\n ``302`` for ``https`` redirects.\n\n- ``frame_options``, default ``SAMEORIGIN``, can be ``SAMEORIGIN``,\n ``DENY``, or ``ALLOWFROM`` (`about Frame Options `_).\n- ``frame_options_allow_from``, default ``None``, a string indicating\n the domains that are allowed to embed the site via iframe.\n\n- ``strict_transport_security``, default ``True``, whether to send HSTS\n headers (`about HSTS `_).\n- ``strict_transport_security_preload``, default ``False``, enables HSTS\n preloading. If you register your application with\n `Google's HSTS preload list `_,\n Firefox and Chrome will never load your site over a non-secure\n connection.\n- ``strict_transport_security_max_age``, default ``ONE_YEAR_IN_SECS``,\n length of time the browser will respect the HSTS header.\n- ``strict_transport_security_include_subdomains``, default ``True``,\n whether subdomains should also use HSTS.\n\n- ``content_security_policy``, default ``default-src: 'self'``, see the\n `Content Security Policy`_ section (`about Content Security Policy `_).\n- ``content_security_policy_nonce_in``, default ``[]``. Adds a per-request nonce\n value to the flask request object and also to the specified CSP header section.\n I.e. ``['script-src', 'style-src']``\n- ``content_security_policy_report_only``, default ``False``, whether to set\n the CSP header as \"report-only\" (as `Content-Security-Policy-Report-Only`)\n to ease deployment by disabling the policy enforcement by the browser,\n requires passing a value with the ``content_security_policy_report_uri``\n parameter\n- ``content_security_policy_report_uri``, default ``None``, a string\n indicating the report URI used for `CSP violation reports\n `_\n\n- ``referrer_policy``, default ``strict-origin-when-cross-origin``, a string\n that sets the Referrer Policy header to send a full URL when performing a same-origin\n request, only send the origin of the document to an equally secure destination\n (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP) (`about Referrer Policy `_).\n\n- ``feature_policy``, default ``{}``, see the `Feature Policy`_ section (`about Feature Policy `_).\n\n- ``permissions_policy``, default ``{'interest-cohort': '()'}``, see the `Permissions Policy`_ section (`about Permissions Policy `_).\n- ``document_policy``, default ``{}``, see the `Document Policy`_ section (`about Document Policy `_).\n\n- ``session_cookie_secure``, default ``True``, set the session cookie\n to ``secure``, preventing it from being sent over plain ``http`` (`about cookies (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)_`).\n- ``session_cookie_http_only``, default ``True``, set the session\n cookie to ``httponly``, preventing it from being read by JavaScript.\n- ``session_cookie_samesite``, default ``Lax``, set this to ``Strict`` to prevent the cookie from being sent by the browser to the target site in all cross-site browsing context, even when following a regular link.\n\n\n- ``force_file_save``, default ``False``, whether to set the\n `X-Download-Options `_\n header to ``noopen`` to prevent IE >= 8 to from opening file downloads\n directly and only save them instead.\n\n- ``x_content_type_options``, default ``True``, Protects against MIME sniffing vulnerabilities (`about Content Type Options `_).\n- ``x_xss_protection``, default ``True``, Protects against cross-site scripting (XSS) attacks (`about XSS Protection `_).\n\nFor a full list of (security) headers, check out: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers.\n\nPer-view options\n~~~~~~~~~~~~~~~~\n\nSometimes you want to change the policy for a specific view. The\n``force_https``, ``frame_options``, ``frame_options_allow_from``,\n`content_security_policy``, ``feature_policy``, ``permissions_policy``\nand ``document_policy`` options can be changed on a per-view basis.\n\n.. code:: python\n\n from flask import Flask\n from flask_talisman import Talisman, ALLOW_FROM\n\n app = Flask(__name__)\n talisman = Talisman(app)\n\n @app.route('/normal')\n def normal():\n return 'Normal'\n\n @app.route('/embeddable')\n @talisman(frame_options=ALLOW_FROM, frame_options_allow_from='*')\n def embeddable():\n return 'Embeddable'\n\nContent Security Policy\n-----------------------\n\nThe default content security policy is extremely strict and will\nprevent loading any resources that are not in the same domain as the\napplication. Most web applications will need to change this policy.\n\nA slightly more permissive policy is available at\n``flask_talisman.GOOGLE_CSP_POLICY``, which allows loading Google-hosted JS\nlibraries, fonts, and embeding media from YouTube and Maps.\n\nYou can and should create your own policy to suit your site's needs.\nHere's a few examples adapted from\n`MDN `_:\n\nExample 1\n~~~~~~~~~\n\nThis is the default policy. A web site administrator wants all content\nto come from the site's own origin (this excludes subdomains.)\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\''\n }\n talisman = Talisman(app, content_security_policy=csp)\n\nExample 2\n~~~~~~~~~\n\nA web site administrator wants to allow content from a trusted domain\nand all its subdomains (it doesn't have to be the same domain that the\nCSP is set on.)\n\n.. code:: python\n\n csp = {\n 'default-src': [\n '\\'self\\'',\n '*.trusted.com'\n ]\n }\n\nExample 3\n~~~~~~~~~\n\nA web site administrator wants to allow users of a web application to\ninclude images from any origin in their own content, but to restrict\naudio or video media to trusted providers, and all scripts only to a\nspecific server that hosts trusted code.\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\'',\n 'img-src': '*',\n 'media-src': [\n 'media1.com',\n 'media2.com',\n ],\n 'script-src': 'userscripts.example.com'\n }\n\nIn this example content is only permitted from the document's origin\nwith the following exceptions:\n\n- Images may loaded from anywhere (note the ``*`` wildcard).\n- Media is only allowed from media1.com and media2.com (and not from\n subdomains of those sites).\n- Executable script is only allowed from userscripts.example.com.\n\nExample 4\n~~~~~~~~~\n\nA web site administrator for an online banking site wants to ensure that\nall its content is loaded using SSL, in order to prevent attackers from\neavesdropping on requests.\n\n.. code:: python\n\n csp = {\n 'default-src': 'https://onlinebanking.jumbobank.com'\n }\n\nThe server only permits access to documents being loaded specifically\nover HTTPS through the single origin onlinebanking.jumbobank.com.\n\nExample 5\n~~~~~~~~~\n\nA web site administrator of a web mail site wants to allow HTML in\nemail, as well as images loaded from anywhere, but not JavaScript or\nother potentially dangerous content.\n\n.. code:: python\n\n csp = {\n 'default-src': [\n '\\'self\\'',\n '*.mailsite.com',\n ],\n 'img-src': '*'\n }\n\nNote that this example doesn't specify a ``script-src``; with the\nexample CSP, this site uses the setting specified by the ``default-src``\ndirective, which means that scripts can be loaded only from the\noriginating server.\n\nExample 6\n~~~~~~~~~\n\nA web site administrator wants to allow embedded scripts (which might\nbe generated dynamicially).\n\n.. code:: python\n\n csp = {\n 'default-src': '\\'self\\'',\n 'script-src': '\\'self\\'',\n }\n talisman = Talisman(\n app,\n content_security_policy=csp,\n content_security_policy_nonce_in=['script-src']\n )\n\nThe nonce needs to be added to the script tag in the template:\n\n.. code:: html\n\n \n\nNote that the CSP directive (`script-src` in the example) to which the `nonce-...`\nsource should be added needs to be defined explicitly.\n\nExample 7\n~~~~~~~~~\n\nA web site adminstrator wants to override the CSP directives via an\nenvironment variable which doesn't support specifying the policy as\na Python dictionary, e.g.:\n\n.. code:: bash\n\n export CSP_DIRECTIVES=\"default-src 'self'; image-src *\"\n python app.py\n\nThen in the app code you can read the CSP directives from the environment:\n\n.. code:: python\n\n import os\n from flask_talisman import Talisman, DEFAULT_CSP_POLICY\n\n talisman = Talisman(\n app,\n content_security_policy=os.environ.get(\"CSP_DIRECTIVES\", DEFAULT_CSP_POLICY),\n )\n\nAs you can see above the policy can be defined simply just like the official\nspecification requires the HTTP header to be set: As a semicolon separated\nlist of individual CSP directives.\n\nFeature Policy\n--------------\n\n**Note:** Feature Policy has largely been `renamed Permissions Policy `_\nin the latest draft and some features are likely to move to Document Policy.\nAt this writing, most browsers support the ``Feature-Policy`` HTTP Header name.\nSee the `Permissions Policy`_ and `Document Policy`_ sections below should you wish\nto set these.\n\nAlso note that the Feature Policy specification did not progress beyond the `draft https://wicg.github.io/feature-policy/`\nstage before being renamed, but is `supported in some form in most browsers\n`_.\n\nThe default feature policy is empty, as this is the default expected behaviour.\n\nGeolocation Example\n~~~~~~~~~~~~~~~~~~~\n\nDisable access to Geolocation interface.\n\n.. code:: python\n\n feature_policy = {\n 'geolocation': '\\'none\\''\n }\n talisman = Talisman(app, feature_policy=feature_policy)\n\nPermissions Policy\n------------------\n\nFeature Policy has been split into Permissions Policy and Document Policy but\nat this writing `browser support of Permissions Policy is very limited `_,\nand it is recommended to still set the ``Feature-Policy`` HTTP Header.\nPermission Policy support is included in Talisman for when this becomes more\nwidely supported.\n\nNote that the `Permission Policy is still an Working Draft `_.\n\nWhen the same feature or permission is set in both Feature Policy and Permission Policy,\nthe Permission Policy setting will take precedence in browsers that support both.\n\nIt should be noted that the syntax differs between Feature Policy and Permission Policy\nas can be seen from the ``geolocation`` examples provided.\n\nThe default Permissions Policy is ``interest-cohort=()``, which opts sites out of\n`Federated Learning of Cohorts `_ an interest-based advertising initiative.\n\nPermission Policy can be set either using a dictionary, or using a string.\n\nGeolocation and Microphone Example\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDisable access to Geolocation interface and Microphone using dictionary syntax\n\n.. code:: python\n\n permission_policy = {\n 'geolocation': '()',\n 'microphone': '()'\n }\n talisman = Talisman(app, permission_policy=permission_policy)\n\nDisable access to Geolocation interface and Microphone using string syntax\n\n.. code:: python\n\n permission_policy = 'geolocation=(), microphone=()'\n talisman = Talisman(app, permission_policy=permission_policy)\n\nDocument Policy\n---------------\n\nFeature Policy has been split into Permissions Policy and Document Policy but\nat this writing `browser support of Document Policy is very limited `_,\nand it is recommended to still set the ``Feature-Policy`` HTTP Header.\nDocument Policy support is included in Talisman for when this becomes more\nwidely supported.\n\nNote that the `Document Policy is still an Unofficial Draft `_.\n\nThe default Document Policy is empty, as this is the default expected behaviour.\n\nDocument Policy can be set either using a dictionary, or using a string.\n\nOversized-Images Example\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nForbid oversized-images using dictionary syntax:\n\n.. code:: python\n\n document_policy = {\n 'oversized-images': '?0'\n }\n talisman = Talisman(app, document_policy=document_policy)\n\nForbid oversized-images using string syntax:\n\n.. code:: python\n\n document_policy = 'oversized-images=?0'\n talisman = Talisman(app, document_policy=document_policy)\n\nDisclaimer\n----------\n\nThis code originated at Google, but is not an official Google product,\nexperimental or otherwise. It was forked on June 6th, 2021 from the\nunmaintained GoogleCloudPlatform/flask-talisman.\n\nThere is no silver bullet for web application security. Talisman can\nhelp, but security is more than just setting a few headers. Any\npublic-facing web application should have a comprehensive approach to\nsecurity.\n\n\nContributing changes\n--------------------\n\n- See `CONTRIBUTING.md`_\n\nLicensing\n---------\n\n- Apache 2.0 - See `LICENSE`_\n\n.. _LICENSE: https://github.com/wntrblm/flask-talisman/blob/master/LICENSE\n.. _CONTRIBUTING.md: https://github.com/wntrblm/flask-talisman/blob/master/CONTRIBUTING.md\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/flask-talisman.svg\n :target: https://pypi.python.org/pypi/flask-talisman", - "release_date": "2021-06-14T12:28:50", + "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n==============\n Invenio-Base\n==============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-base.svg\n :target: https://github.com/inveniosoftware/invenio-base/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-base/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-base/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-base.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-base\n\n.. image:: https://img.shields.io/pypi/v/invenio-base.svg\n :target: https://pypi.org/pypi/invenio-base\n\n\nBase package for building Invenio application factories.\n\nFurther documentation is available on https://invenio-base.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.2.5 (released 2021-10-18)\n\n- Unpin Flask <2.0 and Werkzeug <2.0.\n\nVersion 1.2.4 (released 2021-05-12)\n\n- Pins Flask <2.0 and Werkzeug <2.0 due to incompatibilities in the newly\n released versions.\n\nVersion 1.2.3 (released 2020-05-11)\n\n- Adds support for passing ``root_path`` to the base Flask application factory.\n\nVersion 1.2.2 (released 2020-03-05)\n\n- Adds ``six`` dependency.\n- Adds the ``obj_or_import_string`` and ``load_or_import_from_config`` common\n utility functions for general re-use throughout other Invenio modules.\n\nVersion 1.2.1 (released 2020-03-02)\n\n- Bumps Flask minimum version to v1.0.4.\n- Removes ``invenio instance create`` command and ``cokiecutter`` dependency.\n\nVersion 1.2.0 (released 2019-08-28)\n\n- Adds support to trust new proxy headers through the ``PROXYFIX_CONFIG``\n configuration variable. For more information see the\n `full documentation `_.\n\n- Deprecates the usage of ``WSGI_PROXIES`` configuration which only supports\n ``X-Forwarded-For`` headers.\n\nVersion 1.1.0 (released 2019-07-29)\n\n- Add support for allowing instance path and static folder to be callables\n which are evaluated before being passed to the Flask application class. This\n fixes an issue in pytest-invenio and Invenio-App in which a global instance\n path was only evaluated once.\n\n- Fixes deprecation warnings from Werkzeug.\n\nVersion 1.0.2 (released 2018-12-14)\n\nVersion 1.0.1 (released 2018-05-25)\n\n- Added support for blueprint factory functions in the\n ``invenio_base.blueprints`` and the ``invenio_base.api_blueprints`` entry\n point groups. In addition to specifying an import path to an already created\n blueprint, you can now specify an import path of a blueprint factory function\n with the signature create_blueprint(app), that will create and return a\n blueprint. This allows moving dynamic blueprint creation from the extension\n initialization phase to the blueprint registration phase.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2021-10-18T12:34:05", "parties": [ { "type": "person", "role": "author", - "name": "Alethea Katherine Flowers", - "email": "me@thea.codes", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "flask security https xss", + "invenio", "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: POSIX", - "Operating System :: Unix", + "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://github.com/wntrblm/flask-talisman", - "download_url": "https://files.pythonhosted.org/packages/dd/1a/9f21ccb72a0d09594eb704da7f87a6d373ad7e9d4ac18693d1a3c275afb2/flask-talisman-0.8.1.tar.gz", - "size": 23799, + "homepage_url": "https://github.com/inveniosoftware/invenio-base", + "download_url": "https://files.pythonhosted.org/packages/47/7c/89fe1cd7263c8d67a366c568dcc6f5050518f06ca7695f7b719f3f340229/invenio_base-1.2.5-py2.py3-none-any.whl", + "size": 15348, "sha1": null, - "md5": "306909acdb85448cd33bab9d101e793e", - "sha256": "5d502ec0c51bf1755a797b8cffbe4e94f8684af712ba0b56f3d80b79277ef285", + "md5": "17dcb76abd874239b98e51ba50d86823", + "sha256": "d22a8dee25def2d5e7f10566a12b63e643d6c1267de0baa335dbdfd7382707d6", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2444,9 +1715,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache Software License", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2456,40 +1727,33 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask-talisman/0.8.1/json", + "api_data_url": "https://pypi.org/pypi/invenio-base/1.2.5/json", "datasource_id": null, - "purl": "pkg:pypi/flask-talisman@0.8.1" + "purl": "pkg:pypi/invenio-base@1.2.5" }, { "type": "pypi", "namespace": null, - "name": "flask", - "version": "1.1.4", + "name": "invenio-cache", + "version": "1.1.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "A simple framework for building complex web applications.\nFlask\n=====\n\nFlask is a lightweight `WSGI`_ web application framework. It is designed\nto make getting started quick and easy, with the ability to scale up to\ncomplex applications. It began as a simple wrapper around `Werkzeug`_\nand `Jinja`_ and has become one of the most popular Python web\napplication frameworks.\n\nFlask offers suggestions, but doesn't enforce any dependencies or\nproject layout. It is up to the developer to choose the tools and\nlibraries they want to use. There are many extensions provided by the\ncommunity that make adding new functionality easy.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Flask\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from flask import Flask\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def hello():\n return \"Hello, World!\"\n\n.. code-block:: text\n\n $ env FLASK_APP=hello.py flask run\n * Serving Flask app \"hello\"\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\n\nContributing\n------------\n\nFor guidance on setting up a development environment and how to make a\ncontribution to Flask, see the `contributing guidelines`_.\n\n.. _contributing guidelines: https://github.com/pallets/flask/blob/master/CONTRIBUTING.rst\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Flask and the libraries\nit uses. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/flask/\n* Documentation: https://flask.palletsprojects.com/\n* Releases: https://pypi.org/project/Flask/\n* Code: https://github.com/pallets/flask\n* Issue tracker: https://github.com/pallets/flask/issues\n* Test status: https://dev.azure.com/pallets/flask/_build\n* Official chat: https://discord.gg/t6rrQZH\n\n.. _WSGI: https://wsgi.readthedocs.io\n.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/\n.. _Jinja: https://www.palletsprojects.com/p/jinja/\n.. _pip: https://pip.pypa.io/en/stable/quickstart/", - "release_date": "2021-05-14T01:45:55", + "description": "..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n===============\n Invenio-Cache\n===============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-cache.svg\n :target: https://github.com/inveniosoftware/invenio-cache/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-cache.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-cache\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-cache.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-cache\n\n.. image:: https://img.shields.io/pypi/v/invenio-cache.svg\n :target: https://pypi.org/pypi/invenio-cache\n\nCache module for Invenio.\n\nFurther documentation is available on\nhttps://invenio-cache.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.1.0 (released 2020-03-10)\n\n- changes flask dependency to centrally managed\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2020-03-10T17:25:42", "parties": [ { "type": "person", "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Pallets", - "email": "contact@palletsprojects.com", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ + "invenio cache", "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", - "Framework :: Flask", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", @@ -2497,32 +1761,25 @@ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://palletsprojects.com/p/flask/", - "download_url": "https://files.pythonhosted.org/packages/e8/6d/994208daa354f68fd89a34a8bafbeaab26fda84e7af1e35bdaed02b667e6/Flask-1.1.4-py2.py3-none-any.whl", - "size": 94591, + "homepage_url": "https://github.com/inveniosoftware/invenio-cache", + "download_url": "https://files.pythonhosted.org/packages/04/f0/22b7426ac2b821d93bc6066410fac652c924330bfbd5b64a82e1e36b0ed6/invenio_cache-1.1.0-py2.py3-none-any.whl", + "size": 9071, "sha1": null, - "md5": "6e579a6228c0333dd5b61c5bd214ea05", - "sha256": "c34f04500f2cbbea882b1acb02002ad6fe6b7ffa64a6164577995657f50aed22", + "md5": "8501d03c713fe7580f9d625ac22e247b", + "sha256": "a4562639f2f63cbc9de1302e159ecd9363f17d53d912a8d0773ffe76e2f153fc", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/flask", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2532,73 +1789,60 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask/1.1.4/json", + "api_data_url": "https://pypi.org/pypi/invenio-cache/1.1.0/json", "datasource_id": null, - "purl": "pkg:pypi/flask@1.1.4" + "purl": "pkg:pypi/invenio-cache@1.1.0" }, { "type": "pypi", "namespace": null, - "name": "flask", - "version": "1.1.4", + "name": "invenio-celery", + "version": "1.2.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "A simple framework for building complex web applications.\nFlask\n=====\n\nFlask is a lightweight `WSGI`_ web application framework. It is designed\nto make getting started quick and easy, with the ability to scale up to\ncomplex applications. It began as a simple wrapper around `Werkzeug`_\nand `Jinja`_ and has become one of the most popular Python web\napplication frameworks.\n\nFlask offers suggestions, but doesn't enforce any dependencies or\nproject layout. It is up to the developer to choose the tools and\nlibraries they want to use. There are many extensions provided by the\ncommunity that make adding new functionality easy.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Flask\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from flask import Flask\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def hello():\n return \"Hello, World!\"\n\n.. code-block:: text\n\n $ env FLASK_APP=hello.py flask run\n * Serving Flask app \"hello\"\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\n\nContributing\n------------\n\nFor guidance on setting up a development environment and how to make a\ncontribution to Flask, see the `contributing guidelines`_.\n\n.. _contributing guidelines: https://github.com/pallets/flask/blob/master/CONTRIBUTING.rst\n\n\nDonate\n------\n\nThe Pallets organization develops and supports Flask and the libraries\nit uses. In order to grow the community of contributors and users, and\nallow the maintainers to devote more time to the projects, `please\ndonate today`_.\n\n.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/flask/\n* Documentation: https://flask.palletsprojects.com/\n* Releases: https://pypi.org/project/Flask/\n* Code: https://github.com/pallets/flask\n* Issue tracker: https://github.com/pallets/flask/issues\n* Test status: https://dev.azure.com/pallets/flask/_build\n* Official chat: https://discord.gg/t6rrQZH\n\n.. _WSGI: https://wsgi.readthedocs.io\n.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/\n.. _Jinja: https://www.palletsprojects.com/p/jinja/\n.. _pip: https://pip.pypa.io/en/stable/quickstart/", - "release_date": "2021-05-14T01:45:58", + "description": "Celery module for Invenio.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Celery\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-celery.svg\n :target: https://github.com/inveniosoftware/invenio-celery/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-celery/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-celery/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-celery.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-celery\n\n.. image:: https://img.shields.io/pypi/v/invenio-celery.svg\n :target: https://pypi.org/pypi/invenio-celery\n\n\nCelery distributed task queue module for Invenio.\n\nInvenio-Celery is a small discovery layer that takes care of discovering and\nloading tasks from other Invenio modules, as well as providing configuration\ndefaults for Celery usage in Invenio. Invenio-Celery relies on Flask-CeleryExt\nfor integrating Flask and Celery with application factories.\n\nFurther documentation is available on https://invenio-celery.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2020 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.2.2 (released 2020-12-09)\n\n- Removes the pytest-celery dependency as the package is still in prerelease\n and it only affects tests. If you are using Celery 5 you may need to enable\n the pytest celery plugin - see\n https://docs.celeryproject.org/en/stable/userguide/testing.html#enabling\n\nVersion 1.2.1 (released 2020-09-28)\n\n- Change version bounds on Celery to 4.4 to 5.1.\n\n- Adds dependency on pytest-celery which now installs the celery_config pytest\n fixture.\n\nVersion 1.2.0 (released 2020-03-05)\n\n- added dependency on invenio-base to centralise package management\n\nVersion 1.1.3 (released 2020-02-21)\n\n- Removed redundant version specifier for Celery dependency.\n\nVersion 1.1.2 (released 2020-02-17)\n\n- Unpinned Celery version to allow support of Celery 4.4\n\nVersion 1.1.1 (released 2019-11-19)\n\n- pinned version of celery lower than 4.3 due to Datetime serialization\n issues\n\nVersion 1.1.0 (released 2019-06-21)\n\n- Changed the ``msgpack-python`` dependency to ``msgpack``.\n Please first uninstall ``msgpack-python`` before installing\n the new ``msgpack`` dependency (``pip uninstall msgpack-python``).\n\n\nVersion 1.0.1 (released 2018-12-06)\n\n- Adds support for Celery v4.2. Technically this change is backward\n incompatible because it is no longer possible to load tasks from bare modules\n (e.g. mymodule.py in the Python root). This is a constraint imposed by Celery\n v4.2. We however do not known of any cases where bare modules have been used,\n and also this design is discouraged so we are not flagging it as a backward\n incompatible change, in order to have the change readily available for\n current Invenio version.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2020-12-09T12:33:49", "parties": [ { "type": "person", "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Pallets", - "email": "contact@palletsprojects.com", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ + "invenio celery", "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", - "Framework :: Flask", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://palletsprojects.com/p/flask/", - "download_url": "https://files.pythonhosted.org/packages/4d/5b/2d145f5fe718b2f15ebe69240538f06faa8bbb76488bf962091db1f7a26d/Flask-1.1.4.tar.gz", - "size": 635920, + "homepage_url": "https://github.com/inveniosoftware/invenio-celery", + "download_url": "https://files.pythonhosted.org/packages/b8/a7/ec89de1fd4615aebc0e59c25ab8d8152bb04f03fa21b1c50bdd08239e79e/invenio_celery-1.2.2-py2.py3-none-any.whl", + "size": 8399, "sha1": null, - "md5": "49c23fb3096ee548f9737bbddc934c41", - "sha256": "0fbeb6180d383a9186d0d6ed954e0042ad9f18e0e8de088b2b419d526927d196", + "md5": "fd454eeeb6da903fc8a97c3ba0203d5e", + "sha256": "f03d9d0bb0d5c3b2e1d53ded0dc8839e83d738d00913854de33cefbfa95c4d8d", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/flask", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2608,51 +1852,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/flask/1.1.4/json", + "api_data_url": "https://pypi.org/pypi/invenio-celery/1.2.2/json", "datasource_id": null, - "purl": "pkg:pypi/flask@1.1.4" + "purl": "pkg:pypi/invenio-celery@1.2.2" }, { "type": "pypi", "namespace": null, - "name": "funcsigs", - "version": "1.0.2", + "name": "invenio-config", + "version": "1.0.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+\n.. funcsigs documentation master file, created by\n sphinx-quickstart on Fri Apr 20 20:27:52 2012.\n You can adapt this file completely to your liking, but it should at least\n contain the root `toctree` directive.\n\nIntroducing funcsigs\n====================\n\nThe Funcsigs Package\n--------------------\n\n``funcsigs`` is a backport of the `PEP 362`_ function signature features from\nPython 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7\nas well as 3.3 and up. 3.2 was supported by version 0.4, but with setuptools and\npip no longer supporting 3.2, we cannot make any statement about 3.2\ncompatibility.\n\nCompatibility\n`````````````\n\nThe ``funcsigs`` backport has been tested against:\n\n* CPython 2.6\n* CPython 2.7\n* CPython 3.3\n* CPython 3.4\n* CPython 3.5\n* CPython nightlies\n* PyPy and PyPy3(currently failing CI)\n\nContinuous integration testing is provided by `Travis CI`_.\n\nUnder Python 2.x there is a compatibility issue when a function is assigned to\nthe ``__wrapped__`` property of a class after it has been constructed.\nSimiliarily there under PyPy directly passing the ``__call__`` method of a\nbuiltin is also a compatibility issues. Otherwise the functionality is\nbelieved to be uniform between both Python2 and Python3.\n\nIssues\n``````\n\nSource code for ``funcsigs`` is hosted on `GitHub`_. Any bug reports or feature\nrequests can be made using GitHub's `issues system`_. |build_status| |coverage|\n\nExample\n-------\n\nTo obtain a `Signature` object, pass the target function to the\n``funcsigs.signature`` function.\n\n.. code-block:: python\n\n >>> from funcsigs import signature\n >>> def foo(a, b=None, *args, **kwargs):\n ... pass\n ...\n >>> sig = signature(foo)\n >>> sig\n \n >>> sig.parameters\n OrderedDict([('a', ), ('b', ), ('args', ), ('kwargs', )])\n >>> sig.return_annotation\n \n\nIntrospecting callables with the Signature object\n-------------------------------------------------\n\n.. note::\n\n This section of documentation is a direct reproduction of the Python\n standard library documentation for the inspect module.\n\nThe Signature object represents the call signature of a callable object and its\nreturn annotation. To retrieve a Signature object, use the :func:`signature`\nfunction.\n\n.. function:: signature(callable)\n\n Return a :class:`Signature` object for the given ``callable``::\n\n >>> from funcsigs import signature\n >>> def foo(a, *, b:int, **kwargs):\n ... pass\n\n >>> sig = signature(foo)\n\n >>> str(sig)\n '(a, *, b:int, **kwargs)'\n\n >>> str(sig.parameters['b'])\n 'b:int'\n\n >>> sig.parameters['b'].annotation\n \n\n Accepts a wide range of python callables, from plain functions and classes to\n :func:`functools.partial` objects.\n\n .. note::\n\n Some callables may not be introspectable in certain implementations of\n Python. For example, in CPython, built-in functions defined in C provide\n no metadata about their arguments.\n\n\n.. class:: Signature\n\n A Signature object represents the call signature of a function and its return\n annotation. For each parameter accepted by the function it stores a\n :class:`Parameter` object in its :attr:`parameters` collection.\n\n Signature objects are *immutable*. Use :meth:`Signature.replace` to make a\n modified copy.\n\n .. attribute:: Signature.empty\n\n A special class-level marker to specify absence of a return annotation.\n\n .. attribute:: Signature.parameters\n\n An ordered mapping of parameters' names to the corresponding\n :class:`Parameter` objects.\n\n .. attribute:: Signature.return_annotation\n\n The \"return\" annotation for the callable. If the callable has no \"return\"\n annotation, this attribute is set to :attr:`Signature.empty`.\n\n .. method:: Signature.bind(*args, **kwargs)\n\n Create a mapping from positional and keyword arguments to parameters.\n Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the\n signature, or raises a :exc:`TypeError`.\n\n .. method:: Signature.bind_partial(*args, **kwargs)\n\n Works the same way as :meth:`Signature.bind`, but allows the omission of\n some required arguments (mimics :func:`functools.partial` behavior.)\n Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the\n passed arguments do not match the signature.\n\n .. method:: Signature.replace(*[, parameters][, return_annotation])\n\n Create a new Signature instance based on the instance replace was invoked\n on. It is possible to pass different ``parameters`` and/or\n ``return_annotation`` to override the corresponding properties of the base\n signature. To remove return_annotation from the copied Signature, pass in\n :attr:`Signature.empty`.\n\n ::\n\n >>> def test(a, b):\n ... pass\n >>> sig = signature(test)\n >>> new_sig = sig.replace(return_annotation=\"new return anno\")\n >>> str(new_sig)\n \"(a, b) -> 'new return anno'\"\n\n\n.. class:: Parameter\n\n Parameter objects are *immutable*. Instead of modifying a Parameter object,\n you can use :meth:`Parameter.replace` to create a modified copy.\n\n .. attribute:: Parameter.empty\n\n A special class-level marker to specify absence of default values and\n annotations.\n\n .. attribute:: Parameter.name\n\n The name of the parameter as a string. Must be a valid python identifier\n name (with the exception of ``POSITIONAL_ONLY`` parameters, which can have\n it set to ``None``).\n\n .. attribute:: Parameter.default\n\n The default value for the parameter. If the parameter has no default\n value, this attribute is set to :attr:`Parameter.empty`.\n\n .. attribute:: Parameter.annotation\n\n The annotation for the parameter. If the parameter has no annotation,\n this attribute is set to :attr:`Parameter.empty`.\n\n .. attribute:: Parameter.kind\n\n Describes how argument values are bound to the parameter. Possible values\n (accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):\n\n +------------------------+----------------------------------------------+\n | Name | Meaning |\n +========================+==============================================+\n | *POSITIONAL_ONLY* | Value must be supplied as a positional |\n | | argument. |\n | | |\n | | Python has no explicit syntax for defining |\n | | positional-only parameters, but many built-in|\n | | and extension module functions (especially |\n | | those that accept only one or two parameters)|\n | | accept them. |\n +------------------------+----------------------------------------------+\n | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |\n | | positional argument (this is the standard |\n | | binding behaviour for functions implemented |\n | | in Python.) |\n +------------------------+----------------------------------------------+\n | *VAR_POSITIONAL* | A tuple of positional arguments that aren't |\n | | bound to any other parameter. This |\n | | corresponds to a ``*args`` parameter in a |\n | | Python function definition. |\n +------------------------+----------------------------------------------+\n | *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|\n | | Keyword only parameters are those which |\n | | appear after a ``*`` or ``*args`` entry in a |\n | | Python function definition. |\n +------------------------+----------------------------------------------+\n | *VAR_KEYWORD* | A dict of keyword arguments that aren't bound|\n | | to any other parameter. This corresponds to a|\n | | ``**kwargs`` parameter in a Python function |\n | | definition. |\n +------------------------+----------------------------------------------+\n\n Example: print all keyword-only arguments without default values::\n\n >>> def foo(a, b, *, c, d=10):\n ... pass\n\n >>> sig = signature(foo)\n >>> for param in sig.parameters.values():\n ... if (param.kind == param.KEYWORD_ONLY and\n ... param.default is param.empty):\n ... print('Parameter:', param)\n Parameter: c\n\n .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])\n\n Create a new Parameter instance based on the instance replaced was invoked\n on. To override a :class:`Parameter` attribute, pass the corresponding\n argument. To remove a default value or/and an annotation from a\n Parameter, pass :attr:`Parameter.empty`.\n\n ::\n\n >>> from funcsigs import Parameter\n >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)\n >>> str(param)\n 'foo=42'\n\n >>> str(param.replace()) # Will create a shallow copy of 'param'\n 'foo=42'\n\n >>> str(param.replace(default=Parameter.empty, annotation='spam'))\n \"foo:'spam'\"\n\n\n.. class:: BoundArguments\n\n Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.\n Holds the mapping of arguments to the function's parameters.\n\n .. attribute:: BoundArguments.arguments\n\n An ordered, mutable mapping (:class:`collections.OrderedDict`) of\n parameters' names to arguments' values. Contains only explicitly bound\n arguments. Changes in :attr:`arguments` will reflect in :attr:`args` and\n :attr:`kwargs`.\n\n Should be used in conjunction with :attr:`Signature.parameters` for any\n argument processing purposes.\n\n .. note::\n\n Arguments for which :meth:`Signature.bind` or\n :meth:`Signature.bind_partial` relied on a default value are skipped.\n However, if needed, it is easy to include them.\n\n ::\n\n >>> def foo(a, b=10):\n ... pass\n\n >>> sig = signature(foo)\n >>> ba = sig.bind(5)\n\n >>> ba.args, ba.kwargs\n ((5,), {})\n\n >>> for param in sig.parameters.values():\n ... if param.name not in ba.arguments:\n ... ba.arguments[param.name] = param.default\n\n >>> ba.args, ba.kwargs\n ((5, 10), {})\n\n\n .. attribute:: BoundArguments.args\n\n A tuple of positional arguments values. Dynamically computed from the\n :attr:`arguments` attribute.\n\n .. attribute:: BoundArguments.kwargs\n\n A dict of keyword arguments values. Dynamically computed from the\n :attr:`arguments` attribute.\n\n The :attr:`args` and :attr:`kwargs` properties can be used to invoke\n functions::\n\n def test(a, *, b):\n ...\n\n sig = signature(test)\n ba = sig.bind(10, b=20)\n test(*ba.args, **ba.kwargs)\n\n\n.. seealso::\n\n :pep:`362` - Function Signature Object.\n The detailed specification, implementation details and examples.\n\nCopyright\n---------\n\n*funcsigs* is a derived work of CPython under the terms of the `PSF License\nAgreement`_. The original CPython inspect module, its unit tests and\ndocumentation are the copyright of the Python Software Foundation. The derived\nwork is distributed under the `Apache License Version 2.0`_.\n\n.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python\n.. _Apache License Version 2.0: http://opensource.org/licenses/Apache-2.0\n.. _GitHub: https://github.com/testing-cabal/funcsigs\n.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python\n.. _Travis CI: http://travis-ci.org/\n.. _Read The Docs: http://funcsigs.readthedocs.org/\n.. _PEP 362: http://www.python.org/dev/peps/pep-0362/\n.. _inspect: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object\n.. _issues system: https://github.com/testing-cabal/funcsigs/issues\n\n.. |build_status| image:: https://secure.travis-ci.org/aliles/funcsigs.png?branch=master\n :target: http://travis-ci.org/#!/aliles/funcsigs\n :alt: Current build status\n\n.. |coverage| image:: https://coveralls.io/repos/aliles/funcsigs/badge.png?branch=master\n :target: https://coveralls.io/r/aliles/funcsigs?branch=master\n :alt: Coverage status\n\n.. |pypi_version| image:: https://pypip.in/v/funcsigs/badge.png\n :target: https://crate.io/packages/funcsigs/\n :alt: Latest PyPI version", - "release_date": "2016-04-25T22:22:05", + "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Config\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-config.svg\n :target: https://github.com/inveniosoftware/invenio-config/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-config.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-config\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-config.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-config\n\n.. image:: https://img.shields.io/pypi/v/invenio-config.svg\n :target: https://pypi.org/pypi/invenio-config\n\n\nInvenio configuration loader.\n\nInvenio-Config is a base package of the Invenio digital library framework. It\nis usually installed automatically as a dependency. It facilitates\nconfiguration loading from various sources such as a Python module, an instance\nfolder or environment variables.\n\nFurther documentation is available on https://invenio-config.readthedocs.io/.\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.0.3 (released 2020-05-06)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\nVersion 1.0.2 (released 2019-07-29)\n\n- Added `ALLOWED_HTML_TAGS` and `ALLOWED_HTML_ATTRS` config keys.\n\nVersion 1.0.1 (released 2018-10-02)\n\n- Application configurations are now sorted and loaded in alphabetical order.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2020-05-06T14:14:22", "parties": [ { "type": "person", "role": "author", - "name": "Testing Cabal", - "email": "testing-in-python@lists.idyll.org", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "Development Status :: 4 - Beta", + "invenio config", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://funcsigs.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl", - "size": 17697, + "homepage_url": "https://github.com/inveniosoftware/invenio-config", + "download_url": "https://files.pythonhosted.org/packages/5a/67/c751f8b8cf6ec5c4415bccaeed7f6b7eab836178ca4faa9f4d7088616735/invenio_config-1.0.3-py2.py3-none-any.whl", + "size": 11585, "sha1": null, - "md5": "701d58358171f34b6d1197de2923a35a", - "sha256": "330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca", + "md5": "568b56eed58774c4af391def11b972ad", + "sha256": "238ab074991e7f0d6ee7ebc6eb2f5e41658749dd977ab6e86476e862c0efaf28", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2660,9 +1902,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "ASL", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2672,51 +1914,50 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/funcsigs/1.0.2/json", + "api_data_url": "https://pypi.org/pypi/invenio-config/1.0.3/json", "datasource_id": null, - "purl": "pkg:pypi/funcsigs@1.0.2" + "purl": "pkg:pypi/invenio-config@1.0.3" }, { "type": "pypi", "namespace": null, - "name": "funcsigs", - "version": "1.0.2", + "name": "invenio-i18n", + "version": "1.3.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+\n.. funcsigs documentation master file, created by\n sphinx-quickstart on Fri Apr 20 20:27:52 2012.\n You can adapt this file completely to your liking, but it should at least\n contain the root `toctree` directive.\n\nIntroducing funcsigs\n====================\n\nThe Funcsigs Package\n--------------------\n\n``funcsigs`` is a backport of the `PEP 362`_ function signature features from\nPython 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7\nas well as 3.3 and up. 3.2 was supported by version 0.4, but with setuptools and\npip no longer supporting 3.2, we cannot make any statement about 3.2\ncompatibility.\n\nCompatibility\n`````````````\n\nThe ``funcsigs`` backport has been tested against:\n\n* CPython 2.6\n* CPython 2.7\n* CPython 3.3\n* CPython 3.4\n* CPython 3.5\n* CPython nightlies\n* PyPy and PyPy3(currently failing CI)\n\nContinuous integration testing is provided by `Travis CI`_.\n\nUnder Python 2.x there is a compatibility issue when a function is assigned to\nthe ``__wrapped__`` property of a class after it has been constructed.\nSimiliarily there under PyPy directly passing the ``__call__`` method of a\nbuiltin is also a compatibility issues. Otherwise the functionality is\nbelieved to be uniform between both Python2 and Python3.\n\nIssues\n``````\n\nSource code for ``funcsigs`` is hosted on `GitHub`_. Any bug reports or feature\nrequests can be made using GitHub's `issues system`_. |build_status| |coverage|\n\nExample\n-------\n\nTo obtain a `Signature` object, pass the target function to the\n``funcsigs.signature`` function.\n\n.. code-block:: python\n\n >>> from funcsigs import signature\n >>> def foo(a, b=None, *args, **kwargs):\n ... pass\n ...\n >>> sig = signature(foo)\n >>> sig\n \n >>> sig.parameters\n OrderedDict([('a', ), ('b', ), ('args', ), ('kwargs', )])\n >>> sig.return_annotation\n \n\nIntrospecting callables with the Signature object\n-------------------------------------------------\n\n.. note::\n\n This section of documentation is a direct reproduction of the Python\n standard library documentation for the inspect module.\n\nThe Signature object represents the call signature of a callable object and its\nreturn annotation. To retrieve a Signature object, use the :func:`signature`\nfunction.\n\n.. function:: signature(callable)\n\n Return a :class:`Signature` object for the given ``callable``::\n\n >>> from funcsigs import signature\n >>> def foo(a, *, b:int, **kwargs):\n ... pass\n\n >>> sig = signature(foo)\n\n >>> str(sig)\n '(a, *, b:int, **kwargs)'\n\n >>> str(sig.parameters['b'])\n 'b:int'\n\n >>> sig.parameters['b'].annotation\n \n\n Accepts a wide range of python callables, from plain functions and classes to\n :func:`functools.partial` objects.\n\n .. note::\n\n Some callables may not be introspectable in certain implementations of\n Python. For example, in CPython, built-in functions defined in C provide\n no metadata about their arguments.\n\n\n.. class:: Signature\n\n A Signature object represents the call signature of a function and its return\n annotation. For each parameter accepted by the function it stores a\n :class:`Parameter` object in its :attr:`parameters` collection.\n\n Signature objects are *immutable*. Use :meth:`Signature.replace` to make a\n modified copy.\n\n .. attribute:: Signature.empty\n\n A special class-level marker to specify absence of a return annotation.\n\n .. attribute:: Signature.parameters\n\n An ordered mapping of parameters' names to the corresponding\n :class:`Parameter` objects.\n\n .. attribute:: Signature.return_annotation\n\n The \"return\" annotation for the callable. If the callable has no \"return\"\n annotation, this attribute is set to :attr:`Signature.empty`.\n\n .. method:: Signature.bind(*args, **kwargs)\n\n Create a mapping from positional and keyword arguments to parameters.\n Returns :class:`BoundArguments` if ``*args`` and ``**kwargs`` match the\n signature, or raises a :exc:`TypeError`.\n\n .. method:: Signature.bind_partial(*args, **kwargs)\n\n Works the same way as :meth:`Signature.bind`, but allows the omission of\n some required arguments (mimics :func:`functools.partial` behavior.)\n Returns :class:`BoundArguments`, or raises a :exc:`TypeError` if the\n passed arguments do not match the signature.\n\n .. method:: Signature.replace(*[, parameters][, return_annotation])\n\n Create a new Signature instance based on the instance replace was invoked\n on. It is possible to pass different ``parameters`` and/or\n ``return_annotation`` to override the corresponding properties of the base\n signature. To remove return_annotation from the copied Signature, pass in\n :attr:`Signature.empty`.\n\n ::\n\n >>> def test(a, b):\n ... pass\n >>> sig = signature(test)\n >>> new_sig = sig.replace(return_annotation=\"new return anno\")\n >>> str(new_sig)\n \"(a, b) -> 'new return anno'\"\n\n\n.. class:: Parameter\n\n Parameter objects are *immutable*. Instead of modifying a Parameter object,\n you can use :meth:`Parameter.replace` to create a modified copy.\n\n .. attribute:: Parameter.empty\n\n A special class-level marker to specify absence of default values and\n annotations.\n\n .. attribute:: Parameter.name\n\n The name of the parameter as a string. Must be a valid python identifier\n name (with the exception of ``POSITIONAL_ONLY`` parameters, which can have\n it set to ``None``).\n\n .. attribute:: Parameter.default\n\n The default value for the parameter. If the parameter has no default\n value, this attribute is set to :attr:`Parameter.empty`.\n\n .. attribute:: Parameter.annotation\n\n The annotation for the parameter. If the parameter has no annotation,\n this attribute is set to :attr:`Parameter.empty`.\n\n .. attribute:: Parameter.kind\n\n Describes how argument values are bound to the parameter. Possible values\n (accessible via :class:`Parameter`, like ``Parameter.KEYWORD_ONLY``):\n\n +------------------------+----------------------------------------------+\n | Name | Meaning |\n +========================+==============================================+\n | *POSITIONAL_ONLY* | Value must be supplied as a positional |\n | | argument. |\n | | |\n | | Python has no explicit syntax for defining |\n | | positional-only parameters, but many built-in|\n | | and extension module functions (especially |\n | | those that accept only one or two parameters)|\n | | accept them. |\n +------------------------+----------------------------------------------+\n | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or |\n | | positional argument (this is the standard |\n | | binding behaviour for functions implemented |\n | | in Python.) |\n +------------------------+----------------------------------------------+\n | *VAR_POSITIONAL* | A tuple of positional arguments that aren't |\n | | bound to any other parameter. This |\n | | corresponds to a ``*args`` parameter in a |\n | | Python function definition. |\n +------------------------+----------------------------------------------+\n | *KEYWORD_ONLY* | Value must be supplied as a keyword argument.|\n | | Keyword only parameters are those which |\n | | appear after a ``*`` or ``*args`` entry in a |\n | | Python function definition. |\n +------------------------+----------------------------------------------+\n | *VAR_KEYWORD* | A dict of keyword arguments that aren't bound|\n | | to any other parameter. This corresponds to a|\n | | ``**kwargs`` parameter in a Python function |\n | | definition. |\n +------------------------+----------------------------------------------+\n\n Example: print all keyword-only arguments without default values::\n\n >>> def foo(a, b, *, c, d=10):\n ... pass\n\n >>> sig = signature(foo)\n >>> for param in sig.parameters.values():\n ... if (param.kind == param.KEYWORD_ONLY and\n ... param.default is param.empty):\n ... print('Parameter:', param)\n Parameter: c\n\n .. method:: Parameter.replace(*[, name][, kind][, default][, annotation])\n\n Create a new Parameter instance based on the instance replaced was invoked\n on. To override a :class:`Parameter` attribute, pass the corresponding\n argument. To remove a default value or/and an annotation from a\n Parameter, pass :attr:`Parameter.empty`.\n\n ::\n\n >>> from funcsigs import Parameter\n >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42)\n >>> str(param)\n 'foo=42'\n\n >>> str(param.replace()) # Will create a shallow copy of 'param'\n 'foo=42'\n\n >>> str(param.replace(default=Parameter.empty, annotation='spam'))\n \"foo:'spam'\"\n\n\n.. class:: BoundArguments\n\n Result of a :meth:`Signature.bind` or :meth:`Signature.bind_partial` call.\n Holds the mapping of arguments to the function's parameters.\n\n .. attribute:: BoundArguments.arguments\n\n An ordered, mutable mapping (:class:`collections.OrderedDict`) of\n parameters' names to arguments' values. Contains only explicitly bound\n arguments. Changes in :attr:`arguments` will reflect in :attr:`args` and\n :attr:`kwargs`.\n\n Should be used in conjunction with :attr:`Signature.parameters` for any\n argument processing purposes.\n\n .. note::\n\n Arguments for which :meth:`Signature.bind` or\n :meth:`Signature.bind_partial` relied on a default value are skipped.\n However, if needed, it is easy to include them.\n\n ::\n\n >>> def foo(a, b=10):\n ... pass\n\n >>> sig = signature(foo)\n >>> ba = sig.bind(5)\n\n >>> ba.args, ba.kwargs\n ((5,), {})\n\n >>> for param in sig.parameters.values():\n ... if param.name not in ba.arguments:\n ... ba.arguments[param.name] = param.default\n\n >>> ba.args, ba.kwargs\n ((5, 10), {})\n\n\n .. attribute:: BoundArguments.args\n\n A tuple of positional arguments values. Dynamically computed from the\n :attr:`arguments` attribute.\n\n .. attribute:: BoundArguments.kwargs\n\n A dict of keyword arguments values. Dynamically computed from the\n :attr:`arguments` attribute.\n\n The :attr:`args` and :attr:`kwargs` properties can be used to invoke\n functions::\n\n def test(a, *, b):\n ...\n\n sig = signature(test)\n ba = sig.bind(10, b=20)\n test(*ba.args, **ba.kwargs)\n\n\n.. seealso::\n\n :pep:`362` - Function Signature Object.\n The detailed specification, implementation details and examples.\n\nCopyright\n---------\n\n*funcsigs* is a derived work of CPython under the terms of the `PSF License\nAgreement`_. The original CPython inspect module, its unit tests and\ndocumentation are the copyright of the Python Software Foundation. The derived\nwork is distributed under the `Apache License Version 2.0`_.\n\n.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python\n.. _Apache License Version 2.0: http://opensource.org/licenses/Apache-2.0\n.. _GitHub: https://github.com/testing-cabal/funcsigs\n.. _PSF License Agreement: http://docs.python.org/3/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python\n.. _Travis CI: http://travis-ci.org/\n.. _Read The Docs: http://funcsigs.readthedocs.org/\n.. _PEP 362: http://www.python.org/dev/peps/pep-0362/\n.. _inspect: http://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object\n.. _issues system: https://github.com/testing-cabal/funcsigs/issues\n\n.. |build_status| image:: https://secure.travis-ci.org/aliles/funcsigs.png?branch=master\n :target: http://travis-ci.org/#!/aliles/funcsigs\n :alt: Current build status\n\n.. |coverage| image:: https://coveralls.io/repos/aliles/funcsigs/badge.png?branch=master\n :target: https://coveralls.io/r/aliles/funcsigs?branch=master\n :alt: Coverage status\n\n.. |pypi_version| image:: https://pypip.in/v/funcsigs/badge.png\n :target: https://crate.io/packages/funcsigs/\n :alt: Latest PyPI version", - "release_date": "2016-04-25T22:22:33", + "description": "Invenio internationalization module.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n==============\n Invenio-I18N\n==============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-i18n.svg\n :target: https://github.com/inveniosoftware/invenio-i18n/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-i18n/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-i18n/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-i18n.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-i18n\n\n.. image:: https://img.shields.io/pypi/v/invenio-i18n.svg\n :target: https://pypi.org/pypi/invenio-i18n\n\n\nInvenio internationalization module based on\n`Flask-BabelEx `_.\n\nFeatures:\n\n* Loading and merging message catalogs.\n* Algorithm for detecting a user's locale.\n* Views for changing the locale.\n* Jinja2 macros and filters for I18N.\n\nFurther documentation available at https://invenio-i18n.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.3.1 (released 2021-10-06)\n\n- Fixes issue with language selector button not disabling the currently\n selected field.\n\nVersion 1.3.0 (released 2020-12-07)\n\n- Integrates Semantic-UI templates and assets.\n- Removes webassets-based bundles.\n- Adds InvenioI18N extransion to the API level applications.\n\nVersion 1.2.0 (released 2020-03-06)\n\n- Bumps Flask-BabelEx support latest Flask/Werkzeug.\n- Replaces Flask dependency with ``invenio-base``.\n\nVersion 1.1.1 (released 2018-12-12)\n\n- Fix an incorrect JS import.\n\nVersion 1.1.0 (released 2018-11-06)\n\n- Introduce webpack support.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2021-10-06T15:11:28", "parties": [ { "type": "person", "role": "author", - "name": "Testing Cabal", - "email": "testing-in-python@lists.idyll.org", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "Development Status :: 4 - Beta", + "invenio internationalization i18n localization l10n", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://funcsigs.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz", - "size": 27947, + "homepage_url": "https://github.com/inveniosoftware/invenio-i18n", + "download_url": "https://files.pythonhosted.org/packages/81/56/4398e45ba27c8436e38b8027881d72d1e02ab199d0eb69cb425759173ec4/invenio_i18n-1.3.1-py2.py3-none-any.whl", + "size": 31391, "sha1": null, - "md5": "7e583285b1fb8a76305d6d68f4ccc14e", - "sha256": "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50", + "md5": "1574ffd388ca0a833232f954ea7fcef5", + "sha256": "67b22098900f4fa79a4db47cd189d3fb993223c26e560fd1c87f69b7cc2c5bc8", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2724,9 +1965,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "ASL", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2736,42 +1977,50 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/funcsigs/1.0.2/json", + "api_data_url": "https://pypi.org/pypi/invenio-i18n/1.3.1/json", "datasource_id": null, - "purl": "pkg:pypi/funcsigs@1.0.2" + "purl": "pkg:pypi/invenio-i18n@1.3.1" }, { "type": "pypi", "namespace": null, - "name": "importlib-metadata", - "version": "2.1.3", + "name": "invenio-records", + "version": "1.0.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Read metadata from Python packages\n=========================\n ``importlib_metadata``\n=========================\n\n``importlib_metadata`` is a library to access the metadata for a\nPython package.\n\nAs of Python 3.8, this functionality has been added to the\n`Python standard library\n`_.\nThis package supplies backports of that functionality including\nimprovements added to subsequent Python versions.\n\n\nUsage\n=====\n\nSee the `online documentation `_\nfor usage details.\n\n`Finder authors\n`_ can\nalso add support for custom package installers. See the above documentation\nfor details.\n\n\nCaveats\n=======\n\nThis project primarily supports third-party packages installed by PyPA\ntools (or other conforming packages). It does not support:\n\n- Packages in the stdlib.\n- Packages installed without metadata.\n\nProject details\n===============\n\n * Project home: https://github.com/python/importlib_metadata\n * Report bugs at: https://github.com/python/importlib_metadata/issues\n * Code hosting: https://github.com/python/importlib_metadata\n * Documentation: https://importlib_metadata.readthedocs.io/", - "release_date": "2022-01-23T15:25:17", + "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Records\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-records.svg\n :target: https://github.com/inveniosoftware/invenio-records/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-records.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-records.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/pypi/v/invenio-records.svg\n :target: https://pypi.org/pypi/invenio-records\n\n\n\nInvenio-Records is a metadata storage module. A *record* is a JSON document with\nrevision history identified by a unique `UUID`_ .\n\n.. _UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier\n\nFeatures:\n\n * Generic JSON document storage with revision history.\n * JSONSchema validation of documents.\n * Records creation, update and deletion.\n * CLI and administration interface for CRUD operations on records.\n\nFurther documentation available Documentation:\nhttps://invenio-records.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\nVersion 1.0.2 (released 2019-07-11)\n\n- Fix XSS vulnerability in admin interface.\n\nVersion 1.0.1 (released 2018-12-14)\n\n- Fix CliRunner exceptions\n- Fix json schema url\n- MIT license and shield badge\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", + "release_date": "2019-07-15T08:35:18", "parties": [ { "type": "person", "role": "author", - "name": "Jason R. Coombs", - "email": "jaraco@jaraco.com", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "Development Status :: 3 - Alpha", + "invenio metadata", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries" + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://importlib-metadata.readthedocs.io/", - "download_url": "https://files.pythonhosted.org/packages/cf/b4/877779cd7b5a15536ecbe0655cfb35a0de0ede6d888151fd7356d278c47d/importlib_metadata-2.1.3-py2.py3-none-any.whl", - "size": 10211, + "homepage_url": "https://github.com/inveniosoftware/invenio-records", + "download_url": "https://files.pythonhosted.org/packages/50/97/fd03b1bbc220643230bf9e1f621d4043d583043d0cf5506a8ccb0551029c/invenio_records-1.0.2-py2.py3-none-any.whl", + "size": 88791, "sha1": null, - "md5": "212b354bdd29ba0d1d32806d08b1430c", - "sha256": "52e65a0856f9ba7ea8f2c4ced253fb6c88d1a8c352cb1e916cff4eb17d5a693d", + "md5": "9957fa5aa8d4d5eae377698ef37f9cf6", + "sha256": "5818e2dcef2de1d0b3e827b60c13588ce24f60f368a73b8d70ab75d7275eef63", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2779,9 +2028,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache Software License", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2791,42 +2040,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/importlib-metadata/2.1.3/json", + "api_data_url": "https://pypi.org/pypi/invenio-records/1.0.2/json", "datasource_id": null, - "purl": "pkg:pypi/importlib-metadata@2.1.3" + "purl": "pkg:pypi/invenio-records@1.0.2" }, { "type": "pypi", "namespace": null, - "name": "importlib-metadata", - "version": "2.1.3", + "name": "invenio", + "version": "3.4.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Read metadata from Python packages\n=========================\n ``importlib_metadata``\n=========================\n\n``importlib_metadata`` is a library to access the metadata for a\nPython package.\n\nAs of Python 3.8, this functionality has been added to the\n`Python standard library\n`_.\nThis package supplies backports of that functionality including\nimprovements added to subsequent Python versions.\n\n\nUsage\n=====\n\nSee the `online documentation `_\nfor usage details.\n\n`Finder authors\n`_ can\nalso add support for custom package installers. See the above documentation\nfor details.\n\n\nCaveats\n=======\n\nThis project primarily supports third-party packages installed by PyPA\ntools (or other conforming packages). It does not support:\n\n- Packages in the stdlib.\n- Packages installed without metadata.\n\nProject details\n===============\n\n * Project home: https://github.com/python/importlib_metadata\n * Report bugs at: https://github.com/python/importlib_metadata/issues\n * Code hosting: https://github.com/python/importlib_metadata\n * Documentation: https://importlib_metadata.readthedocs.io/", - "release_date": "2022-01-23T15:25:19", + "description": "Invenio Digital Library Framework.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n\n======================\n Invenio Framework v3\n======================\n\n**Open Source framework for large-scale digital repositories.**\n\n.. image:: https://img.shields.io/pypi/v/invenio.svg\n :target: https://pypi.org/project/invenio/\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio.svg\n :target: https://github.com/inveniosoftware/invenio/blob/master/LICENSE\n\n.. image:: https://travis-ci.org/inveniosoftware/invenio.svg?branch=master\n :target: https://travis-ci.org/inveniosoftware/invenio\n\n.. image:: https://img.shields.io/badge/Discord-join%20chat-%237289da\n :target: https://discord.gg/8qatqBC\n\nInvenio Framework is like a Swiss Army knife of battle-tested, safe and secure\nmodules providing you with all the features you need to build a trusted digital\nrepository.\n\n**Our other products**\n\nLooking for a turn-key Research Data Management platform? Checkout `InvenioRDM `_\n\nLooking for a modern Integrated Library System? Checkout `InvenioILS `_\n\n**Built with Invenio Framework**\n\nSee examples on https://inveniosoftware.org/products/framework/ and https://inveniosoftware.org/showcase/.", + "release_date": "2021-05-12T14:00:40", "parties": [ { "type": "person", "role": "author", - "name": "Jason R. Coombs", - "email": "jaraco@jaraco.com", + "name": "CERN", + "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "Development Status :: 3 - Alpha", + "Invenio digital library framework", + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", "Intended Audience :: Developers", - "Programming Language :: Python :: 2", + "Operating System :: OS Independent", + "Programming Language :: Python", "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries" + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://importlib-metadata.readthedocs.io/", - "download_url": "https://files.pythonhosted.org/packages/4c/d8/af92ca59b33366b3b9d230d17772d728d7b064f3de6d6150332d5fa8dae3/importlib_metadata-2.1.3.tar.gz", - "size": 30408, + "homepage_url": "https://github.com/inveniosoftware/invenio", + "download_url": "https://files.pythonhosted.org/packages/31/59/5c20981a3f371b59c0545905a800cc5f3f066cb9a14a126ba6b96a255933/invenio-3.4.1-py2.py3-none-any.whl", + "size": 4748, "sha1": null, - "md5": "10bf15d611e8d61d6f7b3aa112196fca", - "sha256": "02a9f62b02e9b1cc43871809ef99947e8f5d94771392d666ada2cafc4cd09d4f", + "md5": "30642e31aa3b6764457a22f73a680893", + "sha256": "eddc4d9e8f0f8a1e2efada5a582c9b45d9fe3e49740051e2fe0fe8ec999f94f0", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2834,9 +2090,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "Apache Software License", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Apache Software License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -2846,48 +2102,48 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/importlib-metadata/2.1.3/json", + "api_data_url": "https://pypi.org/pypi/invenio/3.4.1/json", "datasource_id": null, - "purl": "pkg:pypi/importlib-metadata@2.1.3" + "purl": "pkg:pypi/invenio@3.4.1" }, { "type": "pypi", "namespace": null, - "name": "invenio-app", - "version": "1.3.3", + "name": "ipaddress", + "version": "1.0.23", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n=============\n Invenio-App\n=============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-app.svg\n :target: https://github.com/inveniosoftware/invenio-app/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-app/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-app/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-app.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-app\n\n.. image:: https://img.shields.io/pypi/v/invenio-app.svg\n :target: https://pypi.org/pypi/invenio-app\n\nWSGI, Celery and CLI applications for Invenio flavours.\n\nFurther documentation is available on\nhttps://invenio-app.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2017-2019 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.3.3 (released 2021-12-06)\n\n- Pinned Limits library to align with Flask-Limiter.\n\nVersion 1.3.2 (released 2021-10-28)\n\n- Unpins Flask-Talisman to allow newer versions.\n\n- Removes Python 2 support.\n\nVersion 1.3.1 (released 2020-12-07)\n\n- Adds HEAD and OPTIONS HTTP verbs to the /ping endpoint as recommended\n in HAProxy documentation.\n\nVersion 1.3.0 (released 2020-05-13)\n\n- Adds new template theming via allowing Jinja to load templates from different\n theme folders via the new configuration variable ``APP_THEME``.\n\n- Removes the ChoiceLoader used to load templates from the instance folder in\n favour of using Flask instead. Invenio-App sets the application's root_path\n to the instance folder, which makes Flask create the same behavior\n previously achieved with the ChoiceLoader.\n\nVersion 1.2.6 (released 2020-05-06)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\nVersion 1.2.5 (released 2020-02-26)\n\nVersion 1.2.4 (released 2019-11-20)\n\n- Disable ratelimit for celery.\n\nVersion 1.2.3 (released 2019-10-10)\n\n- Make `static_url_path` configurable through environment variable.\n\nVersion 1.2.2 (released 2019-08-29)\n\n- Unpins Invenio packages versions.\n\nVersion 1.2.1 (released 2019-08-21)\n\n- Exempts the \"/ping\" view from rate limiting.\n\nVersion 1.2.0 (released 2019-07-29)\n\n- Fixes issue with instance_path and static_folder being globals. Depends on\n change in Invenio-Base v1.1.0\n\n- Improves rate limiting function to have limits per guest and per\n authenticated users.\n\nVersion 1.1.1 (released 2019-07-15)\n\n- Fixes a security issue where APP_ALLOWED_HOSTS was not always being checked,\n and thus could allow host header injection attacks.\n\n NOTE: you should never route requests to your application with a wrong host\n header. The APP_ALLOWED_HOSTS exists as an extra protective measure, because\n it is easy to misconfigure your web server.\n\n The root cause was that Werkzeug's trusted host feature only works when\n request.host is being evaluated. This means that for instance when only\n url_for (part of the routing system) is used, then the host header check is\n not performed.\n\nVersion 1.1.0 (released 2018-12-14)\n\n- The Flask-DebugToolbar extension is now automatically registered if\n installed.\n\nVersion 1.0.5 (released 2018-12-05)\n\n- Add health check view\n\n- Fix response headers assertion in tests\n\nVersion 1.0.4 (released 2018-10-11)\n\n- Fix Content Security Policy headers when set empty in DEBUG mode.\n\nVersion 1.0.3 (released 2018-10-08)\n\n- Fix Content Security Policy headers when running in DEBUG mode.\n\nVersion 1.0.2 (released 2018-08-24)\n\n- Allows use of Flask-DebugToolbar when running in DEBUG mode.\n\nVersion 1.0.1 (released 2018-06-29)\n\n- Pin Flask-Talisman.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2021-12-06T16:48:11", + "description": "IPv4/IPv6 manipulation library\nPort of the 3.3+ ipaddress module to 2.6, 2.7, 3.2", + "release_date": "2019-10-18T01:30:27", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Philipp Hagemeister", + "email": "phihag@phihag.de", "url": null } ], "keywords": [ - "invenio applications", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", - "Operating System :: OS Independent", + "Natural Language :: English", "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-app", - "download_url": "https://files.pythonhosted.org/packages/25/ee/bfe28143e98e24a27ca8d6c4a464591e8006766a60fe8468a9b2061468e2/invenio_app-1.3.3-py2.py3-none-any.whl", - "size": 18908, + "homepage_url": "https://github.com/phihag/ipaddress", + "download_url": "https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl", + "size": 18159, "sha1": null, - "md5": "623a44fc541a251d30f02763321cb730", - "sha256": "0bca343edf807896a47bd0f8e3bc61cd7f6b381f6cd720a2b6547e0d11c32853", + "md5": "1d1615d1bb0dd32b4f3e1cf6a24dca3a", + "sha256": "6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2895,9 +2151,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "Python Software Foundation License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Python Software Foundation License" ] }, "notice_text": null, @@ -2907,48 +2163,48 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-app/1.3.3/json", + "api_data_url": "https://pypi.org/pypi/ipaddress/1.0.23/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-app@1.3.3" + "purl": "pkg:pypi/ipaddress@1.0.23" }, { "type": "pypi", "namespace": null, - "name": "invenio-app", - "version": "1.3.3", + "name": "ipython-genutils", + "version": "0.2.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n=============\n Invenio-App\n=============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-app.svg\n :target: https://github.com/inveniosoftware/invenio-app/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-app/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-app/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-app.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-app\n\n.. image:: https://img.shields.io/pypi/v/invenio-app.svg\n :target: https://pypi.org/pypi/invenio-app\n\nWSGI, Celery and CLI applications for Invenio flavours.\n\nFurther documentation is available on\nhttps://invenio-app.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2017-2019 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.3.3 (released 2021-12-06)\n\n- Pinned Limits library to align with Flask-Limiter.\n\nVersion 1.3.2 (released 2021-10-28)\n\n- Unpins Flask-Talisman to allow newer versions.\n\n- Removes Python 2 support.\n\nVersion 1.3.1 (released 2020-12-07)\n\n- Adds HEAD and OPTIONS HTTP verbs to the /ping endpoint as recommended\n in HAProxy documentation.\n\nVersion 1.3.0 (released 2020-05-13)\n\n- Adds new template theming via allowing Jinja to load templates from different\n theme folders via the new configuration variable ``APP_THEME``.\n\n- Removes the ChoiceLoader used to load templates from the instance folder in\n favour of using Flask instead. Invenio-App sets the application's root_path\n to the instance folder, which makes Flask create the same behavior\n previously achieved with the ChoiceLoader.\n\nVersion 1.2.6 (released 2020-05-06)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\nVersion 1.2.5 (released 2020-02-26)\n\nVersion 1.2.4 (released 2019-11-20)\n\n- Disable ratelimit for celery.\n\nVersion 1.2.3 (released 2019-10-10)\n\n- Make `static_url_path` configurable through environment variable.\n\nVersion 1.2.2 (released 2019-08-29)\n\n- Unpins Invenio packages versions.\n\nVersion 1.2.1 (released 2019-08-21)\n\n- Exempts the \"/ping\" view from rate limiting.\n\nVersion 1.2.0 (released 2019-07-29)\n\n- Fixes issue with instance_path and static_folder being globals. Depends on\n change in Invenio-Base v1.1.0\n\n- Improves rate limiting function to have limits per guest and per\n authenticated users.\n\nVersion 1.1.1 (released 2019-07-15)\n\n- Fixes a security issue where APP_ALLOWED_HOSTS was not always being checked,\n and thus could allow host header injection attacks.\n\n NOTE: you should never route requests to your application with a wrong host\n header. The APP_ALLOWED_HOSTS exists as an extra protective measure, because\n it is easy to misconfigure your web server.\n\n The root cause was that Werkzeug's trusted host feature only works when\n request.host is being evaluated. This means that for instance when only\n url_for (part of the routing system) is used, then the host header check is\n not performed.\n\nVersion 1.1.0 (released 2018-12-14)\n\n- The Flask-DebugToolbar extension is now automatically registered if\n installed.\n\nVersion 1.0.5 (released 2018-12-05)\n\n- Add health check view\n\n- Fix response headers assertion in tests\n\nVersion 1.0.4 (released 2018-10-11)\n\n- Fix Content Security Policy headers when set empty in DEBUG mode.\n\nVersion 1.0.3 (released 2018-10-08)\n\n- Fix Content Security Policy headers when running in DEBUG mode.\n\nVersion 1.0.2 (released 2018-08-24)\n\n- Allows use of Flask-DebugToolbar when running in DEBUG mode.\n\nVersion 1.0.1 (released 2018-06-29)\n\n- Pin Flask-Talisman.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2021-12-06T16:48:12", + "description": "Vestigial utilities from IPython\nPretend this doesn't exist. Nobody should use it.", + "release_date": "2017-03-13T22:12:25", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "IPython Development Team", + "email": "ipython-dev@scipy.org", "url": null } ], "keywords": [ - "invenio applications", - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Interactive", + "Interpreter", + "Shell", + "Web", "Intended Audience :: Developers", - "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Intended Audience :: System Administrators", "Programming Language :: Python", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.3" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-app", - "download_url": "https://files.pythonhosted.org/packages/ef/e6/f7e3e2c79520a0046008aa0cb5381734f681d040793e5b8d1b995deaca5d/invenio-app-1.3.3.tar.gz", - "size": 31186, + "homepage_url": "http://ipython.org", + "download_url": "https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl", + "size": 26343, "sha1": null, - "md5": "8b4027283bdaeecb44287deb3e67f6e1", - "sha256": "3e811dcc5f873ae63e2ea6be7086d118d3732a83847c4783f63076678278d776", + "md5": "5bf384d999c2e38b696a4d6f162875c3", + "sha256": "72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -2956,9 +2212,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -2968,49 +2224,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-app/1.3.3/json", + "api_data_url": "https://pypi.org/pypi/ipython-genutils/0.2.0/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-app@1.3.3" + "purl": "pkg:pypi/ipython-genutils@0.2.0" }, { "type": "pypi", "namespace": null, - "name": "invenio-base", - "version": "1.2.5", + "name": "ipython", + "version": "5.10.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n==============\n Invenio-Base\n==============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-base.svg\n :target: https://github.com/inveniosoftware/invenio-base/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-base/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-base/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-base.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-base\n\n.. image:: https://img.shields.io/pypi/v/invenio-base.svg\n :target: https://pypi.org/pypi/invenio-base\n\n\nBase package for building Invenio application factories.\n\nFurther documentation is available on https://invenio-base.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.2.5 (released 2021-10-18)\n\n- Unpin Flask <2.0 and Werkzeug <2.0.\n\nVersion 1.2.4 (released 2021-05-12)\n\n- Pins Flask <2.0 and Werkzeug <2.0 due to incompatibilities in the newly\n released versions.\n\nVersion 1.2.3 (released 2020-05-11)\n\n- Adds support for passing ``root_path`` to the base Flask application factory.\n\nVersion 1.2.2 (released 2020-03-05)\n\n- Adds ``six`` dependency.\n- Adds the ``obj_or_import_string`` and ``load_or_import_from_config`` common\n utility functions for general re-use throughout other Invenio modules.\n\nVersion 1.2.1 (released 2020-03-02)\n\n- Bumps Flask minimum version to v1.0.4.\n- Removes ``invenio instance create`` command and ``cokiecutter`` dependency.\n\nVersion 1.2.0 (released 2019-08-28)\n\n- Adds support to trust new proxy headers through the ``PROXYFIX_CONFIG``\n configuration variable. For more information see the\n `full documentation `_.\n\n- Deprecates the usage of ``WSGI_PROXIES`` configuration which only supports\n ``X-Forwarded-For`` headers.\n\nVersion 1.1.0 (released 2019-07-29)\n\n- Add support for allowing instance path and static folder to be callables\n which are evaluated before being passed to the Flask application class. This\n fixes an issue in pytest-invenio and Invenio-App in which a global instance\n path was only evaluated once.\n\n- Fixes deprecation warnings from Werkzeug.\n\nVersion 1.0.2 (released 2018-12-14)\n\nVersion 1.0.1 (released 2018-05-25)\n\n- Added support for blueprint factory functions in the\n ``invenio_base.blueprints`` and the ``invenio_base.api_blueprints`` entry\n point groups. In addition to specifying an import path to an already created\n blueprint, you can now specify an import path of a blueprint factory function\n with the signature create_blueprint(app), that will create and return a\n blueprint. This allows moving dynamic blueprint creation from the extension\n initialization phase to the blueprint registration phase.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2021-10-18T12:34:05", + "description": "IPython: Productive Interactive Computing\nIPython provides a rich toolkit to help you make the most out of using Python\ninteractively. Its main components are:\n\n* A powerful interactive Python shell\n* A `Jupyter `_ kernel to work with Python code in Jupyter\n notebooks and other interactive frontends.\n\nThe enhanced interactive Python shells have the following main features:\n\n* Comprehensive object introspection.\n\n* Input history, persistent across sessions.\n\n* Caching of output results during a session with automatically generated\n references.\n\n* Extensible tab completion, with support by default for completion of python\n variables and keywords, filenames and function keywords.\n\n* Extensible system of 'magic' commands for controlling the environment and\n performing many tasks related either to IPython or the operating system.\n\n* A rich configuration system with easy switching between different setups\n (simpler than changing $PYTHONSTARTUP environment variables every time).\n\n* Session logging and reloading.\n\n* Extensible syntax processing for special purpose situations.\n\n* Access to the system shell with user-extensible alias system.\n\n* Easily embeddable in other Python programs and GUIs.\n\n* Integrated access to the pdb debugger and the Python profiler.\n\nThe latest development version is always available from IPython's `GitHub\nsite `_.", + "release_date": "2020-05-01T18:20:44", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "The IPython Development Team", + "email": "ipython-dev@python.org", "url": null } ], "keywords": [ - "invenio", - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Interactive", + "Interpreter", + "Shell", + "Embedding", + "Framework :: IPython", "Intended Audience :: Developers", - "Operating System :: OS Independent", + "Intended Audience :: Science/Research", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Topic :: System :: Shells" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-base", - "download_url": "https://files.pythonhosted.org/packages/47/7c/89fe1cd7263c8d67a366c568dcc6f5050518f06ca7695f7b719f3f340229/invenio_base-1.2.5-py2.py3-none-any.whl", - "size": 15348, + "homepage_url": "https://ipython.org", + "download_url": "https://files.pythonhosted.org/packages/ce/2c/2849a2b37024a01a847c87d81825c0489eb22ffc6416cac009bf281ea838/ipython-5.10.0-py2-none-any.whl", + "size": 760296, "sha1": null, - "md5": "17dcb76abd874239b98e51ba50d86823", - "sha256": "d22a8dee25def2d5e7f10566a12b63e643d6c1267de0baa335dbdfd7382707d6", + "md5": "b2eb02011835b1254431136a0a2b1be5", + "sha256": "68eb2d70595ea5c3f9f5f8f562c9119e86b0f84de3e5d23407a142cb2a73ba11", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3018,9 +2274,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3030,59 +2286,65 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-base/1.2.5/json", + "api_data_url": "https://pypi.org/pypi/ipython/5.10.0/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-base@1.2.5" + "purl": "pkg:pypi/ipython@5.10.0" }, { "type": "pypi", "namespace": null, - "name": "invenio-base", - "version": "1.2.5", + "name": "itsdangerous", + "version": "1.1.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n==============\n Invenio-Base\n==============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-base.svg\n :target: https://github.com/inveniosoftware/invenio-base/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-base/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-base/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-base.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-base\n\n.. image:: https://img.shields.io/pypi/v/invenio-base.svg\n :target: https://pypi.org/pypi/invenio-base\n\n\nBase package for building Invenio application factories.\n\nFurther documentation is available on https://invenio-base.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.2.5 (released 2021-10-18)\n\n- Unpin Flask <2.0 and Werkzeug <2.0.\n\nVersion 1.2.4 (released 2021-05-12)\n\n- Pins Flask <2.0 and Werkzeug <2.0 due to incompatibilities in the newly\n released versions.\n\nVersion 1.2.3 (released 2020-05-11)\n\n- Adds support for passing ``root_path`` to the base Flask application factory.\n\nVersion 1.2.2 (released 2020-03-05)\n\n- Adds ``six`` dependency.\n- Adds the ``obj_or_import_string`` and ``load_or_import_from_config`` common\n utility functions for general re-use throughout other Invenio modules.\n\nVersion 1.2.1 (released 2020-03-02)\n\n- Bumps Flask minimum version to v1.0.4.\n- Removes ``invenio instance create`` command and ``cokiecutter`` dependency.\n\nVersion 1.2.0 (released 2019-08-28)\n\n- Adds support to trust new proxy headers through the ``PROXYFIX_CONFIG``\n configuration variable. For more information see the\n `full documentation `_.\n\n- Deprecates the usage of ``WSGI_PROXIES`` configuration which only supports\n ``X-Forwarded-For`` headers.\n\nVersion 1.1.0 (released 2019-07-29)\n\n- Add support for allowing instance path and static folder to be callables\n which are evaluated before being passed to the Flask application class. This\n fixes an issue in pytest-invenio and Invenio-App in which a global instance\n path was only evaluated once.\n\n- Fixes deprecation warnings from Werkzeug.\n\nVersion 1.0.2 (released 2018-12-14)\n\nVersion 1.0.1 (released 2018-05-25)\n\n- Added support for blueprint factory functions in the\n ``invenio_base.blueprints`` and the ``invenio_base.api_blueprints`` entry\n point groups. In addition to specifying an import path to an already created\n blueprint, you can now specify an import path of a blueprint factory function\n with the signature create_blueprint(app), that will create and return a\n blueprint. This allows moving dynamic blueprint creation from the extension\n initialization phase to the blueprint registration phase.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2021-10-18T12:34:07", + "description": "Various helpers to pass data to untrusted environments and back.\nitsdangerous\n============\n\n... so better sign this\n\nVarious helpers to pass data to untrusted environments and to get it\nback safe and sound. Data is cryptographically signed to ensure that a\ntoken has not been tampered with.\n\nIt's possible to customize how data is serialized. Data is compressed as\nneeded. A timestamp can be added and verified automatically while\nloading a token.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U itsdangerous\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nA Simple Example\n----------------\n\nHere's how you could generate a token for transmitting a user's id and\nname between web requests.\n\n.. code-block:: python\n\n from itsdangerous import URLSafeSerializer\n auth_s = URLSafeSerializer(\"secret key\", \"auth\")\n token = auth_s.dumps({\"id\": 5, \"name\": \"itsdangerous\"})\n\n print(token)\n # eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg\n\n data = auth_s.loads(token)\n print(data[\"name\"])\n # itsdangerous\n\n\nDonate\n------\n\nThe Pallets organization develops and supports itsdangerous and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/itsdangerous/\n* Documentation: https://itsdangerous.palletsprojects.com/\n* License: `BSD `_\n* Releases: https://pypi.org/project/itsdangerous/\n* Code: https://github.com/pallets/itsdangerous\n* Issue tracker: https://github.com/pallets/itsdangerous/issues\n* Test status: https://travis-ci.org/pallets/itsdangerous\n* Test coverage: https://codecov.io/gh/pallets/itsdangerous", + "release_date": "2018-10-27T00:17:35", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "Pallets Team", + "email": "contact@palletsprojects.com", "url": null } ], "keywords": [ - "invenio", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-base", - "download_url": "https://files.pythonhosted.org/packages/fd/3b/135f8f839f696ec9f163083625b5111310108fd86b0a9668f7da4a0b6f92/invenio-base-1.2.5.tar.gz", - "size": 29272, + "homepage_url": "https://palletsprojects.com/p/itsdangerous/", + "download_url": "https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl", + "size": 16743, "sha1": null, - "md5": "15750be7226a1a50182c880a2db4cd14", - "sha256": "375b84ab32ebef15f766b8be58005e89b6ec13ba0567a9a21da9001a23562977", + "md5": "55179072b7f84ae38f16b3fdca33aa4f", + "sha256": "b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/pallets/itsdangerous", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3092,31 +2354,37 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-base/1.2.5/json", + "api_data_url": "https://pypi.org/pypi/itsdangerous/1.1.0/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-base@1.2.5" + "purl": "pkg:pypi/itsdangerous@1.1.0" }, { "type": "pypi", "namespace": null, - "name": "invenio-cache", - "version": "1.1.0", + "name": "jinja2", + "version": "2.11.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n===============\n Invenio-Cache\n===============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-cache.svg\n :target: https://github.com/inveniosoftware/invenio-cache/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-cache.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-cache\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-cache.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-cache\n\n.. image:: https://img.shields.io/pypi/v/invenio-cache.svg\n :target: https://pypi.org/pypi/invenio-cache\n\nCache module for Invenio.\n\nFurther documentation is available on\nhttps://invenio-cache.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.1.0 (released 2020-03-10)\n\n- changes flask dependency to centrally managed\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2020-03-10T17:25:42", + "description": "A very fast and expressive template engine.\nJinja\n=====\n\nJinja is a fast, expressive, extensible templating engine. Special\nplaceholders in the template allow writing code similar to Python\nsyntax. Then the template is passed data to render the final document.\n\nIt includes:\n\n- Template inheritance and inclusion.\n- Define and import macros within templates.\n- HTML templates can use autoescaping to prevent XSS from untrusted\n user input.\n- A sandboxed environment can safely render untrusted templates.\n- AsyncIO support for generating templates and calling async\n functions.\n- I18N support with Babel.\n- Templates are compiled to optimized Python code just-in-time and\n cached, or can be compiled ahead-of-time.\n- Exceptions point to the correct line in templates to make debugging\n easier.\n- Extensible filters, tests, functions, and even syntax.\n\nJinja's philosophy is that while application logic belongs in Python if\npossible, it shouldn't make the template designer's job difficult by\nrestricting functionality too much.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U Jinja2\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nIn A Nutshell\n-------------\n\n.. code-block:: jinja\n\n {% extends \"base.html\" %}\n {% block title %}Members{% endblock %}\n {% block content %}\n \n {% endblock %}\n\n\nLinks\n-----\n\n- Website: https://palletsprojects.com/p/jinja/\n- Documentation: https://jinja.palletsprojects.com/\n- Releases: https://pypi.org/project/Jinja2/\n- Code: https://github.com/pallets/jinja\n- Issue tracker: https://github.com/pallets/jinja/issues\n- Test status: https://dev.azure.com/pallets/jinja/_build\n- Official chat: https://discord.gg/t6rrQZH", + "release_date": "2021-01-31T16:33:07", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "Pallets", + "email": "contact@palletsprojects.com", "url": null } ], "keywords": [ - "invenio cache", "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", @@ -3126,25 +2394,31 @@ "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Text Processing :: Markup :: HTML" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-cache", - "download_url": "https://files.pythonhosted.org/packages/04/f0/22b7426ac2b821d93bc6066410fac652c924330bfbd5b64a82e1e36b0ed6/invenio_cache-1.1.0-py2.py3-none-any.whl", - "size": 9071, + "homepage_url": "https://palletsprojects.com/p/jinja/", + "download_url": "https://files.pythonhosted.org/packages/7e/c2/1eece8c95ddbc9b1aeb64f5783a9e07a286de42191b7204d67b7496ddf35/Jinja2-2.11.3-py2.py3-none-any.whl", + "size": 125699, "sha1": null, - "md5": "8501d03c713fe7580f9d625ac22e247b", - "sha256": "a4562639f2f63cbc9de1302e159ecd9363f17d53d912a8d0773ffe76e2f153fc", + "md5": "8e733c6f4cdef7f6a336299e8e548dfa", + "sha256": "03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/pallets/jinja", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3154,49 +2428,52 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-cache/1.1.0/json", + "api_data_url": "https://pypi.org/pypi/jinja2/2.11.3/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-cache@1.1.0" + "purl": "pkg:pypi/jinja2@2.11.3" }, { "type": "pypi", "namespace": null, - "name": "invenio-cache", - "version": "1.1.0", + "name": "jsonpatch", + "version": "1.33", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n===============\n Invenio-Cache\n===============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-cache.svg\n :target: https://github.com/inveniosoftware/invenio-cache/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-cache.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-cache\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-cache.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-cache\n\n.. image:: https://img.shields.io/pypi/v/invenio-cache.svg\n :target: https://pypi.org/pypi/invenio-cache\n\nCache module for Invenio.\n\nFurther documentation is available on\nhttps://invenio-cache.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2017-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.1.0 (released 2020-03-10)\n\n- changes flask dependency to centrally managed\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2020-03-10T17:25:43", + "description": "Apply JSON-Patches (RFC 6902)\npython-json-patch\n=================\n\n[![PyPI version](https://img.shields.io/pypi/v/jsonpatch.svg)](https://pypi.python.org/pypi/jsonpatch/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/jsonpatch.svg)](https://pypi.python.org/pypi/jsonpatch/)\n[![Build Status](https://travis-ci.org/stefankoegl/python-json-patch.png?branch=master)](https://travis-ci.org/stefankoegl/python-json-patch)\n[![Coverage Status](https://coveralls.io/repos/stefankoegl/python-json-patch/badge.png?branch=master)](https://coveralls.io/r/stefankoegl/python-json-patch?branch=master)\n\nApplying JSON Patches in Python\n-------------------------------\n\nLibrary to apply JSON Patches according to\n[RFC 6902](http://tools.ietf.org/html/rfc6902)\n\nSee source code for examples\n\n* Website: https://github.com/stefankoegl/python-json-patch\n* Repository: https://github.com/stefankoegl/python-json-patch.git\n* Documentation: https://python-json-patch.readthedocs.org/\n* PyPI: https://pypi.python.org/pypi/jsonpatch\n* Travis CI: https://travis-ci.org/stefankoegl/python-json-patch\n* Coveralls: https://coveralls.io/r/stefankoegl/python-json-patch\n\nRunning external tests\n----------------------\nTo run external tests (such as those from https://github.com/json-patch/json-patch-tests) use ext_test.py\n\n ./ext_tests.py ../json-patch-tests/tests.json", + "release_date": "2023-06-16T21:01:28", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Stefan K\u00f6gl", + "email": "stefan@skoegl.net", "url": null } ], "keywords": [ - "invenio cache", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-cache", - "download_url": "https://files.pythonhosted.org/packages/4f/f8/aee6e433a4b94882b8089cf5ff17ab1612a6ecc9231b3103cc4e6a533c98/invenio-cache-1.1.0.tar.gz", - "size": 16983, + "homepage_url": "https://github.com/stefankoegl/python-json-patch", + "download_url": "https://files.pythonhosted.org/packages/73/07/02e16ed01e04a374e644b575638ec7987ae846d25ad97bcc9945a3ee4b0e/jsonpatch-1.33-py2.py3-none-any.whl", + "size": 12898, "sha1": null, - "md5": "a166e1fac6a455465b7db232ce0f77c5", - "sha256": "1212a83f98fbe29a936587f7c5b2f838f7f934b0b2a9d9a993e377e5a8ab0cf5", + "md5": "c9e70de2819073c6e49e48aa893146a7", + "sha256": "0ae28c0cd062bbd8b8ecc26d7d164fbbea9652a1a3693f3b956c1eae5145dade", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3204,9 +2481,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "Modified BSD License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3216,50 +2493,54 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-cache/1.1.0/json", + "api_data_url": "https://pypi.org/pypi/jsonpatch/1.33/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-cache@1.1.0" + "purl": "pkg:pypi/jsonpatch@1.33" }, { "type": "pypi", "namespace": null, - "name": "invenio-celery", - "version": "1.2.2", + "name": "jsonpointer", + "version": "2.4", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Celery module for Invenio.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Celery\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-celery.svg\n :target: https://github.com/inveniosoftware/invenio-celery/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-celery/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-celery/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-celery.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-celery\n\n.. image:: https://img.shields.io/pypi/v/invenio-celery.svg\n :target: https://pypi.org/pypi/invenio-celery\n\n\nCelery distributed task queue module for Invenio.\n\nInvenio-Celery is a small discovery layer that takes care of discovering and\nloading tasks from other Invenio modules, as well as providing configuration\ndefaults for Celery usage in Invenio. Invenio-Celery relies on Flask-CeleryExt\nfor integrating Flask and Celery with application factories.\n\nFurther documentation is available on https://invenio-celery.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2020 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.2.2 (released 2020-12-09)\n\n- Removes the pytest-celery dependency as the package is still in prerelease\n and it only affects tests. If you are using Celery 5 you may need to enable\n the pytest celery plugin - see\n https://docs.celeryproject.org/en/stable/userguide/testing.html#enabling\n\nVersion 1.2.1 (released 2020-09-28)\n\n- Change version bounds on Celery to 4.4 to 5.1.\n\n- Adds dependency on pytest-celery which now installs the celery_config pytest\n fixture.\n\nVersion 1.2.0 (released 2020-03-05)\n\n- added dependency on invenio-base to centralise package management\n\nVersion 1.1.3 (released 2020-02-21)\n\n- Removed redundant version specifier for Celery dependency.\n\nVersion 1.1.2 (released 2020-02-17)\n\n- Unpinned Celery version to allow support of Celery 4.4\n\nVersion 1.1.1 (released 2019-11-19)\n\n- pinned version of celery lower than 4.3 due to Datetime serialization\n issues\n\nVersion 1.1.0 (released 2019-06-21)\n\n- Changed the ``msgpack-python`` dependency to ``msgpack``.\n Please first uninstall ``msgpack-python`` before installing\n the new ``msgpack`` dependency (``pip uninstall msgpack-python``).\n\n\nVersion 1.0.1 (released 2018-12-06)\n\n- Adds support for Celery v4.2. Technically this change is backward\n incompatible because it is no longer possible to load tasks from bare modules\n (e.g. mymodule.py in the Python root). This is a constraint imposed by Celery\n v4.2. We however do not known of any cases where bare modules have been used,\n and also this design is discouraged so we are not flagging it as a backward\n incompatible change, in order to have the change readily available for\n current Invenio version.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2020-12-09T12:33:49", + "description": "Identify specific nodes in a JSON document (RFC 6901)\npython-json-pointer\n===================\n\n[![PyPI version](https://img.shields.io/pypi/v/jsonpointer.svg)](https://pypi.python.org/pypi/jsonpointer/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/jsonpointer.svg)](https://pypi.python.org/pypi/jsonpointer/)\n[![Build Status](https://travis-ci.org/stefankoegl/python-json-pointer.svg?branch=master)](https://travis-ci.org/stefankoegl/python-json-pointer)\n[![Coverage Status](https://coveralls.io/repos/stefankoegl/python-json-pointer/badge.svg?branch=master)](https://coveralls.io/r/stefankoegl/python-json-pointer?branch=master)\n\n\nResolve JSON Pointers in Python\n-------------------------------\n\nLibrary to resolve JSON Pointers according to\n[RFC 6901](http://tools.ietf.org/html/rfc6901)\n\nSee source code for examples\n* Website: https://github.com/stefankoegl/python-json-pointer\n* Repository: https://github.com/stefankoegl/python-json-pointer.git\n* Documentation: https://python-json-pointer.readthedocs.org/\n* PyPI: https://pypi.python.org/pypi/jsonpointer\n* Travis CI: https://travis-ci.org/stefankoegl/python-json-pointer\n* Coveralls: https://coveralls.io/r/stefankoegl/python-json-pointer", + "release_date": "2023-06-16T21:15:02", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Stefan K\u00f6gl", + "email": "stefan@skoegl.net", "url": null } ], "keywords": [ - "invenio celery", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-celery", - "download_url": "https://files.pythonhosted.org/packages/b8/a7/ec89de1fd4615aebc0e59c25ab8d8152bb04f03fa21b1c50bdd08239e79e/invenio_celery-1.2.2-py2.py3-none-any.whl", - "size": 8399, + "homepage_url": "https://github.com/stefankoegl/python-json-pointer", + "download_url": "https://files.pythonhosted.org/packages/12/f6/0232cc0c617e195f06f810534d00b74d2f348fe71b2118009ad8ad31f878/jsonpointer-2.4-py2.py3-none-any.whl", + "size": 7762, "sha1": null, - "md5": "fd454eeeb6da903fc8a97c3ba0203d5e", - "sha256": "f03d9d0bb0d5c3b2e1d53ded0dc8839e83d738d00913854de33cefbfa95c4d8d", + "md5": "eb9dcb8c4ccf5d97cea88a7d13510032", + "sha256": "15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3267,9 +2548,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "Modified BSD License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3279,50 +2560,52 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-celery/1.2.2/json", + "api_data_url": "https://pypi.org/pypi/jsonpointer/2.4/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-celery@1.2.2" + "purl": "pkg:pypi/jsonpointer@2.4" }, { "type": "pypi", "namespace": null, - "name": "invenio-celery", - "version": "1.2.2", + "name": "jsonref", + "version": "0.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Celery module for Invenio.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Celery\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-celery.svg\n :target: https://github.com/inveniosoftware/invenio-celery/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-celery/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-celery/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-celery.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-celery\n\n.. image:: https://img.shields.io/pypi/v/invenio-celery.svg\n :target: https://pypi.org/pypi/invenio-celery\n\n\nCelery distributed task queue module for Invenio.\n\nInvenio-Celery is a small discovery layer that takes care of discovering and\nloading tasks from other Invenio modules, as well as providing configuration\ndefaults for Celery usage in Invenio. Invenio-Celery relies on Flask-CeleryExt\nfor integrating Flask and Celery with application factories.\n\nFurther documentation is available on https://invenio-celery.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2020 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.2.2 (released 2020-12-09)\n\n- Removes the pytest-celery dependency as the package is still in prerelease\n and it only affects tests. If you are using Celery 5 you may need to enable\n the pytest celery plugin - see\n https://docs.celeryproject.org/en/stable/userguide/testing.html#enabling\n\nVersion 1.2.1 (released 2020-09-28)\n\n- Change version bounds on Celery to 4.4 to 5.1.\n\n- Adds dependency on pytest-celery which now installs the celery_config pytest\n fixture.\n\nVersion 1.2.0 (released 2020-03-05)\n\n- added dependency on invenio-base to centralise package management\n\nVersion 1.1.3 (released 2020-02-21)\n\n- Removed redundant version specifier for Celery dependency.\n\nVersion 1.1.2 (released 2020-02-17)\n\n- Unpinned Celery version to allow support of Celery 4.4\n\nVersion 1.1.1 (released 2019-11-19)\n\n- pinned version of celery lower than 4.3 due to Datetime serialization\n issues\n\nVersion 1.1.0 (released 2019-06-21)\n\n- Changed the ``msgpack-python`` dependency to ``msgpack``.\n Please first uninstall ``msgpack-python`` before installing\n the new ``msgpack`` dependency (``pip uninstall msgpack-python``).\n\n\nVersion 1.0.1 (released 2018-12-06)\n\n- Adds support for Celery v4.2. Technically this change is backward\n incompatible because it is no longer possible to load tasks from bare modules\n (e.g. mymodule.py in the Python root). This is a constraint imposed by Celery\n v4.2. We however do not known of any cases where bare modules have been used,\n and also this design is discouraged so we are not flagging it as a backward\n incompatible change, in order to have the change readily available for\n current Invenio version.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2020-12-09T12:33:50", + "description": "An implementation of JSON Reference for Python\njsonref\n=======\n\n\n.. image:: https://readthedocs.org/projects/jsonref/badge/?version=latest\n :target: https://jsonref.readthedocs.io/en/latest/\n\n.. image:: https://travis-ci.org/gazpachoking/jsonref.png?branch=master\n :target: https://travis-ci.org/gazpachoking/jsonref\n\n.. image:: https://coveralls.io/repos/gazpachoking/jsonref/badge.png?branch=master\n :target: https://coveralls.io/r/gazpachoking/jsonref\n\n\n``jsonref`` is a library for automatic dereferencing of\n`JSON Reference `_\nobjects for Python (supporting Python 2.6+ and Python 3.3+).\n\nThis library lets you use a data structure with JSON reference objects, as if\nthe references had been replaced with the referent data.\n\n\n.. code-block:: python\n\n >>> from pprint import pprint\n >>> import jsonref\n\n >>> # An example json document\n >>> json_str = \"\"\"{\"real\": [1, 2, 3, 4], \"ref\": {\"$ref\": \"#/real\"}}\"\"\"\n >>> data = jsonref.loads(json_str)\n >>> pprint(data) # Reference is not evaluated until here\n {'real': [1, 2, 3, 4], 'ref': [1, 2, 3, 4]}\n\n\nFeatures\n--------\n\n* References are evaluated lazily. Nothing is dereferenced until it is used.\n\n* Recursive references are supported, and create recursive python data\n structures.\n\n\nReferences objects are actually replaced by lazy lookup proxy objects which are\nalmost completely transparent.\n\n.. code-block:: python\n\n >>> data = jsonref.loads('{\"real\": [1, 2, 3, 4], \"ref\": {\"$ref\": \"#/real\"}}')\n >>> # You can tell it is a proxy by using the type function\n >>> type(data[\"real\"]), type(data[\"ref\"])\n (, )\n >>> # You have direct access to the referent data with the __subject__\n >>> # attribute\n >>> type(data[\"ref\"].__subject__)\n \n >>> # If you need to get at the reference object\n >>> data[\"ref\"].__reference__\n {'$ref': '#/real'}\n >>> # Other than that you can use the proxy just like the underlying object\n >>> ref = data[\"ref\"]\n >>> isinstance(ref, list)\n True\n >>> data[\"real\"] == ref\n True\n >>> ref.append(5)\n >>> del ref[0]\n >>> # Actions on the reference affect the real data (if it is mutable)\n >>> pprint(data)\n {'real': [2, 3, 4, 5], 'ref': [2, 3, 4, 5]}", + "release_date": "2018-10-07T19:24:09", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Chase Sterling", + "email": "chase.sterling@gmail.com", "url": null } ], "keywords": [ - "invenio celery", - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Development Status :: 1 - Planning", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-celery", - "download_url": "https://files.pythonhosted.org/packages/67/db/7d7dffe8f620697461a4f680505c1d04904ca5b6805c10fd9a9677b5e0b6/invenio-celery-1.2.2.tar.gz", - "size": 19898, + "homepage_url": "https://github.com/gazpachoking/jsonref", + "download_url": "https://files.pythonhosted.org/packages/b3/cf/93d4f34d76863d4fb995cb8e3e4f29908304065ce6381e0349700c44ad0c/jsonref-0.2.tar.gz", + "size": 13032, "sha1": null, - "md5": "ed586720d46c6f3c73ead8ad5bfb421d", - "sha256": "ac74076f0656a299ad741d6ec2752f7b06bf3b45d742179952267058c868d93d", + "md5": "42b518b9ccd6852d1d709749bc96cb70", + "sha256": "f3c45b121cf6257eafabdc3a8008763aed1cd7da06dbabc59a9e4d2a5e4e6697", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3342,49 +2625,48 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-celery/1.2.2/json", + "api_data_url": "https://pypi.org/pypi/jsonref/0.2/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-celery@1.2.2" + "purl": "pkg:pypi/jsonref@0.2" }, { "type": "pypi", "namespace": null, - "name": "invenio-config", - "version": "1.0.3", + "name": "jsonresolver", + "version": "0.3.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Config\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-config.svg\n :target: https://github.com/inveniosoftware/invenio-config/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-config.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-config\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-config.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-config\n\n.. image:: https://img.shields.io/pypi/v/invenio-config.svg\n :target: https://pypi.org/pypi/invenio-config\n\n\nInvenio configuration loader.\n\nInvenio-Config is a base package of the Invenio digital library framework. It\nis usually installed automatically as a dependency. It facilitates\nconfiguration loading from various sources such as a Python module, an instance\nfolder or environment variables.\n\nFurther documentation is available on https://invenio-config.readthedocs.io/.\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.0.3 (released 2020-05-06)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\nVersion 1.0.2 (released 2019-07-29)\n\n- Added `ALLOWED_HTML_TAGS` and `ALLOWED_HTML_ATTRS` config keys.\n\nVersion 1.0.1 (released 2018-10-02)\n\n- Application configurations are now sorted and loaded in alphabetical order.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2020-05-06T14:14:22", + "description": "..\n This file is part of jsonresolver\n Copyright (C) 2015 CERN.\n\n jsonresolver is free software; you can redistribute it and/or modify\n it under the terms of the Revised BSD License; see LICENSE file for\n more details.\n\n==============\n JSONResolver\n==============\n\n.. image:: https://img.shields.io/travis/inveniosoftware/jsonresolver.svg\n :target: https://travis-ci.org/inveniosoftware/jsonresolver\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/jsonresolver.svg\n :target: https://coveralls.io/r/inveniosoftware/jsonresolver\n\n.. image:: https://img.shields.io/github/tag/inveniosoftware/jsonresolver.svg\n :target: https://github.com/inveniosoftware/jsonresolver/releases\n\n.. image:: https://img.shields.io/pypi/dm/jsonresolver.svg\n :target: https://pypi.python.org/pypi/jsonresolver\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/jsonresolver.svg\n :target: https://github.com/inveniosoftware/jsonresolver/blob/master/LICENSE\n\n\nJSON data resolver with support for plugins.\n\n*This is an experimental developer preview release.*\n\n* Free software: BSD license\n* Documentation: https://jsonresolver.readthedocs.io/\n\n\n..\n This file is part of jsonresolver\n Copyright (C) 2015, 2016 CERN.\n\n jsonresolver is free software; you can redistribute it and/or modify\n it under the terms of the Revised BSD License; see LICENSE file for\n more details.\n\nChanges\n=======\n\nVersion 0.3.1 (released 2020-05-06)\n-----------------------------------\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\n\nVersion 0.3.0 (released 2020-03-12)\n-----------------------------------\n\n- Drops support for Python 2.7\n- Updates testing method\n- Updates python dependencies\n\n\nVersion 0.2.1 (released 2016-04-15)\n-----------------------------------\n\nBug fixes\n~~~~~~~~~\n\n- Fixes issue with exceptions raised during e.g. resolver plugin\n loading being caught and not propagated.\n\nVersion 0.2.0 (released 2016-04-06)\n-----------------------------------\n\nIncompatible changes\n~~~~~~~~~~~~~~~~~~~~\n\n- Changes resolving to be based on hostname without 'http://' prefix.\n\nBug fixes\n~~~~~~~~~\n\n- Fixes issues with the hostname not being matched resulting in the\n same route on two hosts not to work.\n\nVersion 0.1.1 (released 2015-12-11)\n-----------------------------------\n\nImproved features\n~~~~~~~~~~~~~~~~~\n\n- Delays the url_map building until first resolve request.\n\nVersion 0.1.0 (released 2015-11-18)\n-----------------------------------\n\n- Initial public release.", + "release_date": "2020-05-06T13:33:07", "parties": [ { "type": "person", "role": "author", - "name": "CERN", + "name": "Invenio collaboration", "email": "info@inveniosoftware.org", "url": null } ], "keywords": [ - "invenio config", - "Development Status :: 5 - Production/Stable", + "Development Status :: 1 - Planning", "Environment :: Web Environment", + "Framework :: Flask", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-config", - "download_url": "https://files.pythonhosted.org/packages/5a/67/c751f8b8cf6ec5c4415bccaeed7f6b7eab836178ca4faa9f4d7088616735/invenio_config-1.0.3-py2.py3-none-any.whl", - "size": 11585, + "homepage_url": "https://github.com/inveniosoftware/jsonresolver", + "download_url": "https://files.pythonhosted.org/packages/0d/8e/e63fba33303e2062eb1fbd38a5483538ad1b5eee73e04ac1d1f632ac2b76/jsonresolver-0.3.1-py2.py3-none-any.whl", + "size": 9862, "sha1": null, - "md5": "568b56eed58774c4af391def11b972ad", - "sha256": "238ab074991e7f0d6ee7ebc6eb2f5e41658749dd977ab6e86476e862c0efaf28", + "md5": "885596a6122d059b65db7cf2157c981c", + "sha256": "f17a526988456d9895023ae3580714d6ce6af5656869d11d9860dc4a799cf6d4", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3392,9 +2674,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3404,49 +2686,46 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-config/1.0.3/json", + "api_data_url": "https://pypi.org/pypi/jsonresolver/0.3.1/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-config@1.0.3" + "purl": "pkg:pypi/jsonresolver@0.3.1" }, { "type": "pypi", "namespace": null, - "name": "invenio-config", - "version": "1.0.3", + "name": "jsonschema", + "version": "4.0.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Config\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-config.svg\n :target: https://github.com/inveniosoftware/invenio-config/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-config.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-config\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-config.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-config\n\n.. image:: https://img.shields.io/pypi/v/invenio-config.svg\n :target: https://pypi.org/pypi/invenio-config\n\n\nInvenio configuration loader.\n\nInvenio-Config is a base package of the Invenio digital library framework. It\nis usually installed automatically as a dependency. It facilitates\nconfiguration loading from various sources such as a Python module, an instance\nfolder or environment variables.\n\nFurther documentation is available on https://invenio-config.readthedocs.io/.\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.0.3 (released 2020-05-06)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\nVersion 1.0.2 (released 2019-07-29)\n\n- Added `ALLOWED_HTML_TAGS` and `ALLOWED_HTML_ATTRS` config keys.\n\nVersion 1.0.1 (released 2018-10-02)\n\n- Application configurations are now sorted and loaded in alphabetical order.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2020-05-06T14:14:23", + "description": "An implementation of JSON Schema validation for Python\n==========\njsonschema\n==========\n\n|PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit|\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg\n :alt: PyPI version\n :target: https://pypi.org/project/jsonschema/\n\n.. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg\n :alt: Supported Python versions\n :target: https://pypi.org/project/jsonschema/\n\n.. |CI| image:: https://github.com/Julian/jsonschema/workflows/CI/badge.svg\n :alt: Build status\n :target: https://github.com/Julian/jsonschema/actions?query=workflow%3ACI\n\n.. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable&style=flat\n :alt: ReadTheDocs status\n :target: https://python-jsonschema.readthedocs.io/en/stable/\n\n.. |Precommit| image:: https://results.pre-commit.ci/badge/github/Julian/jsonschema/main.svg\n :alt: pre-commit.ci status\n :target: https://results.pre-commit.ci/latest/github/Julian/jsonschema/main\n\n\n``jsonschema`` is an implementation of `JSON Schema\n`_ for Python.\n\n.. code-block:: python\n\n >>> from jsonschema import validate\n\n >>> # A sample schema, like what we'd get from json.load()\n >>> schema = {\n ... \"type\" : \"object\",\n ... \"properties\" : {\n ... \"price\" : {\"type\" : \"number\"},\n ... \"name\" : {\"type\" : \"string\"},\n ... },\n ... }\n\n >>> # If no exception is raised by validate(), the instance is valid.\n >>> validate(instance={\"name\" : \"Eggs\", \"price\" : 34.99}, schema=schema)\n\n >>> validate(\n ... instance={\"name\" : \"Eggs\", \"price\" : \"Invalid\"}, schema=schema,\n ... ) # doctest: +IGNORE_EXCEPTION_DETAIL\n Traceback (most recent call last):\n ...\n ValidationError: 'Invalid' is not of type 'number'\n\nIt can also be used from console:\n\n.. code-block:: bash\n\n $ jsonschema --instance sample.json sample.schema\n\nFeatures\n--------\n\n* Partial support for\n `Draft 2020-12 `_ and\n `Draft 2019-09 `_,\n except for ``dynamicRef`` / ``recursiveRef`` and ``$vocabulary`` (in-progress).\n Full support for\n `Draft 7 `_,\n `Draft 6 `_,\n `Draft 4 `_\n and\n `Draft 3 `_\n\n* `Lazy validation `_\n that can iteratively report *all* validation errors.\n\n* `Programmatic querying `_\n of which properties or items failed validation.\n\n\nInstallation\n------------\n\n``jsonschema`` is available on `PyPI `_. You can install using `pip `_:\n\n.. code-block:: bash\n\n $ pip install jsonschema\n\n\nRunning the Test Suite\n----------------------\n\nIf you have ``tox`` installed (perhaps via ``pip install tox`` or your\npackage manager), running ``tox`` in the directory of your source\ncheckout will run ``jsonschema``'s test suite on all of the versions\nof Python ``jsonschema`` supports. If you don't have all of the\nversions that ``jsonschema`` is tested under, you'll likely want to run\nusing ``tox``'s ``--skip-missing-interpreters`` option.\n\nOf course you're also free to just run the tests on a single version with your\nfavorite test runner. The tests live in the ``jsonschema.tests`` package.\n\n\nBenchmarks\n----------\n\n``jsonschema``'s benchmarks make use of `pyperf\n`_. Running them can be done via::\n\n $ tox -e perf\n\n\nCommunity\n---------\n\nThe JSON Schema specification has `a Slack\n`_, with an `invite link on its home page\n`_. Many folks knowledgeable on authoring\nschemas can be found there.\n\nOtherwise, asking questions on Stack Overflow is another means of\ngetting help if you're stuck.\n\nContributing\n------------\n\nI'm Julian Berman.\n\n``jsonschema`` is on `GitHub `_.\n\nGet in touch, via GitHub or otherwise, if you've got something to contribute,\nit'd be most welcome!\n\nYou can also generally find me on Libera (nick: ``Julian``) in various\nchannels, including ``#python``.\n\nIf you feel overwhelmingly grateful, you can also `sponsor me\n`_.\n\nAnd for companies who appreciate ``jsonschema`` and its continued support\nand growth, ``jsonschema`` is also now supportable via `TideLift\n`_.", + "release_date": "2021-09-29T23:21:52", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Julian Berman", + "email": "Julian@GrayVines.com", "url": null } ], "keywords": [ - "invenio config", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-config", - "download_url": "https://files.pythonhosted.org/packages/cd/8e/36d33ec84f29bbeed5593ea8e89b421e0cbcc6fafd0d8c300d187f4a6d9d/invenio-config-1.0.3.tar.gz", - "size": 19593, + "homepage_url": "https://github.com/Julian/jsonschema", + "download_url": "https://files.pythonhosted.org/packages/9c/99/9789c7fd0bb8876a7d624d903195ce11e5618b421bdb1bf7c975d17a9bc3/jsonschema-4.0.0.tar.gz", + "size": 290808, "sha1": null, - "md5": "42267dbcde1d8ef8be7d333ee5f74c70", - "sha256": "9d10492b49a46703f0ac028ce8ab78b5ff1c72b180ecb4ffcee5bf49682d1e6c", + "md5": "c34c3dab1d792063972a3da3abb0e49f", + "sha256": "bc51325b929171791c42ebc1c70b9713eb134d3bb8ebd5474c8b659b15be6d86", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3466,50 +2745,55 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-config/1.0.3/json", + "api_data_url": "https://pypi.org/pypi/jsonschema/4.0.0/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-config@1.0.3" + "purl": "pkg:pypi/jsonschema@4.0.0" }, { "type": "pypi", "namespace": null, - "name": "invenio-i18n", - "version": "1.3.1", + "name": "kombu", + "version": "4.6.11", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Invenio internationalization module.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n==============\n Invenio-I18N\n==============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-i18n.svg\n :target: https://github.com/inveniosoftware/invenio-i18n/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-i18n/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-i18n/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-i18n.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-i18n\n\n.. image:: https://img.shields.io/pypi/v/invenio-i18n.svg\n :target: https://pypi.org/pypi/invenio-i18n\n\n\nInvenio internationalization module based on\n`Flask-BabelEx `_.\n\nFeatures:\n\n* Loading and merging message catalogs.\n* Algorithm for detecting a user's locale.\n* Views for changing the locale.\n* Jinja2 macros and filters for I18N.\n\nFurther documentation available at https://invenio-i18n.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.3.1 (released 2021-10-06)\n\n- Fixes issue with language selector button not disabling the currently\n selected field.\n\nVersion 1.3.0 (released 2020-12-07)\n\n- Integrates Semantic-UI templates and assets.\n- Removes webassets-based bundles.\n- Adds InvenioI18N extransion to the API level applications.\n\nVersion 1.2.0 (released 2020-03-06)\n\n- Bumps Flask-BabelEx support latest Flask/Werkzeug.\n- Replaces Flask dependency with ``invenio-base``.\n\nVersion 1.1.1 (released 2018-12-12)\n\n- Fix an incorrect JS import.\n\nVersion 1.1.0 (released 2018-11-06)\n\n- Introduce webpack support.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2021-10-06T15:11:28", + "description": "Messaging library for Python.", + "release_date": "2020-06-24T07:11:18", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Ask Solem", + "email": "auvipy@gmail.com, ask@celeryproject.org", "url": null } ], "keywords": [ - "invenio internationalization i18n localization l10n", + "messaging message amqp rabbitmq redis actor producer consumer", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Communications", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Distributed Computing", + "Topic :: System :: Networking" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-i18n", - "download_url": "https://files.pythonhosted.org/packages/81/56/4398e45ba27c8436e38b8027881d72d1e02ab199d0eb69cb425759173ec4/invenio_i18n-1.3.1-py2.py3-none-any.whl", - "size": 31391, + "homepage_url": "https://kombu.readthedocs.io", + "download_url": "https://files.pythonhosted.org/packages/9e/34/3eea6a3a9ff81b0c7ddbdceb22a1ffc1b5907d863f27ca19a68777d2211d/kombu-4.6.11-py2.py3-none-any.whl", + "size": 184431, "sha1": null, - "md5": "1574ffd388ca0a833232f954ea7fcef5", - "sha256": "67b22098900f4fa79a4db47cd189d3fb993223c26e560fd1c87f69b7cc2c5bc8", + "md5": "897e94e5d08627c9ac649a007dffb9cc", + "sha256": "be48cdffb54a2194d93ad6533d73f69408486483d189fe9f5990ee24255b0e0a", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3517,9 +2801,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3529,50 +2813,50 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-i18n/1.3.1/json", + "api_data_url": "https://pypi.org/pypi/kombu/4.6.11/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-i18n@1.3.1" + "purl": "pkg:pypi/kombu@4.6.11" }, { "type": "pypi", "namespace": null, - "name": "invenio-i18n", - "version": "1.3.1", + "name": "limits", + "version": "1.6", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Invenio internationalization module.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n==============\n Invenio-I18N\n==============\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-i18n.svg\n :target: https://github.com/inveniosoftware/invenio-i18n/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-i18n/workflows/CI/badge.svg\n :target: https://github.com/inveniosoftware/invenio-i18n/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-i18n.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-i18n\n\n.. image:: https://img.shields.io/pypi/v/invenio-i18n.svg\n :target: https://pypi.org/pypi/invenio-i18n\n\n\nInvenio internationalization module based on\n`Flask-BabelEx `_.\n\nFeatures:\n\n* Loading and merging message catalogs.\n* Algorithm for detecting a user's locale.\n* Views for changing the locale.\n* Jinja2 macros and filters for I18N.\n\nFurther documentation available at https://invenio-i18n.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 1.3.1 (released 2021-10-06)\n\n- Fixes issue with language selector button not disabling the currently\n selected field.\n\nVersion 1.3.0 (released 2020-12-07)\n\n- Integrates Semantic-UI templates and assets.\n- Removes webassets-based bundles.\n- Adds InvenioI18N extransion to the API level applications.\n\nVersion 1.2.0 (released 2020-03-06)\n\n- Bumps Flask-BabelEx support latest Flask/Werkzeug.\n- Replaces Flask dependency with ``invenio-base``.\n\nVersion 1.1.1 (released 2018-12-12)\n\n- Fix an incorrect JS import.\n\nVersion 1.1.0 (released 2018-11-06)\n\n- Introduce webpack support.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2021-10-06T15:11:30", + "description": "Rate limiting utilities\n.. |ci| image:: https://github.com/alisaifee/limits/workflows/CI/badge.svg?branch=master\n :target: https://github.com/alisaifee/limits/actions?query=branch%3Amaster+workflow%3ACI\n.. |codecov| image:: https://codecov.io/gh/alisaifee/limits/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/alisaifee/limits\n.. |pypi| image:: https://img.shields.io/pypi/v/limits.svg?style=flat-square\n :target: https://pypi.python.org/pypi/limits\n.. |license| image:: https://img.shields.io/pypi/l/limits.svg?style=flat-square\n :target: https://pypi.python.org/pypi/limits\n\n*************\nlimits\n*************\n|ci| |codecov| |pypi| |license|\n\n*limits* provides utilities to implement rate limiting using\nvarious strategies and storage backends such as redis & memcached.\n\n*****\nLinks\n*****\n\n* `Documentation `_\n* `Changelog `_", + "release_date": "2021-11-27T18:06:01", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Ali-Akber Saifee", + "email": "ali@indydevs.org", "url": null } ], "keywords": [ - "invenio internationalization i18n localization l10n", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", + "Operating System :: MacOS", "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-i18n", - "download_url": "https://files.pythonhosted.org/packages/06/70/b65b7ffef1daf8c864329af034c06a56ce8c889d887261553aad75ecd3dc/invenio-i18n-1.3.1.tar.gz", - "size": 36712, + "homepage_url": "https://limits.readthedocs.org", + "download_url": "https://files.pythonhosted.org/packages/f8/80/3e208b8cfdcf9bf85006097a53c93f53a0c23bc711f1e6abfc180ebb4bca/limits-1.6.tar.gz", + "size": 37248, "sha1": null, - "md5": "e589c98d1a78f5a9443ce27523be6352", - "sha256": "02534002f3bf63706a4c3d3b15c32ce4cce0c341217d4204c7c29486fabece22", + "md5": "b81f48fd91a85b5ba96c3b3bc771c808", + "sha256": "6c0a57b42647f1141f5a7a0a8479b49e4367c24937a01bd9d4063a595c2dd48a", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3592,31 +2876,37 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-i18n/1.3.1/json", + "api_data_url": "https://pypi.org/pypi/limits/1.6/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-i18n@1.3.1" + "purl": "pkg:pypi/limits@1.6" }, { "type": "pypi", "namespace": null, - "name": "invenio-records", - "version": "1.0.2", + "name": "markupsafe", + "version": "1.1.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Records\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-records.svg\n :target: https://github.com/inveniosoftware/invenio-records/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-records.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-records.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/pypi/v/invenio-records.svg\n :target: https://pypi.org/pypi/invenio-records\n\n\n\nInvenio-Records is a metadata storage module. A *record* is a JSON document with\nrevision history identified by a unique `UUID`_ .\n\n.. _UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier\n\nFeatures:\n\n * Generic JSON document storage with revision history.\n * JSONSchema validation of documents.\n * Records creation, update and deletion.\n * CLI and administration interface for CRUD operations on records.\n\nFurther documentation available Documentation:\nhttps://invenio-records.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\nVersion 1.0.2 (released 2019-07-11)\n\n- Fix XSS vulnerability in admin interface.\n\nVersion 1.0.1 (released 2018-12-14)\n\n- Fix CliRunner exceptions\n- Fix json schema url\n- MIT license and shield badge\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2019-07-15T08:35:18", + "description": "Safely add untrusted strings to HTML/XML markup.\nMarkupSafe\n==========\n\nMarkupSafe implements a text object that escapes characters so it is\nsafe to use in HTML and XML. Characters that have special meanings are\nreplaced so that they display as the actual characters. This mitigates\ninjection attacks, meaning untrusted user input can safely be displayed\non a page.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U MarkupSafe\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nExamples\n--------\n\n.. code-block:: pycon\n\n >>> from markupsafe import Markup, escape\n >>> # escape replaces special characters and wraps in Markup\n >>> escape('')\n Markup(u'<script>alert(document.cookie);</script>')\n >>> # wrap in Markup to mark text \"safe\" and prevent escaping\n >>> Markup('Hello')\n Markup('hello')\n >>> escape(Markup('Hello'))\n Markup('hello')\n >>> # Markup is a text subclass (str on Python 3, unicode on Python 2)\n >>> # methods and operators escape their arguments\n >>> template = Markup(\"Hello %s\")\n >>> template % '\"World\"'\n Markup('Hello "World"')\n\n\nDonate\n------\n\nThe Pallets organization develops and supports MarkupSafe and other\nlibraries that use it. In order to grow the community of contributors\nand users, and allow the maintainers to devote more time to the\nprojects, `please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/markupsafe/\n* Documentation: https://markupsafe.palletsprojects.com/\n* License: `BSD-3-Clause `_\n* Releases: https://pypi.org/project/MarkupSafe/\n* Code: https://github.com/pallets/markupsafe\n* Issue tracker: https://github.com/pallets/markupsafe/issues\n* Test status:\n\n * Linux, Mac: https://travis-ci.org/pallets/markupsafe\n * Windows: https://ci.appveyor.com/project/pallets/markupsafe\n\n* Test coverage: https://codecov.io/gh/pallets/markupsafe", + "release_date": "2019-02-24T01:04:53", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "The Pallets Team", + "email": "contact@palletsprojects.com", "url": null } ], "keywords": [ - "invenio metadata", "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", @@ -3625,27 +2915,30 @@ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Text Processing :: Markup :: HTML" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-records", - "download_url": "https://files.pythonhosted.org/packages/50/97/fd03b1bbc220643230bf9e1f621d4043d583043d0cf5506a8ccb0551029c/invenio_records-1.0.2-py2.py3-none-any.whl", - "size": 88791, + "homepage_url": "https://palletsprojects.com/p/markupsafe/", + "download_url": "https://files.pythonhosted.org/packages/d8/1f/e97c4c6b182e59562f99c207f0f621d15a42fc82a6532a98e0b2d38b7c4e/MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", + "size": 24349, "sha1": null, - "md5": "9957fa5aa8d4d5eae377698ef37f9cf6", - "sha256": "5818e2dcef2de1d0b3e827b60c13588ce24f60f368a73b8d70ab75d7275eef63", + "md5": "01e8f1759663535a494b0098c29bb39c", + "sha256": "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/pallets/markupsafe", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD-3-Clause", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3655,50 +2948,54 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-records/1.0.2/json", + "api_data_url": "https://pypi.org/pypi/markupsafe/1.1.1/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-records@1.0.2" + "purl": "pkg:pypi/markupsafe@1.1.1" }, { "type": "pypi", "namespace": null, - "name": "invenio-records", - "version": "1.0.2", + "name": "mock", + "version": "3.0.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Records\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-records.svg\n :target: https://github.com/inveniosoftware/invenio-records/blob/master/LICENSE\n\n.. image:: https://img.shields.io/travis/inveniosoftware/invenio-records.svg\n :target: https://travis-ci.org/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-records.svg\n :target: https://coveralls.io/r/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/pypi/v/invenio-records.svg\n :target: https://pypi.org/pypi/invenio-records\n\n\n\nInvenio-Records is a metadata storage module. A *record* is a JSON document with\nrevision history identified by a unique `UUID`_ .\n\n.. _UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier\n\nFeatures:\n\n * Generic JSON document storage with revision history.\n * JSONSchema validation of documents.\n * Records creation, update and deletion.\n * CLI and administration interface for CRUD operations on records.\n\nFurther documentation available Documentation:\nhttps://invenio-records.readthedocs.io/\n\n\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\nVersion 1.0.2 (released 2019-07-11)\n\n- Fix XSS vulnerability in admin interface.\n\nVersion 1.0.1 (released 2018-12-14)\n\n- Fix CliRunner exceptions\n- Fix json schema url\n- MIT license and shield badge\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.", - "release_date": "2019-07-15T08:35:20", + "description": "Rolling backport of unittest.mock for all Pythons\nmock is a library for testing in Python. It allows you to replace parts of\nyour system under test with mock objects and make assertions about how they\nhave been used.\n\nmock is now part of the Python standard library, available as `unittest.mock\n`_ in Python 3.3\nonwards.\n\nThis package contains a rolling backport of the standard library mock code\ncompatible with Python 2.7 and 3.4 and up.\n\nPlease see the standard library documentation for more details.\n\n:Homepage: `Mock Homepage`_\n:Download: `Mock on PyPI`_\n:Documentation: `Python Docs`_\n:License: `BSD License`_\n:Support: `Mailing list (testing-in-python@lists.idyll.org)\n `_\n:Code: `GitHub\n `_\n:Issue tracker: `GitHub Issues\n `_\n:Build status:\n |CircleCI|_ |Docs|_\n\n .. |CircleCI| image:: https://circleci.com/gh/testing-cabal/mock/tree/master.svg?style=shield\n .. _CircleCI: https://circleci.com/gh/testing-cabal/mock/tree/master\n\n .. |Docs| image:: https://readthedocs.org/projects/mock/badge/?version=latest\n .. _Docs: http://mock.readthedocs.org/en/latest/\n\n.. _Mock Homepage: http://mock.readthedocs.org/en/latest/\n.. _BSD License: https://github.com/testing-cabal/mock/blob/master/LICENSE.txt\n.. _Python Docs: https://docs.python.org/dev/library/unittest.mock.html\n.. _mock on PyPI: https://pypi.org/project/mock/", + "release_date": "2019-05-07T21:22:22", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Testing Cabal", + "email": "testing-in-python@lists.idyll.org", "url": null } ], "keywords": [ - "invenio metadata", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Testing" ], - "homepage_url": "https://github.com/inveniosoftware/invenio-records", - "download_url": "https://files.pythonhosted.org/packages/88/8a/b4bd1e9b493fc119d972ac89920c32fa4573205e8fa2e893e53effc51f1c/invenio-records-1.0.2.tar.gz", - "size": 97890, + "homepage_url": "http://mock.readthedocs.org/en/latest/", + "download_url": "https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl", + "size": 25027, "sha1": null, - "md5": "cfb4b57201cb34b9af50f6e28b3b2b78", - "sha256": "c500e7f8c6cee77ed818e7ce13f610e6dd9f96762369d9a99afdaed4e13aa1b7", + "md5": "0b273f0d265660e78e96b739c6a813b4", + "sha256": "d157e52d4e5b938c550f39eb2fd15610db062441a9c2747d3dbfa9298211d0f8", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3706,9 +3003,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "OSI Approved :: BSD License", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -3718,59 +3015,57 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio-records/1.0.2/json", + "api_data_url": "https://pypi.org/pypi/mock/3.0.5/json", "datasource_id": null, - "purl": "pkg:pypi/invenio-records@1.0.2" + "purl": "pkg:pypi/mock@3.0.5" }, { "type": "pypi", "namespace": null, - "name": "invenio", - "version": "3.4.1", + "name": "msgpack", + "version": "1.0.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Invenio Digital Library Framework.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n\n======================\n Invenio Framework v3\n======================\n\n**Open Source framework for large-scale digital repositories.**\n\n.. image:: https://img.shields.io/pypi/v/invenio.svg\n :target: https://pypi.org/project/invenio/\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio.svg\n :target: https://github.com/inveniosoftware/invenio/blob/master/LICENSE\n\n.. image:: https://travis-ci.org/inveniosoftware/invenio.svg?branch=master\n :target: https://travis-ci.org/inveniosoftware/invenio\n\n.. image:: https://img.shields.io/badge/Discord-join%20chat-%237289da\n :target: https://discord.gg/8qatqBC\n\nInvenio Framework is like a Swiss Army knife of battle-tested, safe and secure\nmodules providing you with all the features you need to build a trusted digital\nrepository.\n\n**Our other products**\n\nLooking for a turn-key Research Data Management platform? Checkout `InvenioRDM `_\n\nLooking for a modern Integrated Library System? Checkout `InvenioILS `_\n\n**Built with Invenio Framework**\n\nSee examples on https://inveniosoftware.org/products/framework/ and https://inveniosoftware.org/showcase/.", - "release_date": "2021-05-12T14:00:40", + "description": "MessagePack serializer\n# MessagePack for Python\n\n[![Build Status](https://travis-ci.org/msgpack/msgpack-python.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-python)\n[![Documentation Status](https://readthedocs.org/projects/msgpack-python/badge/?version=latest)](https://msgpack-python.readthedocs.io/en/latest/?badge=latest)\n\n## What's this\n\n[MessagePack](https://msgpack.org/) is an efficient binary serialization format.\nIt lets you exchange data among multiple languages like JSON.\nBut it's faster and smaller.\nThis package provides CPython bindings for reading and writing MessagePack data.\n\n\n## Very important notes for existing users\n\n### PyPI package name\n\nPackage name on PyPI was changed from `msgpack-python` to `msgpack` from 0.5.\n\nWhen upgrading from msgpack-0.4 or earlier, do `pip uninstall msgpack-python` before\n`pip install -U msgpack`.\n\n\n### Compatibility with the old format\n\nYou can use `use_bin_type=False` option to pack `bytes`\nobject into raw type in the old msgpack spec, instead of bin type in new msgpack spec.\n\nYou can unpack old msgpack format using `raw=True` option.\nIt unpacks str (raw) type in msgpack into Python bytes.\n\nSee note below for detail.\n\n\n### Major breaking changes in msgpack 1.0\n\n* Python 2\n\n * The extension module does not support Python 2 anymore.\n The pure Python implementation (`msgpack.fallback`) is used for Python 2.\n\n* Packer\n\n * `use_bin_type=True` by default. bytes are encoded in bin type in msgpack.\n **If you are still using Python 2, you must use unicode for all string types.**\n You can use `use_bin_type=False` to encode into old msgpack format.\n * `encoding` option is removed. UTF-8 is used always.\n\n* Unpacker\n\n * `raw=False` by default. It assumes str types are valid UTF-8 string\n and decode them to Python str (unicode) object.\n * `encoding` option is removed. You can use `raw=True` to support old format.\n * Default value of `max_buffer_size` is changed from 0 to 100 MiB.\n * Default value of `strict_map_key` is changed to True to avoid hashdos.\n You need to pass `strict_map_key=False` if you have data which contain map keys\n which type is not bytes or str.\n\n\n## Install\n\n```\n$ pip install msgpack\n```\n\n### Pure Python implementation\n\nThe extension module in msgpack (`msgpack._cmsgpack`) does not support\nPython 2 and PyPy.\n\nBut msgpack provides a pure Python implementation (`msgpack.fallback`)\nfor PyPy and Python 2.\n\n\n\n### Windows\n\nWhen you can't use a binary distribution, you need to install Visual Studio\nor Windows SDK on Windows.\nWithout extension, using pure Python implementation on CPython runs slowly.\n\n\n## How to use\n\nNOTE: In examples below, I use `raw=False` and `use_bin_type=True` for users\nusing msgpack < 1.0. These options are default from msgpack 1.0 so you can omit them.\n\n\n### One-shot pack & unpack\n\nUse `packb` for packing and `unpackb` for unpacking.\nmsgpack provides `dumps` and `loads` as an alias for compatibility with\n`json` and `pickle`.\n\n`pack` and `dump` packs to a file-like object.\n`unpack` and `load` unpacks from a file-like object.\n\n```pycon\n>>> import msgpack\n>>> msgpack.packb([1, 2, 3], use_bin_type=True)\n'\\x93\\x01\\x02\\x03'\n>>> msgpack.unpackb(_, raw=False)\n[1, 2, 3]\n```\n\n`unpack` unpacks msgpack's array to Python's list, but can also unpack to tuple:\n\n```pycon\n>>> msgpack.unpackb(b'\\x93\\x01\\x02\\x03', use_list=False, raw=False)\n(1, 2, 3)\n```\n\nYou should always specify the `use_list` keyword argument for backward compatibility.\nSee performance issues relating to `use_list option`_ below.\n\nRead the docstring for other options.\n\n\n### Streaming unpacking\n\n`Unpacker` is a \"streaming unpacker\". It unpacks multiple objects from one\nstream (or from bytes provided through its `feed` method).\n\n```py\nimport msgpack\nfrom io import BytesIO\n\nbuf = BytesIO()\nfor i in range(100):\n buf.write(msgpack.packb(i, use_bin_type=True))\n\nbuf.seek(0)\n\nunpacker = msgpack.Unpacker(buf, raw=False)\nfor unpacked in unpacker:\n print(unpacked)\n```\n\n\n### Packing/unpacking of custom data type\n\nIt is also possible to pack/unpack custom data types. Here is an example for\n`datetime.datetime`.\n\n```py\nimport datetime\nimport msgpack\n\nuseful_dict = {\n \"id\": 1,\n \"created\": datetime.datetime.now(),\n}\n\ndef decode_datetime(obj):\n if '__datetime__' in obj:\n obj = datetime.datetime.strptime(obj[\"as_str\"], \"%Y%m%dT%H:%M:%S.%f\")\n return obj\n\ndef encode_datetime(obj):\n if isinstance(obj, datetime.datetime):\n return {'__datetime__': True, 'as_str': obj.strftime(\"%Y%m%dT%H:%M:%S.%f\")}\n return obj\n\n\npacked_dict = msgpack.packb(useful_dict, default=encode_datetime, use_bin_type=True)\nthis_dict_again = msgpack.unpackb(packed_dict, object_hook=decode_datetime, raw=False)\n```\n\n`Unpacker`'s `object_hook` callback receives a dict; the\n`object_pairs_hook` callback may instead be used to receive a list of\nkey-value pairs.\n\n\n### Extended types\n\nIt is also possible to pack/unpack custom data types using the **ext** type.\n\n```pycon\n>>> import msgpack\n>>> import array\n>>> def default(obj):\n... if isinstance(obj, array.array) and obj.typecode == 'd':\n... return msgpack.ExtType(42, obj.tostring())\n... raise TypeError(\"Unknown type: %r\" % (obj,))\n...\n>>> def ext_hook(code, data):\n... if code == 42:\n... a = array.array('d')\n... a.fromstring(data)\n... return a\n... return ExtType(code, data)\n...\n>>> data = array.array('d', [1.2, 3.4])\n>>> packed = msgpack.packb(data, default=default, use_bin_type=True)\n>>> unpacked = msgpack.unpackb(packed, ext_hook=ext_hook, raw=False)\n>>> data == unpacked\nTrue\n```\n\n\n### Advanced unpacking control\n\nAs an alternative to iteration, `Unpacker` objects provide `unpack`,\n`skip`, `read_array_header` and `read_map_header` methods. The former two\nread an entire message from the stream, respectively de-serialising and returning\nthe result, or ignoring it. The latter two methods return the number of elements\nin the upcoming container, so that each element in an array, or key-value pair\nin a map, can be unpacked or skipped individually.\n\n\n## Notes\n\n### string and binary type\n\nEarly versions of msgpack didn't distinguish string and binary types.\nThe type for representing both string and binary types was named **raw**.\n\nYou can pack into and unpack from this old spec using `use_bin_type=False`\nand `raw=True` options.\n\n```pycon\n>>> import msgpack\n>>> msgpack.unpackb(msgpack.packb([b'spam', u'eggs'], use_bin_type=False), raw=True)\n[b'spam', b'eggs']\n>>> msgpack.unpackb(msgpack.packb([b'spam', u'eggs'], use_bin_type=True), raw=False)\n[b'spam', 'eggs']\n```\n\n### ext type\n\nTo use the **ext** type, pass `msgpack.ExtType` object to packer.\n\n```pycon\n>>> import msgpack\n>>> packed = msgpack.packb(msgpack.ExtType(42, b'xyzzy'))\n>>> msgpack.unpackb(packed)\nExtType(code=42, data='xyzzy')\n```\n\nYou can use it with `default` and `ext_hook`. See below.\n\n\n### Security\n\nTo unpacking data received from unreliable source, msgpack provides\ntwo security options.\n\n`max_buffer_size` (default: `100*1024*1024`) limits the internal buffer size.\nIt is used to limit the preallocated list size too.\n\n`strict_map_key` (default: `True`) limits the type of map keys to bytes and str.\nWhile msgpack spec doesn't limit the types of the map keys,\nthere is a risk of the hashdos.\nIf you need to support other types for map keys, use `strict_map_key=False`.\n\n\n### Performance tips\n\nCPython's GC starts when growing allocated object.\nThis means unpacking may cause useless GC.\nYou can use `gc.disable()` when unpacking large message.\n\nList is the default sequence type of Python.\nBut tuple is lighter than list.\nYou can use `use_list=False` while unpacking when performance is important.", + "release_date": "2023-03-08T17:50:48", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Inada Naoki", + "email": "songofacandy@gmail.com", "url": null } ], "keywords": [ - "Invenio digital library framework", - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://github.com/inveniosoftware/invenio", - "download_url": "https://files.pythonhosted.org/packages/31/59/5c20981a3f371b59c0545905a800cc5f3f066cb9a14a126ba6b96a255933/invenio-3.4.1-py2.py3-none-any.whl", - "size": 4748, + "homepage_url": "https://msgpack.org/", + "download_url": "https://files.pythonhosted.org/packages/dc/a1/eba11a0d4b764bc62966a565b470f8c6f38242723ba3057e9b5098678c30/msgpack-1.0.5.tar.gz", + "size": 127834, "sha1": null, - "md5": "30642e31aa3b6764457a22f73a680893", - "sha256": "eddc4d9e8f0f8a1e2efada5a582c9b45d9fe3e49740051e2fe0fe8ec999f94f0", + "md5": "da12a9f0a65a803ec005219f6095d0a3", + "sha256": "c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c", "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/msgpack/msgpack-python/issues", + "code_view_url": "https://github.com/msgpack/msgpack-python", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "Apache 2.0", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Apache Software License" ] }, "notice_text": null, @@ -3780,49 +3075,51 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio/3.4.1/json", + "api_data_url": "https://pypi.org/pypi/msgpack/1.0.5/json", "datasource_id": null, - "purl": "pkg:pypi/invenio@3.4.1" + "purl": "pkg:pypi/msgpack@1.0.5" }, { "type": "pypi", "namespace": null, - "name": "invenio", - "version": "3.4.1", + "name": "pathlib2", + "version": "2.3.7.post1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Invenio Digital Library Framework.\n..\n This file is part of Invenio.\n Copyright (C) 2015-2018 CERN.\n\n Invenio is free software; you can redistribute it and/or modify it\n under the terms of the MIT License; see LICENSE file for more details.\n\n\n======================\n Invenio Framework v3\n======================\n\n**Open Source framework for large-scale digital repositories.**\n\n.. image:: https://img.shields.io/pypi/v/invenio.svg\n :target: https://pypi.org/project/invenio/\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio.svg\n :target: https://github.com/inveniosoftware/invenio/blob/master/LICENSE\n\n.. image:: https://travis-ci.org/inveniosoftware/invenio.svg?branch=master\n :target: https://travis-ci.org/inveniosoftware/invenio\n\n.. image:: https://img.shields.io/badge/Discord-join%20chat-%237289da\n :target: https://discord.gg/8qatqBC\n\nInvenio Framework is like a Swiss Army knife of battle-tested, safe and secure\nmodules providing you with all the features you need to build a trusted digital\nrepository.\n\n**Our other products**\n\nLooking for a turn-key Research Data Management platform? Checkout `InvenioRDM `_\n\nLooking for a modern Integrated Library System? Checkout `InvenioILS `_\n\n**Built with Invenio Framework**\n\nSee examples on https://inveniosoftware.org/products/framework/ and https://inveniosoftware.org/showcase/.", - "release_date": "2021-05-12T14:00:42", + "description": "Object-oriented filesystem paths\nThe `old pathlib `_\r\nmodule on bitbucket is no longer maintained.\r\nThe goal of pathlib2 is to provide a backport of\r\n`standard pathlib `_\r\nmodule which tracks the standard library module,\r\nso all the newest features of the standard pathlib can be\r\nused also on older Python versions.\r\n\r\nDownload\r\n--------\r\n\r\nStandalone releases are available on PyPI:\r\nhttp://pypi.python.org/pypi/pathlib2/\r\n\r\nDevelopment\r\n-----------\r\n\r\nThe main development takes place in the Python standard library: see\r\nthe `Python developer's guide `_.\r\nIn particular, new features should be submitted to the\r\n`Python bug tracker `_.\r\n\r\nIssues that occur in this backport, but that do not occur not in the\r\nstandard Python pathlib module can be submitted on\r\nthe `pathlib2 bug tracker `_.\r\n\r\nDocumentation\r\n-------------\r\n\r\nRefer to the\r\n`standard pathlib `_\r\ndocumentation.\r\n\r\nKnown Issues\r\n------------\r\n\r\nFor historic reasons, pathlib2 still uses bytes to represent file paths internally.\r\nUnfortunately, on Windows with Python 2.7, the file system encoder (``mcbs``)\r\nhas only poor support for non-ascii characters,\r\nand can silently replace non-ascii characters without warning.\r\nFor example, ``u'\u0442\u0435\u0441\u0442'.encode(sys.getfilesystemencoding())`` results in ``????``\r\nwhich is obviously completely useless.\r\n\r\nTherefore, on Windows with Python 2.7, until this problem is fixed upstream,\r\nunfortunately you cannot rely on pathlib2 to support the full unicode range for filenames.\r\nSee `issue #56 `_ for more details.\r\n\r\n.. |github| image:: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml/badge.svg\r\n :target: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml\r\n :alt: github\r\n\r\n.. |codecov| image:: https://codecov.io/gh/jazzband/pathlib2/branch/develop/graph/badge.svg\r\n :target: https://codecov.io/gh/jazzband/pathlib2\r\n :alt: codecov\r\n\r\n.. |jazzband| image:: https://jazzband.co/static/img/badge.svg\r\n :alt: Jazzband\r\n :target: https://jazzband.co/", + "release_date": "2022-02-10T18:01:07", "parties": [ { "type": "person", "role": "author", - "name": "CERN", - "email": "info@inveniosoftware.org", + "name": "Matthias C. M. Troffaes", + "email": "matthias.troffaes@gmail.com", "url": null } ], "keywords": [ - "Invenio digital library framework", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.9", + "Topic :: Software Development :: Libraries", + "Topic :: System :: Filesystems" ], - "homepage_url": "https://github.com/inveniosoftware/invenio", - "download_url": "https://files.pythonhosted.org/packages/fe/e9/bf37c72c3e231ba5dafefb134b0f2cb6fbfc26d7a504047d7277097b6bb8/invenio-3.4.1.tar.gz", - "size": 4051666, + "homepage_url": "https://github.com/jazzband/pathlib2", + "download_url": "https://files.pythonhosted.org/packages/09/eb/4af4bcd5b8731366b676192675221c5324394a580dfae469d498313b5c4a/pathlib2-2.3.7.post1-py2.py3-none-any.whl", + "size": 18027, "sha1": null, - "md5": "3cd9ad36a659c6c3946f65d79677cdfe", - "sha256": "d480e1847c681220624563c28f44a0bcc24eb7457e80b9594ff1c285c86bd69b", + "md5": "d38180feae103da9b2cf41e5d0869ee9", + "sha256": "5266a0fd000452f1b3467d782f079a4343c63aaa119221fbdc4e39577489ca5b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3842,58 +3139,66 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/invenio/3.4.1/json", + "api_data_url": "https://pypi.org/pypi/pathlib2/2.3.7.post1/json", "datasource_id": null, - "purl": "pkg:pypi/invenio@3.4.1" + "purl": "pkg:pypi/pathlib2@2.3.7.post1" }, { "type": "pypi", "namespace": null, - "name": "ipaddress", - "version": "1.0.23", + "name": "pexpect", + "version": "4.9.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "IPv4/IPv6 manipulation library\nPort of the 3.3+ ipaddress module to 2.6, 2.7, 3.2", - "release_date": "2019-10-18T01:30:27", + "description": "Pexpect allows easy control of interactive console applications.\nPexpect is a pure Python module for spawning child applications; controlling\nthem; and responding to expected patterns in their output. Pexpect works like\nDon Libes' Expect. Pexpect allows your script to spawn a child application and\ncontrol it as if a human were typing commands.\n\nPexpect can be used for automating interactive applications such as ssh, ftp,\npasswd, telnet, etc. It can be used to automate setup scripts for duplicating\nsoftware package installations on different servers. It can be used for\nautomated software testing. Pexpect is in the spirit of Don Libes' Expect, but\nPexpect is pure Python.\n\nThe main features of Pexpect require the pty module in the Python standard\nlibrary, which is only available on Unix-like systems. Some features\u2014waiting\nfor patterns from file descriptors or subprocesses\u2014are also available on\nWindows.", + "release_date": "2023-11-25T06:56:14", "parties": [ { "type": "person", "role": "author", - "name": "Philipp Hagemeister", - "email": "phihag@phihag.de", + "name": "Noah Spurrier; Thomas Kluyver; Jeff Quast", + "email": "noah@noah.org, thomas@kluyver.me.uk, contact@jeffquast.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", + "Environment :: Console", "Intended Audience :: Developers", - "Natural Language :: English", + "Intended Audience :: System Administrators", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX", "Programming Language :: Python", - "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6" + "Programming Language :: Python :: 3", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Software Development :: Testing", + "Topic :: System", + "Topic :: System :: Archiving :: Packaging", + "Topic :: System :: Installation/Setup", + "Topic :: System :: Shells", + "Topic :: System :: Software Distribution", + "Topic :: Terminals" ], - "homepage_url": "https://github.com/phihag/ipaddress", - "download_url": "https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl", - "size": 18159, + "homepage_url": "https://pexpect.readthedocs.io/", + "download_url": "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", + "size": 63772, "sha1": null, - "md5": "1d1615d1bb0dd32b4f3e1cf6a24dca3a", - "sha256": "6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc", + "md5": "cf02fc20a67a1cc8b6fbabdeb6d3c0bf", + "sha256": "7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, + "bug_tracking_url": "https://github.com/pexpect/pexpect/issues", + "code_view_url": "https://github.com/pexpect/pexpect", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "Python Software Foundation License", + "license": "ISC license", "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" + "License :: OSI Approved :: ISC License (ISCL)" ] }, "notice_text": null, @@ -3903,48 +3208,41 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ipaddress/1.0.23/json", + "api_data_url": "https://pypi.org/pypi/pexpect/4.9.0/json", "datasource_id": null, - "purl": "pkg:pypi/ipaddress@1.0.23" + "purl": "pkg:pypi/pexpect@4.9.0" }, { "type": "pypi", "namespace": null, - "name": "ipaddress", - "version": "1.0.23", + "name": "pickleshare", + "version": "0.7.5", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "IPv4/IPv6 manipulation library\nPort of the 3.3+ ipaddress module to 2.6, 2.7, 3.2", - "release_date": "2019-10-18T01:30:24", + "description": "Tiny 'shelve'-like database with concurrency support\nPickleShare - a small 'shelve' like datastore with concurrency support\n\nLike shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve,\nmany processes can access the database simultaneously. Changing a value in \ndatabase is immediately visible to other processes accessing the same database.\n\nConcurrency is possible because the values are stored in separate files. Hence\nthe \"database\" is a directory where *all* files are governed by PickleShare.\n\nExample usage::\n\n from pickleshare import *\n db = PickleShareDB('~/testpickleshare')\n db.clear()\n print(\"Should be empty:\",db.items())\n db['hello'] = 15\n db['aku ankka'] = [1,2,313]\n db['paths/are/ok/key'] = [1,(5,46)]\n print(db.keys())\n\nThis module is certainly not ZODB, but can be used for low-load\n(non-mission-critical) situations where tiny code size trumps the \nadvanced features of a \"real\" object database.\n\nInstallation guide: pip install pickleshare", + "release_date": "2018-09-25T19:17:35", "parties": [ { "type": "person", "role": "author", - "name": "Philipp Hagemeister", - "email": "phihag@phihag.de", + "name": "Ville Vainio", + "email": "vivainio@gmail.com", "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 2.6", + "database persistence pickle ipc shelve", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6" + "Programming Language :: Python :: 3" ], - "homepage_url": "https://github.com/phihag/ipaddress", - "download_url": "https://files.pythonhosted.org/packages/b9/9a/3e9da40ea28b8210dd6504d3fe9fe7e013b62bf45902b458d1cdc3c34ed9/ipaddress-1.0.23.tar.gz", - "size": 32958, + "homepage_url": "https://github.com/pickleshare/pickleshare", + "download_url": "https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl", + "size": 6877, "sha1": null, - "md5": "aaee67a8026782af1831148beb0d9060", - "sha256": "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2", + "md5": "7c68934703b75ccfbaad00d1210f7011", + "sha256": "9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -3952,9 +3250,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "Python Software Foundation License", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -3964,48 +3262,55 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ipaddress/1.0.23/json", + "api_data_url": "https://pypi.org/pypi/pickleshare/0.7.5/json", "datasource_id": null, - "purl": "pkg:pypi/ipaddress@1.0.23" + "purl": "pkg:pypi/pickleshare@0.7.5" }, { "type": "pypi", "namespace": null, - "name": "ipython-genutils", - "version": "0.2.0", + "name": "pluggy", + "version": "0.13.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Vestigial utilities from IPython\nPretend this doesn't exist. Nobody should use it.", - "release_date": "2017-03-13T22:12:25", + "description": "plugin and hook calling mechanisms for python\n====================================================\npluggy - A minimalist production ready plugin system\n====================================================\n\n|pypi| |conda-forge| |versions| |travis| |appveyor| |gitter| |black| |codecov|\n\nThis is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.\n\nPlease `read the docs`_ to learn more!\n\nA definitive example\n====================\n.. code-block:: python\n\n import pluggy\n\n hookspec = pluggy.HookspecMarker(\"myproject\")\n hookimpl = pluggy.HookimplMarker(\"myproject\")\n\n\n class MySpec(object):\n \"\"\"A hook specification namespace.\n \"\"\"\n\n @hookspec\n def myhook(self, arg1, arg2):\n \"\"\"My special little hook that you can customize.\n \"\"\"\n\n\n class Plugin_1(object):\n \"\"\"A hook implementation namespace.\n \"\"\"\n\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_1.myhook()\")\n return arg1 + arg2\n\n\n class Plugin_2(object):\n \"\"\"A 2nd hook implementation namespace.\n \"\"\"\n\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_2.myhook()\")\n return arg1 - arg2\n\n\n # create a manager and add the spec\n pm = pluggy.PluginManager(\"myproject\")\n pm.add_hookspecs(MySpec)\n\n # register plugins\n pm.register(Plugin_1())\n pm.register(Plugin_2())\n\n # call our ``myhook`` hook\n results = pm.hook.myhook(arg1=1, arg2=2)\n print(results)\n\n\nRunning this directly gets us::\n\n $ python docs/examples/toy-example.py\n inside Plugin_2.myhook()\n inside Plugin_1.myhook()\n [-1, 3]\n\n\n.. badges\n\n.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg\n :target: https://pypi.org/pypi/pluggy\n\n.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg\n :target: https://pypi.org/pypi/pluggy\n\n.. |travis| image:: https://img.shields.io/travis/pytest-dev/pluggy/master.svg\n :target: https://travis-ci.org/pytest-dev/pluggy\n\n.. |appveyor| image:: https://img.shields.io/appveyor/ci/pytestbot/pluggy/master.svg\n :target: https://ci.appveyor.com/project/pytestbot/pluggy\n\n.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg\n :target: https://anaconda.org/conda-forge/pytest\n\n.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg\n :alt: Join the chat at https://gitter.im/pytest-dev/pluggy\n :target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\n.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pytest-dev/pluggy\n :alt: Code coverage Status\n\n.. links\n.. _pytest:\n http://pytest.org\n.. _tox:\n https://tox.readthedocs.org\n.. _devpi:\n http://doc.devpi.net\n.. _read the docs:\n https://pluggy.readthedocs.io/en/latest/\n\n\n=========\nChangelog\n=========\n\n.. towncrier release notes start\n\npluggy 0.13.1 (2019-11-21)\n==========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#236 `_: Improved documentation, especially with regard to references.\n\n\npluggy 0.13.0 (2019-09-10)\n==========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#222 `_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the\n standard library on Python 3.8+.\n\n\npluggy 0.12.0 (2019-05-27)\n==========================\n\nFeatures\n--------\n\n- `#215 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time. This time with ``.egg`` support.\n\n\npluggy 0.11.0 (2019-05-07)\n==========================\n\nBug Fixes\n---------\n\n- `#205 `_: Revert changes made in 0.10.0 release breaking ``.egg`` installs.\n\n\npluggy 0.10.0 (2019-05-07)\n==========================\n\nFeatures\n--------\n\n- `#199 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.\n\n\npluggy 0.9.0 (2019-02-21)\n=========================\n\nFeatures\n--------\n\n- `#189 `_: ``PluginManager.load_setuptools_entrypoints`` now accepts a ``name`` parameter that when given will\n load only entry points with that name.\n\n ``PluginManager.load_setuptools_entrypoints`` also now returns the number of plugins loaded by the\n call, as opposed to the number of all plugins loaded by all calls to this method.\n\n\n\nBug Fixes\n---------\n\n- `#187 `_: Fix internal ``varnames`` function for PyPy3.\n\n\npluggy 0.8.1 (2018-11-09)\n=========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#166 `_: Add ``stacklevel=2`` to implprefix warning so that the reported location of warning is the caller of PluginManager.\n\n\npluggy 0.8.0 (2018-10-15)\n=========================\n\nFeatures\n--------\n\n- `#177 `_: Add ``get_hookimpls()`` method to hook callers.\n\n\n\nTrivial/Internal Changes\n------------------------\n\n- `#165 `_: Add changelog in long package description and documentation.\n\n\n- `#172 `_: Add a test exemplifying the opt-in nature of spec defined args.\n\n\n- `#57 `_: Encapsulate hook specifications in a type for easier introspection.\n\n\npluggy 0.7.1 (2018-07-28)\n=========================\n\nDeprecations and Removals\n-------------------------\n\n- `#116 `_: Deprecate the ``implprefix`` kwarg to ``PluginManager`` and instead\n expect users to start using explicit ``HookimplMarker`` everywhere.\n\n\n\nFeatures\n--------\n\n- `#122 `_: Add ``.plugin`` member to ``PluginValidationError`` to access failing plugin during post-mortem.\n\n\n- `#138 `_: Add per implementation warnings support for hookspecs allowing for both\n deprecation and future warnings of legacy and (future) experimental hooks\n respectively.\n\n\n\nBug Fixes\n---------\n\n- `#110 `_: Fix a bug where ``_HookCaller.call_historic()`` would call the ``proc``\n arg even when the default is ``None`` resulting in a ``TypeError``.\n\n- `#160 `_: Fix problem when handling ``VersionConflict`` errors when loading setuptools plugins.\n\n\n\nImproved Documentation\n----------------------\n\n- `#123 `_: Document how exceptions are handled and how the hook call loop\n terminates immediately on the first error which is then delivered\n to any surrounding wrappers.\n\n\n- `#136 `_: Docs rework including a much better introduction and comprehensive example\n set for new users. A big thanks goes out to @obestwalter for the great work!\n\n\n\nTrivial/Internal Changes\n------------------------\n\n- `#117 `_: Break up the main monolithic package modules into separate modules by concern\n\n\n- `#131 `_: Automate ``setuptools`` wheels building and PyPi upload using TravisCI.\n\n\n- `#153 `_: Reorganize tests more appropriately by modules relating to each\n internal component/feature. This is in an effort to avoid (future)\n duplication and better separation of concerns in the test set.\n\n\n- `#156 `_: Add ``HookImpl.__repr__()`` for better debugging.\n\n\n- `#66 `_: Start using ``towncrier`` and a custom ``tox`` environment to prepare releases!\n\n\npluggy 0.7.0 (Unreleased)\n=========================\n\n* `#160 `_: We discovered a deployment issue so this version was never released to PyPI, only the tag exists.\n\npluggy 0.6.0 (2017-11-24)\n=========================\n\n- Add CI testing for the features, release, and master\n branches of ``pytest`` (PR `#79`_).\n- Document public API for ``_Result`` objects passed to wrappers\n (PR `#85`_).\n- Document and test hook LIFO ordering (PR `#85`_).\n- Turn warnings into errors in test suite (PR `#89`_).\n- Deprecate ``_Result.result`` (PR `#88`_).\n- Convert ``_Multicall`` to a simple function distinguishing it from\n the legacy version (PR `#90`_).\n- Resolve E741 errors (PR `#96`_).\n- Test and bug fix for unmarked hook collection (PRs `#97`_ and\n `#102`_).\n- Drop support for EOL Python 2.6 and 3.3 (PR `#103`_).\n- Fix ``inspect`` based arg introspection on py3.6 (PR `#94`_).\n\n.. _#79: https://github.com/pytest-dev/pluggy/pull/79\n.. _#85: https://github.com/pytest-dev/pluggy/pull/85\n.. _#88: https://github.com/pytest-dev/pluggy/pull/88\n.. _#89: https://github.com/pytest-dev/pluggy/pull/89\n.. _#90: https://github.com/pytest-dev/pluggy/pull/90\n.. _#94: https://github.com/pytest-dev/pluggy/pull/94\n.. _#96: https://github.com/pytest-dev/pluggy/pull/96\n.. _#97: https://github.com/pytest-dev/pluggy/pull/97\n.. _#102: https://github.com/pytest-dev/pluggy/pull/102\n.. _#103: https://github.com/pytest-dev/pluggy/pull/103\n\n\npluggy 0.5.2 (2017-09-06)\n=========================\n\n- fix bug where ``firstresult`` wrappers were being sent an incorrectly configured\n ``_Result`` (a list was set instead of a single value). Add tests to check for\n this as well as ``_Result.force_result()`` behaviour. Thanks to `@tgoodlet`_\n for the PR `#72`_.\n\n- fix incorrect ``getattr`` of ``DeprecationWarning`` from the ``warnings``\n module. Thanks to `@nicoddemus`_ for the PR `#77`_.\n\n- hide ``pytest`` tracebacks in certain core routines. Thanks to\n `@nicoddemus`_ for the PR `#80`_.\n\n.. _#72: https://github.com/pytest-dev/pluggy/pull/72\n.. _#77: https://github.com/pytest-dev/pluggy/pull/77\n.. _#80: https://github.com/pytest-dev/pluggy/pull/80\n\n\npluggy 0.5.1 (2017-08-29)\n=========================\n\n- fix a bug and add tests for case where ``firstresult`` hooks return\n ``None`` results. Thanks to `@RonnyPfannschmidt`_ and `@tgoodlet`_\n for the issue (`#68`_) and PR (`#69`_) respectively.\n\n.. _#69: https://github.com/pytest-dev/pluggy/pull/69\n.. _#68: https://github.com/pytest-dev/pluggy/issues/68\n\n\npluggy 0.5.0 (2017-08-28)\n=========================\n\n- fix bug where callbacks for historic hooks would not be called for\n already registered plugins. Thanks `@vodik`_ for the PR\n and `@hpk42`_ for further fixes.\n\n- fix `#17`_ by considering only actual functions for hooks\n this removes the ability to register arbitrary callable objects\n which at first glance is a reasonable simplification,\n thanks `@RonnyPfannschmidt`_ for report and pr.\n\n- fix `#19`_: allow registering hookspecs from instances. The PR from\n `@tgoodlet`_ also modernized the varnames implementation.\n\n- resolve `#32`_: split up the test set into multiple modules.\n Thanks to `@RonnyPfannschmidt`_ for the PR and `@tgoodlet`_ for\n the initial request.\n\n- resolve `#14`_: add full sphinx docs. Thanks to `@tgoodlet`_ for\n PR `#39`_.\n\n- add hook call mismatch warnings. Thanks to `@tgoodlet`_ for the\n PR `#42`_.\n\n- resolve `#44`_: move to new-style classes. Thanks to `@MichalTHEDUDE`_\n for PR `#46`_.\n\n- add baseline benchmarking/speed tests using ``pytest-benchmark``\n in PR `#54`_. Thanks to `@tgoodlet`_.\n\n- update the README to showcase the API. Thanks to `@tgoodlet`_ for the\n issue and PR `#55`_.\n\n- deprecate ``__multicall__`` and add a faster call loop implementation.\n Thanks to `@tgoodlet`_ for PR `#58`_.\n\n- raise a comprehensible error when a ``hookimpl`` is called with positional\n args. Thanks to `@RonnyPfannschmidt`_ for the issue and `@tgoodlet`_ for\n PR `#60`_.\n\n- fix the ``firstresult`` test making it more complete\n and remove a duplicate of that test. Thanks to `@tgoodlet`_\n for PR `#62`_.\n\n.. _#62: https://github.com/pytest-dev/pluggy/pull/62\n.. _#60: https://github.com/pytest-dev/pluggy/pull/60\n.. _#58: https://github.com/pytest-dev/pluggy/pull/58\n.. _#55: https://github.com/pytest-dev/pluggy/pull/55\n.. _#54: https://github.com/pytest-dev/pluggy/pull/54\n.. _#46: https://github.com/pytest-dev/pluggy/pull/46\n.. _#44: https://github.com/pytest-dev/pluggy/issues/44\n.. _#42: https://github.com/pytest-dev/pluggy/pull/42\n.. _#39: https://github.com/pytest-dev/pluggy/pull/39\n.. _#32: https://github.com/pytest-dev/pluggy/pull/32\n.. _#19: https://github.com/pytest-dev/pluggy/issues/19\n.. _#17: https://github.com/pytest-dev/pluggy/issues/17\n.. _#14: https://github.com/pytest-dev/pluggy/issues/14\n\n\npluggy 0.4.0 (2016-09-25)\n=========================\n\n- add ``has_plugin(name)`` method to pluginmanager. thanks `@nicoddemus`_.\n\n- fix `#11`_: make plugin parsing more resilient against exceptions\n from ``__getattr__`` functions. Thanks `@nicoddemus`_.\n\n- fix issue `#4`_: specific ``HookCallError`` exception for when a hook call\n provides not enough arguments.\n\n- better error message when loading setuptools entrypoints fails\n due to a ``VersionConflict``. Thanks `@blueyed`_.\n\n.. _#11: https://github.com/pytest-dev/pluggy/issues/11\n.. _#4: https://github.com/pytest-dev/pluggy/issues/4\n\n\npluggy 0.3.1 (2015-09-17)\n=========================\n\n- avoid using deprecated-in-python3.5 getargspec method. Thanks\n `@mdboom`_.\n\n\npluggy 0.3.0 (2015-05-07)\n=========================\n\ninitial release\n\n.. contributors\n.. _@hpk42: https://github.com/hpk42\n.. _@tgoodlet: https://github.com/goodboy\n.. _@MichalTHEDUDE: https://github.com/MichalTHEDUDE\n.. _@vodik: https://github.com/vodik\n.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt\n.. _@blueyed: https://github.com/blueyed\n.. _@nicoddemus: https://github.com/nicoddemus\n.. _@mdboom: https://github.com/mdboom", + "release_date": "2019-11-21T20:42:34", "parties": [ { "type": "person", "role": "author", - "name": "IPython Development Team", - "email": "ipython-dev@scipy.org", + "name": "Holger Krekel", + "email": "holger@merlinux.eu", "url": null } ], "keywords": [ - "Interactive", - "Interpreter", - "Shell", - "Web", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: System Administrators", - "Programming Language :: Python", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3" + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Testing", + "Topic :: Utilities" ], - "homepage_url": "http://ipython.org", - "download_url": "https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl", - "size": 26343, + "homepage_url": "https://github.com/pytest-dev/pluggy", + "download_url": "https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl", + "size": 18077, "sha1": null, - "md5": "5bf384d999c2e38b696a4d6f162875c3", - "sha256": "72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8", + "md5": "32a771dc4df48273d4967e5aab043653", + "sha256": "966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -4013,9 +3318,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", + "license": "MIT license", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -4025,48 +3330,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ipython-genutils/0.2.0/json", + "api_data_url": "https://pypi.org/pypi/pluggy/0.13.1/json", "datasource_id": null, - "purl": "pkg:pypi/ipython-genutils@0.2.0" + "purl": "pkg:pypi/pluggy@0.13.1" }, { "type": "pypi", "namespace": null, - "name": "ipython-genutils", - "version": "0.2.0", + "name": "prompt-toolkit", + "version": "1.0.18", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Vestigial utilities from IPython\nPretend this doesn't exist. Nobody should use it.", - "release_date": "2017-03-13T22:12:26", + "description": "Library for building powerful interactive command lines in Python\nPython Prompt Toolkit\n=====================\n\n|Build Status| |PyPI|\n\n``prompt_toolkit`` is a library for building powerful interactive command lines\nand terminal applications in Python.\n\nRead the `documentation on readthedocs\n`_.\n\n\nPtpython\n********\n\n`ptpython `_ is an interactive\nPython Shell, build on top of prompt_toolkit.\n\n.. image :: https://github.com/jonathanslenders/python-prompt-toolkit/raw/master/docs/images/ptpython.png\n\n\nprompt_toolkit features\n***********************\n\n``prompt_toolkit`` could be a replacement for `GNU readline\n`_, but it can be much\nmore than that.\n\nSome features:\n\n- Pure Python.\n- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)\n- Multi-line input editing.\n- Advanced code completion.\n- Both Emacs and Vi key bindings. (Similar to readline.)\n- Even some advanced Vi functionality, like named registers and digraphs.\n- Reverse and forward incremental search.\n- Runs on all Python versions from 2.6 up to 3.5.\n- Works well with Unicode double width characters. (Chinese input.)\n- Selecting text for copy/paste. (Both Emacs and Vi style.)\n- Support for `bracketed paste `_.\n- Mouse support for cursor positioning and scrolling.\n- Auto suggestions. (Like `fish shell `_.)\n- Multiple input buffers.\n- No global state.\n- Lightweight, the only dependencies are Pygments, six and wcwidth.\n- Runs on Linux, OS X, FreeBSD, OpenBSD and Windows systems.\n- And much more...\n\nFeel free to create tickets for bugs and feature requests, and create pull\nrequests if you have nice patches that you would like to share with others.\n\n\nAbout Windows support\n*********************\n\n``prompt_toolkit`` is cross platform, and everything that you build on top\nshould run fine on both Unix and Windows systems. On Windows, it uses a\ndifferent event loop (``WaitForMultipleObjects`` instead of ``select``), and\nanother input and output system. (Win32 APIs instead of pseudo-terminals and\nVT100.)\n\nIt's worth noting that the implementation is a \"best effort of what is\npossible\". Both Unix and Windows terminals have their limitations. But in\ngeneral, the Unix experience will still be a little better.\n\nFor Windows, it's recommended to use either `cmder\n`_ or `conemu `_.\n\n\nInstallation\n************\n\n::\n\n pip install prompt_toolkit\n\nFor Conda, do:\n\n::\n\n conda install -c https://conda.anaconda.org/conda-forge prompt_toolkit\n\n\nGetting started\n***************\n\nThe most simple example of the library would look like this:\n\n.. code:: python\n\n from prompt_toolkit import prompt\n\n if __name__ == '__main__':\n answer = prompt('Give me some input: ')\n print('You said: %s' % answer)\n\nFor more complex examples, have a look in the ``examples`` directory. All\nexamples are chosen to demonstrate only one thing. Also, don't be afraid to\nlook at the source code. The implementation of the ``prompt`` function could be\na good start.\n\nNote for Python 2: all strings are expected to be unicode strings. So, either\nput a small ``u`` in front of every string or put ``from __future__ import\nunicode_literals`` at the start of the above example.\n\n\nProjects using prompt_toolkit\n*****************************\n\nShells:\n\n- `ptpython `_: Python REPL\n- `ptpdb `_: Python debugger (pdb replacement)\n- `pgcli `_: Postgres client.\n- `mycli `_: MySql client.\n- `wharfee `_: A Docker command line.\n- `xonsh `_: A Python-ish, BASHwards-compatible shell.\n- `saws `_: A Supercharged AWS Command Line Interface.\n- `cycli `_: A Command Line Interface for Cypher.\n- `crash `_: Crate command line client.\n- `vcli `_: Vertica client.\n- `aws-shell `_: An integrated shell for working with the AWS CLI.\n- `softlayer-python `_: A command-line interface to manage various SoftLayer products and services.\n- `ipython `_: The IPython REPL\n- `click-repl `_: Subcommand REPL for click apps.\n- `haxor-news `_: A Hacker News CLI.\n- `gitsome `_: A Git/Shell Autocompleter with GitHub Integration.\n- `http-prompt `_: An interactive command-line HTTP client.\n- `coconut `_: Functional programming in Python.\n- `Ergonomica `_: A Bash alternative written in Python.\n- `Kube-shell `_: Kubernetes shell: An integrated shell for working with the Kubernetes CLI\n\nFull screen applications:\n\n- `pymux `_: A terminal multiplexer (like tmux) in pure Python.\n- `pyvim `_: A Vim clone in pure Python.\n\n(Want your own project to be listed here? Please create a GitHub issue.)\n\n\nPhilosophy\n**********\n\nThe source code of ``prompt_toolkit`` should be readable, concise and\nefficient. We prefer short functions focussing each on one task and for which\nthe input and output types are clearly specified. We mostly prefer composition\nover inheritance, because inheritance can result in too much functionality in\nthe same object. We prefer immutable objects where possible (objects don't\nchange after initialisation). Reusability is important. We absolutely refrain\nfrom having a changing global state, it should be possible to have multiple\nindependent instances of the same code in the same process. The architecture\nshould be layered: the lower levels operate on primitive operations and data\nstructures giving -- when correctly combined -- all the possible flexibility;\nwhile at the higher level, there should be a simpler API, ready-to-use and\nsufficient for most use cases. Thinking about algorithms and efficiency is\nimportant, but avoid premature optimization.\n\n\nSpecial thanks to\n*****************\n\n- `Pygments `_: Syntax highlighter.\n- `wcwidth `_: Determine columns needed for a wide characters.\n\n.. |Build Status| image:: https://api.travis-ci.org/jonathanslenders/python-prompt-toolkit.svg?branch=master\n :target: https://travis-ci.org/jonathanslenders/python-prompt-toolkit#\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/prompt_toolkit.svg\n :target: https://pypi.python.org/pypi/prompt-toolkit/\n :alt: Latest Version", + "release_date": "2019-10-03T20:13:54", "parties": [ { "type": "person", "role": "author", - "name": "IPython Development Team", - "email": "ipython-dev@scipy.org", + "name": "Jonathan Slenders", + "email": null, "url": null } ], "keywords": [ - "Interactive", - "Interpreter", - "Shell", - "Web", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: System Administrators", + "Operating System :: OS Independent", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3" + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Topic :: Software Development" ], - "homepage_url": "http://ipython.org", - "download_url": "https://files.pythonhosted.org/packages/e8/69/fbeffffc05236398ebfcfb512b6d2511c622871dca1746361006da310399/ipython_genutils-0.2.0.tar.gz", - "size": 22208, + "homepage_url": "https://github.com/jonathanslenders/python-prompt-toolkit", + "download_url": "https://files.pythonhosted.org/packages/9d/d2/2f099b5cd62dab819ce7a9f1431c09a9032fbfbb6474f442722e88935376/prompt_toolkit-1.0.18-py2-none-any.whl", + "size": 245351, "sha1": null, - "md5": "5a4f9781f78466da0ea1a648f3e1f79f", - "sha256": "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8", + "md5": "2b38fc7f9d79010c645c538e5951540c", + "sha256": "f7eec66105baf40eda9ab026cd8b2e251337eea8d111196695d82e0c5f0af852", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -4074,7 +3380,6 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -4086,49 +3391,47 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ipython-genutils/0.2.0/json", + "api_data_url": "https://pypi.org/pypi/prompt-toolkit/1.0.18/json", "datasource_id": null, - "purl": "pkg:pypi/ipython-genutils@0.2.0" + "purl": "pkg:pypi/prompt-toolkit@1.0.18" }, { "type": "pypi", "namespace": null, - "name": "ipython", - "version": "5.10.0", + "name": "ptyprocess", + "version": "0.7.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "IPython: Productive Interactive Computing\nIPython provides a rich toolkit to help you make the most out of using Python\ninteractively. Its main components are:\n\n* A powerful interactive Python shell\n* A `Jupyter `_ kernel to work with Python code in Jupyter\n notebooks and other interactive frontends.\n\nThe enhanced interactive Python shells have the following main features:\n\n* Comprehensive object introspection.\n\n* Input history, persistent across sessions.\n\n* Caching of output results during a session with automatically generated\n references.\n\n* Extensible tab completion, with support by default for completion of python\n variables and keywords, filenames and function keywords.\n\n* Extensible system of 'magic' commands for controlling the environment and\n performing many tasks related either to IPython or the operating system.\n\n* A rich configuration system with easy switching between different setups\n (simpler than changing $PYTHONSTARTUP environment variables every time).\n\n* Session logging and reloading.\n\n* Extensible syntax processing for special purpose situations.\n\n* Access to the system shell with user-extensible alias system.\n\n* Easily embeddable in other Python programs and GUIs.\n\n* Integrated access to the pdb debugger and the Python profiler.\n\nThe latest development version is always available from IPython's `GitHub\nsite `_.", - "release_date": "2020-05-01T18:20:44", + "description": "Run a subprocess in a pseudo terminal\nLaunch a subprocess in a pseudo terminal (pty), and interact with both the\nprocess and its pty.\n\nSometimes, piping stdin and stdout is not enough. There might be a password\nprompt that doesn't read from stdin, output that changes when it's going to a\npipe rather than a terminal, or curses-style interfaces that rely on a terminal.\nIf you need to automate these things, running the process in a pseudo terminal\n(pty) is the answer.\n\nInterface::\n\n p = PtyProcessUnicode.spawn(['python'])\n p.read(20)\n p.write('6+6\\n')\n p.read(20)", + "release_date": "2020-12-28T15:15:28", "parties": [ { "type": "person", "role": "author", - "name": "The IPython Development Team", - "email": "ipython-dev@python.org", + "name": "Thomas Kluyver", + "email": "thomas@kluyver.me.uk", "url": null } ], "keywords": [ - "Interactive", - "Interpreter", - "Shell", - "Embedding", - "Framework :: IPython", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", "Intended Audience :: Developers", - "Intended Audience :: Science/Research", + "Intended Audience :: System Administrators", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX", "Programming Language :: Python", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Topic :: System :: Shells" + "Topic :: Terminals" ], - "homepage_url": "https://ipython.org", - "download_url": "https://files.pythonhosted.org/packages/ce/2c/2849a2b37024a01a847c87d81825c0489eb22ffc6416cac009bf281ea838/ipython-5.10.0-py2-none-any.whl", - "size": 760296, + "homepage_url": "https://github.com/pexpect/ptyprocess", + "download_url": "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", + "size": 13993, "sha1": null, - "md5": "b2eb02011835b1254431136a0a2b1be5", - "sha256": "68eb2d70595ea5c3f9f5f8f562c9119e86b0f84de3e5d23407a142cb2a73ba11", + "md5": "99ec04989f767cb72ac82ce671b561b0", + "sha256": "4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -4136,9 +3439,8 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: ISC License (ISCL)" ] }, "notice_text": null, @@ -4148,49 +3450,48 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ipython/5.10.0/json", + "api_data_url": "https://pypi.org/pypi/ptyprocess/0.7.0/json", "datasource_id": null, - "purl": "pkg:pypi/ipython@5.10.0" + "purl": "pkg:pypi/ptyprocess@0.7.0" }, { "type": "pypi", "namespace": null, - "name": "ipython", - "version": "5.10.0", + "name": "pycparser", + "version": "2.21", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "IPython: Productive Interactive Computing\nIPython provides a rich toolkit to help you make the most out of using Python\ninteractively. Its main components are:\n\n* A powerful interactive Python shell\n* A `Jupyter `_ kernel to work with Python code in Jupyter\n notebooks and other interactive frontends.\n\nThe enhanced interactive Python shells have the following main features:\n\n* Comprehensive object introspection.\n\n* Input history, persistent across sessions.\n\n* Caching of output results during a session with automatically generated\n references.\n\n* Extensible tab completion, with support by default for completion of python\n variables and keywords, filenames and function keywords.\n\n* Extensible system of 'magic' commands for controlling the environment and\n performing many tasks related either to IPython or the operating system.\n\n* A rich configuration system with easy switching between different setups\n (simpler than changing $PYTHONSTARTUP environment variables every time).\n\n* Session logging and reloading.\n\n* Extensible syntax processing for special purpose situations.\n\n* Access to the system shell with user-extensible alias system.\n\n* Easily embeddable in other Python programs and GUIs.\n\n* Integrated access to the pdb debugger and the Python profiler.\n\nThe latest development version is always available from IPython's `GitHub\nsite `_.", - "release_date": "2020-05-01T18:21:13", + "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", + "release_date": "2021-11-06T12:50:13", "parties": [ { "type": "person", "role": "author", - "name": "The IPython Development Team", - "email": "ipython-dev@python.org", + "name": "Eli Bendersky", + "email": "eliben@gmail.com", "url": null } ], "keywords": [ - "Interactive", - "Interpreter", - "Shell", - "Embedding", - "Framework :: IPython", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Programming Language :: Python", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Topic :: System :: Shells" + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9" ], - "homepage_url": "https://ipython.org", - "download_url": "https://files.pythonhosted.org/packages/b6/73/c8f68b3a7d0deece3d2f7ab727fbf262bfca7475330b44043a5503b3aa7a/ipython-5.10.0.tar.gz", - "size": 4978748, + "homepage_url": "https://github.com/eliben/pycparser", + "download_url": "https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl", + "size": 118697, "sha1": null, - "md5": "eae7393ed47415709df3823422571a49", - "sha256": "d1f9e2d02bb0900ddef7b6af114aca3a5cf3dc43b9de1f19d37c4aedbc724fee", + "md5": "763d265dfc20860dfbb4c81458400d03", + "sha256": "8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -4210,63 +3511,63 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ipython/5.10.0/json", + "api_data_url": "https://pypi.org/pypi/pycparser/2.21/json", "datasource_id": null, - "purl": "pkg:pypi/ipython@5.10.0" + "purl": "pkg:pypi/pycparser@2.21" }, { "type": "pypi", "namespace": null, - "name": "itsdangerous", - "version": "1.1.0", + "name": "pygments", + "version": "2.5.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Various helpers to pass data to untrusted environments and back.\nitsdangerous\n============\n\n... so better sign this\n\nVarious helpers to pass data to untrusted environments and to get it\nback safe and sound. Data is cryptographically signed to ensure that a\ntoken has not been tampered with.\n\nIt's possible to customize how data is serialized. Data is compressed as\nneeded. A timestamp can be added and verified automatically while\nloading a token.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U itsdangerous\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nA Simple Example\n----------------\n\nHere's how you could generate a token for transmitting a user's id and\nname between web requests.\n\n.. code-block:: python\n\n from itsdangerous import URLSafeSerializer\n auth_s = URLSafeSerializer(\"secret key\", \"auth\")\n token = auth_s.dumps({\"id\": 5, \"name\": \"itsdangerous\"})\n\n print(token)\n # eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg\n\n data = auth_s.loads(token)\n print(data[\"name\"])\n # itsdangerous\n\n\nDonate\n------\n\nThe Pallets organization develops and supports itsdangerous and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/itsdangerous/\n* Documentation: https://itsdangerous.palletsprojects.com/\n* License: `BSD `_\n* Releases: https://pypi.org/project/itsdangerous/\n* Code: https://github.com/pallets/itsdangerous\n* Issue tracker: https://github.com/pallets/itsdangerous/issues\n* Test status: https://travis-ci.org/pallets/itsdangerous\n* Test coverage: https://codecov.io/gh/pallets/itsdangerous", - "release_date": "2018-10-27T00:17:35", + "description": "Pygments\n~~~~~~~~\n\nPygments is a syntax highlighting package written in Python.\n\nIt is a generic syntax highlighter suitable for use in code hosting, forums,\nwikis or other applications that need to prettify source code. Highlights\nare:\n\n* a wide range of over 300 languages and other text formats is supported\n* special attention is paid to details, increasing quality by a fair amount\n* support for new languages and formats are added easily\n* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image formats that PIL supports and ANSI sequences\n* it is usable as a command-line tool and as a library\n\n:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.\n:license: BSD, see LICENSE for details.", + "release_date": "2019-11-29T05:27:22", "parties": [ { "type": "person", "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Pallets Team", - "email": "contact@palletsprojects.com", + "name": "Georg Brandl", + "email": "georg@python.org", "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", + "syntax highlighting", + "Development Status :: 6 - Mature", "Intended Audience :: Developers", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Text Processing :: Filters", + "Topic :: Utilities" ], - "homepage_url": "https://palletsprojects.com/p/itsdangerous/", - "download_url": "https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl", - "size": 16743, + "homepage_url": "http://pygments.org/", + "download_url": "https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl", + "size": 896106, "sha1": null, - "md5": "55179072b7f84ae38f16b3fdca33aa4f", - "sha256": "b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749", + "md5": "044bef3bf7f2ced9d8df7be47d3cfbde", + "sha256": "2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/itsdangerous", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", + "license": "BSD License", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -4278,139 +3579,84 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/itsdangerous/1.1.0/json", + "api_data_url": "https://pypi.org/pypi/pygments/2.5.2/json", "datasource_id": null, - "purl": "pkg:pypi/itsdangerous@1.1.0" + "purl": "pkg:pypi/pygments@2.5.2" }, { "type": "pypi", "namespace": null, - "name": "itsdangerous", - "version": "1.1.0", + "name": "pytz", + "version": "2025.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Various helpers to pass data to untrusted environments and back.\nitsdangerous\n============\n\n... so better sign this\n\nVarious helpers to pass data to untrusted environments and to get it\nback safe and sound. Data is cryptographically signed to ensure that a\ntoken has not been tampered with.\n\nIt's possible to customize how data is serialized. Data is compressed as\nneeded. A timestamp can be added and verified automatically while\nloading a token.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U itsdangerous\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nA Simple Example\n----------------\n\nHere's how you could generate a token for transmitting a user's id and\nname between web requests.\n\n.. code-block:: python\n\n from itsdangerous import URLSafeSerializer\n auth_s = URLSafeSerializer(\"secret key\", \"auth\")\n token = auth_s.dumps({\"id\": 5, \"name\": \"itsdangerous\"})\n\n print(token)\n # eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg\n\n data = auth_s.loads(token)\n print(data[\"name\"])\n # itsdangerous\n\n\nDonate\n------\n\nThe Pallets organization develops and supports itsdangerous and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n`please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/itsdangerous/\n* Documentation: https://itsdangerous.palletsprojects.com/\n* License: `BSD `_\n* Releases: https://pypi.org/project/itsdangerous/\n* Code: https://github.com/pallets/itsdangerous\n* Issue tracker: https://github.com/pallets/itsdangerous/issues\n* Test status: https://travis-ci.org/pallets/itsdangerous\n* Test coverage: https://codecov.io/gh/pallets/itsdangerous", - "release_date": "2018-10-27T00:17:37", + "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", + "release_date": "2025-03-25T02:24:58", "parties": [ { "type": "person", "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", + "name": "Stuart Bishop", + "email": "stuart@stuartbishop.net", "url": null }, { "type": "person", "role": "maintainer", - "name": "Pallets Team", - "email": "contact@palletsprojects.com", + "name": "Stuart Bishop", + "email": "stuart@stuartbishop.net", "url": null } ], "keywords": [ - "Development Status :: 5 - Production/Stable", + "timezone", + "tzinfo", + "datetime", + "olson", + "time", + "Development Status :: 6 - Mature", "Intended Audience :: Developers", + "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.4", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.1", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" - ], - "homepage_url": "https://palletsprojects.com/p/itsdangerous/", - "download_url": "https://files.pythonhosted.org/packages/68/1a/f27de07a8a304ad5fa817bbe383d1238ac4396da447fa11ed937039fa04b/itsdangerous-1.1.0.tar.gz", - "size": 53219, - "sha1": null, - "md5": "9b7f5afa7f1e3acfb7786eeca3d99307", - "sha256": "321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/itsdangerous", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/itsdangerous/1.1.0/json", - "datasource_id": null, - "purl": "pkg:pypi/itsdangerous@1.1.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "jinja2", - "version": "2.11.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A very fast and expressive template engine.\nJinja\n=====\n\nJinja is a fast, expressive, extensible templating engine. Special\nplaceholders in the template allow writing code similar to Python\nsyntax. Then the template is passed data to render the final document.\n\nIt includes:\n\n- Template inheritance and inclusion.\n- Define and import macros within templates.\n- HTML templates can use autoescaping to prevent XSS from untrusted\n user input.\n- A sandboxed environment can safely render untrusted templates.\n- AsyncIO support for generating templates and calling async\n functions.\n- I18N support with Babel.\n- Templates are compiled to optimized Python code just-in-time and\n cached, or can be compiled ahead-of-time.\n- Exceptions point to the correct line in templates to make debugging\n easier.\n- Extensible filters, tests, functions, and even syntax.\n\nJinja's philosophy is that while application logic belongs in Python if\npossible, it shouldn't make the template designer's job difficult by\nrestricting functionality too much.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U Jinja2\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nIn A Nutshell\n-------------\n\n.. code-block:: jinja\n\n {% extends \"base.html\" %}\n {% block title %}Members{% endblock %}\n {% block content %}\n \n {% endblock %}\n\n\nLinks\n-----\n\n- Website: https://palletsprojects.com/p/jinja/\n- Documentation: https://jinja.palletsprojects.com/\n- Releases: https://pypi.org/project/Jinja2/\n- Code: https://github.com/pallets/jinja\n- Issue tracker: https://github.com/pallets/jinja/issues\n- Test status: https://dev.azure.com/pallets/jinja/_build\n- Official chat: https://discord.gg/t6rrQZH", - "release_date": "2021-01-31T16:33:07", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Pallets", - "email": "contact@palletsprojects.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Text Processing :: Markup :: HTML" + "Programming Language :: Python :: 3.9", + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "https://palletsprojects.com/p/jinja/", - "download_url": "https://files.pythonhosted.org/packages/7e/c2/1eece8c95ddbc9b1aeb64f5783a9e07a286de42191b7204d67b7496ddf35/Jinja2-2.11.3-py2.py3-none-any.whl", - "size": 125699, + "homepage_url": "http://pythonhosted.org/pytz", + "download_url": "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", + "size": 509225, "sha1": null, - "md5": "8e733c6f4cdef7f6a336299e8e548dfa", - "sha256": "03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419", + "md5": "51ad498990b93bab1efdb6ecce983474", + "sha256": "5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/jinja", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD-3-Clause", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -4420,39 +3666,41 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jinja2/2.11.3/json", + "api_data_url": "https://pypi.org/pypi/pytz/2025.2/json", "datasource_id": null, - "purl": "pkg:pypi/jinja2@2.11.3" + "purl": "pkg:pypi/pytz@2025.2" }, { "type": "pypi", "namespace": null, - "name": "jinja2", - "version": "2.11.3", + "name": "redis", + "version": "3.5.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "A very fast and expressive template engine.\nJinja\n=====\n\nJinja is a fast, expressive, extensible templating engine. Special\nplaceholders in the template allow writing code similar to Python\nsyntax. Then the template is passed data to render the final document.\n\nIt includes:\n\n- Template inheritance and inclusion.\n- Define and import macros within templates.\n- HTML templates can use autoescaping to prevent XSS from untrusted\n user input.\n- A sandboxed environment can safely render untrusted templates.\n- AsyncIO support for generating templates and calling async\n functions.\n- I18N support with Babel.\n- Templates are compiled to optimized Python code just-in-time and\n cached, or can be compiled ahead-of-time.\n- Exceptions point to the correct line in templates to make debugging\n easier.\n- Extensible filters, tests, functions, and even syntax.\n\nJinja's philosophy is that while application logic belongs in Python if\npossible, it shouldn't make the template designer's job difficult by\nrestricting functionality too much.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U Jinja2\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nIn A Nutshell\n-------------\n\n.. code-block:: jinja\n\n {% extends \"base.html\" %}\n {% block title %}Members{% endblock %}\n {% block content %}\n \n {% endblock %}\n\n\nLinks\n-----\n\n- Website: https://palletsprojects.com/p/jinja/\n- Documentation: https://jinja.palletsprojects.com/\n- Releases: https://pypi.org/project/Jinja2/\n- Code: https://github.com/pallets/jinja\n- Issue tracker: https://github.com/pallets/jinja/issues\n- Test status: https://dev.azure.com/pallets/jinja/_build\n- Official chat: https://discord.gg/t6rrQZH", - "release_date": "2021-01-31T16:33:09", + "description": "Python client for Redis key-value store\nredis-py\n========\n\nThe Python interface to the Redis key-value store.\n\n.. image:: https://secure.travis-ci.org/andymccurdy/redis-py.svg?branch=master\n :target: https://travis-ci.org/andymccurdy/redis-py\n.. image:: https://readthedocs.org/projects/redis-py/badge/?version=stable&style=flat\n :target: https://redis-py.readthedocs.io/en/stable/\n.. image:: https://badge.fury.io/py/redis.svg\n :target: https://pypi.org/project/redis/\n.. image:: https://codecov.io/gh/andymccurdy/redis-py/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/andymccurdy/redis-py\n\n\nPython 2 Compatibility Note\n---------------------------\n\nredis-py 3.5.x will be the last version of redis-py that supports Python 2.\nThe 3.5.x line will continue to get bug fixes and security patches that\nsupport Python 2 until August 1, 2020. redis-py 4.0 will be the next major\nversion and will require Python 3.5+.\n\n\nInstallation\n------------\n\nredis-py requires a running Redis server. See `Redis's quickstart\n`_ for installation instructions.\n\nredis-py can be installed using `pip` similar to other Python packages. Do not use `sudo`\nwith `pip`. It is usually good to work in a\n`virtualenv `_ or\n`venv `_ to avoid conflicts with other package\nmanagers and Python projects. For a quick introduction see\n`Python Virtual Environments in Five Minutes `_.\n\nTo install redis-py, simply:\n\n.. code-block:: bash\n\n $ pip install redis\n\nor from source:\n\n.. code-block:: bash\n\n $ python setup.py install\n\n\nGetting Started\n---------------\n\n.. code-block:: pycon\n\n >>> import redis\n >>> r = redis.Redis(host='localhost', port=6379, db=0)\n >>> r.set('foo', 'bar')\n True\n >>> r.get('foo')\n b'bar'\n\nBy default, all responses are returned as `bytes` in Python 3 and `str` in\nPython 2. The user is responsible for decoding to Python 3 strings or Python 2\nunicode objects.\n\nIf **all** string responses from a client should be decoded, the user can\nspecify `decode_responses=True` to `Redis.__init__`. In this case, any\nRedis command that returns a string type will be decoded with the `encoding`\nspecified.\n\n\nUpgrading from redis-py 2.X to 3.0\n----------------------------------\n\nredis-py 3.0 introduces many new features but required a number of backwards\nincompatible changes to be made in the process. This section attempts to\nprovide an upgrade path for users migrating from 2.X to 3.0.\n\n\nPython Version Support\n^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 supports Python 2.7 and Python 3.5+.\n\n\nClient Classes: Redis and StrictRedis\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 drops support for the legacy \"Redis\" client class. \"StrictRedis\"\nhas been renamed to \"Redis\" and an alias named \"StrictRedis\" is provided so\nthat users previously using \"StrictRedis\" can continue to run unchanged.\n\nThe 2.X \"Redis\" class provided alternative implementations of a few commands.\nThis confused users (rightfully so) and caused a number of support issues. To\nmake things easier going forward, it was decided to drop support for these\nalternate implementations and instead focus on a single client class.\n\n2.X users that are already using StrictRedis don't have to change the class\nname. StrictRedis will continue to work for the foreseeable future.\n\n2.X users that are using the Redis class will have to make changes if they\nuse any of the following commands:\n\n* SETEX: The argument order has changed. The new order is (name, time, value).\n* LREM: The argument order has changed. The new order is (name, num, value).\n* TTL and PTTL: The return value is now always an int and matches the\n official Redis command (>0 indicates the timeout, -1 indicates that the key\n exists but that it has no expire time set, -2 indicates that the key does\n not exist)\n\n\nSSL Connections\n^^^^^^^^^^^^^^^\n\nredis-py 3.0 changes the default value of the `ssl_cert_reqs` option from\n`None` to `'required'`. See\n`Issue 1016 `_. This\nchange enforces hostname validation when accepting a cert from a remote SSL\nterminator. If the terminator doesn't properly set the hostname on the cert\nthis will cause redis-py 3.0 to raise a ConnectionError.\n\nThis check can be disabled by setting `ssl_cert_reqs` to `None`. Note that\ndoing so removes the security check. Do so at your own risk.\n\nIt has been reported that SSL certs received from AWS ElastiCache do not have\nproper hostnames and turning off hostname verification is currently required.\n\n\nMSET, MSETNX and ZADD\n^^^^^^^^^^^^^^^^^^^^^\n\nThese commands all accept a mapping of key/value pairs. In redis-py 2.X\nthis mapping could be specified as ``*args`` or as ``**kwargs``. Both of these\nstyles caused issues when Redis introduced optional flags to ZADD. Relying on\n``*args`` caused issues with the optional argument order, especially in Python\n2.7. Relying on ``**kwargs`` caused potential collision issues of user keys with\nthe argument names in the method signature.\n\nTo resolve this, redis-py 3.0 has changed these three commands to all accept\na single positional argument named mapping that is expected to be a dict. For\nMSET and MSETNX, the dict is a mapping of key-names -> values. For ZADD, the\ndict is a mapping of element-names -> score.\n\nMSET, MSETNX and ZADD now look like:\n\n.. code-block:: python\n\n def mset(self, mapping):\n def msetnx(self, mapping):\n def zadd(self, name, mapping, nx=False, xx=False, ch=False, incr=False):\n\nAll 2.X users that use these commands must modify their code to supply\nkeys and values as a dict to these commands.\n\n\nZINCRBY\n^^^^^^^\n\nredis-py 2.X accidentally modified the argument order of ZINCRBY, swapping the\norder of value and amount. ZINCRBY now looks like:\n\n.. code-block:: python\n\n def zincrby(self, name, amount, value):\n\nAll 2.X users that rely on ZINCRBY must swap the order of amount and value\nfor the command to continue to work as intended.\n\n\nEncoding of User Input\n^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 only accepts user data as bytes, strings or numbers (ints, longs\nand floats). Attempting to specify a key or a value as any other type will\nraise a DataError exception.\n\nredis-py 2.X attempted to coerce any type of input into a string. While\noccasionally convenient, this caused all sorts of hidden errors when users\npassed boolean values (which were coerced to 'True' or 'False'), a None\nvalue (which was coerced to 'None') or other values, such as user defined\ntypes.\n\nAll 2.X users should make sure that the keys and values they pass into\nredis-py are either bytes, strings or numbers.\n\n\nLocks\n^^^^^\n\nredis-py 3.0 drops support for the pipeline-based Lock and now only supports\nthe Lua-based lock. In doing so, LuaLock has been renamed to Lock. This also\nmeans that redis-py Lock objects require Redis server 2.6 or greater.\n\n2.X users that were explicitly referring to \"LuaLock\" will have to now refer\nto \"Lock\" instead.\n\n\nLocks as Context Managers\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 now raises a LockError when using a lock as a context manager and\nthe lock cannot be acquired within the specified timeout. This is more of a\nbug fix than a backwards incompatible change. However, given an error is now\nraised where none was before, this might alarm some users.\n\n2.X users should make sure they're wrapping their lock code in a try/catch\nlike this:\n\n.. code-block:: python\n\n try:\n with r.lock('my-lock-key', blocking_timeout=5) as lock:\n # code you want executed only after the lock has been acquired\n except LockError:\n # the lock wasn't acquired\n\n\nAPI Reference\n-------------\n\nThe `official Redis command documentation `_ does a\ngreat job of explaining each command in detail. redis-py attempts to adhere\nto the official command syntax. There are a few exceptions:\n\n* **SELECT**: Not implemented. See the explanation in the Thread Safety section\n below.\n* **DEL**: 'del' is a reserved keyword in the Python syntax. Therefore redis-py\n uses 'delete' instead.\n* **MULTI/EXEC**: These are implemented as part of the Pipeline class. The\n pipeline is wrapped with the MULTI and EXEC statements by default when it\n is executed, which can be disabled by specifying transaction=False.\n See more about Pipelines below.\n* **SUBSCRIBE/LISTEN**: Similar to pipelines, PubSub is implemented as a separate\n class as it places the underlying connection in a state where it can't\n execute non-pubsub commands. Calling the pubsub method from the Redis client\n will return a PubSub instance where you can subscribe to channels and listen\n for messages. You can only call PUBLISH from the Redis client (see\n `this comment on issue #151\n `_\n for details).\n* **SCAN/SSCAN/HSCAN/ZSCAN**: The \\*SCAN commands are implemented as they\n exist in the Redis documentation. In addition, each command has an equivalent\n iterator method. These are purely for convenience so the user doesn't have\n to keep track of the cursor while iterating. Use the\n scan_iter/sscan_iter/hscan_iter/zscan_iter methods for this behavior.\n\n\nMore Detail\n-----------\n\nConnection Pools\n^^^^^^^^^^^^^^^^\n\nBehind the scenes, redis-py uses a connection pool to manage connections to\na Redis server. By default, each Redis instance you create will in turn create\nits own connection pool. You can override this behavior and use an existing\nconnection pool by passing an already created connection pool instance to the\nconnection_pool argument of the Redis class. You may choose to do this in order\nto implement client side sharding or have fine-grain control of how\nconnections are managed.\n\n.. code-block:: pycon\n\n >>> pool = redis.ConnectionPool(host='localhost', port=6379, db=0)\n >>> r = redis.Redis(connection_pool=pool)\n\nConnections\n^^^^^^^^^^^\n\nConnectionPools manage a set of Connection instances. redis-py ships with two\ntypes of Connections. The default, Connection, is a normal TCP socket based\nconnection. The UnixDomainSocketConnection allows for clients running on the\nsame device as the server to connect via a unix domain socket. To use a\nUnixDomainSocketConnection connection, simply pass the unix_socket_path\nargument, which is a string to the unix domain socket file. Additionally, make\nsure the unixsocket parameter is defined in your redis.conf file. It's\ncommented out by default.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(unix_socket_path='/tmp/redis.sock')\n\nYou can create your own Connection subclasses as well. This may be useful if\nyou want to control the socket behavior within an async framework. To\ninstantiate a client class using your own connection, you need to create\na connection pool, passing your class to the connection_class argument.\nOther keyword parameters you pass to the pool will be passed to the class\nspecified during initialization.\n\n.. code-block:: pycon\n\n >>> pool = redis.ConnectionPool(connection_class=YourConnectionClass,\n your_arg='...', ...)\n\nConnections maintain an open socket to the Redis server. Sometimes these\nsockets are interrupted or disconnected for a variety of reasons. For example,\nnetwork appliances, load balancers and other services that sit between clients\nand servers are often configured to kill connections that remain idle for a\ngiven threshold.\n\nWhen a connection becomes disconnected, the next command issued on that\nconnection will fail and redis-py will raise a ConnectionError to the caller.\nThis allows each application that uses redis-py to handle errors in a way\nthat's fitting for that specific application. However, constant error\nhandling can be verbose and cumbersome, especially when socket disconnections\nhappen frequently in many production environments.\n\nTo combat this, redis-py can issue regular health checks to assess the\nliveliness of a connection just before issuing a command. Users can pass\n``health_check_interval=N`` to the Redis or ConnectionPool classes or\nas a query argument within a Redis URL. The value of ``health_check_interval``\nmust be an integer. A value of ``0``, the default, disables health checks.\nAny positive integer will enable health checks. Health checks are performed\njust before a command is executed if the underlying connection has been idle\nfor more than ``health_check_interval`` seconds. For example,\n``health_check_interval=30`` will ensure that a health check is run on any\nconnection that has been idle for 30 or more seconds just before a command\nis executed on that connection.\n\nIf your application is running in an environment that disconnects idle\nconnections after 30 seconds you should set the ``health_check_interval``\noption to a value less than 30.\n\nThis option also works on any PubSub connection that is created from a\nclient with ``health_check_interval`` enabled. PubSub users need to ensure\nthat ``get_message()`` or ``listen()`` are called more frequently than\n``health_check_interval`` seconds. It is assumed that most workloads already\ndo this.\n\nIf your PubSub use case doesn't call ``get_message()`` or ``listen()``\nfrequently, you should call ``pubsub.check_health()`` explicitly on a\nregularly basis.\n\nParsers\n^^^^^^^\n\nParser classes provide a way to control how responses from the Redis server\nare parsed. redis-py ships with two parser classes, the PythonParser and the\nHiredisParser. By default, redis-py will attempt to use the HiredisParser if\nyou have the hiredis module installed and will fallback to the PythonParser\notherwise.\n\nHiredis is a C library maintained by the core Redis team. Pieter Noordhuis was\nkind enough to create Python bindings. Using Hiredis can provide up to a\n10x speed improvement in parsing responses from the Redis server. The\nperformance increase is most noticeable when retrieving many pieces of data,\nsuch as from LRANGE or SMEMBERS operations.\n\nHiredis is available on PyPI, and can be installed via pip just like redis-py.\n\n.. code-block:: bash\n\n $ pip install hiredis\n\nResponse Callbacks\n^^^^^^^^^^^^^^^^^^\n\nThe client class uses a set of callbacks to cast Redis responses to the\nappropriate Python type. There are a number of these callbacks defined on\nthe Redis client class in a dictionary called RESPONSE_CALLBACKS.\n\nCustom callbacks can be added on a per-instance basis using the\nset_response_callback method. This method accepts two arguments: a command\nname and the callback. Callbacks added in this manner are only valid on the\ninstance the callback is added to. If you want to define or override a callback\nglobally, you should make a subclass of the Redis client and add your callback\nto its RESPONSE_CALLBACKS class dictionary.\n\nResponse callbacks take at least one parameter: the response from the Redis\nserver. Keyword arguments may also be accepted in order to further control\nhow to interpret the response. These keyword arguments are specified during the\ncommand's call to execute_command. The ZRANGE implementation demonstrates the\nuse of response callback keyword arguments with its \"withscores\" argument.\n\nThread Safety\n^^^^^^^^^^^^^\n\nRedis client instances can safely be shared between threads. Internally,\nconnection instances are only retrieved from the connection pool during\ncommand execution, and returned to the pool directly after. Command execution\nnever modifies state on the client instance.\n\nHowever, there is one caveat: the Redis SELECT command. The SELECT command\nallows you to switch the database currently in use by the connection. That\ndatabase remains selected until another is selected or until the connection is\nclosed. This creates an issue in that connections could be returned to the pool\nthat are connected to a different database.\n\nAs a result, redis-py does not implement the SELECT command on client\ninstances. If you use multiple Redis databases within the same application, you\nshould create a separate client instance (and possibly a separate connection\npool) for each database.\n\nIt is not safe to pass PubSub or Pipeline objects between threads.\n\nPipelines\n^^^^^^^^^\n\nPipelines are a subclass of the base Redis class that provide support for\nbuffering multiple commands to the server in a single request. They can be used\nto dramatically increase the performance of groups of commands by reducing the\nnumber of back-and-forth TCP packets between the client and server.\n\nPipelines are quite simple to use:\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> r.set('bing', 'baz')\n >>> # Use the pipeline() method to create a pipeline instance\n >>> pipe = r.pipeline()\n >>> # The following SET commands are buffered\n >>> pipe.set('foo', 'bar')\n >>> pipe.get('bing')\n >>> # the EXECUTE call sends all buffered commands to the server, returning\n >>> # a list of responses, one for each command.\n >>> pipe.execute()\n [True, b'baz']\n\nFor ease of use, all commands being buffered into the pipeline return the\npipeline object itself. Therefore calls can be chained like:\n\n.. code-block:: pycon\n\n >>> pipe.set('foo', 'bar').sadd('faz', 'baz').incr('auto_number').execute()\n [True, True, 6]\n\nIn addition, pipelines can also ensure the buffered commands are executed\natomically as a group. This happens by default. If you want to disable the\natomic nature of a pipeline but still want to buffer commands, you can turn\noff transactions.\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline(transaction=False)\n\nA common issue occurs when requiring atomic transactions but needing to\nretrieve values in Redis prior for use within the transaction. For instance,\nlet's assume that the INCR command didn't exist and we need to build an atomic\nversion of INCR in Python.\n\nThe completely naive implementation could GET the value, increment it in\nPython, and SET the new value back. However, this is not atomic because\nmultiple clients could be doing this at the same time, each getting the same\nvalue from GET.\n\nEnter the WATCH command. WATCH provides the ability to monitor one or more keys\nprior to starting a transaction. If any of those keys change prior the\nexecution of that transaction, the entire transaction will be canceled and a\nWatchError will be raised. To implement our own client-side INCR command, we\ncould do something like this:\n\n.. code-block:: pycon\n\n >>> with r.pipeline() as pipe:\n ... while True:\n ... try:\n ... # put a WATCH on the key that holds our sequence value\n ... pipe.watch('OUR-SEQUENCE-KEY')\n ... # after WATCHing, the pipeline is put into immediate execution\n ... # mode until we tell it to start buffering commands again.\n ... # this allows us to get the current value of our sequence\n ... current_value = pipe.get('OUR-SEQUENCE-KEY')\n ... next_value = int(current_value) + 1\n ... # now we can put the pipeline back into buffered mode with MULTI\n ... pipe.multi()\n ... pipe.set('OUR-SEQUENCE-KEY', next_value)\n ... # and finally, execute the pipeline (the set command)\n ... pipe.execute()\n ... # if a WatchError wasn't raised during execution, everything\n ... # we just did happened atomically.\n ... break\n ... except WatchError:\n ... # another client must have changed 'OUR-SEQUENCE-KEY' between\n ... # the time we started WATCHing it and the pipeline's execution.\n ... # our best bet is to just retry.\n ... continue\n\nNote that, because the Pipeline must bind to a single connection for the\nduration of a WATCH, care must be taken to ensure that the connection is\nreturned to the connection pool by calling the reset() method. If the\nPipeline is used as a context manager (as in the example above) reset()\nwill be called automatically. Of course you can do this the manual way by\nexplicitly calling reset():\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline()\n >>> while True:\n ... try:\n ... pipe.watch('OUR-SEQUENCE-KEY')\n ... ...\n ... pipe.execute()\n ... break\n ... except WatchError:\n ... continue\n ... finally:\n ... pipe.reset()\n\nA convenience method named \"transaction\" exists for handling all the\nboilerplate of handling and retrying watch errors. It takes a callable that\nshould expect a single parameter, a pipeline object, and any number of keys to\nbe WATCHed. Our client-side INCR command above can be written like this,\nwhich is much easier to read:\n\n.. code-block:: pycon\n\n >>> def client_side_incr(pipe):\n ... current_value = pipe.get('OUR-SEQUENCE-KEY')\n ... next_value = int(current_value) + 1\n ... pipe.multi()\n ... pipe.set('OUR-SEQUENCE-KEY', next_value)\n >>>\n >>> r.transaction(client_side_incr, 'OUR-SEQUENCE-KEY')\n [True]\n\nBe sure to call `pipe.multi()` in the callable passed to `Redis.transaction`\nprior to any write commands.\n\nPublish / Subscribe\n^^^^^^^^^^^^^^^^^^^\n\nredis-py includes a `PubSub` object that subscribes to channels and listens\nfor new messages. Creating a `PubSub` object is easy.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> p = r.pubsub()\n\nOnce a `PubSub` instance is created, channels and patterns can be subscribed\nto.\n\n.. code-block:: pycon\n\n >>> p.subscribe('my-first-channel', 'my-second-channel', ...)\n >>> p.psubscribe('my-*', ...)\n\nThe `PubSub` instance is now subscribed to those channels/patterns. The\nsubscription confirmations can be seen by reading messages from the `PubSub`\ninstance.\n\n.. code-block:: pycon\n\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-second-channel', 'data': 1}\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-first-channel', 'data': 2}\n >>> p.get_message()\n {'pattern': None, 'type': 'psubscribe', 'channel': b'my-*', 'data': 3}\n\nEvery message read from a `PubSub` instance will be a dictionary with the\nfollowing keys.\n\n* **type**: One of the following: 'subscribe', 'unsubscribe', 'psubscribe',\n 'punsubscribe', 'message', 'pmessage'\n* **channel**: The channel [un]subscribed to or the channel a message was\n published to\n* **pattern**: The pattern that matched a published message's channel. Will be\n `None` in all cases except for 'pmessage' types.\n* **data**: The message data. With [un]subscribe messages, this value will be\n the number of channels and patterns the connection is currently subscribed\n to. With [p]message messages, this value will be the actual published\n message.\n\nLet's send a message now.\n\n.. code-block:: pycon\n\n # the publish method returns the number matching channel and pattern\n # subscriptions. 'my-first-channel' matches both the 'my-first-channel'\n # subscription and the 'my-*' pattern subscription, so this message will\n # be delivered to 2 channels/patterns\n >>> r.publish('my-first-channel', 'some data')\n 2\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': b'some data', 'pattern': None, 'type': 'message'}\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': b'some data', 'pattern': b'my-*', 'type': 'pmessage'}\n\nUnsubscribing works just like subscribing. If no arguments are passed to\n[p]unsubscribe, all channels or patterns will be unsubscribed from.\n\n.. code-block:: pycon\n\n >>> p.unsubscribe()\n >>> p.punsubscribe('my-*')\n >>> p.get_message()\n {'channel': b'my-second-channel', 'data': 2, 'pattern': None, 'type': 'unsubscribe'}\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': 1, 'pattern': None, 'type': 'unsubscribe'}\n >>> p.get_message()\n {'channel': b'my-*', 'data': 0, 'pattern': None, 'type': 'punsubscribe'}\n\nredis-py also allows you to register callback functions to handle published\nmessages. Message handlers take a single argument, the message, which is a\ndictionary just like the examples above. To subscribe to a channel or pattern\nwith a message handler, pass the channel or pattern name as a keyword argument\nwith its value being the callback function.\n\nWhen a message is read on a channel or pattern with a message handler, the\nmessage dictionary is created and passed to the message handler. In this case,\na `None` value is returned from get_message() since the message was already\nhandled.\n\n.. code-block:: pycon\n\n >>> def my_handler(message):\n ... print('MY HANDLER: ', message['data'])\n >>> p.subscribe(**{'my-channel': my_handler})\n # read the subscribe confirmation message\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-channel', 'data': 1}\n >>> r.publish('my-channel', 'awesome data')\n 1\n # for the message handler to work, we need tell the instance to read data.\n # this can be done in several ways (read more below). we'll just use\n # the familiar get_message() function for now\n >>> message = p.get_message()\n MY HANDLER: awesome data\n # note here that the my_handler callback printed the string above.\n # `message` is None because the message was handled by our handler.\n >>> print(message)\n None\n\nIf your application is not interested in the (sometimes noisy)\nsubscribe/unsubscribe confirmation messages, you can ignore them by passing\n`ignore_subscribe_messages=True` to `r.pubsub()`. This will cause all\nsubscribe/unsubscribe messages to be read, but they won't bubble up to your\napplication.\n\n.. code-block:: pycon\n\n >>> p = r.pubsub(ignore_subscribe_messages=True)\n >>> p.subscribe('my-channel')\n >>> p.get_message() # hides the subscribe message and returns None\n >>> r.publish('my-channel', 'my data')\n 1\n >>> p.get_message()\n {'channel': b'my-channel', 'data': b'my data', 'pattern': None, 'type': 'message'}\n\nThere are three different strategies for reading messages.\n\nThe examples above have been using `pubsub.get_message()`. Behind the scenes,\n`get_message()` uses the system's 'select' module to quickly poll the\nconnection's socket. If there's data available to be read, `get_message()` will\nread it, format the message and return it or pass it to a message handler. If\nthere's no data to be read, `get_message()` will immediately return None. This\nmakes it trivial to integrate into an existing event loop inside your\napplication.\n\n.. code-block:: pycon\n\n >>> while True:\n >>> message = p.get_message()\n >>> if message:\n >>> # do something with the message\n >>> time.sleep(0.001) # be nice to the system :)\n\nOlder versions of redis-py only read messages with `pubsub.listen()`. listen()\nis a generator that blocks until a message is available. If your application\ndoesn't need to do anything else but receive and act on messages received from\nredis, listen() is an easy way to get up an running.\n\n.. code-block:: pycon\n\n >>> for message in p.listen():\n ... # do something with the message\n\nThe third option runs an event loop in a separate thread.\n`pubsub.run_in_thread()` creates a new thread and starts the event loop. The\nthread object is returned to the caller of `run_in_thread()`. The caller can\nuse the `thread.stop()` method to shut down the event loop and thread. Behind\nthe scenes, this is simply a wrapper around `get_message()` that runs in a\nseparate thread, essentially creating a tiny non-blocking event loop for you.\n`run_in_thread()` takes an optional `sleep_time` argument. If specified, the\nevent loop will call `time.sleep()` with the value in each iteration of the\nloop.\n\nNote: Since we're running in a separate thread, there's no way to handle\nmessages that aren't automatically handled with registered message handlers.\nTherefore, redis-py prevents you from calling `run_in_thread()` if you're\nsubscribed to patterns or channels that don't have message handlers attached.\n\n.. code-block:: pycon\n\n >>> p.subscribe(**{'my-channel': my_handler})\n >>> thread = p.run_in_thread(sleep_time=0.001)\n # the event loop is now running in the background processing messages\n # when it's time to shut it down...\n >>> thread.stop()\n\nA PubSub object adheres to the same encoding semantics as the client instance\nit was created from. Any channel or pattern that's unicode will be encoded\nusing the `charset` specified on the client before being sent to Redis. If the\nclient's `decode_responses` flag is set the False (the default), the\n'channel', 'pattern' and 'data' values in message dictionaries will be byte\nstrings (str on Python 2, bytes on Python 3). If the client's\n`decode_responses` is True, then the 'channel', 'pattern' and 'data' values\nwill be automatically decoded to unicode strings using the client's `charset`.\n\nPubSub objects remember what channels and patterns they are subscribed to. In\nthe event of a disconnection such as a network error or timeout, the\nPubSub object will re-subscribe to all prior channels and patterns when\nreconnecting. Messages that were published while the client was disconnected\ncannot be delivered. When you're finished with a PubSub object, call its\n`.close()` method to shutdown the connection.\n\n.. code-block:: pycon\n\n >>> p = r.pubsub()\n >>> ...\n >>> p.close()\n\n\nThe PUBSUB set of subcommands CHANNELS, NUMSUB and NUMPAT are also\nsupported:\n\n.. code-block:: pycon\n\n >>> r.pubsub_channels()\n [b'foo', b'bar']\n >>> r.pubsub_numsub('foo', 'bar')\n [(b'foo', 9001), (b'bar', 42)]\n >>> r.pubsub_numsub('baz')\n [(b'baz', 0)]\n >>> r.pubsub_numpat()\n 1204\n\nMonitor\n^^^^^^^\nredis-py includes a `Monitor` object that streams every command processed\nby the Redis server. Use `listen()` on the `Monitor` object to block\nuntil a command is received.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> with r.monitor() as m:\n >>> for command in m.listen():\n >>> print(command)\n\nLua Scripting\n^^^^^^^^^^^^^\n\nredis-py supports the EVAL, EVALSHA, and SCRIPT commands. However, there are\na number of edge cases that make these commands tedious to use in real world\nscenarios. Therefore, redis-py exposes a Script object that makes scripting\nmuch easier to use.\n\nTo create a Script instance, use the `register_script` function on a client\ninstance passing the Lua code as the first argument. `register_script` returns\na Script instance that you can use throughout your code.\n\nThe following trivial Lua script accepts two parameters: the name of a key and\na multiplier value. The script fetches the value stored in the key, multiplies\nit with the multiplier value and returns the result.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis()\n >>> lua = \"\"\"\n ... local value = redis.call('GET', KEYS[1])\n ... value = tonumber(value)\n ... return value * ARGV[1]\"\"\"\n >>> multiply = r.register_script(lua)\n\n`multiply` is now a Script instance that is invoked by calling it like a\nfunction. Script instances accept the following optional arguments:\n\n* **keys**: A list of key names that the script will access. This becomes the\n KEYS list in Lua.\n* **args**: A list of argument values. This becomes the ARGV list in Lua.\n* **client**: A redis-py Client or Pipeline instance that will invoke the\n script. If client isn't specified, the client that initially\n created the Script instance (the one that `register_script` was\n invoked from) will be used.\n\nContinuing the example from above:\n\n.. code-block:: pycon\n\n >>> r.set('foo', 2)\n >>> multiply(keys=['foo'], args=[5])\n 10\n\nThe value of key 'foo' is set to 2. When multiply is invoked, the 'foo' key is\npassed to the script along with the multiplier value of 5. Lua executes the\nscript and returns the result, 10.\n\nScript instances can be executed using a different client instance, even one\nthat points to a completely different Redis server.\n\n.. code-block:: pycon\n\n >>> r2 = redis.Redis('redis2.example.com')\n >>> r2.set('foo', 3)\n >>> multiply(keys=['foo'], args=[5], client=r2)\n 15\n\nThe Script object ensures that the Lua script is loaded into Redis's script\ncache. In the event of a NOSCRIPT error, it will load the script and retry\nexecuting it.\n\nScript objects can also be used in pipelines. The pipeline instance should be\npassed as the client argument when calling the script. Care is taken to ensure\nthat the script is registered in Redis's script cache just prior to pipeline\nexecution.\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline()\n >>> pipe.set('foo', 5)\n >>> multiply(keys=['foo'], args=[5], client=pipe)\n >>> pipe.execute()\n [True, 25]\n\nSentinel support\n^^^^^^^^^^^^^^^^\n\nredis-py can be used together with `Redis Sentinel `_\nto discover Redis nodes. You need to have at least one Sentinel daemon running\nin order to use redis-py's Sentinel support.\n\nConnecting redis-py to the Sentinel instance(s) is easy. You can use a\nSentinel connection to discover the master and slaves network addresses:\n\n.. code-block:: pycon\n\n >>> from redis.sentinel import Sentinel\n >>> sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1)\n >>> sentinel.discover_master('mymaster')\n ('127.0.0.1', 6379)\n >>> sentinel.discover_slaves('mymaster')\n [('127.0.0.1', 6380)]\n\nYou can also create Redis client connections from a Sentinel instance. You can\nconnect to either the master (for write operations) or a slave (for read-only\noperations).\n\n.. code-block:: pycon\n\n >>> master = sentinel.master_for('mymaster', socket_timeout=0.1)\n >>> slave = sentinel.slave_for('mymaster', socket_timeout=0.1)\n >>> master.set('foo', 'bar')\n >>> slave.get('foo')\n b'bar'\n\nThe master and slave objects are normal Redis instances with their\nconnection pool bound to the Sentinel instance. When a Sentinel backed client\nattempts to establish a connection, it first queries the Sentinel servers to\ndetermine an appropriate host to connect to. If no server is found,\na MasterNotFoundError or SlaveNotFoundError is raised. Both exceptions are\nsubclasses of ConnectionError.\n\nWhen trying to connect to a slave client, the Sentinel connection pool will\niterate over the list of slaves until it finds one that can be connected to.\nIf no slaves can be connected to, a connection will be established with the\nmaster.\n\nSee `Guidelines for Redis clients with support for Redis Sentinel\n`_ to learn more about Redis Sentinel.\n\nScan Iterators\n^^^^^^^^^^^^^^\n\nThe \\*SCAN commands introduced in Redis 2.8 can be cumbersome to use. While\nthese commands are fully supported, redis-py also exposes the following methods\nthat return Python iterators for convenience: `scan_iter`, `hscan_iter`,\n`sscan_iter` and `zscan_iter`.\n\n.. code-block:: pycon\n\n >>> for key, value in (('A', '1'), ('B', '2'), ('C', '3')):\n ... r.set(key, value)\n >>> for key in r.scan_iter():\n ... print(key, r.get(key))\n A 1\n B 2\n C 3\n\nAuthor\n^^^^^^\n\nredis-py is developed and maintained by Andy McCurdy (sedrik@gmail.com).\nIt can be found here: https://github.com/andymccurdy/redis-py\n\nSpecial thanks to:\n\n* Ludovico Magnocavallo, author of the original Python Redis client, from\n which some of the socket code is still used.\n* Alexander Solovyov for ideas on the generic response callback system.\n* Paul Hubbard for initial packaging support.", + "release_date": "2020-06-01T21:30:33", "parties": [ { "type": "person", "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", + "name": "Andy McCurdy", + "email": "sedrik@gmail.com", "url": null }, { "type": "person", "role": "maintainer", - "name": "Pallets", - "email": "contact@palletsprojects.com", + "name": "Andy McCurdy", + "email": "sedrik@gmail.com", "url": null } ], "keywords": [ + "Redis", + "key-value store", "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", @@ -4464,82 +3712,14 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Text Processing :: Markup :: HTML" - ], - "homepage_url": "https://palletsprojects.com/p/jinja/", - "download_url": "https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7/Jinja2-2.11.3.tar.gz", - "size": 257589, - "sha1": null, - "md5": "231dc00d34afb2672c497713fa9cdaaa", - "sha256": "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/jinja", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jinja2/2.11.3/json", - "datasource_id": null, - "purl": "pkg:pypi/jinja2@2.11.3" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonpatch", - "version": "1.33", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Apply JSON-Patches (RFC 6902)\npython-json-patch\n=================\n\n[![PyPI version](https://img.shields.io/pypi/v/jsonpatch.svg)](https://pypi.python.org/pypi/jsonpatch/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/jsonpatch.svg)](https://pypi.python.org/pypi/jsonpatch/)\n[![Build Status](https://travis-ci.org/stefankoegl/python-json-patch.png?branch=master)](https://travis-ci.org/stefankoegl/python-json-patch)\n[![Coverage Status](https://coveralls.io/repos/stefankoegl/python-json-patch/badge.png?branch=master)](https://coveralls.io/r/stefankoegl/python-json-patch?branch=master)\n\nApplying JSON Patches in Python\n-------------------------------\n\nLibrary to apply JSON Patches according to\n[RFC 6902](http://tools.ietf.org/html/rfc6902)\n\nSee source code for examples\n\n* Website: https://github.com/stefankoegl/python-json-patch\n* Repository: https://github.com/stefankoegl/python-json-patch.git\n* Documentation: https://python-json-patch.readthedocs.org/\n* PyPI: https://pypi.python.org/pypi/jsonpatch\n* Travis CI: https://travis-ci.org/stefankoegl/python-json-patch\n* Coveralls: https://coveralls.io/r/stefankoegl/python-json-patch\n\nRunning external tests\n----------------------\nTo run external tests (such as those from https://github.com/json-patch/json-patch-tests) use ext_test.py\n\n ./ext_tests.py ../json-patch-tests/tests.json", - "release_date": "2023-06-16T21:01:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stefan K\u00f6gl", - "email": "stefan@skoegl.net", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" + "Programming Language :: Python :: Implementation :: PyPy" ], - "homepage_url": "https://github.com/stefankoegl/python-json-patch", - "download_url": "https://files.pythonhosted.org/packages/73/07/02e16ed01e04a374e644b575638ec7987ae846d25ad97bcc9945a3ee4b0e/jsonpatch-1.33-py2.py3-none-any.whl", - "size": 12898, + "homepage_url": "https://github.com/andymccurdy/redis-py", + "download_url": "https://files.pythonhosted.org/packages/a7/7c/24fb0511df653cf1a5d938d8f5d19802a88cef255706fdda242ff97e91b7/redis-3.5.3-py2.py3-none-any.whl", + "size": 72144, "sha1": null, - "md5": "c9e70de2819073c6e49e48aa893146a7", - "sha256": "0ae28c0cd062bbd8b8ecc26d7d164fbbea9652a1a3693f3b956c1eae5145dade", + "md5": "c37ac6eeeb79559fe0c4cfe23d79b754", + "sha256": "432b788c4530cfe16d8d943a09d40ca6c16149727e4afe8c2c9d5580c59d9f24", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -4547,9 +3727,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "Modified BSD License", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -4559,2716 +3739,51 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonpatch/1.33/json", + "api_data_url": "https://pypi.org/pypi/redis/3.5.3/json", "datasource_id": null, - "purl": "pkg:pypi/jsonpatch@1.33" + "purl": "pkg:pypi/redis@3.5.3" }, { "type": "pypi", "namespace": null, - "name": "jsonpatch", - "version": "1.33", + "name": "scandir", + "version": "1.10.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Apply JSON-Patches (RFC 6902)\npython-json-patch\n=================\n\n[![PyPI version](https://img.shields.io/pypi/v/jsonpatch.svg)](https://pypi.python.org/pypi/jsonpatch/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/jsonpatch.svg)](https://pypi.python.org/pypi/jsonpatch/)\n[![Build Status](https://travis-ci.org/stefankoegl/python-json-patch.png?branch=master)](https://travis-ci.org/stefankoegl/python-json-patch)\n[![Coverage Status](https://coveralls.io/repos/stefankoegl/python-json-patch/badge.png?branch=master)](https://coveralls.io/r/stefankoegl/python-json-patch?branch=master)\n\nApplying JSON Patches in Python\n-------------------------------\n\nLibrary to apply JSON Patches according to\n[RFC 6902](http://tools.ietf.org/html/rfc6902)\n\nSee source code for examples\n\n* Website: https://github.com/stefankoegl/python-json-patch\n* Repository: https://github.com/stefankoegl/python-json-patch.git\n* Documentation: https://python-json-patch.readthedocs.org/\n* PyPI: https://pypi.python.org/pypi/jsonpatch\n* Travis CI: https://travis-ci.org/stefankoegl/python-json-patch\n* Coveralls: https://coveralls.io/r/stefankoegl/python-json-patch\n\nRunning external tests\n----------------------\nTo run external tests (such as those from https://github.com/json-patch/json-patch-tests) use ext_test.py\n\n ./ext_tests.py ../json-patch-tests/tests.json", - "release_date": "2023-06-26T12:07:29", + "description": "scandir, a better directory iterator and faster os.walk()\r\n=========================================================\r\n\r\n.. image:: https://img.shields.io/pypi/v/scandir.svg\r\n :target: https://pypi.python.org/pypi/scandir\r\n :alt: scandir on PyPI (Python Package Index)\r\n\r\n.. image:: https://travis-ci.org/benhoyt/scandir.svg?branch=master\r\n :target: https://travis-ci.org/benhoyt/scandir\r\n :alt: Travis CI tests (Linux)\r\n\r\n.. image:: https://ci.appveyor.com/api/projects/status/github/benhoyt/scandir?branch=master&svg=true\r\n :target: https://ci.appveyor.com/project/benhoyt/scandir\r\n :alt: Appveyor tests (Windows)\r\n\r\n\r\n``scandir()`` is a directory iteration function like ``os.listdir()``,\r\nexcept that instead of returning a list of bare filenames, it yields\r\n``DirEntry`` objects that include file type and stat information along\r\nwith the name. Using ``scandir()`` increases the speed of ``os.walk()``\r\nby 2-20 times (depending on the platform and file system) by avoiding\r\nunnecessary calls to ``os.stat()`` in most cases.\r\n\r\n\r\nNow included in a Python near you!\r\n----------------------------------\r\n\r\n``scandir`` has been included in the Python 3.5 standard library as\r\n``os.scandir()``, and the related performance improvements to\r\n``os.walk()`` have also been included. So if you're lucky enough to be\r\nusing Python 3.5 (release date September 13, 2015) you get the benefit\r\nimmediately, otherwise just\r\n`download this module from PyPI `_,\r\ninstall it with ``pip install scandir``, and then do something like\r\nthis in your code:\r\n\r\n.. code-block:: python\r\n\r\n # Use the built-in version of scandir/walk if possible, otherwise\r\n # use the scandir module version\r\n try:\r\n from os import scandir, walk\r\n except ImportError:\r\n from scandir import scandir, walk\r\n\r\n`PEP 471 `_, which is the\r\nPEP that proposes including ``scandir`` in the Python standard library,\r\nwas `accepted `_\r\nin July 2014 by Victor Stinner, the BDFL-delegate for the PEP.\r\n\r\nThis ``scandir`` module is intended to work on Python 2.7+ and Python\r\n3.4+ (and it has been tested on those versions).\r\n\r\n\r\nBackground\r\n----------\r\n\r\nPython's built-in ``os.walk()`` is significantly slower than it needs to be,\r\nbecause -- in addition to calling ``listdir()`` on each directory -- it calls\r\n``stat()`` on each file to determine whether the filename is a directory or not.\r\nBut both ``FindFirstFile`` / ``FindNextFile`` on Windows and ``readdir`` on Linux/OS\r\nX already tell you whether the files returned are directories or not, so\r\nno further ``stat`` system calls are needed. In short, you can reduce the number\r\nof system calls from about 2N to N, where N is the total number of files and\r\ndirectories in the tree.\r\n\r\nIn practice, removing all those extra system calls makes ``os.walk()`` about\r\n**7-50 times as fast on Windows, and about 3-10 times as fast on Linux and Mac OS\r\nX.** So we're not talking about micro-optimizations. See more benchmarks\r\nin the \"Benchmarks\" section below.\r\n\r\nSomewhat relatedly, many people have also asked for a version of\r\n``os.listdir()`` that yields filenames as it iterates instead of returning them\r\nas one big list. This improves memory efficiency for iterating very large\r\ndirectories.\r\n\r\nSo as well as a faster ``walk()``, scandir adds a new ``scandir()`` function.\r\nThey're pretty easy to use, but see \"The API\" below for the full docs.\r\n\r\n\r\nBenchmarks\r\n----------\r\n\r\nBelow are results showing how many times as fast ``scandir.walk()`` is than\r\n``os.walk()`` on various systems, found by running ``benchmark.py`` with no\r\narguments:\r\n\r\n==================== ============== =============\r\nSystem version Python version Times as fast\r\n==================== ============== =============\r\nWindows 7 64-bit 2.7.7 64-bit 10.4\r\nWindows 7 64-bit SSD 2.7.7 64-bit 10.3\r\nWindows 7 64-bit NFS 2.7.6 64-bit 36.8\r\nWindows 7 64-bit SSD 3.4.1 64-bit 9.9\r\nWindows 7 64-bit SSD 3.5.0 64-bit 9.5\r\nUbuntu 14.04 64-bit 2.7.6 64-bit 5.8\r\nMac OS X 10.9.3 2.7.5 64-bit 3.8\r\n==================== ============== =============\r\n\r\nAll of the above tests were done using the fast C version of scandir\r\n(source code in ``_scandir.c``).\r\n\r\nNote that the gains are less than the above on smaller directories and greater\r\non larger directories. This is why ``benchmark.py`` creates a test directory\r\ntree with a standardized size.\r\n\r\n\r\nThe API\r\n-------\r\n\r\nwalk()\r\n~~~~~~\r\n\r\nThe API for ``scandir.walk()`` is exactly the same as ``os.walk()``, so just\r\n`read the Python docs `_.\r\n\r\nscandir()\r\n~~~~~~~~~\r\n\r\nThe full docs for ``scandir()`` and the ``DirEntry`` objects it yields are\r\navailable in the `Python documentation here `_. \r\nBut below is a brief summary as well.\r\n\r\n scandir(path='.') -> iterator of DirEntry objects for given path\r\n\r\nLike ``listdir``, ``scandir`` calls the operating system's directory\r\niteration system calls to get the names of the files in the given\r\n``path``, but it's different from ``listdir`` in two ways:\r\n\r\n* Instead of returning bare filename strings, it returns lightweight\r\n ``DirEntry`` objects that hold the filename string and provide\r\n simple methods that allow access to the additional data the\r\n operating system may have returned.\r\n\r\n* It returns a generator instead of a list, so that ``scandir`` acts\r\n as a true iterator instead of returning the full list immediately.\r\n\r\n``scandir()`` yields a ``DirEntry`` object for each file and\r\nsub-directory in ``path``. Just like ``listdir``, the ``'.'``\r\nand ``'..'`` pseudo-directories are skipped, and the entries are\r\nyielded in system-dependent order. Each ``DirEntry`` object has the\r\nfollowing attributes and methods:\r\n\r\n* ``name``: the entry's filename, relative to the scandir ``path``\r\n argument (corresponds to the return values of ``os.listdir``)\r\n\r\n* ``path``: the entry's full path name (not necessarily an absolute\r\n path) -- the equivalent of ``os.path.join(scandir_path, entry.name)``\r\n\r\n* ``is_dir(*, follow_symlinks=True)``: similar to\r\n ``pathlib.Path.is_dir()``, but the return value is cached on the\r\n ``DirEntry`` object; doesn't require a system call in most cases;\r\n don't follow symbolic links if ``follow_symlinks`` is False\r\n\r\n* ``is_file(*, follow_symlinks=True)``: similar to\r\n ``pathlib.Path.is_file()``, but the return value is cached on the\r\n ``DirEntry`` object; doesn't require a system call in most cases; \r\n don't follow symbolic links if ``follow_symlinks`` is False\r\n\r\n* ``is_symlink()``: similar to ``pathlib.Path.is_symlink()``, but the\r\n return value is cached on the ``DirEntry`` object; doesn't require a\r\n system call in most cases\r\n\r\n* ``stat(*, follow_symlinks=True)``: like ``os.stat()``, but the\r\n return value is cached on the ``DirEntry`` object; does not require a\r\n system call on Windows (except for symlinks); don't follow symbolic links\r\n (like ``os.lstat()``) if ``follow_symlinks`` is False\r\n\r\n* ``inode()``: return the inode number of the entry; the return value\r\n is cached on the ``DirEntry`` object\r\n\r\nHere's a very simple example of ``scandir()`` showing use of the\r\n``DirEntry.name`` attribute and the ``DirEntry.is_dir()`` method:\r\n\r\n.. code-block:: python\r\n\r\n def subdirs(path):\r\n \"\"\"Yield directory names not starting with '.' under given path.\"\"\"\r\n for entry in os.scandir(path):\r\n if not entry.name.startswith('.') and entry.is_dir():\r\n yield entry.name\r\n\r\nThis ``subdirs()`` function will be significantly faster with scandir\r\nthan ``os.listdir()`` and ``os.path.isdir()`` on both Windows and POSIX\r\nsystems, especially on medium-sized or large directories.\r\n\r\n\r\nFurther reading\r\n---------------\r\n\r\n* `The Python docs for scandir `_\r\n* `PEP 471 `_, the\r\n (now-accepted) Python Enhancement Proposal that proposed adding\r\n ``scandir`` to the standard library -- a lot of details here,\r\n including rejected ideas and previous discussion\r\n\r\n\r\nFlames, comments, bug reports\r\n-----------------------------\r\n\r\nPlease send flames, comments, and questions about scandir to Ben Hoyt:\r\n\r\nhttp://benhoyt.com/\r\n\r\nFile bug reports for the version in the Python 3.5 standard library\r\n`here `_, or file bug reports\r\nor feature requests for this module at the GitHub project page:\r\n\r\nhttps://github.com/benhoyt/scandir", + "release_date": "2019-03-09T17:58:33", "parties": [ { "type": "person", "role": "author", - "name": "Stefan K\u00f6gl", - "email": "stefan@skoegl.net", + "name": "Ben Hoyt", + "email": "benhoyt@gmail.com", "url": null } ], "keywords": [ "Development Status :: 5 - Production/Stable", - "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/stefankoegl/python-json-patch", - "download_url": "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz", - "size": 21699, - "sha1": null, - "md5": "ed3e8eaa5cce105ad02509d185f0889f", - "sha256": "9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Modified BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonpatch/1.33/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonpatch@1.33" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonpointer", - "version": "2.4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Identify specific nodes in a JSON document (RFC 6901)\npython-json-pointer\n===================\n\n[![PyPI version](https://img.shields.io/pypi/v/jsonpointer.svg)](https://pypi.python.org/pypi/jsonpointer/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/jsonpointer.svg)](https://pypi.python.org/pypi/jsonpointer/)\n[![Build Status](https://travis-ci.org/stefankoegl/python-json-pointer.svg?branch=master)](https://travis-ci.org/stefankoegl/python-json-pointer)\n[![Coverage Status](https://coveralls.io/repos/stefankoegl/python-json-pointer/badge.svg?branch=master)](https://coveralls.io/r/stefankoegl/python-json-pointer?branch=master)\n\n\nResolve JSON Pointers in Python\n-------------------------------\n\nLibrary to resolve JSON Pointers according to\n[RFC 6901](http://tools.ietf.org/html/rfc6901)\n\nSee source code for examples\n* Website: https://github.com/stefankoegl/python-json-pointer\n* Repository: https://github.com/stefankoegl/python-json-pointer.git\n* Documentation: https://python-json-pointer.readthedocs.org/\n* PyPI: https://pypi.python.org/pypi/jsonpointer\n* Travis CI: https://travis-ci.org/stefankoegl/python-json-pointer\n* Coveralls: https://coveralls.io/r/stefankoegl/python-json-pointer", - "release_date": "2023-06-16T21:15:02", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stefan K\u00f6gl", - "email": "stefan@skoegl.net", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/stefankoegl/python-json-pointer", - "download_url": "https://files.pythonhosted.org/packages/12/f6/0232cc0c617e195f06f810534d00b74d2f348fe71b2118009ad8ad31f878/jsonpointer-2.4-py2.py3-none-any.whl", - "size": 7762, - "sha1": null, - "md5": "eb9dcb8c4ccf5d97cea88a7d13510032", - "sha256": "15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Modified BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonpointer/2.4/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonpointer@2.4" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonpointer", - "version": "2.4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Identify specific nodes in a JSON document (RFC 6901)\npython-json-pointer\n===================\n\n[![PyPI version](https://img.shields.io/pypi/v/jsonpointer.svg)](https://pypi.python.org/pypi/jsonpointer/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/jsonpointer.svg)](https://pypi.python.org/pypi/jsonpointer/)\n[![Build Status](https://travis-ci.org/stefankoegl/python-json-pointer.svg?branch=master)](https://travis-ci.org/stefankoegl/python-json-pointer)\n[![Coverage Status](https://coveralls.io/repos/stefankoegl/python-json-pointer/badge.svg?branch=master)](https://coveralls.io/r/stefankoegl/python-json-pointer?branch=master)\n\n\nResolve JSON Pointers in Python\n-------------------------------\n\nLibrary to resolve JSON Pointers according to\n[RFC 6901](http://tools.ietf.org/html/rfc6901)\n\nSee source code for examples\n* Website: https://github.com/stefankoegl/python-json-pointer\n* Repository: https://github.com/stefankoegl/python-json-pointer.git\n* Documentation: https://python-json-pointer.readthedocs.org/\n* PyPI: https://pypi.python.org/pypi/jsonpointer\n* Travis CI: https://travis-ci.org/stefankoegl/python-json-pointer\n* Coveralls: https://coveralls.io/r/stefankoegl/python-json-pointer", - "release_date": "2023-06-26T12:06:53", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stefan K\u00f6gl", - "email": "stefan@skoegl.net", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/stefankoegl/python-json-pointer", - "download_url": "https://files.pythonhosted.org/packages/8f/5e/67d3ab449818b629a0ffe554bb7eb5c030a71f7af5d80fbf670d7ebe62bc/jsonpointer-2.4.tar.gz", - "size": 9254, - "sha1": null, - "md5": "16d785130e5ff235e4ae336eaa611e13", - "sha256": "585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Modified BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonpointer/2.4/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonpointer@2.4" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonref", - "version": "0.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An implementation of JSON Reference for Python\njsonref\n=======\n\n\n.. image:: https://readthedocs.org/projects/jsonref/badge/?version=latest\n :target: https://jsonref.readthedocs.io/en/latest/\n\n.. image:: https://travis-ci.org/gazpachoking/jsonref.png?branch=master\n :target: https://travis-ci.org/gazpachoking/jsonref\n\n.. image:: https://coveralls.io/repos/gazpachoking/jsonref/badge.png?branch=master\n :target: https://coveralls.io/r/gazpachoking/jsonref\n\n\n``jsonref`` is a library for automatic dereferencing of\n`JSON Reference `_\nobjects for Python (supporting Python 2.6+ and Python 3.3+).\n\nThis library lets you use a data structure with JSON reference objects, as if\nthe references had been replaced with the referent data.\n\n\n.. code-block:: python\n\n >>> from pprint import pprint\n >>> import jsonref\n\n >>> # An example json document\n >>> json_str = \"\"\"{\"real\": [1, 2, 3, 4], \"ref\": {\"$ref\": \"#/real\"}}\"\"\"\n >>> data = jsonref.loads(json_str)\n >>> pprint(data) # Reference is not evaluated until here\n {'real': [1, 2, 3, 4], 'ref': [1, 2, 3, 4]}\n\n\nFeatures\n--------\n\n* References are evaluated lazily. Nothing is dereferenced until it is used.\n\n* Recursive references are supported, and create recursive python data\n structures.\n\n\nReferences objects are actually replaced by lazy lookup proxy objects which are\nalmost completely transparent.\n\n.. code-block:: python\n\n >>> data = jsonref.loads('{\"real\": [1, 2, 3, 4], \"ref\": {\"$ref\": \"#/real\"}}')\n >>> # You can tell it is a proxy by using the type function\n >>> type(data[\"real\"]), type(data[\"ref\"])\n (, )\n >>> # You have direct access to the referent data with the __subject__\n >>> # attribute\n >>> type(data[\"ref\"].__subject__)\n \n >>> # If you need to get at the reference object\n >>> data[\"ref\"].__reference__\n {'$ref': '#/real'}\n >>> # Other than that you can use the proxy just like the underlying object\n >>> ref = data[\"ref\"]\n >>> isinstance(ref, list)\n True\n >>> data[\"real\"] == ref\n True\n >>> ref.append(5)\n >>> del ref[0]\n >>> # Actions on the reference affect the real data (if it is mutable)\n >>> pprint(data)\n {'real': [2, 3, 4, 5], 'ref': [2, 3, 4, 5]}", - "release_date": "2018-10-07T19:24:09", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Chase Sterling", - "email": "chase.sterling@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 1 - Planning", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/gazpachoking/jsonref", - "download_url": "https://files.pythonhosted.org/packages/b3/cf/93d4f34d76863d4fb995cb8e3e4f29908304065ce6381e0349700c44ad0c/jsonref-0.2.tar.gz", - "size": 13032, - "sha1": null, - "md5": "42b518b9ccd6852d1d709749bc96cb70", - "sha256": "f3c45b121cf6257eafabdc3a8008763aed1cd7da06dbabc59a9e4d2a5e4e6697", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonref/0.2/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonref@0.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonresolver", - "version": "0.3.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "..\n This file is part of jsonresolver\n Copyright (C) 2015 CERN.\n\n jsonresolver is free software; you can redistribute it and/or modify\n it under the terms of the Revised BSD License; see LICENSE file for\n more details.\n\n==============\n JSONResolver\n==============\n\n.. image:: https://img.shields.io/travis/inveniosoftware/jsonresolver.svg\n :target: https://travis-ci.org/inveniosoftware/jsonresolver\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/jsonresolver.svg\n :target: https://coveralls.io/r/inveniosoftware/jsonresolver\n\n.. image:: https://img.shields.io/github/tag/inveniosoftware/jsonresolver.svg\n :target: https://github.com/inveniosoftware/jsonresolver/releases\n\n.. image:: https://img.shields.io/pypi/dm/jsonresolver.svg\n :target: https://pypi.python.org/pypi/jsonresolver\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/jsonresolver.svg\n :target: https://github.com/inveniosoftware/jsonresolver/blob/master/LICENSE\n\n\nJSON data resolver with support for plugins.\n\n*This is an experimental developer preview release.*\n\n* Free software: BSD license\n* Documentation: https://jsonresolver.readthedocs.io/\n\n\n..\n This file is part of jsonresolver\n Copyright (C) 2015, 2016 CERN.\n\n jsonresolver is free software; you can redistribute it and/or modify\n it under the terms of the Revised BSD License; see LICENSE file for\n more details.\n\nChanges\n=======\n\nVersion 0.3.1 (released 2020-05-06)\n-----------------------------------\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\n\nVersion 0.3.0 (released 2020-03-12)\n-----------------------------------\n\n- Drops support for Python 2.7\n- Updates testing method\n- Updates python dependencies\n\n\nVersion 0.2.1 (released 2016-04-15)\n-----------------------------------\n\nBug fixes\n~~~~~~~~~\n\n- Fixes issue with exceptions raised during e.g. resolver plugin\n loading being caught and not propagated.\n\nVersion 0.2.0 (released 2016-04-06)\n-----------------------------------\n\nIncompatible changes\n~~~~~~~~~~~~~~~~~~~~\n\n- Changes resolving to be based on hostname without 'http://' prefix.\n\nBug fixes\n~~~~~~~~~\n\n- Fixes issues with the hostname not being matched resulting in the\n same route on two hosts not to work.\n\nVersion 0.1.1 (released 2015-12-11)\n-----------------------------------\n\nImproved features\n~~~~~~~~~~~~~~~~~\n\n- Delays the url_map building until first resolve request.\n\nVersion 0.1.0 (released 2015-11-18)\n-----------------------------------\n\n- Initial public release.", - "release_date": "2020-05-06T13:33:07", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Invenio collaboration", - "email": "info@inveniosoftware.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 1 - Planning", - "Environment :: Web Environment", - "Framework :: Flask", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/inveniosoftware/jsonresolver", - "download_url": "https://files.pythonhosted.org/packages/0d/8e/e63fba33303e2062eb1fbd38a5483538ad1b5eee73e04ac1d1f632ac2b76/jsonresolver-0.3.1-py2.py3-none-any.whl", - "size": 9862, - "sha1": null, - "md5": "885596a6122d059b65db7cf2157c981c", - "sha256": "f17a526988456d9895023ae3580714d6ce6af5656869d11d9860dc4a799cf6d4", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonresolver/0.3.1/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonresolver@0.3.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonresolver", - "version": "0.3.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "..\n This file is part of jsonresolver\n Copyright (C) 2015 CERN.\n\n jsonresolver is free software; you can redistribute it and/or modify\n it under the terms of the Revised BSD License; see LICENSE file for\n more details.\n\n==============\n JSONResolver\n==============\n\n.. image:: https://img.shields.io/travis/inveniosoftware/jsonresolver.svg\n :target: https://travis-ci.org/inveniosoftware/jsonresolver\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/jsonresolver.svg\n :target: https://coveralls.io/r/inveniosoftware/jsonresolver\n\n.. image:: https://img.shields.io/github/tag/inveniosoftware/jsonresolver.svg\n :target: https://github.com/inveniosoftware/jsonresolver/releases\n\n.. image:: https://img.shields.io/pypi/dm/jsonresolver.svg\n :target: https://pypi.python.org/pypi/jsonresolver\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/jsonresolver.svg\n :target: https://github.com/inveniosoftware/jsonresolver/blob/master/LICENSE\n\n\nJSON data resolver with support for plugins.\n\n*This is an experimental developer preview release.*\n\n* Free software: BSD license\n* Documentation: https://jsonresolver.readthedocs.io/\n\n\n..\n This file is part of jsonresolver\n Copyright (C) 2015, 2016 CERN.\n\n jsonresolver is free software; you can redistribute it and/or modify\n it under the terms of the Revised BSD License; see LICENSE file for\n more details.\n\nChanges\n=======\n\nVersion 0.3.1 (released 2020-05-06)\n-----------------------------------\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n\n\nVersion 0.3.0 (released 2020-03-12)\n-----------------------------------\n\n- Drops support for Python 2.7\n- Updates testing method\n- Updates python dependencies\n\n\nVersion 0.2.1 (released 2016-04-15)\n-----------------------------------\n\nBug fixes\n~~~~~~~~~\n\n- Fixes issue with exceptions raised during e.g. resolver plugin\n loading being caught and not propagated.\n\nVersion 0.2.0 (released 2016-04-06)\n-----------------------------------\n\nIncompatible changes\n~~~~~~~~~~~~~~~~~~~~\n\n- Changes resolving to be based on hostname without 'http://' prefix.\n\nBug fixes\n~~~~~~~~~\n\n- Fixes issues with the hostname not being matched resulting in the\n same route on two hosts not to work.\n\nVersion 0.1.1 (released 2015-12-11)\n-----------------------------------\n\nImproved features\n~~~~~~~~~~~~~~~~~\n\n- Delays the url_map building until first resolve request.\n\nVersion 0.1.0 (released 2015-11-18)\n-----------------------------------\n\n- Initial public release.", - "release_date": "2020-05-06T13:33:08", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Invenio collaboration", - "email": "info@inveniosoftware.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 1 - Planning", - "Environment :: Web Environment", - "Framework :: Flask", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/inveniosoftware/jsonresolver", - "download_url": "https://files.pythonhosted.org/packages/2c/45/30a9704607f4f868bb44a1f04d133157b8355cc1b99e083e9d7d47df3d24/jsonresolver-0.3.1.tar.gz", - "size": 19766, - "sha1": null, - "md5": "324cc0d097be3a44f1e7234a1a8ad51a", - "sha256": "2d8090f6a1fe92e70f2903f05515415bde7ce46402e528279f865bce4ee689ca", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonresolver/0.3.1/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonresolver@0.3.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "jsonschema", - "version": "4.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "An implementation of JSON Schema validation for Python\n==========\njsonschema\n==========\n\n|PyPI| |Pythons| |CI| |ReadTheDocs| |Precommit|\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/jsonschema.svg\n :alt: PyPI version\n :target: https://pypi.org/project/jsonschema/\n\n.. |Pythons| image:: https://img.shields.io/pypi/pyversions/jsonschema.svg\n :alt: Supported Python versions\n :target: https://pypi.org/project/jsonschema/\n\n.. |CI| image:: https://github.com/Julian/jsonschema/workflows/CI/badge.svg\n :alt: Build status\n :target: https://github.com/Julian/jsonschema/actions?query=workflow%3ACI\n\n.. |ReadTheDocs| image:: https://readthedocs.org/projects/python-jsonschema/badge/?version=stable&style=flat\n :alt: ReadTheDocs status\n :target: https://python-jsonschema.readthedocs.io/en/stable/\n\n.. |Precommit| image:: https://results.pre-commit.ci/badge/github/Julian/jsonschema/main.svg\n :alt: pre-commit.ci status\n :target: https://results.pre-commit.ci/latest/github/Julian/jsonschema/main\n\n\n``jsonschema`` is an implementation of `JSON Schema\n`_ for Python.\n\n.. code-block:: python\n\n >>> from jsonschema import validate\n\n >>> # A sample schema, like what we'd get from json.load()\n >>> schema = {\n ... \"type\" : \"object\",\n ... \"properties\" : {\n ... \"price\" : {\"type\" : \"number\"},\n ... \"name\" : {\"type\" : \"string\"},\n ... },\n ... }\n\n >>> # If no exception is raised by validate(), the instance is valid.\n >>> validate(instance={\"name\" : \"Eggs\", \"price\" : 34.99}, schema=schema)\n\n >>> validate(\n ... instance={\"name\" : \"Eggs\", \"price\" : \"Invalid\"}, schema=schema,\n ... ) # doctest: +IGNORE_EXCEPTION_DETAIL\n Traceback (most recent call last):\n ...\n ValidationError: 'Invalid' is not of type 'number'\n\nIt can also be used from console:\n\n.. code-block:: bash\n\n $ jsonschema --instance sample.json sample.schema\n\nFeatures\n--------\n\n* Partial support for\n `Draft 2020-12 `_ and\n `Draft 2019-09 `_,\n except for ``dynamicRef`` / ``recursiveRef`` and ``$vocabulary`` (in-progress).\n Full support for\n `Draft 7 `_,\n `Draft 6 `_,\n `Draft 4 `_\n and\n `Draft 3 `_\n\n* `Lazy validation `_\n that can iteratively report *all* validation errors.\n\n* `Programmatic querying `_\n of which properties or items failed validation.\n\n\nInstallation\n------------\n\n``jsonschema`` is available on `PyPI `_. You can install using `pip `_:\n\n.. code-block:: bash\n\n $ pip install jsonschema\n\n\nRunning the Test Suite\n----------------------\n\nIf you have ``tox`` installed (perhaps via ``pip install tox`` or your\npackage manager), running ``tox`` in the directory of your source\ncheckout will run ``jsonschema``'s test suite on all of the versions\nof Python ``jsonschema`` supports. If you don't have all of the\nversions that ``jsonschema`` is tested under, you'll likely want to run\nusing ``tox``'s ``--skip-missing-interpreters`` option.\n\nOf course you're also free to just run the tests on a single version with your\nfavorite test runner. The tests live in the ``jsonschema.tests`` package.\n\n\nBenchmarks\n----------\n\n``jsonschema``'s benchmarks make use of `pyperf\n`_. Running them can be done via::\n\n $ tox -e perf\n\n\nCommunity\n---------\n\nThe JSON Schema specification has `a Slack\n`_, with an `invite link on its home page\n`_. Many folks knowledgeable on authoring\nschemas can be found there.\n\nOtherwise, asking questions on Stack Overflow is another means of\ngetting help if you're stuck.\n\nContributing\n------------\n\nI'm Julian Berman.\n\n``jsonschema`` is on `GitHub `_.\n\nGet in touch, via GitHub or otherwise, if you've got something to contribute,\nit'd be most welcome!\n\nYou can also generally find me on Libera (nick: ``Julian``) in various\nchannels, including ``#python``.\n\nIf you feel overwhelmingly grateful, you can also `sponsor me\n`_.\n\nAnd for companies who appreciate ``jsonschema`` and its continued support\nand growth, ``jsonschema`` is also now supportable via `TideLift\n`_.", - "release_date": "2021-09-29T23:21:52", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Julian Berman", - "email": "Julian@GrayVines.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/Julian/jsonschema", - "download_url": "https://files.pythonhosted.org/packages/9c/99/9789c7fd0bb8876a7d624d903195ce11e5618b421bdb1bf7c975d17a9bc3/jsonschema-4.0.0.tar.gz", - "size": 290808, - "sha1": null, - "md5": "c34c3dab1d792063972a3da3abb0e49f", - "sha256": "bc51325b929171791c42ebc1c70b9713eb134d3bb8ebd5474c8b659b15be6d86", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/jsonschema/4.0.0/json", - "datasource_id": null, - "purl": "pkg:pypi/jsonschema@4.0.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "kombu", - "version": "4.6.11", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Messaging library for Python.", - "release_date": "2020-06-24T07:11:18", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ask Solem", - "email": "auvipy@gmail.com, ask@celeryproject.org", - "url": null - } - ], - "keywords": [ - "messaging message amqp rabbitmq redis actor producer consumer", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Communications", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Distributed Computing", - "Topic :: System :: Networking" - ], - "homepage_url": "https://kombu.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/9e/34/3eea6a3a9ff81b0c7ddbdceb22a1ffc1b5907d863f27ca19a68777d2211d/kombu-4.6.11-py2.py3-none-any.whl", - "size": 184431, - "sha1": null, - "md5": "897e94e5d08627c9ac649a007dffb9cc", - "sha256": "be48cdffb54a2194d93ad6533d73f69408486483d189fe9f5990ee24255b0e0a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/kombu/4.6.11/json", - "datasource_id": null, - "purl": "pkg:pypi/kombu@4.6.11" - }, - { - "type": "pypi", - "namespace": null, - "name": "kombu", - "version": "4.6.11", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Messaging library for Python.", - "release_date": "2020-06-24T07:11:39", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ask Solem", - "email": "auvipy@gmail.com, ask@celeryproject.org", - "url": null - } - ], - "keywords": [ - "messaging message amqp rabbitmq redis actor producer consumer", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Communications", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Distributed Computing", - "Topic :: System :: Networking" - ], - "homepage_url": "https://kombu.readthedocs.io", - "download_url": "https://files.pythonhosted.org/packages/45/e1/00f2e3f6f5575aa2f7ee41e2fd884ce573f8146e136bde37daf45ef7ca5e/kombu-4.6.11.tar.gz", - "size": 406968, - "sha1": null, - "md5": "759b31d97fc11c4cb16f6d293723e85e", - "sha256": "ca1b45faac8c0b18493d02a8571792f3c40291cf2bcf1f55afed3d8f3aa7ba74", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/kombu/4.6.11/json", - "datasource_id": null, - "purl": "pkg:pypi/kombu@4.6.11" - }, - { - "type": "pypi", - "namespace": null, - "name": "limits", - "version": "1.6", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Rate limiting utilities\n.. |ci| image:: https://github.com/alisaifee/limits/workflows/CI/badge.svg?branch=master\n :target: https://github.com/alisaifee/limits/actions?query=branch%3Amaster+workflow%3ACI\n.. |codecov| image:: https://codecov.io/gh/alisaifee/limits/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/alisaifee/limits\n.. |pypi| image:: https://img.shields.io/pypi/v/limits.svg?style=flat-square\n :target: https://pypi.python.org/pypi/limits\n.. |license| image:: https://img.shields.io/pypi/l/limits.svg?style=flat-square\n :target: https://pypi.python.org/pypi/limits\n\n*************\nlimits\n*************\n|ci| |codecov| |pypi| |license|\n\n*limits* provides utilities to implement rate limiting using\nvarious strategies and storage backends such as redis & memcached.\n\n*****\nLinks\n*****\n\n* `Documentation `_\n* `Changelog `_", - "release_date": "2021-11-27T18:06:01", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ali-Akber Saifee", - "email": "ali@indydevs.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: MacOS", - "Operating System :: OS Independent", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://limits.readthedocs.org", - "download_url": "https://files.pythonhosted.org/packages/f8/80/3e208b8cfdcf9bf85006097a53c93f53a0c23bc711f1e6abfc180ebb4bca/limits-1.6.tar.gz", - "size": 37248, - "sha1": null, - "md5": "b81f48fd91a85b5ba96c3b3bc771c808", - "sha256": "6c0a57b42647f1141f5a7a0a8479b49e4367c24937a01bd9d4063a595c2dd48a", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/limits/1.6/json", - "datasource_id": null, - "purl": "pkg:pypi/limits@1.6" - }, - { - "type": "pypi", - "namespace": null, - "name": "markupsafe", - "version": "1.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Safely add untrusted strings to HTML/XML markup.\nMarkupSafe\n==========\n\nMarkupSafe implements a text object that escapes characters so it is\nsafe to use in HTML and XML. Characters that have special meanings are\nreplaced so that they display as the actual characters. This mitigates\ninjection attacks, meaning untrusted user input can safely be displayed\non a page.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U MarkupSafe\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nExamples\n--------\n\n.. code-block:: pycon\n\n >>> from markupsafe import Markup, escape\n >>> # escape replaces special characters and wraps in Markup\n >>> escape('')\n Markup(u'<script>alert(document.cookie);</script>')\n >>> # wrap in Markup to mark text \"safe\" and prevent escaping\n >>> Markup('Hello')\n Markup('hello')\n >>> escape(Markup('Hello'))\n Markup('hello')\n >>> # Markup is a text subclass (str on Python 3, unicode on Python 2)\n >>> # methods and operators escape their arguments\n >>> template = Markup(\"Hello %s\")\n >>> template % '\"World\"'\n Markup('Hello "World"')\n\n\nDonate\n------\n\nThe Pallets organization develops and supports MarkupSafe and other\nlibraries that use it. In order to grow the community of contributors\nand users, and allow the maintainers to devote more time to the\nprojects, `please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/markupsafe/\n* Documentation: https://markupsafe.palletsprojects.com/\n* License: `BSD-3-Clause `_\n* Releases: https://pypi.org/project/MarkupSafe/\n* Code: https://github.com/pallets/markupsafe\n* Issue tracker: https://github.com/pallets/markupsafe/issues\n* Test status:\n\n * Linux, Mac: https://travis-ci.org/pallets/markupsafe\n * Windows: https://ci.appveyor.com/project/pallets/markupsafe\n\n* Test coverage: https://codecov.io/gh/pallets/markupsafe", - "release_date": "2019-02-24T01:04:53", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "The Pallets Team", - "email": "contact@palletsprojects.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Text Processing :: Markup :: HTML" - ], - "homepage_url": "https://palletsprojects.com/p/markupsafe/", - "download_url": "https://files.pythonhosted.org/packages/d8/1f/e97c4c6b182e59562f99c207f0f621d15a42fc82a6532a98e0b2d38b7c4e/MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", - "size": 24349, - "sha1": null, - "md5": "01e8f1759663535a494b0098c29bb39c", - "sha256": "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/markupsafe", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/markupsafe/1.1.1/json", - "datasource_id": null, - "purl": "pkg:pypi/markupsafe@1.1.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "markupsafe", - "version": "1.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Safely add untrusted strings to HTML/XML markup.\nMarkupSafe\n==========\n\nMarkupSafe implements a text object that escapes characters so it is\nsafe to use in HTML and XML. Characters that have special meanings are\nreplaced so that they display as the actual characters. This mitigates\ninjection attacks, meaning untrusted user input can safely be displayed\non a page.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U MarkupSafe\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart/\n\n\nExamples\n--------\n\n.. code-block:: pycon\n\n >>> from markupsafe import Markup, escape\n >>> # escape replaces special characters and wraps in Markup\n >>> escape('')\n Markup(u'<script>alert(document.cookie);</script>')\n >>> # wrap in Markup to mark text \"safe\" and prevent escaping\n >>> Markup('Hello')\n Markup('hello')\n >>> escape(Markup('Hello'))\n Markup('hello')\n >>> # Markup is a text subclass (str on Python 3, unicode on Python 2)\n >>> # methods and operators escape their arguments\n >>> template = Markup(\"Hello %s\")\n >>> template % '\"World\"'\n Markup('Hello "World"')\n\n\nDonate\n------\n\nThe Pallets organization develops and supports MarkupSafe and other\nlibraries that use it. In order to grow the community of contributors\nand users, and allow the maintainers to devote more time to the\nprojects, `please donate today`_.\n\n.. _please donate today: https://palletsprojects.com/donate\n\n\nLinks\n-----\n\n* Website: https://palletsprojects.com/p/markupsafe/\n* Documentation: https://markupsafe.palletsprojects.com/\n* License: `BSD-3-Clause `_\n* Releases: https://pypi.org/project/MarkupSafe/\n* Code: https://github.com/pallets/markupsafe\n* Issue tracker: https://github.com/pallets/markupsafe/issues\n* Test status:\n\n * Linux, Mac: https://travis-ci.org/pallets/markupsafe\n * Windows: https://ci.appveyor.com/project/pallets/markupsafe\n\n* Test coverage: https://codecov.io/gh/pallets/markupsafe", - "release_date": "2019-02-24T01:05:32", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "The Pallets Team", - "email": "contact@palletsprojects.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Text Processing :: Markup :: HTML" - ], - "homepage_url": "https://palletsprojects.com/p/markupsafe/", - "download_url": "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz", - "size": 19151, - "sha1": null, - "md5": "43fd756864fe42063068e092e220c57b", - "sha256": "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/markupsafe", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/markupsafe/1.1.1/json", - "datasource_id": null, - "purl": "pkg:pypi/markupsafe@1.1.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "mock", - "version": "3.0.5", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Rolling backport of unittest.mock for all Pythons\nmock is a library for testing in Python. It allows you to replace parts of\nyour system under test with mock objects and make assertions about how they\nhave been used.\n\nmock is now part of the Python standard library, available as `unittest.mock\n`_ in Python 3.3\nonwards.\n\nThis package contains a rolling backport of the standard library mock code\ncompatible with Python 2.7 and 3.4 and up.\n\nPlease see the standard library documentation for more details.\n\n:Homepage: `Mock Homepage`_\n:Download: `Mock on PyPI`_\n:Documentation: `Python Docs`_\n:License: `BSD License`_\n:Support: `Mailing list (testing-in-python@lists.idyll.org)\n `_\n:Code: `GitHub\n `_\n:Issue tracker: `GitHub Issues\n `_\n:Build status:\n |CircleCI|_ |Docs|_\n\n .. |CircleCI| image:: https://circleci.com/gh/testing-cabal/mock/tree/master.svg?style=shield\n .. _CircleCI: https://circleci.com/gh/testing-cabal/mock/tree/master\n\n .. |Docs| image:: https://readthedocs.org/projects/mock/badge/?version=latest\n .. _Docs: http://mock.readthedocs.org/en/latest/\n\n.. _Mock Homepage: http://mock.readthedocs.org/en/latest/\n.. _BSD License: https://github.com/testing-cabal/mock/blob/master/LICENSE.txt\n.. _Python Docs: https://docs.python.org/dev/library/unittest.mock.html\n.. _mock on PyPI: https://pypi.org/project/mock/", - "release_date": "2019-05-07T21:22:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Testing Cabal", - "email": "testing-in-python@lists.idyll.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Testing" - ], - "homepage_url": "http://mock.readthedocs.org/en/latest/", - "download_url": "https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl", - "size": 25027, - "sha1": null, - "md5": "0b273f0d265660e78e96b739c6a813b4", - "sha256": "d157e52d4e5b938c550f39eb2fd15610db062441a9c2747d3dbfa9298211d0f8", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "OSI Approved :: BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/mock/3.0.5/json", - "datasource_id": null, - "purl": "pkg:pypi/mock@3.0.5" - }, - { - "type": "pypi", - "namespace": null, - "name": "mock", - "version": "3.0.5", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Rolling backport of unittest.mock for all Pythons\nmock is a library for testing in Python. It allows you to replace parts of\nyour system under test with mock objects and make assertions about how they\nhave been used.\n\nmock is now part of the Python standard library, available as `unittest.mock\n`_ in Python 3.3\nonwards.\n\nThis package contains a rolling backport of the standard library mock code\ncompatible with Python 2.7 and 3.4 and up.\n\nPlease see the standard library documentation for more details.\n\n:Homepage: `Mock Homepage`_\n:Download: `Mock on PyPI`_\n:Documentation: `Python Docs`_\n:License: `BSD License`_\n:Support: `Mailing list (testing-in-python@lists.idyll.org)\n `_\n:Code: `GitHub\n `_\n:Issue tracker: `GitHub Issues\n `_\n:Build status:\n |CircleCI|_ |Docs|_\n\n .. |CircleCI| image:: https://circleci.com/gh/testing-cabal/mock/tree/master.svg?style=shield\n .. _CircleCI: https://circleci.com/gh/testing-cabal/mock/tree/master\n\n .. |Docs| image:: https://readthedocs.org/projects/mock/badge/?version=latest\n .. _Docs: http://mock.readthedocs.org/en/latest/\n\n.. _Mock Homepage: http://mock.readthedocs.org/en/latest/\n.. _BSD License: https://github.com/testing-cabal/mock/blob/master/LICENSE.txt\n.. _Python Docs: https://docs.python.org/dev/library/unittest.mock.html\n.. _mock on PyPI: https://pypi.org/project/mock/", - "release_date": "2019-05-07T21:22:24", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Testing Cabal", - "email": "testing-in-python@lists.idyll.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Testing" - ], - "homepage_url": "http://mock.readthedocs.org/en/latest/", - "download_url": "https://files.pythonhosted.org/packages/2e/ab/4fe657d78b270aa6a32f027849513b829b41b0f28d9d8d7f8c3d29ea559a/mock-3.0.5.tar.gz", - "size": 28126, - "sha1": null, - "md5": "d834a46d9a129be3e76fdcc99751e82c", - "sha256": "83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "OSI Approved :: BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/mock/3.0.5/json", - "datasource_id": null, - "purl": "pkg:pypi/mock@3.0.5" - }, - { - "type": "pypi", - "namespace": null, - "name": "msgpack", - "version": "1.0.5", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "MessagePack serializer\n# MessagePack for Python\n\n[![Build Status](https://travis-ci.org/msgpack/msgpack-python.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-python)\n[![Documentation Status](https://readthedocs.org/projects/msgpack-python/badge/?version=latest)](https://msgpack-python.readthedocs.io/en/latest/?badge=latest)\n\n## What's this\n\n[MessagePack](https://msgpack.org/) is an efficient binary serialization format.\nIt lets you exchange data among multiple languages like JSON.\nBut it's faster and smaller.\nThis package provides CPython bindings for reading and writing MessagePack data.\n\n\n## Very important notes for existing users\n\n### PyPI package name\n\nPackage name on PyPI was changed from `msgpack-python` to `msgpack` from 0.5.\n\nWhen upgrading from msgpack-0.4 or earlier, do `pip uninstall msgpack-python` before\n`pip install -U msgpack`.\n\n\n### Compatibility with the old format\n\nYou can use `use_bin_type=False` option to pack `bytes`\nobject into raw type in the old msgpack spec, instead of bin type in new msgpack spec.\n\nYou can unpack old msgpack format using `raw=True` option.\nIt unpacks str (raw) type in msgpack into Python bytes.\n\nSee note below for detail.\n\n\n### Major breaking changes in msgpack 1.0\n\n* Python 2\n\n * The extension module does not support Python 2 anymore.\n The pure Python implementation (`msgpack.fallback`) is used for Python 2.\n\n* Packer\n\n * `use_bin_type=True` by default. bytes are encoded in bin type in msgpack.\n **If you are still using Python 2, you must use unicode for all string types.**\n You can use `use_bin_type=False` to encode into old msgpack format.\n * `encoding` option is removed. UTF-8 is used always.\n\n* Unpacker\n\n * `raw=False` by default. It assumes str types are valid UTF-8 string\n and decode them to Python str (unicode) object.\n * `encoding` option is removed. You can use `raw=True` to support old format.\n * Default value of `max_buffer_size` is changed from 0 to 100 MiB.\n * Default value of `strict_map_key` is changed to True to avoid hashdos.\n You need to pass `strict_map_key=False` if you have data which contain map keys\n which type is not bytes or str.\n\n\n## Install\n\n```\n$ pip install msgpack\n```\n\n### Pure Python implementation\n\nThe extension module in msgpack (`msgpack._cmsgpack`) does not support\nPython 2 and PyPy.\n\nBut msgpack provides a pure Python implementation (`msgpack.fallback`)\nfor PyPy and Python 2.\n\n\n\n### Windows\n\nWhen you can't use a binary distribution, you need to install Visual Studio\nor Windows SDK on Windows.\nWithout extension, using pure Python implementation on CPython runs slowly.\n\n\n## How to use\n\nNOTE: In examples below, I use `raw=False` and `use_bin_type=True` for users\nusing msgpack < 1.0. These options are default from msgpack 1.0 so you can omit them.\n\n\n### One-shot pack & unpack\n\nUse `packb` for packing and `unpackb` for unpacking.\nmsgpack provides `dumps` and `loads` as an alias for compatibility with\n`json` and `pickle`.\n\n`pack` and `dump` packs to a file-like object.\n`unpack` and `load` unpacks from a file-like object.\n\n```pycon\n>>> import msgpack\n>>> msgpack.packb([1, 2, 3], use_bin_type=True)\n'\\x93\\x01\\x02\\x03'\n>>> msgpack.unpackb(_, raw=False)\n[1, 2, 3]\n```\n\n`unpack` unpacks msgpack's array to Python's list, but can also unpack to tuple:\n\n```pycon\n>>> msgpack.unpackb(b'\\x93\\x01\\x02\\x03', use_list=False, raw=False)\n(1, 2, 3)\n```\n\nYou should always specify the `use_list` keyword argument for backward compatibility.\nSee performance issues relating to `use_list option`_ below.\n\nRead the docstring for other options.\n\n\n### Streaming unpacking\n\n`Unpacker` is a \"streaming unpacker\". It unpacks multiple objects from one\nstream (or from bytes provided through its `feed` method).\n\n```py\nimport msgpack\nfrom io import BytesIO\n\nbuf = BytesIO()\nfor i in range(100):\n buf.write(msgpack.packb(i, use_bin_type=True))\n\nbuf.seek(0)\n\nunpacker = msgpack.Unpacker(buf, raw=False)\nfor unpacked in unpacker:\n print(unpacked)\n```\n\n\n### Packing/unpacking of custom data type\n\nIt is also possible to pack/unpack custom data types. Here is an example for\n`datetime.datetime`.\n\n```py\nimport datetime\nimport msgpack\n\nuseful_dict = {\n \"id\": 1,\n \"created\": datetime.datetime.now(),\n}\n\ndef decode_datetime(obj):\n if '__datetime__' in obj:\n obj = datetime.datetime.strptime(obj[\"as_str\"], \"%Y%m%dT%H:%M:%S.%f\")\n return obj\n\ndef encode_datetime(obj):\n if isinstance(obj, datetime.datetime):\n return {'__datetime__': True, 'as_str': obj.strftime(\"%Y%m%dT%H:%M:%S.%f\")}\n return obj\n\n\npacked_dict = msgpack.packb(useful_dict, default=encode_datetime, use_bin_type=True)\nthis_dict_again = msgpack.unpackb(packed_dict, object_hook=decode_datetime, raw=False)\n```\n\n`Unpacker`'s `object_hook` callback receives a dict; the\n`object_pairs_hook` callback may instead be used to receive a list of\nkey-value pairs.\n\n\n### Extended types\n\nIt is also possible to pack/unpack custom data types using the **ext** type.\n\n```pycon\n>>> import msgpack\n>>> import array\n>>> def default(obj):\n... if isinstance(obj, array.array) and obj.typecode == 'd':\n... return msgpack.ExtType(42, obj.tostring())\n... raise TypeError(\"Unknown type: %r\" % (obj,))\n...\n>>> def ext_hook(code, data):\n... if code == 42:\n... a = array.array('d')\n... a.fromstring(data)\n... return a\n... return ExtType(code, data)\n...\n>>> data = array.array('d', [1.2, 3.4])\n>>> packed = msgpack.packb(data, default=default, use_bin_type=True)\n>>> unpacked = msgpack.unpackb(packed, ext_hook=ext_hook, raw=False)\n>>> data == unpacked\nTrue\n```\n\n\n### Advanced unpacking control\n\nAs an alternative to iteration, `Unpacker` objects provide `unpack`,\n`skip`, `read_array_header` and `read_map_header` methods. The former two\nread an entire message from the stream, respectively de-serialising and returning\nthe result, or ignoring it. The latter two methods return the number of elements\nin the upcoming container, so that each element in an array, or key-value pair\nin a map, can be unpacked or skipped individually.\n\n\n## Notes\n\n### string and binary type\n\nEarly versions of msgpack didn't distinguish string and binary types.\nThe type for representing both string and binary types was named **raw**.\n\nYou can pack into and unpack from this old spec using `use_bin_type=False`\nand `raw=True` options.\n\n```pycon\n>>> import msgpack\n>>> msgpack.unpackb(msgpack.packb([b'spam', u'eggs'], use_bin_type=False), raw=True)\n[b'spam', b'eggs']\n>>> msgpack.unpackb(msgpack.packb([b'spam', u'eggs'], use_bin_type=True), raw=False)\n[b'spam', 'eggs']\n```\n\n### ext type\n\nTo use the **ext** type, pass `msgpack.ExtType` object to packer.\n\n```pycon\n>>> import msgpack\n>>> packed = msgpack.packb(msgpack.ExtType(42, b'xyzzy'))\n>>> msgpack.unpackb(packed)\nExtType(code=42, data='xyzzy')\n```\n\nYou can use it with `default` and `ext_hook`. See below.\n\n\n### Security\n\nTo unpacking data received from unreliable source, msgpack provides\ntwo security options.\n\n`max_buffer_size` (default: `100*1024*1024`) limits the internal buffer size.\nIt is used to limit the preallocated list size too.\n\n`strict_map_key` (default: `True`) limits the type of map keys to bytes and str.\nWhile msgpack spec doesn't limit the types of the map keys,\nthere is a risk of the hashdos.\nIf you need to support other types for map keys, use `strict_map_key=False`.\n\n\n### Performance tips\n\nCPython's GC starts when growing allocated object.\nThis means unpacking may cause useless GC.\nYou can use `gc.disable()` when unpacking large message.\n\nList is the default sequence type of Python.\nBut tuple is lighter than list.\nYou can use `use_list=False` while unpacking when performance is important.", - "release_date": "2023-03-08T17:50:48", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Inada Naoki", - "email": "songofacandy@gmail.com", - "url": null - } - ], - "keywords": [ - "Intended Audience :: Developers", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://msgpack.org/", - "download_url": "https://files.pythonhosted.org/packages/dc/a1/eba11a0d4b764bc62966a565b470f8c6f38242723ba3057e9b5098678c30/msgpack-1.0.5.tar.gz", - "size": 127834, - "sha1": null, - "md5": "da12a9f0a65a803ec005219f6095d0a3", - "sha256": "c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c", - "sha512": null, - "bug_tracking_url": "https://github.com/msgpack/msgpack-python/issues", - "code_view_url": "https://github.com/msgpack/msgpack-python", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "Apache 2.0", - "classifiers": [ - "License :: OSI Approved :: Apache Software License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/msgpack/1.0.5/json", - "datasource_id": null, - "purl": "pkg:pypi/msgpack@1.0.5" - }, - { - "type": "pypi", - "namespace": null, - "name": "pathlib2", - "version": "2.3.7.post1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Object-oriented filesystem paths\nThe `old pathlib `_\r\nmodule on bitbucket is no longer maintained.\r\nThe goal of pathlib2 is to provide a backport of\r\n`standard pathlib `_\r\nmodule which tracks the standard library module,\r\nso all the newest features of the standard pathlib can be\r\nused also on older Python versions.\r\n\r\nDownload\r\n--------\r\n\r\nStandalone releases are available on PyPI:\r\nhttp://pypi.python.org/pypi/pathlib2/\r\n\r\nDevelopment\r\n-----------\r\n\r\nThe main development takes place in the Python standard library: see\r\nthe `Python developer's guide `_.\r\nIn particular, new features should be submitted to the\r\n`Python bug tracker `_.\r\n\r\nIssues that occur in this backport, but that do not occur not in the\r\nstandard Python pathlib module can be submitted on\r\nthe `pathlib2 bug tracker `_.\r\n\r\nDocumentation\r\n-------------\r\n\r\nRefer to the\r\n`standard pathlib `_\r\ndocumentation.\r\n\r\nKnown Issues\r\n------------\r\n\r\nFor historic reasons, pathlib2 still uses bytes to represent file paths internally.\r\nUnfortunately, on Windows with Python 2.7, the file system encoder (``mcbs``)\r\nhas only poor support for non-ascii characters,\r\nand can silently replace non-ascii characters without warning.\r\nFor example, ``u'\u0442\u0435\u0441\u0442'.encode(sys.getfilesystemencoding())`` results in ``????``\r\nwhich is obviously completely useless.\r\n\r\nTherefore, on Windows with Python 2.7, until this problem is fixed upstream,\r\nunfortunately you cannot rely on pathlib2 to support the full unicode range for filenames.\r\nSee `issue #56 `_ for more details.\r\n\r\n.. |github| image:: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml/badge.svg\r\n :target: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml\r\n :alt: github\r\n\r\n.. |codecov| image:: https://codecov.io/gh/jazzband/pathlib2/branch/develop/graph/badge.svg\r\n :target: https://codecov.io/gh/jazzband/pathlib2\r\n :alt: codecov\r\n\r\n.. |jazzband| image:: https://jazzband.co/static/img/badge.svg\r\n :alt: Jazzband\r\n :target: https://jazzband.co/", - "release_date": "2022-02-10T18:01:07", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Matthias C. M. Troffaes", - "email": "matthias.troffaes@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development :: Libraries", - "Topic :: System :: Filesystems" - ], - "homepage_url": "https://github.com/jazzband/pathlib2", - "download_url": "https://files.pythonhosted.org/packages/09/eb/4af4bcd5b8731366b676192675221c5324394a580dfae469d498313b5c4a/pathlib2-2.3.7.post1-py2.py3-none-any.whl", - "size": 18027, - "sha1": null, - "md5": "d38180feae103da9b2cf41e5d0869ee9", - "sha256": "5266a0fd000452f1b3467d782f079a4343c63aaa119221fbdc4e39577489ca5b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pathlib2/2.3.7.post1/json", - "datasource_id": null, - "purl": "pkg:pypi/pathlib2@2.3.7.post1" - }, - { - "type": "pypi", - "namespace": null, - "name": "pathlib2", - "version": "2.3.7.post1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Object-oriented filesystem paths\nThe `old pathlib `_\r\nmodule on bitbucket is no longer maintained.\r\nThe goal of pathlib2 is to provide a backport of\r\n`standard pathlib `_\r\nmodule which tracks the standard library module,\r\nso all the newest features of the standard pathlib can be\r\nused also on older Python versions.\r\n\r\nDownload\r\n--------\r\n\r\nStandalone releases are available on PyPI:\r\nhttp://pypi.python.org/pypi/pathlib2/\r\n\r\nDevelopment\r\n-----------\r\n\r\nThe main development takes place in the Python standard library: see\r\nthe `Python developer's guide `_.\r\nIn particular, new features should be submitted to the\r\n`Python bug tracker `_.\r\n\r\nIssues that occur in this backport, but that do not occur not in the\r\nstandard Python pathlib module can be submitted on\r\nthe `pathlib2 bug tracker `_.\r\n\r\nDocumentation\r\n-------------\r\n\r\nRefer to the\r\n`standard pathlib `_\r\ndocumentation.\r\n\r\nKnown Issues\r\n------------\r\n\r\nFor historic reasons, pathlib2 still uses bytes to represent file paths internally.\r\nUnfortunately, on Windows with Python 2.7, the file system encoder (``mcbs``)\r\nhas only poor support for non-ascii characters,\r\nand can silently replace non-ascii characters without warning.\r\nFor example, ``u'\u0442\u0435\u0441\u0442'.encode(sys.getfilesystemencoding())`` results in ``????``\r\nwhich is obviously completely useless.\r\n\r\nTherefore, on Windows with Python 2.7, until this problem is fixed upstream,\r\nunfortunately you cannot rely on pathlib2 to support the full unicode range for filenames.\r\nSee `issue #56 `_ for more details.\r\n\r\n.. |github| image:: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml/badge.svg\r\n :target: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml\r\n :alt: github\r\n\r\n.. |codecov| image:: https://codecov.io/gh/jazzband/pathlib2/branch/develop/graph/badge.svg\r\n :target: https://codecov.io/gh/jazzband/pathlib2\r\n :alt: codecov\r\n\r\n.. |jazzband| image:: https://jazzband.co/static/img/badge.svg\r\n :alt: Jazzband\r\n :target: https://jazzband.co/", - "release_date": "2022-02-10T18:01:09", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Matthias C. M. Troffaes", - "email": "matthias.troffaes@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development :: Libraries", - "Topic :: System :: Filesystems" - ], - "homepage_url": "https://github.com/jazzband/pathlib2", - "download_url": "https://files.pythonhosted.org/packages/31/51/99caf463dc7c18eb18dad1fffe465a3cf3ee50ac3d1dccbd1781336fe9c7/pathlib2-2.3.7.post1.tar.gz", - "size": 211190, - "sha1": null, - "md5": "a8a4d8f897e709006a4586cf2102edc6", - "sha256": "9fe0edad898b83c0c3e199c842b27ed216645d2e177757b2dd67384d4113c641", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pathlib2/2.3.7.post1/json", - "datasource_id": null, - "purl": "pkg:pypi/pathlib2@2.3.7.post1" - }, - { - "type": "pypi", - "namespace": null, - "name": "pexpect", - "version": "4.9.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Pexpect allows easy control of interactive console applications.\nPexpect is a pure Python module for spawning child applications; controlling\nthem; and responding to expected patterns in their output. Pexpect works like\nDon Libes' Expect. Pexpect allows your script to spawn a child application and\ncontrol it as if a human were typing commands.\n\nPexpect can be used for automating interactive applications such as ssh, ftp,\npasswd, telnet, etc. It can be used to automate setup scripts for duplicating\nsoftware package installations on different servers. It can be used for\nautomated software testing. Pexpect is in the spirit of Don Libes' Expect, but\nPexpect is pure Python.\n\nThe main features of Pexpect require the pty module in the Python standard\nlibrary, which is only available on Unix-like systems. Some features\u2014waiting\nfor patterns from file descriptors or subprocesses\u2014are also available on\nWindows.", - "release_date": "2023-11-25T06:56:14", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Noah Spurrier; Thomas Kluyver; Jeff Quast", - "email": "noah@noah.org, thomas@kluyver.me.uk, contact@jeffquast.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Quality Assurance", - "Topic :: Software Development :: Testing", - "Topic :: System", - "Topic :: System :: Archiving :: Packaging", - "Topic :: System :: Installation/Setup", - "Topic :: System :: Shells", - "Topic :: System :: Software Distribution", - "Topic :: Terminals" - ], - "homepage_url": "https://pexpect.readthedocs.io/", - "download_url": "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", - "size": 63772, - "sha1": null, - "md5": "cf02fc20a67a1cc8b6fbabdeb6d3c0bf", - "sha256": "7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", - "sha512": null, - "bug_tracking_url": "https://github.com/pexpect/pexpect/issues", - "code_view_url": "https://github.com/pexpect/pexpect", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ISC license", - "classifiers": [ - "License :: OSI Approved :: ISC License (ISCL)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pexpect/4.9.0/json", - "datasource_id": null, - "purl": "pkg:pypi/pexpect@4.9.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "pexpect", - "version": "4.9.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Pexpect allows easy control of interactive console applications.\nPexpect is a pure Python module for spawning child applications; controlling\nthem; and responding to expected patterns in their output. Pexpect works like\nDon Libes' Expect. Pexpect allows your script to spawn a child application and\ncontrol it as if a human were typing commands.\n\nPexpect can be used for automating interactive applications such as ssh, ftp,\npasswd, telnet, etc. It can be used to automate setup scripts for duplicating\nsoftware package installations on different servers. It can be used for\nautomated software testing. Pexpect is in the spirit of Don Libes' Expect, but\nPexpect is pure Python.\n\nThe main features of Pexpect require the pty module in the Python standard\nlibrary, which is only available on Unix-like systems. Some features\u2014waiting\nfor patterns from file descriptors or subprocesses\u2014are also available on\nWindows.", - "release_date": "2023-11-25T09:07:26", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Noah Spurrier; Thomas Kluyver; Jeff Quast", - "email": "noah@noah.org, thomas@kluyver.me.uk, contact@jeffquast.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Quality Assurance", - "Topic :: Software Development :: Testing", - "Topic :: System", - "Topic :: System :: Archiving :: Packaging", - "Topic :: System :: Installation/Setup", - "Topic :: System :: Shells", - "Topic :: System :: Software Distribution", - "Topic :: Terminals" - ], - "homepage_url": "https://pexpect.readthedocs.io/", - "download_url": "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", - "size": 166450, - "sha1": null, - "md5": "f48d48325ee7f1221add0396ea9e2f14", - "sha256": "ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", - "sha512": null, - "bug_tracking_url": "https://github.com/pexpect/pexpect/issues", - "code_view_url": "https://github.com/pexpect/pexpect", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ISC license", - "classifiers": [ - "License :: OSI Approved :: ISC License (ISCL)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pexpect/4.9.0/json", - "datasource_id": null, - "purl": "pkg:pypi/pexpect@4.9.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "pickleshare", - "version": "0.7.5", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Tiny 'shelve'-like database with concurrency support\nPickleShare - a small 'shelve' like datastore with concurrency support\n\nLike shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve,\nmany processes can access the database simultaneously. Changing a value in \ndatabase is immediately visible to other processes accessing the same database.\n\nConcurrency is possible because the values are stored in separate files. Hence\nthe \"database\" is a directory where *all* files are governed by PickleShare.\n\nExample usage::\n\n from pickleshare import *\n db = PickleShareDB('~/testpickleshare')\n db.clear()\n print(\"Should be empty:\",db.items())\n db['hello'] = 15\n db['aku ankka'] = [1,2,313]\n db['paths/are/ok/key'] = [1,(5,46)]\n print(db.keys())\n\nThis module is certainly not ZODB, but can be used for low-load\n(non-mission-critical) situations where tiny code size trumps the \nadvanced features of a \"real\" object database.\n\nInstallation guide: pip install pickleshare", - "release_date": "2018-09-25T19:17:35", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ville Vainio", - "email": "vivainio@gmail.com", - "url": null - } - ], - "keywords": [ - "database persistence pickle ipc shelve", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3" - ], - "homepage_url": "https://github.com/pickleshare/pickleshare", - "download_url": "https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl", - "size": 6877, - "sha1": null, - "md5": "7c68934703b75ccfbaad00d1210f7011", - "sha256": "9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pickleshare/0.7.5/json", - "datasource_id": null, - "purl": "pkg:pypi/pickleshare@0.7.5" - }, - { - "type": "pypi", - "namespace": null, - "name": "pickleshare", - "version": "0.7.5", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Tiny 'shelve'-like database with concurrency support\nPickleShare - a small 'shelve' like datastore with concurrency support\n\nLike shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve,\nmany processes can access the database simultaneously. Changing a value in \ndatabase is immediately visible to other processes accessing the same database.\n\nConcurrency is possible because the values are stored in separate files. Hence\nthe \"database\" is a directory where *all* files are governed by PickleShare.\n\nExample usage::\n\n from pickleshare import *\n db = PickleShareDB('~/testpickleshare')\n db.clear()\n print(\"Should be empty:\",db.items())\n db['hello'] = 15\n db['aku ankka'] = [1,2,313]\n db['paths/are/ok/key'] = [1,(5,46)]\n print(db.keys())\n\nThis module is certainly not ZODB, but can be used for low-load\n(non-mission-critical) situations where tiny code size trumps the \nadvanced features of a \"real\" object database.\n\nInstallation guide: pip install pickleshare", - "release_date": "2018-09-25T19:17:37", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ville Vainio", - "email": "vivainio@gmail.com", - "url": null - } - ], - "keywords": [ - "database persistence pickle ipc shelve", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3" - ], - "homepage_url": "https://github.com/pickleshare/pickleshare", - "download_url": "https://files.pythonhosted.org/packages/d8/b6/df3c1c9b616e9c0edbc4fbab6ddd09df9535849c64ba51fcb6531c32d4d8/pickleshare-0.7.5.tar.gz", - "size": 6161, - "sha1": null, - "md5": "44ab782615894a812ab96669a122a634", - "sha256": "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pickleshare/0.7.5/json", - "datasource_id": null, - "purl": "pkg:pypi/pickleshare@0.7.5" - }, - { - "type": "pypi", - "namespace": null, - "name": "pluggy", - "version": "0.13.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "plugin and hook calling mechanisms for python\n====================================================\npluggy - A minimalist production ready plugin system\n====================================================\n\n|pypi| |conda-forge| |versions| |travis| |appveyor| |gitter| |black| |codecov|\n\nThis is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.\n\nPlease `read the docs`_ to learn more!\n\nA definitive example\n====================\n.. code-block:: python\n\n import pluggy\n\n hookspec = pluggy.HookspecMarker(\"myproject\")\n hookimpl = pluggy.HookimplMarker(\"myproject\")\n\n\n class MySpec(object):\n \"\"\"A hook specification namespace.\n \"\"\"\n\n @hookspec\n def myhook(self, arg1, arg2):\n \"\"\"My special little hook that you can customize.\n \"\"\"\n\n\n class Plugin_1(object):\n \"\"\"A hook implementation namespace.\n \"\"\"\n\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_1.myhook()\")\n return arg1 + arg2\n\n\n class Plugin_2(object):\n \"\"\"A 2nd hook implementation namespace.\n \"\"\"\n\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_2.myhook()\")\n return arg1 - arg2\n\n\n # create a manager and add the spec\n pm = pluggy.PluginManager(\"myproject\")\n pm.add_hookspecs(MySpec)\n\n # register plugins\n pm.register(Plugin_1())\n pm.register(Plugin_2())\n\n # call our ``myhook`` hook\n results = pm.hook.myhook(arg1=1, arg2=2)\n print(results)\n\n\nRunning this directly gets us::\n\n $ python docs/examples/toy-example.py\n inside Plugin_2.myhook()\n inside Plugin_1.myhook()\n [-1, 3]\n\n\n.. badges\n\n.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg\n :target: https://pypi.org/pypi/pluggy\n\n.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg\n :target: https://pypi.org/pypi/pluggy\n\n.. |travis| image:: https://img.shields.io/travis/pytest-dev/pluggy/master.svg\n :target: https://travis-ci.org/pytest-dev/pluggy\n\n.. |appveyor| image:: https://img.shields.io/appveyor/ci/pytestbot/pluggy/master.svg\n :target: https://ci.appveyor.com/project/pytestbot/pluggy\n\n.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg\n :target: https://anaconda.org/conda-forge/pytest\n\n.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg\n :alt: Join the chat at https://gitter.im/pytest-dev/pluggy\n :target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\n.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pytest-dev/pluggy\n :alt: Code coverage Status\n\n.. links\n.. _pytest:\n http://pytest.org\n.. _tox:\n https://tox.readthedocs.org\n.. _devpi:\n http://doc.devpi.net\n.. _read the docs:\n https://pluggy.readthedocs.io/en/latest/\n\n\n=========\nChangelog\n=========\n\n.. towncrier release notes start\n\npluggy 0.13.1 (2019-11-21)\n==========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#236 `_: Improved documentation, especially with regard to references.\n\n\npluggy 0.13.0 (2019-09-10)\n==========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#222 `_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the\n standard library on Python 3.8+.\n\n\npluggy 0.12.0 (2019-05-27)\n==========================\n\nFeatures\n--------\n\n- `#215 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time. This time with ``.egg`` support.\n\n\npluggy 0.11.0 (2019-05-07)\n==========================\n\nBug Fixes\n---------\n\n- `#205 `_: Revert changes made in 0.10.0 release breaking ``.egg`` installs.\n\n\npluggy 0.10.0 (2019-05-07)\n==========================\n\nFeatures\n--------\n\n- `#199 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.\n\n\npluggy 0.9.0 (2019-02-21)\n=========================\n\nFeatures\n--------\n\n- `#189 `_: ``PluginManager.load_setuptools_entrypoints`` now accepts a ``name`` parameter that when given will\n load only entry points with that name.\n\n ``PluginManager.load_setuptools_entrypoints`` also now returns the number of plugins loaded by the\n call, as opposed to the number of all plugins loaded by all calls to this method.\n\n\n\nBug Fixes\n---------\n\n- `#187 `_: Fix internal ``varnames`` function for PyPy3.\n\n\npluggy 0.8.1 (2018-11-09)\n=========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#166 `_: Add ``stacklevel=2`` to implprefix warning so that the reported location of warning is the caller of PluginManager.\n\n\npluggy 0.8.0 (2018-10-15)\n=========================\n\nFeatures\n--------\n\n- `#177 `_: Add ``get_hookimpls()`` method to hook callers.\n\n\n\nTrivial/Internal Changes\n------------------------\n\n- `#165 `_: Add changelog in long package description and documentation.\n\n\n- `#172 `_: Add a test exemplifying the opt-in nature of spec defined args.\n\n\n- `#57 `_: Encapsulate hook specifications in a type for easier introspection.\n\n\npluggy 0.7.1 (2018-07-28)\n=========================\n\nDeprecations and Removals\n-------------------------\n\n- `#116 `_: Deprecate the ``implprefix`` kwarg to ``PluginManager`` and instead\n expect users to start using explicit ``HookimplMarker`` everywhere.\n\n\n\nFeatures\n--------\n\n- `#122 `_: Add ``.plugin`` member to ``PluginValidationError`` to access failing plugin during post-mortem.\n\n\n- `#138 `_: Add per implementation warnings support for hookspecs allowing for both\n deprecation and future warnings of legacy and (future) experimental hooks\n respectively.\n\n\n\nBug Fixes\n---------\n\n- `#110 `_: Fix a bug where ``_HookCaller.call_historic()`` would call the ``proc``\n arg even when the default is ``None`` resulting in a ``TypeError``.\n\n- `#160 `_: Fix problem when handling ``VersionConflict`` errors when loading setuptools plugins.\n\n\n\nImproved Documentation\n----------------------\n\n- `#123 `_: Document how exceptions are handled and how the hook call loop\n terminates immediately on the first error which is then delivered\n to any surrounding wrappers.\n\n\n- `#136 `_: Docs rework including a much better introduction and comprehensive example\n set for new users. A big thanks goes out to @obestwalter for the great work!\n\n\n\nTrivial/Internal Changes\n------------------------\n\n- `#117 `_: Break up the main monolithic package modules into separate modules by concern\n\n\n- `#131 `_: Automate ``setuptools`` wheels building and PyPi upload using TravisCI.\n\n\n- `#153 `_: Reorganize tests more appropriately by modules relating to each\n internal component/feature. This is in an effort to avoid (future)\n duplication and better separation of concerns in the test set.\n\n\n- `#156 `_: Add ``HookImpl.__repr__()`` for better debugging.\n\n\n- `#66 `_: Start using ``towncrier`` and a custom ``tox`` environment to prepare releases!\n\n\npluggy 0.7.0 (Unreleased)\n=========================\n\n* `#160 `_: We discovered a deployment issue so this version was never released to PyPI, only the tag exists.\n\npluggy 0.6.0 (2017-11-24)\n=========================\n\n- Add CI testing for the features, release, and master\n branches of ``pytest`` (PR `#79`_).\n- Document public API for ``_Result`` objects passed to wrappers\n (PR `#85`_).\n- Document and test hook LIFO ordering (PR `#85`_).\n- Turn warnings into errors in test suite (PR `#89`_).\n- Deprecate ``_Result.result`` (PR `#88`_).\n- Convert ``_Multicall`` to a simple function distinguishing it from\n the legacy version (PR `#90`_).\n- Resolve E741 errors (PR `#96`_).\n- Test and bug fix for unmarked hook collection (PRs `#97`_ and\n `#102`_).\n- Drop support for EOL Python 2.6 and 3.3 (PR `#103`_).\n- Fix ``inspect`` based arg introspection on py3.6 (PR `#94`_).\n\n.. _#79: https://github.com/pytest-dev/pluggy/pull/79\n.. _#85: https://github.com/pytest-dev/pluggy/pull/85\n.. _#88: https://github.com/pytest-dev/pluggy/pull/88\n.. _#89: https://github.com/pytest-dev/pluggy/pull/89\n.. _#90: https://github.com/pytest-dev/pluggy/pull/90\n.. _#94: https://github.com/pytest-dev/pluggy/pull/94\n.. _#96: https://github.com/pytest-dev/pluggy/pull/96\n.. _#97: https://github.com/pytest-dev/pluggy/pull/97\n.. _#102: https://github.com/pytest-dev/pluggy/pull/102\n.. _#103: https://github.com/pytest-dev/pluggy/pull/103\n\n\npluggy 0.5.2 (2017-09-06)\n=========================\n\n- fix bug where ``firstresult`` wrappers were being sent an incorrectly configured\n ``_Result`` (a list was set instead of a single value). Add tests to check for\n this as well as ``_Result.force_result()`` behaviour. Thanks to `@tgoodlet`_\n for the PR `#72`_.\n\n- fix incorrect ``getattr`` of ``DeprecationWarning`` from the ``warnings``\n module. Thanks to `@nicoddemus`_ for the PR `#77`_.\n\n- hide ``pytest`` tracebacks in certain core routines. Thanks to\n `@nicoddemus`_ for the PR `#80`_.\n\n.. _#72: https://github.com/pytest-dev/pluggy/pull/72\n.. _#77: https://github.com/pytest-dev/pluggy/pull/77\n.. _#80: https://github.com/pytest-dev/pluggy/pull/80\n\n\npluggy 0.5.1 (2017-08-29)\n=========================\n\n- fix a bug and add tests for case where ``firstresult`` hooks return\n ``None`` results. Thanks to `@RonnyPfannschmidt`_ and `@tgoodlet`_\n for the issue (`#68`_) and PR (`#69`_) respectively.\n\n.. _#69: https://github.com/pytest-dev/pluggy/pull/69\n.. _#68: https://github.com/pytest-dev/pluggy/issues/68\n\n\npluggy 0.5.0 (2017-08-28)\n=========================\n\n- fix bug where callbacks for historic hooks would not be called for\n already registered plugins. Thanks `@vodik`_ for the PR\n and `@hpk42`_ for further fixes.\n\n- fix `#17`_ by considering only actual functions for hooks\n this removes the ability to register arbitrary callable objects\n which at first glance is a reasonable simplification,\n thanks `@RonnyPfannschmidt`_ for report and pr.\n\n- fix `#19`_: allow registering hookspecs from instances. The PR from\n `@tgoodlet`_ also modernized the varnames implementation.\n\n- resolve `#32`_: split up the test set into multiple modules.\n Thanks to `@RonnyPfannschmidt`_ for the PR and `@tgoodlet`_ for\n the initial request.\n\n- resolve `#14`_: add full sphinx docs. Thanks to `@tgoodlet`_ for\n PR `#39`_.\n\n- add hook call mismatch warnings. Thanks to `@tgoodlet`_ for the\n PR `#42`_.\n\n- resolve `#44`_: move to new-style classes. Thanks to `@MichalTHEDUDE`_\n for PR `#46`_.\n\n- add baseline benchmarking/speed tests using ``pytest-benchmark``\n in PR `#54`_. Thanks to `@tgoodlet`_.\n\n- update the README to showcase the API. Thanks to `@tgoodlet`_ for the\n issue and PR `#55`_.\n\n- deprecate ``__multicall__`` and add a faster call loop implementation.\n Thanks to `@tgoodlet`_ for PR `#58`_.\n\n- raise a comprehensible error when a ``hookimpl`` is called with positional\n args. Thanks to `@RonnyPfannschmidt`_ for the issue and `@tgoodlet`_ for\n PR `#60`_.\n\n- fix the ``firstresult`` test making it more complete\n and remove a duplicate of that test. Thanks to `@tgoodlet`_\n for PR `#62`_.\n\n.. _#62: https://github.com/pytest-dev/pluggy/pull/62\n.. _#60: https://github.com/pytest-dev/pluggy/pull/60\n.. _#58: https://github.com/pytest-dev/pluggy/pull/58\n.. _#55: https://github.com/pytest-dev/pluggy/pull/55\n.. _#54: https://github.com/pytest-dev/pluggy/pull/54\n.. _#46: https://github.com/pytest-dev/pluggy/pull/46\n.. _#44: https://github.com/pytest-dev/pluggy/issues/44\n.. _#42: https://github.com/pytest-dev/pluggy/pull/42\n.. _#39: https://github.com/pytest-dev/pluggy/pull/39\n.. _#32: https://github.com/pytest-dev/pluggy/pull/32\n.. _#19: https://github.com/pytest-dev/pluggy/issues/19\n.. _#17: https://github.com/pytest-dev/pluggy/issues/17\n.. _#14: https://github.com/pytest-dev/pluggy/issues/14\n\n\npluggy 0.4.0 (2016-09-25)\n=========================\n\n- add ``has_plugin(name)`` method to pluginmanager. thanks `@nicoddemus`_.\n\n- fix `#11`_: make plugin parsing more resilient against exceptions\n from ``__getattr__`` functions. Thanks `@nicoddemus`_.\n\n- fix issue `#4`_: specific ``HookCallError`` exception for when a hook call\n provides not enough arguments.\n\n- better error message when loading setuptools entrypoints fails\n due to a ``VersionConflict``. Thanks `@blueyed`_.\n\n.. _#11: https://github.com/pytest-dev/pluggy/issues/11\n.. _#4: https://github.com/pytest-dev/pluggy/issues/4\n\n\npluggy 0.3.1 (2015-09-17)\n=========================\n\n- avoid using deprecated-in-python3.5 getargspec method. Thanks\n `@mdboom`_.\n\n\npluggy 0.3.0 (2015-05-07)\n=========================\n\ninitial release\n\n.. contributors\n.. _@hpk42: https://github.com/hpk42\n.. _@tgoodlet: https://github.com/goodboy\n.. _@MichalTHEDUDE: https://github.com/MichalTHEDUDE\n.. _@vodik: https://github.com/vodik\n.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt\n.. _@blueyed: https://github.com/blueyed\n.. _@nicoddemus: https://github.com/nicoddemus\n.. _@mdboom: https://github.com/mdboom", - "release_date": "2019-11-21T20:42:34", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Holger Krekel", - "email": "holger@merlinux.eu", - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Testing", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/pytest-dev/pluggy", - "download_url": "https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl", - "size": 18077, - "sha1": null, - "md5": "32a771dc4df48273d4967e5aab043653", - "sha256": "966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT license", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pluggy/0.13.1/json", - "datasource_id": null, - "purl": "pkg:pypi/pluggy@0.13.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "pluggy", - "version": "0.13.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "plugin and hook calling mechanisms for python\n====================================================\npluggy - A minimalist production ready plugin system\n====================================================\n\n|pypi| |conda-forge| |versions| |travis| |appveyor| |gitter| |black| |codecov|\n\nThis is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.\n\nPlease `read the docs`_ to learn more!\n\nA definitive example\n====================\n.. code-block:: python\n\n import pluggy\n\n hookspec = pluggy.HookspecMarker(\"myproject\")\n hookimpl = pluggy.HookimplMarker(\"myproject\")\n\n\n class MySpec(object):\n \"\"\"A hook specification namespace.\n \"\"\"\n\n @hookspec\n def myhook(self, arg1, arg2):\n \"\"\"My special little hook that you can customize.\n \"\"\"\n\n\n class Plugin_1(object):\n \"\"\"A hook implementation namespace.\n \"\"\"\n\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_1.myhook()\")\n return arg1 + arg2\n\n\n class Plugin_2(object):\n \"\"\"A 2nd hook implementation namespace.\n \"\"\"\n\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_2.myhook()\")\n return arg1 - arg2\n\n\n # create a manager and add the spec\n pm = pluggy.PluginManager(\"myproject\")\n pm.add_hookspecs(MySpec)\n\n # register plugins\n pm.register(Plugin_1())\n pm.register(Plugin_2())\n\n # call our ``myhook`` hook\n results = pm.hook.myhook(arg1=1, arg2=2)\n print(results)\n\n\nRunning this directly gets us::\n\n $ python docs/examples/toy-example.py\n inside Plugin_2.myhook()\n inside Plugin_1.myhook()\n [-1, 3]\n\n\n.. badges\n\n.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg\n :target: https://pypi.org/pypi/pluggy\n\n.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg\n :target: https://pypi.org/pypi/pluggy\n\n.. |travis| image:: https://img.shields.io/travis/pytest-dev/pluggy/master.svg\n :target: https://travis-ci.org/pytest-dev/pluggy\n\n.. |appveyor| image:: https://img.shields.io/appveyor/ci/pytestbot/pluggy/master.svg\n :target: https://ci.appveyor.com/project/pytestbot/pluggy\n\n.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg\n :target: https://anaconda.org/conda-forge/pytest\n\n.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg\n :alt: Join the chat at https://gitter.im/pytest-dev/pluggy\n :target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\n.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pytest-dev/pluggy\n :alt: Code coverage Status\n\n.. links\n.. _pytest:\n http://pytest.org\n.. _tox:\n https://tox.readthedocs.org\n.. _devpi:\n http://doc.devpi.net\n.. _read the docs:\n https://pluggy.readthedocs.io/en/latest/\n\n\n=========\nChangelog\n=========\n\n.. towncrier release notes start\n\npluggy 0.13.1 (2019-11-21)\n==========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#236 `_: Improved documentation, especially with regard to references.\n\n\npluggy 0.13.0 (2019-09-10)\n==========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#222 `_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the\n standard library on Python 3.8+.\n\n\npluggy 0.12.0 (2019-05-27)\n==========================\n\nFeatures\n--------\n\n- `#215 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time. This time with ``.egg`` support.\n\n\npluggy 0.11.0 (2019-05-07)\n==========================\n\nBug Fixes\n---------\n\n- `#205 `_: Revert changes made in 0.10.0 release breaking ``.egg`` installs.\n\n\npluggy 0.10.0 (2019-05-07)\n==========================\n\nFeatures\n--------\n\n- `#199 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.\n\n\npluggy 0.9.0 (2019-02-21)\n=========================\n\nFeatures\n--------\n\n- `#189 `_: ``PluginManager.load_setuptools_entrypoints`` now accepts a ``name`` parameter that when given will\n load only entry points with that name.\n\n ``PluginManager.load_setuptools_entrypoints`` also now returns the number of plugins loaded by the\n call, as opposed to the number of all plugins loaded by all calls to this method.\n\n\n\nBug Fixes\n---------\n\n- `#187 `_: Fix internal ``varnames`` function for PyPy3.\n\n\npluggy 0.8.1 (2018-11-09)\n=========================\n\nTrivial/Internal Changes\n------------------------\n\n- `#166 `_: Add ``stacklevel=2`` to implprefix warning so that the reported location of warning is the caller of PluginManager.\n\n\npluggy 0.8.0 (2018-10-15)\n=========================\n\nFeatures\n--------\n\n- `#177 `_: Add ``get_hookimpls()`` method to hook callers.\n\n\n\nTrivial/Internal Changes\n------------------------\n\n- `#165 `_: Add changelog in long package description and documentation.\n\n\n- `#172 `_: Add a test exemplifying the opt-in nature of spec defined args.\n\n\n- `#57 `_: Encapsulate hook specifications in a type for easier introspection.\n\n\npluggy 0.7.1 (2018-07-28)\n=========================\n\nDeprecations and Removals\n-------------------------\n\n- `#116 `_: Deprecate the ``implprefix`` kwarg to ``PluginManager`` and instead\n expect users to start using explicit ``HookimplMarker`` everywhere.\n\n\n\nFeatures\n--------\n\n- `#122 `_: Add ``.plugin`` member to ``PluginValidationError`` to access failing plugin during post-mortem.\n\n\n- `#138 `_: Add per implementation warnings support for hookspecs allowing for both\n deprecation and future warnings of legacy and (future) experimental hooks\n respectively.\n\n\n\nBug Fixes\n---------\n\n- `#110 `_: Fix a bug where ``_HookCaller.call_historic()`` would call the ``proc``\n arg even when the default is ``None`` resulting in a ``TypeError``.\n\n- `#160 `_: Fix problem when handling ``VersionConflict`` errors when loading setuptools plugins.\n\n\n\nImproved Documentation\n----------------------\n\n- `#123 `_: Document how exceptions are handled and how the hook call loop\n terminates immediately on the first error which is then delivered\n to any surrounding wrappers.\n\n\n- `#136 `_: Docs rework including a much better introduction and comprehensive example\n set for new users. A big thanks goes out to @obestwalter for the great work!\n\n\n\nTrivial/Internal Changes\n------------------------\n\n- `#117 `_: Break up the main monolithic package modules into separate modules by concern\n\n\n- `#131 `_: Automate ``setuptools`` wheels building and PyPi upload using TravisCI.\n\n\n- `#153 `_: Reorganize tests more appropriately by modules relating to each\n internal component/feature. This is in an effort to avoid (future)\n duplication and better separation of concerns in the test set.\n\n\n- `#156 `_: Add ``HookImpl.__repr__()`` for better debugging.\n\n\n- `#66 `_: Start using ``towncrier`` and a custom ``tox`` environment to prepare releases!\n\n\npluggy 0.7.0 (Unreleased)\n=========================\n\n* `#160 `_: We discovered a deployment issue so this version was never released to PyPI, only the tag exists.\n\npluggy 0.6.0 (2017-11-24)\n=========================\n\n- Add CI testing for the features, release, and master\n branches of ``pytest`` (PR `#79`_).\n- Document public API for ``_Result`` objects passed to wrappers\n (PR `#85`_).\n- Document and test hook LIFO ordering (PR `#85`_).\n- Turn warnings into errors in test suite (PR `#89`_).\n- Deprecate ``_Result.result`` (PR `#88`_).\n- Convert ``_Multicall`` to a simple function distinguishing it from\n the legacy version (PR `#90`_).\n- Resolve E741 errors (PR `#96`_).\n- Test and bug fix for unmarked hook collection (PRs `#97`_ and\n `#102`_).\n- Drop support for EOL Python 2.6 and 3.3 (PR `#103`_).\n- Fix ``inspect`` based arg introspection on py3.6 (PR `#94`_).\n\n.. _#79: https://github.com/pytest-dev/pluggy/pull/79\n.. _#85: https://github.com/pytest-dev/pluggy/pull/85\n.. _#88: https://github.com/pytest-dev/pluggy/pull/88\n.. _#89: https://github.com/pytest-dev/pluggy/pull/89\n.. _#90: https://github.com/pytest-dev/pluggy/pull/90\n.. _#94: https://github.com/pytest-dev/pluggy/pull/94\n.. _#96: https://github.com/pytest-dev/pluggy/pull/96\n.. _#97: https://github.com/pytest-dev/pluggy/pull/97\n.. _#102: https://github.com/pytest-dev/pluggy/pull/102\n.. _#103: https://github.com/pytest-dev/pluggy/pull/103\n\n\npluggy 0.5.2 (2017-09-06)\n=========================\n\n- fix bug where ``firstresult`` wrappers were being sent an incorrectly configured\n ``_Result`` (a list was set instead of a single value). Add tests to check for\n this as well as ``_Result.force_result()`` behaviour. Thanks to `@tgoodlet`_\n for the PR `#72`_.\n\n- fix incorrect ``getattr`` of ``DeprecationWarning`` from the ``warnings``\n module. Thanks to `@nicoddemus`_ for the PR `#77`_.\n\n- hide ``pytest`` tracebacks in certain core routines. Thanks to\n `@nicoddemus`_ for the PR `#80`_.\n\n.. _#72: https://github.com/pytest-dev/pluggy/pull/72\n.. _#77: https://github.com/pytest-dev/pluggy/pull/77\n.. _#80: https://github.com/pytest-dev/pluggy/pull/80\n\n\npluggy 0.5.1 (2017-08-29)\n=========================\n\n- fix a bug and add tests for case where ``firstresult`` hooks return\n ``None`` results. Thanks to `@RonnyPfannschmidt`_ and `@tgoodlet`_\n for the issue (`#68`_) and PR (`#69`_) respectively.\n\n.. _#69: https://github.com/pytest-dev/pluggy/pull/69\n.. _#68: https://github.com/pytest-dev/pluggy/issues/68\n\n\npluggy 0.5.0 (2017-08-28)\n=========================\n\n- fix bug where callbacks for historic hooks would not be called for\n already registered plugins. Thanks `@vodik`_ for the PR\n and `@hpk42`_ for further fixes.\n\n- fix `#17`_ by considering only actual functions for hooks\n this removes the ability to register arbitrary callable objects\n which at first glance is a reasonable simplification,\n thanks `@RonnyPfannschmidt`_ for report and pr.\n\n- fix `#19`_: allow registering hookspecs from instances. The PR from\n `@tgoodlet`_ also modernized the varnames implementation.\n\n- resolve `#32`_: split up the test set into multiple modules.\n Thanks to `@RonnyPfannschmidt`_ for the PR and `@tgoodlet`_ for\n the initial request.\n\n- resolve `#14`_: add full sphinx docs. Thanks to `@tgoodlet`_ for\n PR `#39`_.\n\n- add hook call mismatch warnings. Thanks to `@tgoodlet`_ for the\n PR `#42`_.\n\n- resolve `#44`_: move to new-style classes. Thanks to `@MichalTHEDUDE`_\n for PR `#46`_.\n\n- add baseline benchmarking/speed tests using ``pytest-benchmark``\n in PR `#54`_. Thanks to `@tgoodlet`_.\n\n- update the README to showcase the API. Thanks to `@tgoodlet`_ for the\n issue and PR `#55`_.\n\n- deprecate ``__multicall__`` and add a faster call loop implementation.\n Thanks to `@tgoodlet`_ for PR `#58`_.\n\n- raise a comprehensible error when a ``hookimpl`` is called with positional\n args. Thanks to `@RonnyPfannschmidt`_ for the issue and `@tgoodlet`_ for\n PR `#60`_.\n\n- fix the ``firstresult`` test making it more complete\n and remove a duplicate of that test. Thanks to `@tgoodlet`_\n for PR `#62`_.\n\n.. _#62: https://github.com/pytest-dev/pluggy/pull/62\n.. _#60: https://github.com/pytest-dev/pluggy/pull/60\n.. _#58: https://github.com/pytest-dev/pluggy/pull/58\n.. _#55: https://github.com/pytest-dev/pluggy/pull/55\n.. _#54: https://github.com/pytest-dev/pluggy/pull/54\n.. _#46: https://github.com/pytest-dev/pluggy/pull/46\n.. _#44: https://github.com/pytest-dev/pluggy/issues/44\n.. _#42: https://github.com/pytest-dev/pluggy/pull/42\n.. _#39: https://github.com/pytest-dev/pluggy/pull/39\n.. _#32: https://github.com/pytest-dev/pluggy/pull/32\n.. _#19: https://github.com/pytest-dev/pluggy/issues/19\n.. _#17: https://github.com/pytest-dev/pluggy/issues/17\n.. _#14: https://github.com/pytest-dev/pluggy/issues/14\n\n\npluggy 0.4.0 (2016-09-25)\n=========================\n\n- add ``has_plugin(name)`` method to pluginmanager. thanks `@nicoddemus`_.\n\n- fix `#11`_: make plugin parsing more resilient against exceptions\n from ``__getattr__`` functions. Thanks `@nicoddemus`_.\n\n- fix issue `#4`_: specific ``HookCallError`` exception for when a hook call\n provides not enough arguments.\n\n- better error message when loading setuptools entrypoints fails\n due to a ``VersionConflict``. Thanks `@blueyed`_.\n\n.. _#11: https://github.com/pytest-dev/pluggy/issues/11\n.. _#4: https://github.com/pytest-dev/pluggy/issues/4\n\n\npluggy 0.3.1 (2015-09-17)\n=========================\n\n- avoid using deprecated-in-python3.5 getargspec method. Thanks\n `@mdboom`_.\n\n\npluggy 0.3.0 (2015-05-07)\n=========================\n\ninitial release\n\n.. contributors\n.. _@hpk42: https://github.com/hpk42\n.. _@tgoodlet: https://github.com/goodboy\n.. _@MichalTHEDUDE: https://github.com/MichalTHEDUDE\n.. _@vodik: https://github.com/vodik\n.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt\n.. _@blueyed: https://github.com/blueyed\n.. _@nicoddemus: https://github.com/nicoddemus\n.. _@mdboom: https://github.com/mdboom", - "release_date": "2019-11-21T20:42:37", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Holger Krekel", - "email": "holger@merlinux.eu", - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Testing", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/pytest-dev/pluggy", - "download_url": "https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14/pluggy-0.13.1.tar.gz", - "size": 57962, - "sha1": null, - "md5": "7f610e28b8b34487336b585a3dfb803d", - "sha256": "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT license", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pluggy/0.13.1/json", - "datasource_id": null, - "purl": "pkg:pypi/pluggy@0.13.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "prompt-toolkit", - "version": "1.0.18", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Library for building powerful interactive command lines in Python\nPython Prompt Toolkit\n=====================\n\n|Build Status| |PyPI|\n\n``prompt_toolkit`` is a library for building powerful interactive command lines\nand terminal applications in Python.\n\nRead the `documentation on readthedocs\n`_.\n\n\nPtpython\n********\n\n`ptpython `_ is an interactive\nPython Shell, build on top of prompt_toolkit.\n\n.. image :: https://github.com/jonathanslenders/python-prompt-toolkit/raw/master/docs/images/ptpython.png\n\n\nprompt_toolkit features\n***********************\n\n``prompt_toolkit`` could be a replacement for `GNU readline\n`_, but it can be much\nmore than that.\n\nSome features:\n\n- Pure Python.\n- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)\n- Multi-line input editing.\n- Advanced code completion.\n- Both Emacs and Vi key bindings. (Similar to readline.)\n- Even some advanced Vi functionality, like named registers and digraphs.\n- Reverse and forward incremental search.\n- Runs on all Python versions from 2.6 up to 3.5.\n- Works well with Unicode double width characters. (Chinese input.)\n- Selecting text for copy/paste. (Both Emacs and Vi style.)\n- Support for `bracketed paste `_.\n- Mouse support for cursor positioning and scrolling.\n- Auto suggestions. (Like `fish shell `_.)\n- Multiple input buffers.\n- No global state.\n- Lightweight, the only dependencies are Pygments, six and wcwidth.\n- Runs on Linux, OS X, FreeBSD, OpenBSD and Windows systems.\n- And much more...\n\nFeel free to create tickets for bugs and feature requests, and create pull\nrequests if you have nice patches that you would like to share with others.\n\n\nAbout Windows support\n*********************\n\n``prompt_toolkit`` is cross platform, and everything that you build on top\nshould run fine on both Unix and Windows systems. On Windows, it uses a\ndifferent event loop (``WaitForMultipleObjects`` instead of ``select``), and\nanother input and output system. (Win32 APIs instead of pseudo-terminals and\nVT100.)\n\nIt's worth noting that the implementation is a \"best effort of what is\npossible\". Both Unix and Windows terminals have their limitations. But in\ngeneral, the Unix experience will still be a little better.\n\nFor Windows, it's recommended to use either `cmder\n`_ or `conemu `_.\n\n\nInstallation\n************\n\n::\n\n pip install prompt_toolkit\n\nFor Conda, do:\n\n::\n\n conda install -c https://conda.anaconda.org/conda-forge prompt_toolkit\n\n\nGetting started\n***************\n\nThe most simple example of the library would look like this:\n\n.. code:: python\n\n from prompt_toolkit import prompt\n\n if __name__ == '__main__':\n answer = prompt('Give me some input: ')\n print('You said: %s' % answer)\n\nFor more complex examples, have a look in the ``examples`` directory. All\nexamples are chosen to demonstrate only one thing. Also, don't be afraid to\nlook at the source code. The implementation of the ``prompt`` function could be\na good start.\n\nNote for Python 2: all strings are expected to be unicode strings. So, either\nput a small ``u`` in front of every string or put ``from __future__ import\nunicode_literals`` at the start of the above example.\n\n\nProjects using prompt_toolkit\n*****************************\n\nShells:\n\n- `ptpython `_: Python REPL\n- `ptpdb `_: Python debugger (pdb replacement)\n- `pgcli `_: Postgres client.\n- `mycli `_: MySql client.\n- `wharfee `_: A Docker command line.\n- `xonsh `_: A Python-ish, BASHwards-compatible shell.\n- `saws `_: A Supercharged AWS Command Line Interface.\n- `cycli `_: A Command Line Interface for Cypher.\n- `crash `_: Crate command line client.\n- `vcli `_: Vertica client.\n- `aws-shell `_: An integrated shell for working with the AWS CLI.\n- `softlayer-python `_: A command-line interface to manage various SoftLayer products and services.\n- `ipython `_: The IPython REPL\n- `click-repl `_: Subcommand REPL for click apps.\n- `haxor-news `_: A Hacker News CLI.\n- `gitsome `_: A Git/Shell Autocompleter with GitHub Integration.\n- `http-prompt `_: An interactive command-line HTTP client.\n- `coconut `_: Functional programming in Python.\n- `Ergonomica `_: A Bash alternative written in Python.\n- `Kube-shell `_: Kubernetes shell: An integrated shell for working with the Kubernetes CLI\n\nFull screen applications:\n\n- `pymux `_: A terminal multiplexer (like tmux) in pure Python.\n- `pyvim `_: A Vim clone in pure Python.\n\n(Want your own project to be listed here? Please create a GitHub issue.)\n\n\nPhilosophy\n**********\n\nThe source code of ``prompt_toolkit`` should be readable, concise and\nefficient. We prefer short functions focussing each on one task and for which\nthe input and output types are clearly specified. We mostly prefer composition\nover inheritance, because inheritance can result in too much functionality in\nthe same object. We prefer immutable objects where possible (objects don't\nchange after initialisation). Reusability is important. We absolutely refrain\nfrom having a changing global state, it should be possible to have multiple\nindependent instances of the same code in the same process. The architecture\nshould be layered: the lower levels operate on primitive operations and data\nstructures giving -- when correctly combined -- all the possible flexibility;\nwhile at the higher level, there should be a simpler API, ready-to-use and\nsufficient for most use cases. Thinking about algorithms and efficiency is\nimportant, but avoid premature optimization.\n\n\nSpecial thanks to\n*****************\n\n- `Pygments `_: Syntax highlighter.\n- `wcwidth `_: Determine columns needed for a wide characters.\n\n.. |Build Status| image:: https://api.travis-ci.org/jonathanslenders/python-prompt-toolkit.svg?branch=master\n :target: https://travis-ci.org/jonathanslenders/python-prompt-toolkit#\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/prompt_toolkit.svg\n :target: https://pypi.python.org/pypi/prompt-toolkit/\n :alt: Latest Version", - "release_date": "2019-10-03T20:13:54", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Jonathan Slenders", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Topic :: Software Development" - ], - "homepage_url": "https://github.com/jonathanslenders/python-prompt-toolkit", - "download_url": "https://files.pythonhosted.org/packages/9d/d2/2f099b5cd62dab819ce7a9f1431c09a9032fbfbb6474f442722e88935376/prompt_toolkit-1.0.18-py2-none-any.whl", - "size": 245351, - "sha1": null, - "md5": "2b38fc7f9d79010c645c538e5951540c", - "sha256": "f7eec66105baf40eda9ab026cd8b2e251337eea8d111196695d82e0c5f0af852", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/prompt-toolkit/1.0.18/json", - "datasource_id": null, - "purl": "pkg:pypi/prompt-toolkit@1.0.18" - }, - { - "type": "pypi", - "namespace": null, - "name": "prompt-toolkit", - "version": "1.0.18", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Library for building powerful interactive command lines in Python\nPython Prompt Toolkit\n=====================\n\n|Build Status| |PyPI|\n\n``prompt_toolkit`` is a library for building powerful interactive command lines\nand terminal applications in Python.\n\nRead the `documentation on readthedocs\n`_.\n\n\nPtpython\n********\n\n`ptpython `_ is an interactive\nPython Shell, build on top of prompt_toolkit.\n\n.. image :: https://github.com/jonathanslenders/python-prompt-toolkit/raw/master/docs/images/ptpython.png\n\n\nprompt_toolkit features\n***********************\n\n``prompt_toolkit`` could be a replacement for `GNU readline\n`_, but it can be much\nmore than that.\n\nSome features:\n\n- Pure Python.\n- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)\n- Multi-line input editing.\n- Advanced code completion.\n- Both Emacs and Vi key bindings. (Similar to readline.)\n- Even some advanced Vi functionality, like named registers and digraphs.\n- Reverse and forward incremental search.\n- Runs on all Python versions from 2.6 up to 3.5.\n- Works well with Unicode double width characters. (Chinese input.)\n- Selecting text for copy/paste. (Both Emacs and Vi style.)\n- Support for `bracketed paste `_.\n- Mouse support for cursor positioning and scrolling.\n- Auto suggestions. (Like `fish shell `_.)\n- Multiple input buffers.\n- No global state.\n- Lightweight, the only dependencies are Pygments, six and wcwidth.\n- Runs on Linux, OS X, FreeBSD, OpenBSD and Windows systems.\n- And much more...\n\nFeel free to create tickets for bugs and feature requests, and create pull\nrequests if you have nice patches that you would like to share with others.\n\n\nAbout Windows support\n*********************\n\n``prompt_toolkit`` is cross platform, and everything that you build on top\nshould run fine on both Unix and Windows systems. On Windows, it uses a\ndifferent event loop (``WaitForMultipleObjects`` instead of ``select``), and\nanother input and output system. (Win32 APIs instead of pseudo-terminals and\nVT100.)\n\nIt's worth noting that the implementation is a \"best effort of what is\npossible\". Both Unix and Windows terminals have their limitations. But in\ngeneral, the Unix experience will still be a little better.\n\nFor Windows, it's recommended to use either `cmder\n`_ or `conemu `_.\n\n\nInstallation\n************\n\n::\n\n pip install prompt_toolkit\n\nFor Conda, do:\n\n::\n\n conda install -c https://conda.anaconda.org/conda-forge prompt_toolkit\n\n\nGetting started\n***************\n\nThe most simple example of the library would look like this:\n\n.. code:: python\n\n from prompt_toolkit import prompt\n\n if __name__ == '__main__':\n answer = prompt('Give me some input: ')\n print('You said: %s' % answer)\n\nFor more complex examples, have a look in the ``examples`` directory. All\nexamples are chosen to demonstrate only one thing. Also, don't be afraid to\nlook at the source code. The implementation of the ``prompt`` function could be\na good start.\n\nNote for Python 2: all strings are expected to be unicode strings. So, either\nput a small ``u`` in front of every string or put ``from __future__ import\nunicode_literals`` at the start of the above example.\n\n\nProjects using prompt_toolkit\n*****************************\n\nShells:\n\n- `ptpython `_: Python REPL\n- `ptpdb `_: Python debugger (pdb replacement)\n- `pgcli `_: Postgres client.\n- `mycli `_: MySql client.\n- `wharfee `_: A Docker command line.\n- `xonsh `_: A Python-ish, BASHwards-compatible shell.\n- `saws `_: A Supercharged AWS Command Line Interface.\n- `cycli `_: A Command Line Interface for Cypher.\n- `crash `_: Crate command line client.\n- `vcli `_: Vertica client.\n- `aws-shell `_: An integrated shell for working with the AWS CLI.\n- `softlayer-python `_: A command-line interface to manage various SoftLayer products and services.\n- `ipython `_: The IPython REPL\n- `click-repl `_: Subcommand REPL for click apps.\n- `haxor-news `_: A Hacker News CLI.\n- `gitsome `_: A Git/Shell Autocompleter with GitHub Integration.\n- `http-prompt `_: An interactive command-line HTTP client.\n- `coconut `_: Functional programming in Python.\n- `Ergonomica `_: A Bash alternative written in Python.\n- `Kube-shell `_: Kubernetes shell: An integrated shell for working with the Kubernetes CLI\n\nFull screen applications:\n\n- `pymux `_: A terminal multiplexer (like tmux) in pure Python.\n- `pyvim `_: A Vim clone in pure Python.\n\n(Want your own project to be listed here? Please create a GitHub issue.)\n\n\nPhilosophy\n**********\n\nThe source code of ``prompt_toolkit`` should be readable, concise and\nefficient. We prefer short functions focussing each on one task and for which\nthe input and output types are clearly specified. We mostly prefer composition\nover inheritance, because inheritance can result in too much functionality in\nthe same object. We prefer immutable objects where possible (objects don't\nchange after initialisation). Reusability is important. We absolutely refrain\nfrom having a changing global state, it should be possible to have multiple\nindependent instances of the same code in the same process. The architecture\nshould be layered: the lower levels operate on primitive operations and data\nstructures giving -- when correctly combined -- all the possible flexibility;\nwhile at the higher level, there should be a simpler API, ready-to-use and\nsufficient for most use cases. Thinking about algorithms and efficiency is\nimportant, but avoid premature optimization.\n\n\nSpecial thanks to\n*****************\n\n- `Pygments `_: Syntax highlighter.\n- `wcwidth `_: Determine columns needed for a wide characters.\n\n.. |Build Status| image:: https://api.travis-ci.org/jonathanslenders/python-prompt-toolkit.svg?branch=master\n :target: https://travis-ci.org/jonathanslenders/python-prompt-toolkit#\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/prompt_toolkit.svg\n :target: https://pypi.python.org/pypi/prompt-toolkit/\n :alt: Latest Version", - "release_date": "2019-10-03T20:13:52", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Jonathan Slenders", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Topic :: Software Development" - ], - "homepage_url": "https://github.com/jonathanslenders/python-prompt-toolkit", - "download_url": "https://files.pythonhosted.org/packages/c5/64/c170e5b1913b540bf0c8ab7676b21fdd1d25b65ddeb10025c6ca43cccd4c/prompt_toolkit-1.0.18.tar.gz", - "size": 242335, - "sha1": null, - "md5": "b3f4c92b4a0a7039d8f59d150ee439e2", - "sha256": "dd4fca02c8069497ad931a2d09914c6b0d1b50151ce876bc15bde4c747090126", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/prompt-toolkit/1.0.18/json", - "datasource_id": null, - "purl": "pkg:pypi/prompt-toolkit@1.0.18" - }, - { - "type": "pypi", - "namespace": null, - "name": "ptyprocess", - "version": "0.7.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Run a subprocess in a pseudo terminal\nLaunch a subprocess in a pseudo terminal (pty), and interact with both the\nprocess and its pty.\n\nSometimes, piping stdin and stdout is not enough. There might be a password\nprompt that doesn't read from stdin, output that changes when it's going to a\npipe rather than a terminal, or curses-style interfaces that rely on a terminal.\nIf you need to automate these things, running the process in a pseudo terminal\n(pty) is the answer.\n\nInterface::\n\n p = PtyProcessUnicode.spawn(['python'])\n p.read(20)\n p.write('6+6\\n')\n p.read(20)", - "release_date": "2020-12-28T15:15:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Thomas Kluyver", - "email": "thomas@kluyver.me.uk", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Topic :: Terminals" - ], - "homepage_url": "https://github.com/pexpect/ptyprocess", - "download_url": "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", - "size": 13993, - "sha1": null, - "md5": "99ec04989f767cb72ac82ce671b561b0", - "sha256": "4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: ISC License (ISCL)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ptyprocess/0.7.0/json", - "datasource_id": null, - "purl": "pkg:pypi/ptyprocess@0.7.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "ptyprocess", - "version": "0.7.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Run a subprocess in a pseudo terminal\nLaunch a subprocess in a pseudo terminal (pty), and interact with both the\nprocess and its pty.\n\nSometimes, piping stdin and stdout is not enough. There might be a password\nprompt that doesn't read from stdin, output that changes when it's going to a\npipe rather than a terminal, or curses-style interfaces that rely on a terminal.\nIf you need to automate these things, running the process in a pseudo terminal\n(pty) is the answer.\n\nInterface::\n\n p = PtyProcessUnicode.spawn(['python'])\n p.read(20)\n p.write('6+6\\n')\n p.read(20)", - "release_date": "2020-12-28T15:15:30", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Thomas Kluyver", - "email": "thomas@kluyver.me.uk", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Topic :: Terminals" - ], - "homepage_url": "https://github.com/pexpect/ptyprocess", - "download_url": "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", - "size": 70762, - "sha1": null, - "md5": "9da200c397cb1752209a6b718b6cfc68", - "sha256": "5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: ISC License (ISCL)" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ptyprocess/0.7.0/json", - "datasource_id": null, - "purl": "pkg:pypi/ptyprocess@0.7.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "pycparser", - "version": "2.21", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", - "release_date": "2021-11-06T12:50:13", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Eli Bendersky", - "email": "eliben@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl", - "size": 118697, - "sha1": null, - "md5": "763d265dfc20860dfbb4c81458400d03", - "sha256": "8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.21/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.21" - }, - { - "type": "pypi", - "namespace": null, - "name": "pycparser", - "version": "2.21", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "C parser in Python\npycparser is a complete parser of the C language, written in\npure Python using the PLY parsing library.\nIt parses C code into an AST and can serve as a front-end for\nC compilers or analysis tools.", - "release_date": "2021-11-06T12:48:46", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Eli Bendersky", - "email": "eliben@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/eliben/pycparser", - "download_url": "https://files.pythonhosted.org/packages/5e/0b/95d387f5f4433cb0f53ff7ad859bd2c6051051cebbb564f139a999ab46de/pycparser-2.21.tar.gz", - "size": 170877, - "sha1": null, - "md5": "48f7d743bf018f7bb2ffc5fb976d1492", - "sha256": "e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pycparser/2.21/json", - "datasource_id": null, - "purl": "pkg:pypi/pycparser@2.21" - }, - { - "type": "pypi", - "namespace": null, - "name": "pygments", - "version": "2.5.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Pygments\n~~~~~~~~\n\nPygments is a syntax highlighting package written in Python.\n\nIt is a generic syntax highlighter suitable for use in code hosting, forums,\nwikis or other applications that need to prettify source code. Highlights\nare:\n\n* a wide range of over 300 languages and other text formats is supported\n* special attention is paid to details, increasing quality by a fair amount\n* support for new languages and formats are added easily\n* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image formats that PIL supports and ANSI sequences\n* it is usable as a command-line tool and as a library\n\n:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.\n:license: BSD, see LICENSE for details.", - "release_date": "2019-11-29T05:27:22", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Georg Brandl", - "email": "georg@python.org", - "url": null - } - ], - "keywords": [ - "syntax highlighting", - "Development Status :: 6 - Mature", - "Intended Audience :: Developers", - "Intended Audience :: End Users/Desktop", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Filters", - "Topic :: Utilities" - ], - "homepage_url": "http://pygments.org/", - "download_url": "https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl", - "size": 896106, - "sha1": null, - "md5": "044bef3bf7f2ced9d8df7be47d3cfbde", - "sha256": "2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pygments/2.5.2/json", - "datasource_id": null, - "purl": "pkg:pypi/pygments@2.5.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "pygments", - "version": "2.5.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Pygments\n~~~~~~~~\n\nPygments is a syntax highlighting package written in Python.\n\nIt is a generic syntax highlighter suitable for use in code hosting, forums,\nwikis or other applications that need to prettify source code. Highlights\nare:\n\n* a wide range of over 300 languages and other text formats is supported\n* special attention is paid to details, increasing quality by a fair amount\n* support for new languages and formats are added easily\n* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image formats that PIL supports and ANSI sequences\n* it is usable as a command-line tool and as a library\n\n:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.\n:license: BSD, see LICENSE for details.", - "release_date": "2019-11-29T05:27:46", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Georg Brandl", - "email": "georg@python.org", - "url": null - } - ], - "keywords": [ - "syntax highlighting", - "Development Status :: 6 - Mature", - "Intended Audience :: Developers", - "Intended Audience :: End Users/Desktop", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Filters", - "Topic :: Utilities" - ], - "homepage_url": "http://pygments.org/", - "download_url": "https://files.pythonhosted.org/packages/cb/9f/27d4844ac5bf158a33900dbad7985951e2910397998e85712da03ce125f0/Pygments-2.5.2.tar.gz", - "size": 20263984, - "sha1": null, - "md5": "465a35559863089d959d783a69f79b9f", - "sha256": "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pygments/2.5.2/json", - "datasource_id": null, - "purl": "pkg:pypi/pygments@2.5.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "pytz", - "version": "2025.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", - "release_date": "2025-03-25T02:24:58", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stuart Bishop", - "email": "stuart@stuartbishop.net", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Stuart Bishop", - "email": "stuart@stuartbishop.net", - "url": null - } - ], - "keywords": [ - "timezone", - "tzinfo", - "datetime", - "olson", - "time", - "Development Status :: 6 - Mature", - "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.4", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.1", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "http://pythonhosted.org/pytz", - "download_url": "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", - "size": 509225, - "sha1": null, - "md5": "51ad498990b93bab1efdb6ecce983474", - "sha256": "5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pytz/2025.2/json", - "datasource_id": null, - "purl": "pkg:pypi/pytz@2025.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "pytz", - "version": "2025.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "World timezone definitions, modern and historical\npytz - World Timezone Definitions for Python\n============================================\n\n:Author: Stuart Bishop \n\nIntroduction\n~~~~~~~~~~~~\n\npytz brings the Olson tz database into Python. This library allows\naccurate and cross platform timezone calculations using Python 2.4\nor higher. It also solves the issue of ambiguous times at the end\nof daylight saving time, which you can read more about in the Python\nLibrary Reference (``datetime.tzinfo``).\n\nAlmost all of the Olson timezones are supported.\n\n.. note::\n\n Projects using Python 3.9 or later should be using the support\n now included as part of the standard library, and third party\n packages work with it such as `tzdata `_.\n pytz offers no advantages beyond backwards compatibility with\n code written for earlier versions of Python.\n\n.. note::\n\n This library differs from the documented Python API for\n tzinfo implementations; if you want to create local wallclock\n times you need to use the ``localize()`` method documented in this\n document. In addition, if you perform date arithmetic on local\n times that cross DST boundaries, the result may be in an incorrect\n timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get\n 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A\n ``normalize()`` method is provided to correct this. Unfortunately these\n issues cannot be resolved without modifying the Python datetime\n implementation (see PEP-431).\n\n\nInstallation\n~~~~~~~~~~~~\n\nThis package can either be installed using ``pip`` or from a tarball using the\nstandard Python distutils.\n\nIf you are installing using ``pip``, you don't need to download anything as the\nlatest version will be downloaded for you from PyPI::\n\n pip install pytz\n\nIf you are installing from a tarball, run the following command as an\nadministrative user::\n\n python setup.py install\n\n\npytz for Enterprise\n~~~~~~~~~~~~~~~~~~~\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of pytz and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more. `_.\n\n\nExample & Usage\n~~~~~~~~~~~~~~~\n\nLocalized times and date arithmetic\n-----------------------------------\n\n>>> from datetime import datetime, timedelta\n>>> from pytz import timezone\n>>> import pytz\n>>> utc = pytz.utc\n>>> utc.zone\n'UTC'\n>>> eastern = timezone('US/Eastern')\n>>> eastern.zone\n'US/Eastern'\n>>> amsterdam = timezone('Europe/Amsterdam')\n>>> fmt = '%Y-%m-%d %H:%M:%S %Z%z'\n\nThis library only supports two ways of building a localized time. The\nfirst is to use the ``localize()`` method provided by the pytz library.\nThis is used to localize a naive datetime (datetime with no timezone\ninformation):\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 6, 0, 0))\n>>> print(loc_dt.strftime(fmt))\n2002-10-27 06:00:00 EST-0500\n\nThe second way of building a localized time is by converting an existing\nlocalized time using the standard ``astimezone()`` method:\n\n>>> ams_dt = loc_dt.astimezone(amsterdam)\n>>> ams_dt.strftime(fmt)\n'2002-10-27 12:00:00 CET+0100'\n\nUnfortunately using the tzinfo argument of the standard datetime\nconstructors ''does not work'' with pytz for many timezones.\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\\ Does not work this way!\n'2002-10-27 12:00:00 LMT+0018'\n\nIt is safe for timezones without daylight saving transitions though, such\nas UTC:\n\n>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=pytz.utc).strftime(fmt) # /!\\ Not recommended except for UTC\n'2002-10-27 12:00:00 UTC+0000'\n\nThe preferred way of dealing with times is to always work in UTC,\nconverting to localtime only when generating output to be read\nby humans.\n\n>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)\n>>> loc_dt = utc_dt.astimezone(eastern)\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:00:00 EST-0500'\n\nThis library also allows you to do date arithmetic using local\ntimes, although it is more complicated than working in UTC as you\nneed to use the ``normalize()`` method to handle daylight saving time\nand other timezone transitions. In this example, ``loc_dt`` is set\nto the instant when daylight saving time ends in the US/Eastern\ntimezone.\n\n>>> before = loc_dt - timedelta(minutes=10)\n>>> before.strftime(fmt)\n'2002-10-27 00:50:00 EST-0500'\n>>> eastern.normalize(before).strftime(fmt)\n'2002-10-27 01:50:00 EDT-0400'\n>>> after = eastern.normalize(before + timedelta(minutes=20))\n>>> after.strftime(fmt)\n'2002-10-27 01:10:00 EST-0500'\n\nCreating local times is also tricky, and the reason why working with\nlocal times is not recommended. Unfortunately, you cannot just pass\na ``tzinfo`` argument when constructing a datetime (see the next\nsection for more details)\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 0)\n>>> dt1 = eastern.localize(dt, is_dst=True)\n>>> dt1.strftime(fmt)\n'2002-10-27 01:30:00 EDT-0400'\n>>> dt2 = eastern.localize(dt, is_dst=False)\n>>> dt2.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nConverting between timezones is more easily done, using the\nstandard astimezone method.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = utc_dt.astimezone(au_tz)\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> utc_dt == utc_dt2\nTrue\n\nYou can take shortcuts when dealing with the UTC side of timezone\nconversions. ``normalize()`` and ``localize()`` are not really\nnecessary when there are no daylight saving time transitions to\ndeal with.\n\n>>> utc_dt = datetime.fromtimestamp(1143408899, tz=utc)\n>>> utc_dt.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n>>> au_tz = timezone('Australia/Sydney')\n>>> au_dt = au_tz.normalize(utc_dt.astimezone(au_tz))\n>>> au_dt.strftime(fmt)\n'2006-03-27 08:34:59 AEDT+1100'\n>>> utc_dt2 = au_dt.astimezone(utc)\n>>> utc_dt2.strftime(fmt)\n'2006-03-26 21:34:59 UTC+0000'\n\n\n``tzinfo`` API\n--------------\n\nThe ``tzinfo`` instances returned by the ``timezone()`` function have\nbeen extended to cope with ambiguous times by adding an ``is_dst``\nparameter to the ``utcoffset()``, ``dst()`` && ``tzname()`` methods.\n\n>>> tz = timezone('America/St_Johns')\n\n>>> normal = datetime(2009, 9, 1)\n>>> ambiguous = datetime(2009, 10, 31, 23, 30)\n\nThe ``is_dst`` parameter is ignored for most timestamps. It is only used\nduring DST transition ambiguous periods to resolve that ambiguity.\n\n>>> print(tz.utcoffset(normal, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(normal, is_dst=True))\n1:00:00\n>>> tz.tzname(normal, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=True))\n-1 day, 21:30:00\n>>> print(tz.dst(ambiguous, is_dst=True))\n1:00:00\n>>> tz.tzname(ambiguous, is_dst=True)\n'NDT'\n\n>>> print(tz.utcoffset(normal, is_dst=False))\n-1 day, 21:30:00\n>>> tz.dst(normal, is_dst=False).seconds\n3600\n>>> tz.tzname(normal, is_dst=False)\n'NDT'\n\n>>> print(tz.utcoffset(ambiguous, is_dst=False))\n-1 day, 20:30:00\n>>> tz.dst(ambiguous, is_dst=False)\ndatetime.timedelta(0)\n>>> tz.tzname(ambiguous, is_dst=False)\n'NST'\n\nIf ``is_dst`` is not specified, ambiguous timestamps will raise\nan ``pytz.exceptions.AmbiguousTimeError`` exception.\n\n>>> print(tz.utcoffset(normal))\n-1 day, 21:30:00\n>>> print(tz.dst(normal))\n1:00:00\n>>> tz.tzname(normal)\n'NDT'\n\n>>> import pytz.exceptions\n>>> try:\n... tz.utcoffset(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.dst(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n>>> try:\n... tz.tzname(ambiguous)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % ambiguous)\npytz.exceptions.AmbiguousTimeError: 2009-10-31 23:30:00\n\n\nProblems with Localtime\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major problem we have to deal with is that certain datetimes\nmay occur twice in a year. For example, in the US/Eastern timezone\non the last Sunday morning in October, the following sequence\nhappens:\n\n - 01:00 EDT occurs\n - 1 hour later, instead of 2:00am the clock is turned back 1 hour\n and 01:00 happens again (this time 01:00 EST)\n\nIn fact, every instant between 01:00 and 02:00 occurs twice. This means\nthat if you try and create a time in the 'US/Eastern' timezone\nthe standard datetime syntax, there is no way to specify if you meant\nbefore of after the end-of-daylight-saving-time transition. Using the\npytz custom syntax, the best you can do is make an educated guess:\n\n>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))\n>>> loc_dt.strftime(fmt)\n'2002-10-27 01:30:00 EST-0500'\n\nAs you can see, the system has chosen one for you and there is a 50%\nchance of it being out by one hour. For some applications, this does\nnot matter. However, if you are trying to schedule meetings with people\nin different timezones or analyze log files it is not acceptable.\n\nThe best and simplest solution is to stick with using UTC. The pytz\npackage encourages using UTC for internal timezone representation by\nincluding a special UTC implementation based on the standard Python\nreference implementation in the Python documentation.\n\nThe UTC timezone unpickles to be the same instance, and pickles to a\nsmaller size than other pytz tzinfo instances. The UTC implementation\ncan be obtained as pytz.utc, pytz.UTC, or pytz.timezone('UTC').\n\n>>> import pickle, pytz\n>>> dt = datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)\n>>> naive = dt.replace(tzinfo=None)\n>>> p = pickle.dumps(dt, 1)\n>>> naive_p = pickle.dumps(naive, 1)\n>>> len(p) - len(naive_p)\n17\n>>> new = pickle.loads(p)\n>>> new == dt\nTrue\n>>> new is dt\nFalse\n>>> new.tzinfo is dt.tzinfo\nTrue\n>>> pytz.utc is pytz.UTC is pytz.timezone('UTC')\nTrue\n\nNote that some other timezones are commonly thought of as the same (GMT,\nGreenwich, Universal, etc.). The definition of UTC is distinct from these\nother timezones, and they are not equivalent. For this reason, they will\nnot compare the same in Python.\n\n>>> utc == pytz.timezone('GMT')\nFalse\n\nSee the section `What is UTC`_, below.\n\nIf you insist on working with local times, this library provides a\nfacility for constructing them unambiguously:\n\n>>> loc_dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> est_dt = eastern.localize(loc_dt, is_dst=True)\n>>> edt_dt = eastern.localize(loc_dt, is_dst=False)\n>>> print(est_dt.strftime(fmt) + ' / ' + edt_dt.strftime(fmt))\n2002-10-27 01:30:00 EDT-0400 / 2002-10-27 01:30:00 EST-0500\n\nIf you pass None as the is_dst flag to localize(), pytz will refuse to\nguess and raise exceptions if you try to build ambiguous or non-existent\ntimes.\n\nFor example, 1:30am on 27th Oct 2002 happened twice in the US/Eastern\ntimezone when the clocks where put back at the end of Daylight Saving\nTime:\n\n>>> dt = datetime(2002, 10, 27, 1, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.AmbiguousTimeError:\n... print('pytz.exceptions.AmbiguousTimeError: %s' % dt)\npytz.exceptions.AmbiguousTimeError: 2002-10-27 01:30:00\n\nSimilarly, 2:30am on 7th April 2002 never happened at all in the\nUS/Eastern timezone, as the clocks where put forward at 2:00am skipping\nthe entire hour:\n\n>>> dt = datetime(2002, 4, 7, 2, 30, 00)\n>>> try:\n... eastern.localize(dt, is_dst=None)\n... except pytz.exceptions.NonExistentTimeError:\n... print('pytz.exceptions.NonExistentTimeError: %s' % dt)\npytz.exceptions.NonExistentTimeError: 2002-04-07 02:30:00\n\nBoth of these exceptions share a common base class to make error handling\neasier:\n\n>>> isinstance(pytz.AmbiguousTimeError(), pytz.InvalidTimeError)\nTrue\n>>> isinstance(pytz.NonExistentTimeError(), pytz.InvalidTimeError)\nTrue\n\n\nA special case is where countries change their timezone definitions\nwith no daylight savings time switch. For example, in 1915 Warsaw\nswitched from Warsaw time to Central European time with no daylight savings\ntransition. So at the stroke of midnight on August 5th 1915 the clocks\nwere wound back 24 minutes creating an ambiguous time period that cannot\nbe specified without referring to the timezone abbreviation or the\nactual UTC offset. In this case midnight happened twice, neither time\nduring a daylight saving time period. pytz handles this transition by\ntreating the ambiguous period before the switch as daylight savings\ntime, and the ambiguous period after as standard time.\n\n\n>>> warsaw = pytz.timezone('Europe/Warsaw')\n>>> amb_dt1 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=True)\n>>> amb_dt1.strftime(fmt)\n'1915-08-04 23:59:59 WMT+0124'\n>>> amb_dt2 = warsaw.localize(datetime(1915, 8, 4, 23, 59, 59), is_dst=False)\n>>> amb_dt2.strftime(fmt)\n'1915-08-04 23:59:59 CET+0100'\n>>> switch_dt = warsaw.localize(datetime(1915, 8, 5, 00, 00, 00), is_dst=False)\n>>> switch_dt.strftime(fmt)\n'1915-08-05 00:00:00 CET+0100'\n>>> str(switch_dt - amb_dt1)\n'0:24:01'\n>>> str(switch_dt - amb_dt2)\n'0:00:01'\n\nThe best way of creating a time during an ambiguous time period is\nby converting from another timezone such as UTC:\n\n>>> utc_dt = datetime(1915, 8, 4, 22, 36, tzinfo=pytz.utc)\n>>> utc_dt.astimezone(warsaw).strftime(fmt)\n'1915-08-04 23:36:00 CET+0100'\n\nThe standard Python way of handling all these ambiguities is not to\nhandle them, such as demonstrated in this example using the US/Eastern\ntimezone definition from the Python documentation (Note that this\nimplementation only works for dates between 1987 and 2006 - it is\nincluded for tests only!):\n\n>>> from pytz.reference import Eastern # pytz.reference only for tests\n>>> dt = datetime(2002, 10, 27, 0, 30, tzinfo=Eastern)\n>>> str(dt)\n'2002-10-27 00:30:00-04:00'\n>>> str(dt + timedelta(hours=1))\n'2002-10-27 01:30:00-05:00'\n>>> str(dt + timedelta(hours=2))\n'2002-10-27 02:30:00-05:00'\n>>> str(dt + timedelta(hours=3))\n'2002-10-27 03:30:00-05:00'\n\nNotice the first two results? At first glance you might think they are\ncorrect, but taking the UTC offset into account you find that they are\nactually two hours appart instead of the 1 hour we asked for.\n\n>>> from pytz.reference import UTC # pytz.reference only for tests\n>>> str(dt.astimezone(UTC))\n'2002-10-27 04:30:00+00:00'\n>>> str((dt + timedelta(hours=1)).astimezone(UTC))\n'2002-10-27 06:30:00+00:00'\n\n\nCountry Information\n~~~~~~~~~~~~~~~~~~~\n\nA mechanism is provided to access the timezones commonly in use\nfor a particular country, looked up using the ISO 3166 country code.\nIt returns a list of strings that can be used to retrieve the relevant\ntzinfo instance using ``pytz.timezone()``:\n\n>>> print(' '.join(pytz.country_timezones['nz']))\nPacific/Auckland Pacific/Chatham\n\nThe Olson database comes with a ISO 3166 country code to English country\nname mapping that pytz exposes as a dictionary:\n\n>>> print(pytz.country_names['nz'])\nNew Zealand\n\n\nWhat is UTC\n~~~~~~~~~~~\n\n'UTC' is `Coordinated Universal Time`_. It is a successor to, but distinct\nfrom, Greenwich Mean Time (GMT) and the various definitions of Universal\nTime. UTC is now the worldwide standard for regulating clocks and time\nmeasurement.\n\nAll other timezones are defined relative to UTC, and include offsets like\nUTC+0800 - hours to add or subtract from UTC to derive the local time. No\ndaylight saving time occurs in UTC, making it a useful timezone to perform\ndate arithmetic without worrying about the confusion and ambiguities caused\nby daylight saving time transitions, your country changing its timezone, or\nmobile computers that roam through multiple timezones.\n\n.. _Coordinated Universal Time: https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n\n\nHelpers\n~~~~~~~\n\nThere are two lists of timezones provided.\n\n``all_timezones`` is the exhaustive list of the timezone names that can\nbe used.\n\n>>> from pytz import all_timezones\n>>> len(all_timezones) >= 500\nTrue\n>>> 'Etc/Greenwich' in all_timezones\nTrue\n\n``common_timezones`` is a list of useful, current timezones. It doesn't\ncontain deprecated zones or historical zones, except for a few I've\ndeemed in common usage, such as US/Eastern (open a bug report if you\nthink other timezones are deserving of being included here). It is also\na sequence of strings.\n\n>>> from pytz import common_timezones\n>>> len(common_timezones) < len(all_timezones)\nTrue\n>>> 'Etc/Greenwich' in common_timezones\nFalse\n>>> 'Australia/Melbourne' in common_timezones\nTrue\n>>> 'US/Eastern' in common_timezones\nTrue\n>>> 'Canada/Eastern' in common_timezones\nTrue\n>>> 'Australia/Yancowinna' in all_timezones\nTrue\n>>> 'Australia/Yancowinna' in common_timezones\nFalse\n\nBoth ``common_timezones`` and ``all_timezones`` are alphabetically\nsorted:\n\n>>> common_timezones_dupe = common_timezones[:]\n>>> common_timezones_dupe.sort()\n>>> common_timezones == common_timezones_dupe\nTrue\n>>> all_timezones_dupe = all_timezones[:]\n>>> all_timezones_dupe.sort()\n>>> all_timezones == all_timezones_dupe\nTrue\n\n``all_timezones`` and ``common_timezones`` are also available as sets.\n\n>>> from pytz import all_timezones_set, common_timezones_set\n>>> 'US/Eastern' in all_timezones_set\nTrue\n>>> 'US/Eastern' in common_timezones_set\nTrue\n>>> 'Australia/Victoria' in common_timezones_set\nFalse\n\nYou can also retrieve lists of timezones used by particular countries\nusing the ``country_timezones()`` function. It requires an ISO-3166\ntwo letter country code.\n\n>>> from pytz import country_timezones\n>>> print(' '.join(country_timezones('ch')))\nEurope/Zurich\n>>> print(' '.join(country_timezones('CH')))\nEurope/Zurich\n\n\nInternationalization - i18n/l10n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPytz is an interface to the IANA database, which uses ASCII names. The `Unicode Consortium's Unicode Locales (CLDR) `_\nproject provides translations. Python packages such as\n`Babel `_\nand Thomas Khyn's `l18n `_ package can be used\nto access these translations from Python.\n\n\nLicense\n~~~~~~~\n\nMIT license.\n\nThis code is also available as part of Zope 3 under the Zope Public\nLicense, Version 2.1 (ZPL).\n\nI'm happy to relicense this code if necessary for inclusion in other\nopen source projects.\n\n\nLatest Versions\n~~~~~~~~~~~~~~~\n\nThis package will be updated after releases of the Olson timezone\ndatabase. The latest version can be downloaded from the `Python Package\nIndex `_. The code that is used\nto generate this distribution is hosted on Github and available\nusing git::\n\n git clone https://github.com/stub42/pytz.git\n\nAnnouncements of new releases are made on\n`Launchpad `_, and the\n`Atom feed `_\nhosted there.\n\n\nBugs, Feature Requests & Patches\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBugs should be reported on `Github `_.\nFeature requests are unlikely to be considered, and efforts instead directed\nto timezone support now built into Python or packages that work with it.\n\n\nSecurity Issues\n~~~~~~~~~~~~~~~\n\nReports about security issues can be made via `Tidelift `_.\n\n\nIssues & Limitations\n~~~~~~~~~~~~~~~~~~~~\n\n- This project is in maintenance mode. Projects using Python 3.9 or later\n are best served by using the timezone functionaly now included in core\n Python and packages that work with it such as `tzdata `_.\n\n- Offsets from UTC are rounded to the nearest whole minute, so timezones\n such as Europe/Amsterdam pre 1937 will be up to 30 seconds out. This\n was a limitation of the Python datetime library.\n\n- If you think a timezone definition is incorrect, I probably can't fix\n it. pytz is a direct translation of the Olson timezone database, and\n changes to the timezone definitions need to be made to this source.\n If you find errors they should be reported to the time zone mailing\n list, linked from http://www.iana.org/time-zones.\n\n\nFurther Reading\n~~~~~~~~~~~~~~~\n\nMore info than you want to know about timezones:\nhttps://data.iana.org/time-zones/tz-link.html\n\n\nContact\n~~~~~~~\n\nStuart Bishop ", - "release_date": "2025-03-25T02:25:00", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stuart Bishop", - "email": "stuart@stuartbishop.net", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Stuart Bishop", - "email": "stuart@stuartbishop.net", - "url": null - } - ], - "keywords": [ - "timezone", - "tzinfo", - "datetime", - "olson", - "time", - "Development Status :: 6 - Mature", - "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.4", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.1", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "http://pythonhosted.org/pytz", - "download_url": "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", - "size": 320884, - "sha1": null, - "md5": "6a7760c71e38b6c75577b34b18b89d5b", - "sha256": "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pytz/2025.2/json", - "datasource_id": null, - "purl": "pkg:pypi/pytz@2025.2" - }, - { - "type": "pypi", - "namespace": null, - "name": "redis", - "version": "3.5.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python client for Redis key-value store\nredis-py\n========\n\nThe Python interface to the Redis key-value store.\n\n.. image:: https://secure.travis-ci.org/andymccurdy/redis-py.svg?branch=master\n :target: https://travis-ci.org/andymccurdy/redis-py\n.. image:: https://readthedocs.org/projects/redis-py/badge/?version=stable&style=flat\n :target: https://redis-py.readthedocs.io/en/stable/\n.. image:: https://badge.fury.io/py/redis.svg\n :target: https://pypi.org/project/redis/\n.. image:: https://codecov.io/gh/andymccurdy/redis-py/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/andymccurdy/redis-py\n\n\nPython 2 Compatibility Note\n---------------------------\n\nredis-py 3.5.x will be the last version of redis-py that supports Python 2.\nThe 3.5.x line will continue to get bug fixes and security patches that\nsupport Python 2 until August 1, 2020. redis-py 4.0 will be the next major\nversion and will require Python 3.5+.\n\n\nInstallation\n------------\n\nredis-py requires a running Redis server. See `Redis's quickstart\n`_ for installation instructions.\n\nredis-py can be installed using `pip` similar to other Python packages. Do not use `sudo`\nwith `pip`. It is usually good to work in a\n`virtualenv `_ or\n`venv `_ to avoid conflicts with other package\nmanagers and Python projects. For a quick introduction see\n`Python Virtual Environments in Five Minutes `_.\n\nTo install redis-py, simply:\n\n.. code-block:: bash\n\n $ pip install redis\n\nor from source:\n\n.. code-block:: bash\n\n $ python setup.py install\n\n\nGetting Started\n---------------\n\n.. code-block:: pycon\n\n >>> import redis\n >>> r = redis.Redis(host='localhost', port=6379, db=0)\n >>> r.set('foo', 'bar')\n True\n >>> r.get('foo')\n b'bar'\n\nBy default, all responses are returned as `bytes` in Python 3 and `str` in\nPython 2. The user is responsible for decoding to Python 3 strings or Python 2\nunicode objects.\n\nIf **all** string responses from a client should be decoded, the user can\nspecify `decode_responses=True` to `Redis.__init__`. In this case, any\nRedis command that returns a string type will be decoded with the `encoding`\nspecified.\n\n\nUpgrading from redis-py 2.X to 3.0\n----------------------------------\n\nredis-py 3.0 introduces many new features but required a number of backwards\nincompatible changes to be made in the process. This section attempts to\nprovide an upgrade path for users migrating from 2.X to 3.0.\n\n\nPython Version Support\n^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 supports Python 2.7 and Python 3.5+.\n\n\nClient Classes: Redis and StrictRedis\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 drops support for the legacy \"Redis\" client class. \"StrictRedis\"\nhas been renamed to \"Redis\" and an alias named \"StrictRedis\" is provided so\nthat users previously using \"StrictRedis\" can continue to run unchanged.\n\nThe 2.X \"Redis\" class provided alternative implementations of a few commands.\nThis confused users (rightfully so) and caused a number of support issues. To\nmake things easier going forward, it was decided to drop support for these\nalternate implementations and instead focus on a single client class.\n\n2.X users that are already using StrictRedis don't have to change the class\nname. StrictRedis will continue to work for the foreseeable future.\n\n2.X users that are using the Redis class will have to make changes if they\nuse any of the following commands:\n\n* SETEX: The argument order has changed. The new order is (name, time, value).\n* LREM: The argument order has changed. The new order is (name, num, value).\n* TTL and PTTL: The return value is now always an int and matches the\n official Redis command (>0 indicates the timeout, -1 indicates that the key\n exists but that it has no expire time set, -2 indicates that the key does\n not exist)\n\n\nSSL Connections\n^^^^^^^^^^^^^^^\n\nredis-py 3.0 changes the default value of the `ssl_cert_reqs` option from\n`None` to `'required'`. See\n`Issue 1016 `_. This\nchange enforces hostname validation when accepting a cert from a remote SSL\nterminator. If the terminator doesn't properly set the hostname on the cert\nthis will cause redis-py 3.0 to raise a ConnectionError.\n\nThis check can be disabled by setting `ssl_cert_reqs` to `None`. Note that\ndoing so removes the security check. Do so at your own risk.\n\nIt has been reported that SSL certs received from AWS ElastiCache do not have\nproper hostnames and turning off hostname verification is currently required.\n\n\nMSET, MSETNX and ZADD\n^^^^^^^^^^^^^^^^^^^^^\n\nThese commands all accept a mapping of key/value pairs. In redis-py 2.X\nthis mapping could be specified as ``*args`` or as ``**kwargs``. Both of these\nstyles caused issues when Redis introduced optional flags to ZADD. Relying on\n``*args`` caused issues with the optional argument order, especially in Python\n2.7. Relying on ``**kwargs`` caused potential collision issues of user keys with\nthe argument names in the method signature.\n\nTo resolve this, redis-py 3.0 has changed these three commands to all accept\na single positional argument named mapping that is expected to be a dict. For\nMSET and MSETNX, the dict is a mapping of key-names -> values. For ZADD, the\ndict is a mapping of element-names -> score.\n\nMSET, MSETNX and ZADD now look like:\n\n.. code-block:: python\n\n def mset(self, mapping):\n def msetnx(self, mapping):\n def zadd(self, name, mapping, nx=False, xx=False, ch=False, incr=False):\n\nAll 2.X users that use these commands must modify their code to supply\nkeys and values as a dict to these commands.\n\n\nZINCRBY\n^^^^^^^\n\nredis-py 2.X accidentally modified the argument order of ZINCRBY, swapping the\norder of value and amount. ZINCRBY now looks like:\n\n.. code-block:: python\n\n def zincrby(self, name, amount, value):\n\nAll 2.X users that rely on ZINCRBY must swap the order of amount and value\nfor the command to continue to work as intended.\n\n\nEncoding of User Input\n^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 only accepts user data as bytes, strings or numbers (ints, longs\nand floats). Attempting to specify a key or a value as any other type will\nraise a DataError exception.\n\nredis-py 2.X attempted to coerce any type of input into a string. While\noccasionally convenient, this caused all sorts of hidden errors when users\npassed boolean values (which were coerced to 'True' or 'False'), a None\nvalue (which was coerced to 'None') or other values, such as user defined\ntypes.\n\nAll 2.X users should make sure that the keys and values they pass into\nredis-py are either bytes, strings or numbers.\n\n\nLocks\n^^^^^\n\nredis-py 3.0 drops support for the pipeline-based Lock and now only supports\nthe Lua-based lock. In doing so, LuaLock has been renamed to Lock. This also\nmeans that redis-py Lock objects require Redis server 2.6 or greater.\n\n2.X users that were explicitly referring to \"LuaLock\" will have to now refer\nto \"Lock\" instead.\n\n\nLocks as Context Managers\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 now raises a LockError when using a lock as a context manager and\nthe lock cannot be acquired within the specified timeout. This is more of a\nbug fix than a backwards incompatible change. However, given an error is now\nraised where none was before, this might alarm some users.\n\n2.X users should make sure they're wrapping their lock code in a try/catch\nlike this:\n\n.. code-block:: python\n\n try:\n with r.lock('my-lock-key', blocking_timeout=5) as lock:\n # code you want executed only after the lock has been acquired\n except LockError:\n # the lock wasn't acquired\n\n\nAPI Reference\n-------------\n\nThe `official Redis command documentation `_ does a\ngreat job of explaining each command in detail. redis-py attempts to adhere\nto the official command syntax. There are a few exceptions:\n\n* **SELECT**: Not implemented. See the explanation in the Thread Safety section\n below.\n* **DEL**: 'del' is a reserved keyword in the Python syntax. Therefore redis-py\n uses 'delete' instead.\n* **MULTI/EXEC**: These are implemented as part of the Pipeline class. The\n pipeline is wrapped with the MULTI and EXEC statements by default when it\n is executed, which can be disabled by specifying transaction=False.\n See more about Pipelines below.\n* **SUBSCRIBE/LISTEN**: Similar to pipelines, PubSub is implemented as a separate\n class as it places the underlying connection in a state where it can't\n execute non-pubsub commands. Calling the pubsub method from the Redis client\n will return a PubSub instance where you can subscribe to channels and listen\n for messages. You can only call PUBLISH from the Redis client (see\n `this comment on issue #151\n `_\n for details).\n* **SCAN/SSCAN/HSCAN/ZSCAN**: The \\*SCAN commands are implemented as they\n exist in the Redis documentation. In addition, each command has an equivalent\n iterator method. These are purely for convenience so the user doesn't have\n to keep track of the cursor while iterating. Use the\n scan_iter/sscan_iter/hscan_iter/zscan_iter methods for this behavior.\n\n\nMore Detail\n-----------\n\nConnection Pools\n^^^^^^^^^^^^^^^^\n\nBehind the scenes, redis-py uses a connection pool to manage connections to\na Redis server. By default, each Redis instance you create will in turn create\nits own connection pool. You can override this behavior and use an existing\nconnection pool by passing an already created connection pool instance to the\nconnection_pool argument of the Redis class. You may choose to do this in order\nto implement client side sharding or have fine-grain control of how\nconnections are managed.\n\n.. code-block:: pycon\n\n >>> pool = redis.ConnectionPool(host='localhost', port=6379, db=0)\n >>> r = redis.Redis(connection_pool=pool)\n\nConnections\n^^^^^^^^^^^\n\nConnectionPools manage a set of Connection instances. redis-py ships with two\ntypes of Connections. The default, Connection, is a normal TCP socket based\nconnection. The UnixDomainSocketConnection allows for clients running on the\nsame device as the server to connect via a unix domain socket. To use a\nUnixDomainSocketConnection connection, simply pass the unix_socket_path\nargument, which is a string to the unix domain socket file. Additionally, make\nsure the unixsocket parameter is defined in your redis.conf file. It's\ncommented out by default.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(unix_socket_path='/tmp/redis.sock')\n\nYou can create your own Connection subclasses as well. This may be useful if\nyou want to control the socket behavior within an async framework. To\ninstantiate a client class using your own connection, you need to create\na connection pool, passing your class to the connection_class argument.\nOther keyword parameters you pass to the pool will be passed to the class\nspecified during initialization.\n\n.. code-block:: pycon\n\n >>> pool = redis.ConnectionPool(connection_class=YourConnectionClass,\n your_arg='...', ...)\n\nConnections maintain an open socket to the Redis server. Sometimes these\nsockets are interrupted or disconnected for a variety of reasons. For example,\nnetwork appliances, load balancers and other services that sit between clients\nand servers are often configured to kill connections that remain idle for a\ngiven threshold.\n\nWhen a connection becomes disconnected, the next command issued on that\nconnection will fail and redis-py will raise a ConnectionError to the caller.\nThis allows each application that uses redis-py to handle errors in a way\nthat's fitting for that specific application. However, constant error\nhandling can be verbose and cumbersome, especially when socket disconnections\nhappen frequently in many production environments.\n\nTo combat this, redis-py can issue regular health checks to assess the\nliveliness of a connection just before issuing a command. Users can pass\n``health_check_interval=N`` to the Redis or ConnectionPool classes or\nas a query argument within a Redis URL. The value of ``health_check_interval``\nmust be an integer. A value of ``0``, the default, disables health checks.\nAny positive integer will enable health checks. Health checks are performed\njust before a command is executed if the underlying connection has been idle\nfor more than ``health_check_interval`` seconds. For example,\n``health_check_interval=30`` will ensure that a health check is run on any\nconnection that has been idle for 30 or more seconds just before a command\nis executed on that connection.\n\nIf your application is running in an environment that disconnects idle\nconnections after 30 seconds you should set the ``health_check_interval``\noption to a value less than 30.\n\nThis option also works on any PubSub connection that is created from a\nclient with ``health_check_interval`` enabled. PubSub users need to ensure\nthat ``get_message()`` or ``listen()`` are called more frequently than\n``health_check_interval`` seconds. It is assumed that most workloads already\ndo this.\n\nIf your PubSub use case doesn't call ``get_message()`` or ``listen()``\nfrequently, you should call ``pubsub.check_health()`` explicitly on a\nregularly basis.\n\nParsers\n^^^^^^^\n\nParser classes provide a way to control how responses from the Redis server\nare parsed. redis-py ships with two parser classes, the PythonParser and the\nHiredisParser. By default, redis-py will attempt to use the HiredisParser if\nyou have the hiredis module installed and will fallback to the PythonParser\notherwise.\n\nHiredis is a C library maintained by the core Redis team. Pieter Noordhuis was\nkind enough to create Python bindings. Using Hiredis can provide up to a\n10x speed improvement in parsing responses from the Redis server. The\nperformance increase is most noticeable when retrieving many pieces of data,\nsuch as from LRANGE or SMEMBERS operations.\n\nHiredis is available on PyPI, and can be installed via pip just like redis-py.\n\n.. code-block:: bash\n\n $ pip install hiredis\n\nResponse Callbacks\n^^^^^^^^^^^^^^^^^^\n\nThe client class uses a set of callbacks to cast Redis responses to the\nappropriate Python type. There are a number of these callbacks defined on\nthe Redis client class in a dictionary called RESPONSE_CALLBACKS.\n\nCustom callbacks can be added on a per-instance basis using the\nset_response_callback method. This method accepts two arguments: a command\nname and the callback. Callbacks added in this manner are only valid on the\ninstance the callback is added to. If you want to define or override a callback\nglobally, you should make a subclass of the Redis client and add your callback\nto its RESPONSE_CALLBACKS class dictionary.\n\nResponse callbacks take at least one parameter: the response from the Redis\nserver. Keyword arguments may also be accepted in order to further control\nhow to interpret the response. These keyword arguments are specified during the\ncommand's call to execute_command. The ZRANGE implementation demonstrates the\nuse of response callback keyword arguments with its \"withscores\" argument.\n\nThread Safety\n^^^^^^^^^^^^^\n\nRedis client instances can safely be shared between threads. Internally,\nconnection instances are only retrieved from the connection pool during\ncommand execution, and returned to the pool directly after. Command execution\nnever modifies state on the client instance.\n\nHowever, there is one caveat: the Redis SELECT command. The SELECT command\nallows you to switch the database currently in use by the connection. That\ndatabase remains selected until another is selected or until the connection is\nclosed. This creates an issue in that connections could be returned to the pool\nthat are connected to a different database.\n\nAs a result, redis-py does not implement the SELECT command on client\ninstances. If you use multiple Redis databases within the same application, you\nshould create a separate client instance (and possibly a separate connection\npool) for each database.\n\nIt is not safe to pass PubSub or Pipeline objects between threads.\n\nPipelines\n^^^^^^^^^\n\nPipelines are a subclass of the base Redis class that provide support for\nbuffering multiple commands to the server in a single request. They can be used\nto dramatically increase the performance of groups of commands by reducing the\nnumber of back-and-forth TCP packets between the client and server.\n\nPipelines are quite simple to use:\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> r.set('bing', 'baz')\n >>> # Use the pipeline() method to create a pipeline instance\n >>> pipe = r.pipeline()\n >>> # The following SET commands are buffered\n >>> pipe.set('foo', 'bar')\n >>> pipe.get('bing')\n >>> # the EXECUTE call sends all buffered commands to the server, returning\n >>> # a list of responses, one for each command.\n >>> pipe.execute()\n [True, b'baz']\n\nFor ease of use, all commands being buffered into the pipeline return the\npipeline object itself. Therefore calls can be chained like:\n\n.. code-block:: pycon\n\n >>> pipe.set('foo', 'bar').sadd('faz', 'baz').incr('auto_number').execute()\n [True, True, 6]\n\nIn addition, pipelines can also ensure the buffered commands are executed\natomically as a group. This happens by default. If you want to disable the\natomic nature of a pipeline but still want to buffer commands, you can turn\noff transactions.\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline(transaction=False)\n\nA common issue occurs when requiring atomic transactions but needing to\nretrieve values in Redis prior for use within the transaction. For instance,\nlet's assume that the INCR command didn't exist and we need to build an atomic\nversion of INCR in Python.\n\nThe completely naive implementation could GET the value, increment it in\nPython, and SET the new value back. However, this is not atomic because\nmultiple clients could be doing this at the same time, each getting the same\nvalue from GET.\n\nEnter the WATCH command. WATCH provides the ability to monitor one or more keys\nprior to starting a transaction. If any of those keys change prior the\nexecution of that transaction, the entire transaction will be canceled and a\nWatchError will be raised. To implement our own client-side INCR command, we\ncould do something like this:\n\n.. code-block:: pycon\n\n >>> with r.pipeline() as pipe:\n ... while True:\n ... try:\n ... # put a WATCH on the key that holds our sequence value\n ... pipe.watch('OUR-SEQUENCE-KEY')\n ... # after WATCHing, the pipeline is put into immediate execution\n ... # mode until we tell it to start buffering commands again.\n ... # this allows us to get the current value of our sequence\n ... current_value = pipe.get('OUR-SEQUENCE-KEY')\n ... next_value = int(current_value) + 1\n ... # now we can put the pipeline back into buffered mode with MULTI\n ... pipe.multi()\n ... pipe.set('OUR-SEQUENCE-KEY', next_value)\n ... # and finally, execute the pipeline (the set command)\n ... pipe.execute()\n ... # if a WatchError wasn't raised during execution, everything\n ... # we just did happened atomically.\n ... break\n ... except WatchError:\n ... # another client must have changed 'OUR-SEQUENCE-KEY' between\n ... # the time we started WATCHing it and the pipeline's execution.\n ... # our best bet is to just retry.\n ... continue\n\nNote that, because the Pipeline must bind to a single connection for the\nduration of a WATCH, care must be taken to ensure that the connection is\nreturned to the connection pool by calling the reset() method. If the\nPipeline is used as a context manager (as in the example above) reset()\nwill be called automatically. Of course you can do this the manual way by\nexplicitly calling reset():\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline()\n >>> while True:\n ... try:\n ... pipe.watch('OUR-SEQUENCE-KEY')\n ... ...\n ... pipe.execute()\n ... break\n ... except WatchError:\n ... continue\n ... finally:\n ... pipe.reset()\n\nA convenience method named \"transaction\" exists for handling all the\nboilerplate of handling and retrying watch errors. It takes a callable that\nshould expect a single parameter, a pipeline object, and any number of keys to\nbe WATCHed. Our client-side INCR command above can be written like this,\nwhich is much easier to read:\n\n.. code-block:: pycon\n\n >>> def client_side_incr(pipe):\n ... current_value = pipe.get('OUR-SEQUENCE-KEY')\n ... next_value = int(current_value) + 1\n ... pipe.multi()\n ... pipe.set('OUR-SEQUENCE-KEY', next_value)\n >>>\n >>> r.transaction(client_side_incr, 'OUR-SEQUENCE-KEY')\n [True]\n\nBe sure to call `pipe.multi()` in the callable passed to `Redis.transaction`\nprior to any write commands.\n\nPublish / Subscribe\n^^^^^^^^^^^^^^^^^^^\n\nredis-py includes a `PubSub` object that subscribes to channels and listens\nfor new messages. Creating a `PubSub` object is easy.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> p = r.pubsub()\n\nOnce a `PubSub` instance is created, channels and patterns can be subscribed\nto.\n\n.. code-block:: pycon\n\n >>> p.subscribe('my-first-channel', 'my-second-channel', ...)\n >>> p.psubscribe('my-*', ...)\n\nThe `PubSub` instance is now subscribed to those channels/patterns. The\nsubscription confirmations can be seen by reading messages from the `PubSub`\ninstance.\n\n.. code-block:: pycon\n\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-second-channel', 'data': 1}\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-first-channel', 'data': 2}\n >>> p.get_message()\n {'pattern': None, 'type': 'psubscribe', 'channel': b'my-*', 'data': 3}\n\nEvery message read from a `PubSub` instance will be a dictionary with the\nfollowing keys.\n\n* **type**: One of the following: 'subscribe', 'unsubscribe', 'psubscribe',\n 'punsubscribe', 'message', 'pmessage'\n* **channel**: The channel [un]subscribed to or the channel a message was\n published to\n* **pattern**: The pattern that matched a published message's channel. Will be\n `None` in all cases except for 'pmessage' types.\n* **data**: The message data. With [un]subscribe messages, this value will be\n the number of channels and patterns the connection is currently subscribed\n to. With [p]message messages, this value will be the actual published\n message.\n\nLet's send a message now.\n\n.. code-block:: pycon\n\n # the publish method returns the number matching channel and pattern\n # subscriptions. 'my-first-channel' matches both the 'my-first-channel'\n # subscription and the 'my-*' pattern subscription, so this message will\n # be delivered to 2 channels/patterns\n >>> r.publish('my-first-channel', 'some data')\n 2\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': b'some data', 'pattern': None, 'type': 'message'}\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': b'some data', 'pattern': b'my-*', 'type': 'pmessage'}\n\nUnsubscribing works just like subscribing. If no arguments are passed to\n[p]unsubscribe, all channels or patterns will be unsubscribed from.\n\n.. code-block:: pycon\n\n >>> p.unsubscribe()\n >>> p.punsubscribe('my-*')\n >>> p.get_message()\n {'channel': b'my-second-channel', 'data': 2, 'pattern': None, 'type': 'unsubscribe'}\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': 1, 'pattern': None, 'type': 'unsubscribe'}\n >>> p.get_message()\n {'channel': b'my-*', 'data': 0, 'pattern': None, 'type': 'punsubscribe'}\n\nredis-py also allows you to register callback functions to handle published\nmessages. Message handlers take a single argument, the message, which is a\ndictionary just like the examples above. To subscribe to a channel or pattern\nwith a message handler, pass the channel or pattern name as a keyword argument\nwith its value being the callback function.\n\nWhen a message is read on a channel or pattern with a message handler, the\nmessage dictionary is created and passed to the message handler. In this case,\na `None` value is returned from get_message() since the message was already\nhandled.\n\n.. code-block:: pycon\n\n >>> def my_handler(message):\n ... print('MY HANDLER: ', message['data'])\n >>> p.subscribe(**{'my-channel': my_handler})\n # read the subscribe confirmation message\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-channel', 'data': 1}\n >>> r.publish('my-channel', 'awesome data')\n 1\n # for the message handler to work, we need tell the instance to read data.\n # this can be done in several ways (read more below). we'll just use\n # the familiar get_message() function for now\n >>> message = p.get_message()\n MY HANDLER: awesome data\n # note here that the my_handler callback printed the string above.\n # `message` is None because the message was handled by our handler.\n >>> print(message)\n None\n\nIf your application is not interested in the (sometimes noisy)\nsubscribe/unsubscribe confirmation messages, you can ignore them by passing\n`ignore_subscribe_messages=True` to `r.pubsub()`. This will cause all\nsubscribe/unsubscribe messages to be read, but they won't bubble up to your\napplication.\n\n.. code-block:: pycon\n\n >>> p = r.pubsub(ignore_subscribe_messages=True)\n >>> p.subscribe('my-channel')\n >>> p.get_message() # hides the subscribe message and returns None\n >>> r.publish('my-channel', 'my data')\n 1\n >>> p.get_message()\n {'channel': b'my-channel', 'data': b'my data', 'pattern': None, 'type': 'message'}\n\nThere are three different strategies for reading messages.\n\nThe examples above have been using `pubsub.get_message()`. Behind the scenes,\n`get_message()` uses the system's 'select' module to quickly poll the\nconnection's socket. If there's data available to be read, `get_message()` will\nread it, format the message and return it or pass it to a message handler. If\nthere's no data to be read, `get_message()` will immediately return None. This\nmakes it trivial to integrate into an existing event loop inside your\napplication.\n\n.. code-block:: pycon\n\n >>> while True:\n >>> message = p.get_message()\n >>> if message:\n >>> # do something with the message\n >>> time.sleep(0.001) # be nice to the system :)\n\nOlder versions of redis-py only read messages with `pubsub.listen()`. listen()\nis a generator that blocks until a message is available. If your application\ndoesn't need to do anything else but receive and act on messages received from\nredis, listen() is an easy way to get up an running.\n\n.. code-block:: pycon\n\n >>> for message in p.listen():\n ... # do something with the message\n\nThe third option runs an event loop in a separate thread.\n`pubsub.run_in_thread()` creates a new thread and starts the event loop. The\nthread object is returned to the caller of `run_in_thread()`. The caller can\nuse the `thread.stop()` method to shut down the event loop and thread. Behind\nthe scenes, this is simply a wrapper around `get_message()` that runs in a\nseparate thread, essentially creating a tiny non-blocking event loop for you.\n`run_in_thread()` takes an optional `sleep_time` argument. If specified, the\nevent loop will call `time.sleep()` with the value in each iteration of the\nloop.\n\nNote: Since we're running in a separate thread, there's no way to handle\nmessages that aren't automatically handled with registered message handlers.\nTherefore, redis-py prevents you from calling `run_in_thread()` if you're\nsubscribed to patterns or channels that don't have message handlers attached.\n\n.. code-block:: pycon\n\n >>> p.subscribe(**{'my-channel': my_handler})\n >>> thread = p.run_in_thread(sleep_time=0.001)\n # the event loop is now running in the background processing messages\n # when it's time to shut it down...\n >>> thread.stop()\n\nA PubSub object adheres to the same encoding semantics as the client instance\nit was created from. Any channel or pattern that's unicode will be encoded\nusing the `charset` specified on the client before being sent to Redis. If the\nclient's `decode_responses` flag is set the False (the default), the\n'channel', 'pattern' and 'data' values in message dictionaries will be byte\nstrings (str on Python 2, bytes on Python 3). If the client's\n`decode_responses` is True, then the 'channel', 'pattern' and 'data' values\nwill be automatically decoded to unicode strings using the client's `charset`.\n\nPubSub objects remember what channels and patterns they are subscribed to. In\nthe event of a disconnection such as a network error or timeout, the\nPubSub object will re-subscribe to all prior channels and patterns when\nreconnecting. Messages that were published while the client was disconnected\ncannot be delivered. When you're finished with a PubSub object, call its\n`.close()` method to shutdown the connection.\n\n.. code-block:: pycon\n\n >>> p = r.pubsub()\n >>> ...\n >>> p.close()\n\n\nThe PUBSUB set of subcommands CHANNELS, NUMSUB and NUMPAT are also\nsupported:\n\n.. code-block:: pycon\n\n >>> r.pubsub_channels()\n [b'foo', b'bar']\n >>> r.pubsub_numsub('foo', 'bar')\n [(b'foo', 9001), (b'bar', 42)]\n >>> r.pubsub_numsub('baz')\n [(b'baz', 0)]\n >>> r.pubsub_numpat()\n 1204\n\nMonitor\n^^^^^^^\nredis-py includes a `Monitor` object that streams every command processed\nby the Redis server. Use `listen()` on the `Monitor` object to block\nuntil a command is received.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> with r.monitor() as m:\n >>> for command in m.listen():\n >>> print(command)\n\nLua Scripting\n^^^^^^^^^^^^^\n\nredis-py supports the EVAL, EVALSHA, and SCRIPT commands. However, there are\na number of edge cases that make these commands tedious to use in real world\nscenarios. Therefore, redis-py exposes a Script object that makes scripting\nmuch easier to use.\n\nTo create a Script instance, use the `register_script` function on a client\ninstance passing the Lua code as the first argument. `register_script` returns\na Script instance that you can use throughout your code.\n\nThe following trivial Lua script accepts two parameters: the name of a key and\na multiplier value. The script fetches the value stored in the key, multiplies\nit with the multiplier value and returns the result.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis()\n >>> lua = \"\"\"\n ... local value = redis.call('GET', KEYS[1])\n ... value = tonumber(value)\n ... return value * ARGV[1]\"\"\"\n >>> multiply = r.register_script(lua)\n\n`multiply` is now a Script instance that is invoked by calling it like a\nfunction. Script instances accept the following optional arguments:\n\n* **keys**: A list of key names that the script will access. This becomes the\n KEYS list in Lua.\n* **args**: A list of argument values. This becomes the ARGV list in Lua.\n* **client**: A redis-py Client or Pipeline instance that will invoke the\n script. If client isn't specified, the client that initially\n created the Script instance (the one that `register_script` was\n invoked from) will be used.\n\nContinuing the example from above:\n\n.. code-block:: pycon\n\n >>> r.set('foo', 2)\n >>> multiply(keys=['foo'], args=[5])\n 10\n\nThe value of key 'foo' is set to 2. When multiply is invoked, the 'foo' key is\npassed to the script along with the multiplier value of 5. Lua executes the\nscript and returns the result, 10.\n\nScript instances can be executed using a different client instance, even one\nthat points to a completely different Redis server.\n\n.. code-block:: pycon\n\n >>> r2 = redis.Redis('redis2.example.com')\n >>> r2.set('foo', 3)\n >>> multiply(keys=['foo'], args=[5], client=r2)\n 15\n\nThe Script object ensures that the Lua script is loaded into Redis's script\ncache. In the event of a NOSCRIPT error, it will load the script and retry\nexecuting it.\n\nScript objects can also be used in pipelines. The pipeline instance should be\npassed as the client argument when calling the script. Care is taken to ensure\nthat the script is registered in Redis's script cache just prior to pipeline\nexecution.\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline()\n >>> pipe.set('foo', 5)\n >>> multiply(keys=['foo'], args=[5], client=pipe)\n >>> pipe.execute()\n [True, 25]\n\nSentinel support\n^^^^^^^^^^^^^^^^\n\nredis-py can be used together with `Redis Sentinel `_\nto discover Redis nodes. You need to have at least one Sentinel daemon running\nin order to use redis-py's Sentinel support.\n\nConnecting redis-py to the Sentinel instance(s) is easy. You can use a\nSentinel connection to discover the master and slaves network addresses:\n\n.. code-block:: pycon\n\n >>> from redis.sentinel import Sentinel\n >>> sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1)\n >>> sentinel.discover_master('mymaster')\n ('127.0.0.1', 6379)\n >>> sentinel.discover_slaves('mymaster')\n [('127.0.0.1', 6380)]\n\nYou can also create Redis client connections from a Sentinel instance. You can\nconnect to either the master (for write operations) or a slave (for read-only\noperations).\n\n.. code-block:: pycon\n\n >>> master = sentinel.master_for('mymaster', socket_timeout=0.1)\n >>> slave = sentinel.slave_for('mymaster', socket_timeout=0.1)\n >>> master.set('foo', 'bar')\n >>> slave.get('foo')\n b'bar'\n\nThe master and slave objects are normal Redis instances with their\nconnection pool bound to the Sentinel instance. When a Sentinel backed client\nattempts to establish a connection, it first queries the Sentinel servers to\ndetermine an appropriate host to connect to. If no server is found,\na MasterNotFoundError or SlaveNotFoundError is raised. Both exceptions are\nsubclasses of ConnectionError.\n\nWhen trying to connect to a slave client, the Sentinel connection pool will\niterate over the list of slaves until it finds one that can be connected to.\nIf no slaves can be connected to, a connection will be established with the\nmaster.\n\nSee `Guidelines for Redis clients with support for Redis Sentinel\n`_ to learn more about Redis Sentinel.\n\nScan Iterators\n^^^^^^^^^^^^^^\n\nThe \\*SCAN commands introduced in Redis 2.8 can be cumbersome to use. While\nthese commands are fully supported, redis-py also exposes the following methods\nthat return Python iterators for convenience: `scan_iter`, `hscan_iter`,\n`sscan_iter` and `zscan_iter`.\n\n.. code-block:: pycon\n\n >>> for key, value in (('A', '1'), ('B', '2'), ('C', '3')):\n ... r.set(key, value)\n >>> for key in r.scan_iter():\n ... print(key, r.get(key))\n A 1\n B 2\n C 3\n\nAuthor\n^^^^^^\n\nredis-py is developed and maintained by Andy McCurdy (sedrik@gmail.com).\nIt can be found here: https://github.com/andymccurdy/redis-py\n\nSpecial thanks to:\n\n* Ludovico Magnocavallo, author of the original Python Redis client, from\n which some of the socket code is still used.\n* Alexander Solovyov for ideas on the generic response callback system.\n* Paul Hubbard for initial packaging support.", - "release_date": "2020-06-01T21:30:33", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Andy McCurdy", - "email": "sedrik@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Andy McCurdy", - "email": "sedrik@gmail.com", - "url": null - } - ], - "keywords": [ - "Redis", - "key-value store", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/andymccurdy/redis-py", - "download_url": "https://files.pythonhosted.org/packages/a7/7c/24fb0511df653cf1a5d938d8f5d19802a88cef255706fdda242ff97e91b7/redis-3.5.3-py2.py3-none-any.whl", - "size": 72144, - "sha1": null, - "md5": "c37ac6eeeb79559fe0c4cfe23d79b754", - "sha256": "432b788c4530cfe16d8d943a09d40ca6c16149727e4afe8c2c9d5580c59d9f24", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/redis/3.5.3/json", - "datasource_id": null, - "purl": "pkg:pypi/redis@3.5.3" - }, - { - "type": "pypi", - "namespace": null, - "name": "redis", - "version": "3.5.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python client for Redis key-value store\nredis-py\n========\n\nThe Python interface to the Redis key-value store.\n\n.. image:: https://secure.travis-ci.org/andymccurdy/redis-py.svg?branch=master\n :target: https://travis-ci.org/andymccurdy/redis-py\n.. image:: https://readthedocs.org/projects/redis-py/badge/?version=stable&style=flat\n :target: https://redis-py.readthedocs.io/en/stable/\n.. image:: https://badge.fury.io/py/redis.svg\n :target: https://pypi.org/project/redis/\n.. image:: https://codecov.io/gh/andymccurdy/redis-py/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/andymccurdy/redis-py\n\n\nPython 2 Compatibility Note\n---------------------------\n\nredis-py 3.5.x will be the last version of redis-py that supports Python 2.\nThe 3.5.x line will continue to get bug fixes and security patches that\nsupport Python 2 until August 1, 2020. redis-py 4.0 will be the next major\nversion and will require Python 3.5+.\n\n\nInstallation\n------------\n\nredis-py requires a running Redis server. See `Redis's quickstart\n`_ for installation instructions.\n\nredis-py can be installed using `pip` similar to other Python packages. Do not use `sudo`\nwith `pip`. It is usually good to work in a\n`virtualenv `_ or\n`venv `_ to avoid conflicts with other package\nmanagers and Python projects. For a quick introduction see\n`Python Virtual Environments in Five Minutes `_.\n\nTo install redis-py, simply:\n\n.. code-block:: bash\n\n $ pip install redis\n\nor from source:\n\n.. code-block:: bash\n\n $ python setup.py install\n\n\nGetting Started\n---------------\n\n.. code-block:: pycon\n\n >>> import redis\n >>> r = redis.Redis(host='localhost', port=6379, db=0)\n >>> r.set('foo', 'bar')\n True\n >>> r.get('foo')\n b'bar'\n\nBy default, all responses are returned as `bytes` in Python 3 and `str` in\nPython 2. The user is responsible for decoding to Python 3 strings or Python 2\nunicode objects.\n\nIf **all** string responses from a client should be decoded, the user can\nspecify `decode_responses=True` to `Redis.__init__`. In this case, any\nRedis command that returns a string type will be decoded with the `encoding`\nspecified.\n\n\nUpgrading from redis-py 2.X to 3.0\n----------------------------------\n\nredis-py 3.0 introduces many new features but required a number of backwards\nincompatible changes to be made in the process. This section attempts to\nprovide an upgrade path for users migrating from 2.X to 3.0.\n\n\nPython Version Support\n^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 supports Python 2.7 and Python 3.5+.\n\n\nClient Classes: Redis and StrictRedis\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 drops support for the legacy \"Redis\" client class. \"StrictRedis\"\nhas been renamed to \"Redis\" and an alias named \"StrictRedis\" is provided so\nthat users previously using \"StrictRedis\" can continue to run unchanged.\n\nThe 2.X \"Redis\" class provided alternative implementations of a few commands.\nThis confused users (rightfully so) and caused a number of support issues. To\nmake things easier going forward, it was decided to drop support for these\nalternate implementations and instead focus on a single client class.\n\n2.X users that are already using StrictRedis don't have to change the class\nname. StrictRedis will continue to work for the foreseeable future.\n\n2.X users that are using the Redis class will have to make changes if they\nuse any of the following commands:\n\n* SETEX: The argument order has changed. The new order is (name, time, value).\n* LREM: The argument order has changed. The new order is (name, num, value).\n* TTL and PTTL: The return value is now always an int and matches the\n official Redis command (>0 indicates the timeout, -1 indicates that the key\n exists but that it has no expire time set, -2 indicates that the key does\n not exist)\n\n\nSSL Connections\n^^^^^^^^^^^^^^^\n\nredis-py 3.0 changes the default value of the `ssl_cert_reqs` option from\n`None` to `'required'`. See\n`Issue 1016 `_. This\nchange enforces hostname validation when accepting a cert from a remote SSL\nterminator. If the terminator doesn't properly set the hostname on the cert\nthis will cause redis-py 3.0 to raise a ConnectionError.\n\nThis check can be disabled by setting `ssl_cert_reqs` to `None`. Note that\ndoing so removes the security check. Do so at your own risk.\n\nIt has been reported that SSL certs received from AWS ElastiCache do not have\nproper hostnames and turning off hostname verification is currently required.\n\n\nMSET, MSETNX and ZADD\n^^^^^^^^^^^^^^^^^^^^^\n\nThese commands all accept a mapping of key/value pairs. In redis-py 2.X\nthis mapping could be specified as ``*args`` or as ``**kwargs``. Both of these\nstyles caused issues when Redis introduced optional flags to ZADD. Relying on\n``*args`` caused issues with the optional argument order, especially in Python\n2.7. Relying on ``**kwargs`` caused potential collision issues of user keys with\nthe argument names in the method signature.\n\nTo resolve this, redis-py 3.0 has changed these three commands to all accept\na single positional argument named mapping that is expected to be a dict. For\nMSET and MSETNX, the dict is a mapping of key-names -> values. For ZADD, the\ndict is a mapping of element-names -> score.\n\nMSET, MSETNX and ZADD now look like:\n\n.. code-block:: python\n\n def mset(self, mapping):\n def msetnx(self, mapping):\n def zadd(self, name, mapping, nx=False, xx=False, ch=False, incr=False):\n\nAll 2.X users that use these commands must modify their code to supply\nkeys and values as a dict to these commands.\n\n\nZINCRBY\n^^^^^^^\n\nredis-py 2.X accidentally modified the argument order of ZINCRBY, swapping the\norder of value and amount. ZINCRBY now looks like:\n\n.. code-block:: python\n\n def zincrby(self, name, amount, value):\n\nAll 2.X users that rely on ZINCRBY must swap the order of amount and value\nfor the command to continue to work as intended.\n\n\nEncoding of User Input\n^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 only accepts user data as bytes, strings or numbers (ints, longs\nand floats). Attempting to specify a key or a value as any other type will\nraise a DataError exception.\n\nredis-py 2.X attempted to coerce any type of input into a string. While\noccasionally convenient, this caused all sorts of hidden errors when users\npassed boolean values (which were coerced to 'True' or 'False'), a None\nvalue (which was coerced to 'None') or other values, such as user defined\ntypes.\n\nAll 2.X users should make sure that the keys and values they pass into\nredis-py are either bytes, strings or numbers.\n\n\nLocks\n^^^^^\n\nredis-py 3.0 drops support for the pipeline-based Lock and now only supports\nthe Lua-based lock. In doing so, LuaLock has been renamed to Lock. This also\nmeans that redis-py Lock objects require Redis server 2.6 or greater.\n\n2.X users that were explicitly referring to \"LuaLock\" will have to now refer\nto \"Lock\" instead.\n\n\nLocks as Context Managers\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nredis-py 3.0 now raises a LockError when using a lock as a context manager and\nthe lock cannot be acquired within the specified timeout. This is more of a\nbug fix than a backwards incompatible change. However, given an error is now\nraised where none was before, this might alarm some users.\n\n2.X users should make sure they're wrapping their lock code in a try/catch\nlike this:\n\n.. code-block:: python\n\n try:\n with r.lock('my-lock-key', blocking_timeout=5) as lock:\n # code you want executed only after the lock has been acquired\n except LockError:\n # the lock wasn't acquired\n\n\nAPI Reference\n-------------\n\nThe `official Redis command documentation `_ does a\ngreat job of explaining each command in detail. redis-py attempts to adhere\nto the official command syntax. There are a few exceptions:\n\n* **SELECT**: Not implemented. See the explanation in the Thread Safety section\n below.\n* **DEL**: 'del' is a reserved keyword in the Python syntax. Therefore redis-py\n uses 'delete' instead.\n* **MULTI/EXEC**: These are implemented as part of the Pipeline class. The\n pipeline is wrapped with the MULTI and EXEC statements by default when it\n is executed, which can be disabled by specifying transaction=False.\n See more about Pipelines below.\n* **SUBSCRIBE/LISTEN**: Similar to pipelines, PubSub is implemented as a separate\n class as it places the underlying connection in a state where it can't\n execute non-pubsub commands. Calling the pubsub method from the Redis client\n will return a PubSub instance where you can subscribe to channels and listen\n for messages. You can only call PUBLISH from the Redis client (see\n `this comment on issue #151\n `_\n for details).\n* **SCAN/SSCAN/HSCAN/ZSCAN**: The \\*SCAN commands are implemented as they\n exist in the Redis documentation. In addition, each command has an equivalent\n iterator method. These are purely for convenience so the user doesn't have\n to keep track of the cursor while iterating. Use the\n scan_iter/sscan_iter/hscan_iter/zscan_iter methods for this behavior.\n\n\nMore Detail\n-----------\n\nConnection Pools\n^^^^^^^^^^^^^^^^\n\nBehind the scenes, redis-py uses a connection pool to manage connections to\na Redis server. By default, each Redis instance you create will in turn create\nits own connection pool. You can override this behavior and use an existing\nconnection pool by passing an already created connection pool instance to the\nconnection_pool argument of the Redis class. You may choose to do this in order\nto implement client side sharding or have fine-grain control of how\nconnections are managed.\n\n.. code-block:: pycon\n\n >>> pool = redis.ConnectionPool(host='localhost', port=6379, db=0)\n >>> r = redis.Redis(connection_pool=pool)\n\nConnections\n^^^^^^^^^^^\n\nConnectionPools manage a set of Connection instances. redis-py ships with two\ntypes of Connections. The default, Connection, is a normal TCP socket based\nconnection. The UnixDomainSocketConnection allows for clients running on the\nsame device as the server to connect via a unix domain socket. To use a\nUnixDomainSocketConnection connection, simply pass the unix_socket_path\nargument, which is a string to the unix domain socket file. Additionally, make\nsure the unixsocket parameter is defined in your redis.conf file. It's\ncommented out by default.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(unix_socket_path='/tmp/redis.sock')\n\nYou can create your own Connection subclasses as well. This may be useful if\nyou want to control the socket behavior within an async framework. To\ninstantiate a client class using your own connection, you need to create\na connection pool, passing your class to the connection_class argument.\nOther keyword parameters you pass to the pool will be passed to the class\nspecified during initialization.\n\n.. code-block:: pycon\n\n >>> pool = redis.ConnectionPool(connection_class=YourConnectionClass,\n your_arg='...', ...)\n\nConnections maintain an open socket to the Redis server. Sometimes these\nsockets are interrupted or disconnected for a variety of reasons. For example,\nnetwork appliances, load balancers and other services that sit between clients\nand servers are often configured to kill connections that remain idle for a\ngiven threshold.\n\nWhen a connection becomes disconnected, the next command issued on that\nconnection will fail and redis-py will raise a ConnectionError to the caller.\nThis allows each application that uses redis-py to handle errors in a way\nthat's fitting for that specific application. However, constant error\nhandling can be verbose and cumbersome, especially when socket disconnections\nhappen frequently in many production environments.\n\nTo combat this, redis-py can issue regular health checks to assess the\nliveliness of a connection just before issuing a command. Users can pass\n``health_check_interval=N`` to the Redis or ConnectionPool classes or\nas a query argument within a Redis URL. The value of ``health_check_interval``\nmust be an integer. A value of ``0``, the default, disables health checks.\nAny positive integer will enable health checks. Health checks are performed\njust before a command is executed if the underlying connection has been idle\nfor more than ``health_check_interval`` seconds. For example,\n``health_check_interval=30`` will ensure that a health check is run on any\nconnection that has been idle for 30 or more seconds just before a command\nis executed on that connection.\n\nIf your application is running in an environment that disconnects idle\nconnections after 30 seconds you should set the ``health_check_interval``\noption to a value less than 30.\n\nThis option also works on any PubSub connection that is created from a\nclient with ``health_check_interval`` enabled. PubSub users need to ensure\nthat ``get_message()`` or ``listen()`` are called more frequently than\n``health_check_interval`` seconds. It is assumed that most workloads already\ndo this.\n\nIf your PubSub use case doesn't call ``get_message()`` or ``listen()``\nfrequently, you should call ``pubsub.check_health()`` explicitly on a\nregularly basis.\n\nParsers\n^^^^^^^\n\nParser classes provide a way to control how responses from the Redis server\nare parsed. redis-py ships with two parser classes, the PythonParser and the\nHiredisParser. By default, redis-py will attempt to use the HiredisParser if\nyou have the hiredis module installed and will fallback to the PythonParser\notherwise.\n\nHiredis is a C library maintained by the core Redis team. Pieter Noordhuis was\nkind enough to create Python bindings. Using Hiredis can provide up to a\n10x speed improvement in parsing responses from the Redis server. The\nperformance increase is most noticeable when retrieving many pieces of data,\nsuch as from LRANGE or SMEMBERS operations.\n\nHiredis is available on PyPI, and can be installed via pip just like redis-py.\n\n.. code-block:: bash\n\n $ pip install hiredis\n\nResponse Callbacks\n^^^^^^^^^^^^^^^^^^\n\nThe client class uses a set of callbacks to cast Redis responses to the\nappropriate Python type. There are a number of these callbacks defined on\nthe Redis client class in a dictionary called RESPONSE_CALLBACKS.\n\nCustom callbacks can be added on a per-instance basis using the\nset_response_callback method. This method accepts two arguments: a command\nname and the callback. Callbacks added in this manner are only valid on the\ninstance the callback is added to. If you want to define or override a callback\nglobally, you should make a subclass of the Redis client and add your callback\nto its RESPONSE_CALLBACKS class dictionary.\n\nResponse callbacks take at least one parameter: the response from the Redis\nserver. Keyword arguments may also be accepted in order to further control\nhow to interpret the response. These keyword arguments are specified during the\ncommand's call to execute_command. The ZRANGE implementation demonstrates the\nuse of response callback keyword arguments with its \"withscores\" argument.\n\nThread Safety\n^^^^^^^^^^^^^\n\nRedis client instances can safely be shared between threads. Internally,\nconnection instances are only retrieved from the connection pool during\ncommand execution, and returned to the pool directly after. Command execution\nnever modifies state on the client instance.\n\nHowever, there is one caveat: the Redis SELECT command. The SELECT command\nallows you to switch the database currently in use by the connection. That\ndatabase remains selected until another is selected or until the connection is\nclosed. This creates an issue in that connections could be returned to the pool\nthat are connected to a different database.\n\nAs a result, redis-py does not implement the SELECT command on client\ninstances. If you use multiple Redis databases within the same application, you\nshould create a separate client instance (and possibly a separate connection\npool) for each database.\n\nIt is not safe to pass PubSub or Pipeline objects between threads.\n\nPipelines\n^^^^^^^^^\n\nPipelines are a subclass of the base Redis class that provide support for\nbuffering multiple commands to the server in a single request. They can be used\nto dramatically increase the performance of groups of commands by reducing the\nnumber of back-and-forth TCP packets between the client and server.\n\nPipelines are quite simple to use:\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> r.set('bing', 'baz')\n >>> # Use the pipeline() method to create a pipeline instance\n >>> pipe = r.pipeline()\n >>> # The following SET commands are buffered\n >>> pipe.set('foo', 'bar')\n >>> pipe.get('bing')\n >>> # the EXECUTE call sends all buffered commands to the server, returning\n >>> # a list of responses, one for each command.\n >>> pipe.execute()\n [True, b'baz']\n\nFor ease of use, all commands being buffered into the pipeline return the\npipeline object itself. Therefore calls can be chained like:\n\n.. code-block:: pycon\n\n >>> pipe.set('foo', 'bar').sadd('faz', 'baz').incr('auto_number').execute()\n [True, True, 6]\n\nIn addition, pipelines can also ensure the buffered commands are executed\natomically as a group. This happens by default. If you want to disable the\natomic nature of a pipeline but still want to buffer commands, you can turn\noff transactions.\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline(transaction=False)\n\nA common issue occurs when requiring atomic transactions but needing to\nretrieve values in Redis prior for use within the transaction. For instance,\nlet's assume that the INCR command didn't exist and we need to build an atomic\nversion of INCR in Python.\n\nThe completely naive implementation could GET the value, increment it in\nPython, and SET the new value back. However, this is not atomic because\nmultiple clients could be doing this at the same time, each getting the same\nvalue from GET.\n\nEnter the WATCH command. WATCH provides the ability to monitor one or more keys\nprior to starting a transaction. If any of those keys change prior the\nexecution of that transaction, the entire transaction will be canceled and a\nWatchError will be raised. To implement our own client-side INCR command, we\ncould do something like this:\n\n.. code-block:: pycon\n\n >>> with r.pipeline() as pipe:\n ... while True:\n ... try:\n ... # put a WATCH on the key that holds our sequence value\n ... pipe.watch('OUR-SEQUENCE-KEY')\n ... # after WATCHing, the pipeline is put into immediate execution\n ... # mode until we tell it to start buffering commands again.\n ... # this allows us to get the current value of our sequence\n ... current_value = pipe.get('OUR-SEQUENCE-KEY')\n ... next_value = int(current_value) + 1\n ... # now we can put the pipeline back into buffered mode with MULTI\n ... pipe.multi()\n ... pipe.set('OUR-SEQUENCE-KEY', next_value)\n ... # and finally, execute the pipeline (the set command)\n ... pipe.execute()\n ... # if a WatchError wasn't raised during execution, everything\n ... # we just did happened atomically.\n ... break\n ... except WatchError:\n ... # another client must have changed 'OUR-SEQUENCE-KEY' between\n ... # the time we started WATCHing it and the pipeline's execution.\n ... # our best bet is to just retry.\n ... continue\n\nNote that, because the Pipeline must bind to a single connection for the\nduration of a WATCH, care must be taken to ensure that the connection is\nreturned to the connection pool by calling the reset() method. If the\nPipeline is used as a context manager (as in the example above) reset()\nwill be called automatically. Of course you can do this the manual way by\nexplicitly calling reset():\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline()\n >>> while True:\n ... try:\n ... pipe.watch('OUR-SEQUENCE-KEY')\n ... ...\n ... pipe.execute()\n ... break\n ... except WatchError:\n ... continue\n ... finally:\n ... pipe.reset()\n\nA convenience method named \"transaction\" exists for handling all the\nboilerplate of handling and retrying watch errors. It takes a callable that\nshould expect a single parameter, a pipeline object, and any number of keys to\nbe WATCHed. Our client-side INCR command above can be written like this,\nwhich is much easier to read:\n\n.. code-block:: pycon\n\n >>> def client_side_incr(pipe):\n ... current_value = pipe.get('OUR-SEQUENCE-KEY')\n ... next_value = int(current_value) + 1\n ... pipe.multi()\n ... pipe.set('OUR-SEQUENCE-KEY', next_value)\n >>>\n >>> r.transaction(client_side_incr, 'OUR-SEQUENCE-KEY')\n [True]\n\nBe sure to call `pipe.multi()` in the callable passed to `Redis.transaction`\nprior to any write commands.\n\nPublish / Subscribe\n^^^^^^^^^^^^^^^^^^^\n\nredis-py includes a `PubSub` object that subscribes to channels and listens\nfor new messages. Creating a `PubSub` object is easy.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> p = r.pubsub()\n\nOnce a `PubSub` instance is created, channels and patterns can be subscribed\nto.\n\n.. code-block:: pycon\n\n >>> p.subscribe('my-first-channel', 'my-second-channel', ...)\n >>> p.psubscribe('my-*', ...)\n\nThe `PubSub` instance is now subscribed to those channels/patterns. The\nsubscription confirmations can be seen by reading messages from the `PubSub`\ninstance.\n\n.. code-block:: pycon\n\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-second-channel', 'data': 1}\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-first-channel', 'data': 2}\n >>> p.get_message()\n {'pattern': None, 'type': 'psubscribe', 'channel': b'my-*', 'data': 3}\n\nEvery message read from a `PubSub` instance will be a dictionary with the\nfollowing keys.\n\n* **type**: One of the following: 'subscribe', 'unsubscribe', 'psubscribe',\n 'punsubscribe', 'message', 'pmessage'\n* **channel**: The channel [un]subscribed to or the channel a message was\n published to\n* **pattern**: The pattern that matched a published message's channel. Will be\n `None` in all cases except for 'pmessage' types.\n* **data**: The message data. With [un]subscribe messages, this value will be\n the number of channels and patterns the connection is currently subscribed\n to. With [p]message messages, this value will be the actual published\n message.\n\nLet's send a message now.\n\n.. code-block:: pycon\n\n # the publish method returns the number matching channel and pattern\n # subscriptions. 'my-first-channel' matches both the 'my-first-channel'\n # subscription and the 'my-*' pattern subscription, so this message will\n # be delivered to 2 channels/patterns\n >>> r.publish('my-first-channel', 'some data')\n 2\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': b'some data', 'pattern': None, 'type': 'message'}\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': b'some data', 'pattern': b'my-*', 'type': 'pmessage'}\n\nUnsubscribing works just like subscribing. If no arguments are passed to\n[p]unsubscribe, all channels or patterns will be unsubscribed from.\n\n.. code-block:: pycon\n\n >>> p.unsubscribe()\n >>> p.punsubscribe('my-*')\n >>> p.get_message()\n {'channel': b'my-second-channel', 'data': 2, 'pattern': None, 'type': 'unsubscribe'}\n >>> p.get_message()\n {'channel': b'my-first-channel', 'data': 1, 'pattern': None, 'type': 'unsubscribe'}\n >>> p.get_message()\n {'channel': b'my-*', 'data': 0, 'pattern': None, 'type': 'punsubscribe'}\n\nredis-py also allows you to register callback functions to handle published\nmessages. Message handlers take a single argument, the message, which is a\ndictionary just like the examples above. To subscribe to a channel or pattern\nwith a message handler, pass the channel or pattern name as a keyword argument\nwith its value being the callback function.\n\nWhen a message is read on a channel or pattern with a message handler, the\nmessage dictionary is created and passed to the message handler. In this case,\na `None` value is returned from get_message() since the message was already\nhandled.\n\n.. code-block:: pycon\n\n >>> def my_handler(message):\n ... print('MY HANDLER: ', message['data'])\n >>> p.subscribe(**{'my-channel': my_handler})\n # read the subscribe confirmation message\n >>> p.get_message()\n {'pattern': None, 'type': 'subscribe', 'channel': b'my-channel', 'data': 1}\n >>> r.publish('my-channel', 'awesome data')\n 1\n # for the message handler to work, we need tell the instance to read data.\n # this can be done in several ways (read more below). we'll just use\n # the familiar get_message() function for now\n >>> message = p.get_message()\n MY HANDLER: awesome data\n # note here that the my_handler callback printed the string above.\n # `message` is None because the message was handled by our handler.\n >>> print(message)\n None\n\nIf your application is not interested in the (sometimes noisy)\nsubscribe/unsubscribe confirmation messages, you can ignore them by passing\n`ignore_subscribe_messages=True` to `r.pubsub()`. This will cause all\nsubscribe/unsubscribe messages to be read, but they won't bubble up to your\napplication.\n\n.. code-block:: pycon\n\n >>> p = r.pubsub(ignore_subscribe_messages=True)\n >>> p.subscribe('my-channel')\n >>> p.get_message() # hides the subscribe message and returns None\n >>> r.publish('my-channel', 'my data')\n 1\n >>> p.get_message()\n {'channel': b'my-channel', 'data': b'my data', 'pattern': None, 'type': 'message'}\n\nThere are three different strategies for reading messages.\n\nThe examples above have been using `pubsub.get_message()`. Behind the scenes,\n`get_message()` uses the system's 'select' module to quickly poll the\nconnection's socket. If there's data available to be read, `get_message()` will\nread it, format the message and return it or pass it to a message handler. If\nthere's no data to be read, `get_message()` will immediately return None. This\nmakes it trivial to integrate into an existing event loop inside your\napplication.\n\n.. code-block:: pycon\n\n >>> while True:\n >>> message = p.get_message()\n >>> if message:\n >>> # do something with the message\n >>> time.sleep(0.001) # be nice to the system :)\n\nOlder versions of redis-py only read messages with `pubsub.listen()`. listen()\nis a generator that blocks until a message is available. If your application\ndoesn't need to do anything else but receive and act on messages received from\nredis, listen() is an easy way to get up an running.\n\n.. code-block:: pycon\n\n >>> for message in p.listen():\n ... # do something with the message\n\nThe third option runs an event loop in a separate thread.\n`pubsub.run_in_thread()` creates a new thread and starts the event loop. The\nthread object is returned to the caller of `run_in_thread()`. The caller can\nuse the `thread.stop()` method to shut down the event loop and thread. Behind\nthe scenes, this is simply a wrapper around `get_message()` that runs in a\nseparate thread, essentially creating a tiny non-blocking event loop for you.\n`run_in_thread()` takes an optional `sleep_time` argument. If specified, the\nevent loop will call `time.sleep()` with the value in each iteration of the\nloop.\n\nNote: Since we're running in a separate thread, there's no way to handle\nmessages that aren't automatically handled with registered message handlers.\nTherefore, redis-py prevents you from calling `run_in_thread()` if you're\nsubscribed to patterns or channels that don't have message handlers attached.\n\n.. code-block:: pycon\n\n >>> p.subscribe(**{'my-channel': my_handler})\n >>> thread = p.run_in_thread(sleep_time=0.001)\n # the event loop is now running in the background processing messages\n # when it's time to shut it down...\n >>> thread.stop()\n\nA PubSub object adheres to the same encoding semantics as the client instance\nit was created from. Any channel or pattern that's unicode will be encoded\nusing the `charset` specified on the client before being sent to Redis. If the\nclient's `decode_responses` flag is set the False (the default), the\n'channel', 'pattern' and 'data' values in message dictionaries will be byte\nstrings (str on Python 2, bytes on Python 3). If the client's\n`decode_responses` is True, then the 'channel', 'pattern' and 'data' values\nwill be automatically decoded to unicode strings using the client's `charset`.\n\nPubSub objects remember what channels and patterns they are subscribed to. In\nthe event of a disconnection such as a network error or timeout, the\nPubSub object will re-subscribe to all prior channels and patterns when\nreconnecting. Messages that were published while the client was disconnected\ncannot be delivered. When you're finished with a PubSub object, call its\n`.close()` method to shutdown the connection.\n\n.. code-block:: pycon\n\n >>> p = r.pubsub()\n >>> ...\n >>> p.close()\n\n\nThe PUBSUB set of subcommands CHANNELS, NUMSUB and NUMPAT are also\nsupported:\n\n.. code-block:: pycon\n\n >>> r.pubsub_channels()\n [b'foo', b'bar']\n >>> r.pubsub_numsub('foo', 'bar')\n [(b'foo', 9001), (b'bar', 42)]\n >>> r.pubsub_numsub('baz')\n [(b'baz', 0)]\n >>> r.pubsub_numpat()\n 1204\n\nMonitor\n^^^^^^^\nredis-py includes a `Monitor` object that streams every command processed\nby the Redis server. Use `listen()` on the `Monitor` object to block\nuntil a command is received.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis(...)\n >>> with r.monitor() as m:\n >>> for command in m.listen():\n >>> print(command)\n\nLua Scripting\n^^^^^^^^^^^^^\n\nredis-py supports the EVAL, EVALSHA, and SCRIPT commands. However, there are\na number of edge cases that make these commands tedious to use in real world\nscenarios. Therefore, redis-py exposes a Script object that makes scripting\nmuch easier to use.\n\nTo create a Script instance, use the `register_script` function on a client\ninstance passing the Lua code as the first argument. `register_script` returns\na Script instance that you can use throughout your code.\n\nThe following trivial Lua script accepts two parameters: the name of a key and\na multiplier value. The script fetches the value stored in the key, multiplies\nit with the multiplier value and returns the result.\n\n.. code-block:: pycon\n\n >>> r = redis.Redis()\n >>> lua = \"\"\"\n ... local value = redis.call('GET', KEYS[1])\n ... value = tonumber(value)\n ... return value * ARGV[1]\"\"\"\n >>> multiply = r.register_script(lua)\n\n`multiply` is now a Script instance that is invoked by calling it like a\nfunction. Script instances accept the following optional arguments:\n\n* **keys**: A list of key names that the script will access. This becomes the\n KEYS list in Lua.\n* **args**: A list of argument values. This becomes the ARGV list in Lua.\n* **client**: A redis-py Client or Pipeline instance that will invoke the\n script. If client isn't specified, the client that initially\n created the Script instance (the one that `register_script` was\n invoked from) will be used.\n\nContinuing the example from above:\n\n.. code-block:: pycon\n\n >>> r.set('foo', 2)\n >>> multiply(keys=['foo'], args=[5])\n 10\n\nThe value of key 'foo' is set to 2. When multiply is invoked, the 'foo' key is\npassed to the script along with the multiplier value of 5. Lua executes the\nscript and returns the result, 10.\n\nScript instances can be executed using a different client instance, even one\nthat points to a completely different Redis server.\n\n.. code-block:: pycon\n\n >>> r2 = redis.Redis('redis2.example.com')\n >>> r2.set('foo', 3)\n >>> multiply(keys=['foo'], args=[5], client=r2)\n 15\n\nThe Script object ensures that the Lua script is loaded into Redis's script\ncache. In the event of a NOSCRIPT error, it will load the script and retry\nexecuting it.\n\nScript objects can also be used in pipelines. The pipeline instance should be\npassed as the client argument when calling the script. Care is taken to ensure\nthat the script is registered in Redis's script cache just prior to pipeline\nexecution.\n\n.. code-block:: pycon\n\n >>> pipe = r.pipeline()\n >>> pipe.set('foo', 5)\n >>> multiply(keys=['foo'], args=[5], client=pipe)\n >>> pipe.execute()\n [True, 25]\n\nSentinel support\n^^^^^^^^^^^^^^^^\n\nredis-py can be used together with `Redis Sentinel `_\nto discover Redis nodes. You need to have at least one Sentinel daemon running\nin order to use redis-py's Sentinel support.\n\nConnecting redis-py to the Sentinel instance(s) is easy. You can use a\nSentinel connection to discover the master and slaves network addresses:\n\n.. code-block:: pycon\n\n >>> from redis.sentinel import Sentinel\n >>> sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1)\n >>> sentinel.discover_master('mymaster')\n ('127.0.0.1', 6379)\n >>> sentinel.discover_slaves('mymaster')\n [('127.0.0.1', 6380)]\n\nYou can also create Redis client connections from a Sentinel instance. You can\nconnect to either the master (for write operations) or a slave (for read-only\noperations).\n\n.. code-block:: pycon\n\n >>> master = sentinel.master_for('mymaster', socket_timeout=0.1)\n >>> slave = sentinel.slave_for('mymaster', socket_timeout=0.1)\n >>> master.set('foo', 'bar')\n >>> slave.get('foo')\n b'bar'\n\nThe master and slave objects are normal Redis instances with their\nconnection pool bound to the Sentinel instance. When a Sentinel backed client\nattempts to establish a connection, it first queries the Sentinel servers to\ndetermine an appropriate host to connect to. If no server is found,\na MasterNotFoundError or SlaveNotFoundError is raised. Both exceptions are\nsubclasses of ConnectionError.\n\nWhen trying to connect to a slave client, the Sentinel connection pool will\niterate over the list of slaves until it finds one that can be connected to.\nIf no slaves can be connected to, a connection will be established with the\nmaster.\n\nSee `Guidelines for Redis clients with support for Redis Sentinel\n`_ to learn more about Redis Sentinel.\n\nScan Iterators\n^^^^^^^^^^^^^^\n\nThe \\*SCAN commands introduced in Redis 2.8 can be cumbersome to use. While\nthese commands are fully supported, redis-py also exposes the following methods\nthat return Python iterators for convenience: `scan_iter`, `hscan_iter`,\n`sscan_iter` and `zscan_iter`.\n\n.. code-block:: pycon\n\n >>> for key, value in (('A', '1'), ('B', '2'), ('C', '3')):\n ... r.set(key, value)\n >>> for key in r.scan_iter():\n ... print(key, r.get(key))\n A 1\n B 2\n C 3\n\nAuthor\n^^^^^^\n\nredis-py is developed and maintained by Andy McCurdy (sedrik@gmail.com).\nIt can be found here: https://github.com/andymccurdy/redis-py\n\nSpecial thanks to:\n\n* Ludovico Magnocavallo, author of the original Python Redis client, from\n which some of the socket code is still used.\n* Alexander Solovyov for ideas on the generic response callback system.\n* Paul Hubbard for initial packaging support.", - "release_date": "2020-06-01T21:30:35", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Andy McCurdy", - "email": "sedrik@gmail.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Andy McCurdy", - "email": "sedrik@gmail.com", - "url": null - } - ], - "keywords": [ - "Redis", - "key-value store", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/andymccurdy/redis-py", - "download_url": "https://files.pythonhosted.org/packages/b3/17/1e567ff78c83854e16b98694411fe6e08c3426af866ad11397cddceb80d3/redis-3.5.3.tar.gz", - "size": 141112, - "sha1": null, - "md5": "7a00d4540374f34e152a33faa1fcee5f", - "sha256": "0e7e0cfca8660dea8b7d5cd8c4f6c5e29e11f31158c0b0ae91a397f00e5a05a2", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/redis/3.5.3/json", - "datasource_id": null, - "purl": "pkg:pypi/redis@3.5.3" - }, - { - "type": "pypi", - "namespace": null, - "name": "scandir", - "version": "1.10.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "scandir, a better directory iterator and faster os.walk()\r\n=========================================================\r\n\r\n.. image:: https://img.shields.io/pypi/v/scandir.svg\r\n :target: https://pypi.python.org/pypi/scandir\r\n :alt: scandir on PyPI (Python Package Index)\r\n\r\n.. image:: https://travis-ci.org/benhoyt/scandir.svg?branch=master\r\n :target: https://travis-ci.org/benhoyt/scandir\r\n :alt: Travis CI tests (Linux)\r\n\r\n.. image:: https://ci.appveyor.com/api/projects/status/github/benhoyt/scandir?branch=master&svg=true\r\n :target: https://ci.appveyor.com/project/benhoyt/scandir\r\n :alt: Appveyor tests (Windows)\r\n\r\n\r\n``scandir()`` is a directory iteration function like ``os.listdir()``,\r\nexcept that instead of returning a list of bare filenames, it yields\r\n``DirEntry`` objects that include file type and stat information along\r\nwith the name. Using ``scandir()`` increases the speed of ``os.walk()``\r\nby 2-20 times (depending on the platform and file system) by avoiding\r\nunnecessary calls to ``os.stat()`` in most cases.\r\n\r\n\r\nNow included in a Python near you!\r\n----------------------------------\r\n\r\n``scandir`` has been included in the Python 3.5 standard library as\r\n``os.scandir()``, and the related performance improvements to\r\n``os.walk()`` have also been included. So if you're lucky enough to be\r\nusing Python 3.5 (release date September 13, 2015) you get the benefit\r\nimmediately, otherwise just\r\n`download this module from PyPI `_,\r\ninstall it with ``pip install scandir``, and then do something like\r\nthis in your code:\r\n\r\n.. code-block:: python\r\n\r\n # Use the built-in version of scandir/walk if possible, otherwise\r\n # use the scandir module version\r\n try:\r\n from os import scandir, walk\r\n except ImportError:\r\n from scandir import scandir, walk\r\n\r\n`PEP 471 `_, which is the\r\nPEP that proposes including ``scandir`` in the Python standard library,\r\nwas `accepted `_\r\nin July 2014 by Victor Stinner, the BDFL-delegate for the PEP.\r\n\r\nThis ``scandir`` module is intended to work on Python 2.7+ and Python\r\n3.4+ (and it has been tested on those versions).\r\n\r\n\r\nBackground\r\n----------\r\n\r\nPython's built-in ``os.walk()`` is significantly slower than it needs to be,\r\nbecause -- in addition to calling ``listdir()`` on each directory -- it calls\r\n``stat()`` on each file to determine whether the filename is a directory or not.\r\nBut both ``FindFirstFile`` / ``FindNextFile`` on Windows and ``readdir`` on Linux/OS\r\nX already tell you whether the files returned are directories or not, so\r\nno further ``stat`` system calls are needed. In short, you can reduce the number\r\nof system calls from about 2N to N, where N is the total number of files and\r\ndirectories in the tree.\r\n\r\nIn practice, removing all those extra system calls makes ``os.walk()`` about\r\n**7-50 times as fast on Windows, and about 3-10 times as fast on Linux and Mac OS\r\nX.** So we're not talking about micro-optimizations. See more benchmarks\r\nin the \"Benchmarks\" section below.\r\n\r\nSomewhat relatedly, many people have also asked for a version of\r\n``os.listdir()`` that yields filenames as it iterates instead of returning them\r\nas one big list. This improves memory efficiency for iterating very large\r\ndirectories.\r\n\r\nSo as well as a faster ``walk()``, scandir adds a new ``scandir()`` function.\r\nThey're pretty easy to use, but see \"The API\" below for the full docs.\r\n\r\n\r\nBenchmarks\r\n----------\r\n\r\nBelow are results showing how many times as fast ``scandir.walk()`` is than\r\n``os.walk()`` on various systems, found by running ``benchmark.py`` with no\r\narguments:\r\n\r\n==================== ============== =============\r\nSystem version Python version Times as fast\r\n==================== ============== =============\r\nWindows 7 64-bit 2.7.7 64-bit 10.4\r\nWindows 7 64-bit SSD 2.7.7 64-bit 10.3\r\nWindows 7 64-bit NFS 2.7.6 64-bit 36.8\r\nWindows 7 64-bit SSD 3.4.1 64-bit 9.9\r\nWindows 7 64-bit SSD 3.5.0 64-bit 9.5\r\nUbuntu 14.04 64-bit 2.7.6 64-bit 5.8\r\nMac OS X 10.9.3 2.7.5 64-bit 3.8\r\n==================== ============== =============\r\n\r\nAll of the above tests were done using the fast C version of scandir\r\n(source code in ``_scandir.c``).\r\n\r\nNote that the gains are less than the above on smaller directories and greater\r\non larger directories. This is why ``benchmark.py`` creates a test directory\r\ntree with a standardized size.\r\n\r\n\r\nThe API\r\n-------\r\n\r\nwalk()\r\n~~~~~~\r\n\r\nThe API for ``scandir.walk()`` is exactly the same as ``os.walk()``, so just\r\n`read the Python docs `_.\r\n\r\nscandir()\r\n~~~~~~~~~\r\n\r\nThe full docs for ``scandir()`` and the ``DirEntry`` objects it yields are\r\navailable in the `Python documentation here `_. \r\nBut below is a brief summary as well.\r\n\r\n scandir(path='.') -> iterator of DirEntry objects for given path\r\n\r\nLike ``listdir``, ``scandir`` calls the operating system's directory\r\niteration system calls to get the names of the files in the given\r\n``path``, but it's different from ``listdir`` in two ways:\r\n\r\n* Instead of returning bare filename strings, it returns lightweight\r\n ``DirEntry`` objects that hold the filename string and provide\r\n simple methods that allow access to the additional data the\r\n operating system may have returned.\r\n\r\n* It returns a generator instead of a list, so that ``scandir`` acts\r\n as a true iterator instead of returning the full list immediately.\r\n\r\n``scandir()`` yields a ``DirEntry`` object for each file and\r\nsub-directory in ``path``. Just like ``listdir``, the ``'.'``\r\nand ``'..'`` pseudo-directories are skipped, and the entries are\r\nyielded in system-dependent order. Each ``DirEntry`` object has the\r\nfollowing attributes and methods:\r\n\r\n* ``name``: the entry's filename, relative to the scandir ``path``\r\n argument (corresponds to the return values of ``os.listdir``)\r\n\r\n* ``path``: the entry's full path name (not necessarily an absolute\r\n path) -- the equivalent of ``os.path.join(scandir_path, entry.name)``\r\n\r\n* ``is_dir(*, follow_symlinks=True)``: similar to\r\n ``pathlib.Path.is_dir()``, but the return value is cached on the\r\n ``DirEntry`` object; doesn't require a system call in most cases;\r\n don't follow symbolic links if ``follow_symlinks`` is False\r\n\r\n* ``is_file(*, follow_symlinks=True)``: similar to\r\n ``pathlib.Path.is_file()``, but the return value is cached on the\r\n ``DirEntry`` object; doesn't require a system call in most cases; \r\n don't follow symbolic links if ``follow_symlinks`` is False\r\n\r\n* ``is_symlink()``: similar to ``pathlib.Path.is_symlink()``, but the\r\n return value is cached on the ``DirEntry`` object; doesn't require a\r\n system call in most cases\r\n\r\n* ``stat(*, follow_symlinks=True)``: like ``os.stat()``, but the\r\n return value is cached on the ``DirEntry`` object; does not require a\r\n system call on Windows (except for symlinks); don't follow symbolic links\r\n (like ``os.lstat()``) if ``follow_symlinks`` is False\r\n\r\n* ``inode()``: return the inode number of the entry; the return value\r\n is cached on the ``DirEntry`` object\r\n\r\nHere's a very simple example of ``scandir()`` showing use of the\r\n``DirEntry.name`` attribute and the ``DirEntry.is_dir()`` method:\r\n\r\n.. code-block:: python\r\n\r\n def subdirs(path):\r\n \"\"\"Yield directory names not starting with '.' under given path.\"\"\"\r\n for entry in os.scandir(path):\r\n if not entry.name.startswith('.') and entry.is_dir():\r\n yield entry.name\r\n\r\nThis ``subdirs()`` function will be significantly faster with scandir\r\nthan ``os.listdir()`` and ``os.path.isdir()`` on both Windows and POSIX\r\nsystems, especially on medium-sized or large directories.\r\n\r\n\r\nFurther reading\r\n---------------\r\n\r\n* `The Python docs for scandir `_\r\n* `PEP 471 `_, the\r\n (now-accepted) Python Enhancement Proposal that proposed adding\r\n ``scandir`` to the standard library -- a lot of details here,\r\n including rejected ideas and previous discussion\r\n\r\n\r\nFlames, comments, bug reports\r\n-----------------------------\r\n\r\nPlease send flames, comments, and questions about scandir to Ben Hoyt:\r\n\r\nhttp://benhoyt.com/\r\n\r\nFile bug reports for the version in the Python 3.5 standard library\r\n`here `_, or file bug reports\r\nor feature requests for this module at the GitHub project page:\r\n\r\nhttps://github.com/benhoyt/scandir", - "release_date": "2019-03-09T17:58:33", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ben Hoyt", - "email": "benhoyt@gmail.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: System :: Filesystems", - "Topic :: System :: Operating System" - ], - "homepage_url": "https://github.com/benhoyt/scandir", - "download_url": "https://files.pythonhosted.org/packages/df/f5/9c052db7bd54d0cbf1bc0bb6554362bba1012d03e5888950a4f5c5dadc4e/scandir-1.10.0.tar.gz", - "size": 33311, - "sha1": null, - "md5": "f8378f4d9f95a6a78e97ab01aa900c1d", - "sha256": "4d4631f6062e658e9007ab3149a9b914f3548cb38bfb021c64f39a025ce578ae", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "New BSD License", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/scandir/1.10.0/json", - "datasource_id": null, - "purl": "pkg:pypi/scandir@1.10.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "setuptools", - "version": "44.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Easily download, build, install, upgrade, and uninstall Python packages\n.. image:: https://img.shields.io/pypi/v/setuptools.svg\n :target: https://pypi.org/project/setuptools\n\n.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg\n :target: https://setuptools.readthedocs.io\n\n.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white\n :target: https://travis-ci.org/pypa/setuptools\n\n.. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20CI&logo=appveyor&logoColor=white\n :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master\n\n.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white\n :target: https://codecov.io/gh/pypa/setuptools\n\n.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat\n :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme\n\n.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg\n\nSee the `Installation Instructions\n`_ in the Python Packaging\nUser's Guide for instructions on installing, upgrading, and uninstalling\nSetuptools.\n\nQuestions and comments should be directed to the `distutils-sig\nmailing list `_.\nBug reports and especially tested patches may be\nsubmitted directly to the `bug tracker\n`_.\n\nTo report a security vulnerability, please use the\n`Tidelift security contact `_.\nTidelift will coordinate the fix and disclosure.\n\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nSetuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more `_.\n\nCode of Conduct\n===============\n\nEveryone interacting in the setuptools project's codebases, issue trackers,\nchat rooms, and mailing lists is expected to follow the\n`PyPA Code of Conduct `_.", - "release_date": "2020-05-29T01:06:05", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Python Packaging Authority", - "email": "distutils-sig@python.org", - "url": null - } - ], - "keywords": [ - "CPAN PyPI distutils eggs package management", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Archiving :: Packaging", - "Topic :: System :: Systems Administration", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/pypa/setuptools", - "download_url": "https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl", - "size": 583493, - "sha1": null, - "md5": "a5d4ce18230f73d2973afa33b79110ec", - "sha256": "27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/setuptools/44.1.1/json", - "datasource_id": null, - "purl": "pkg:pypi/setuptools@44.1.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "setuptools", - "version": "44.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Easily download, build, install, upgrade, and uninstall Python packages\n.. image:: https://img.shields.io/pypi/v/setuptools.svg\n :target: https://pypi.org/project/setuptools\n\n.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg\n :target: https://setuptools.readthedocs.io\n\n.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white\n :target: https://travis-ci.org/pypa/setuptools\n\n.. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20CI&logo=appveyor&logoColor=white\n :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master\n\n.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white\n :target: https://codecov.io/gh/pypa/setuptools\n\n.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat\n :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme\n\n.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg\n\nSee the `Installation Instructions\n`_ in the Python Packaging\nUser's Guide for instructions on installing, upgrading, and uninstalling\nSetuptools.\n\nQuestions and comments should be directed to the `distutils-sig\nmailing list `_.\nBug reports and especially tested patches may be\nsubmitted directly to the `bug tracker\n`_.\n\nTo report a security vulnerability, please use the\n`Tidelift security contact `_.\nTidelift will coordinate the fix and disclosure.\n\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nSetuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more `_.\n\nCode of Conduct\n===============\n\nEveryone interacting in the setuptools project's codebases, issue trackers,\nchat rooms, and mailing lists is expected to follow the\n`PyPA Code of Conduct `_.", - "release_date": "2020-05-29T01:06:07", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Python Packaging Authority", - "email": "distutils-sig@python.org", - "url": null - } - ], - "keywords": [ - "CPAN PyPI distutils eggs package management", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Archiving :: Packaging", - "Topic :: System :: Systems Administration", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/pypa/setuptools", - "download_url": "https://files.pythonhosted.org/packages/b2/40/4e00501c204b457f10fe410da0c97537214b2265247bc9a5bc6edd55b9e4/setuptools-44.1.1.zip", - "size": 858770, - "sha1": null, - "md5": "2c41f19cfd1f16a7d7bb23689921ac1b", - "sha256": "c67aa55db532a0dadc4d2e20ba9961cbd3ccc84d544e9029699822542b5a476b", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/setuptools/44.1.1/json", - "datasource_id": null, - "purl": "pkg:pypi/setuptools@44.1.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "simplegeneric", - "version": "0.8.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Simple generic functions (similar to Python's own len(), pickle.dump(), etc.)\n* New in 0.8: Source and tests are compatible with Python 3 (w/o ``setup.py``)\r\n\r\n * 0.8.1: setup.py is now compatible with Python 3 as well\r\n\r\n* New in 0.7: `Multiple Types or Objects`_\r\n\r\n* New in 0.6: `Inspection and Extension`_, and thread-safe method registration\r\n\r\nThe ``simplegeneric`` module lets you define simple single-dispatch\r\ngeneric functions, akin to Python's built-in generic functions like\r\n``len()``, ``iter()`` and so on. However, instead of using\r\nspecially-named methods, these generic functions use simple lookup\r\ntables, akin to those used by e.g. ``pickle.dump()`` and other\r\ngeneric functions found in the Python standard library.\r\n\r\nAs you can see from the above examples, generic functions are actually\r\nquite common in Python already, but there is no standard way to create\r\nsimple ones. This library attempts to fill that gap, as generic\r\nfunctions are an `excellent alternative to the Visitor pattern`_, as\r\nwell as being a great substitute for most common uses of adaptation.\r\n\r\nThis library tries to be the simplest possible implementation of generic\r\nfunctions, and it therefore eschews the use of multiple or predicate\r\ndispatch, as well as avoiding speedup techniques such as C dispatching\r\nor code generation. But it has absolutely no dependencies, other than\r\nPython 2.4, and the implementation is just a single Python module of\r\nless than 100 lines.\r\n\r\n\r\nUsage\r\n-----\r\n\r\nDefining and using a generic function is straightforward::\r\n\r\n >>> from simplegeneric import generic\r\n >>> @generic\r\n ... def move(item, target):\r\n ... \"\"\"Default implementation goes here\"\"\"\r\n ... print(\"what you say?!\")\r\n\r\n >>> @move.when_type(int)\r\n ... def move_int(item, target):\r\n ... print(\"In AD %d, %s was beginning.\" % (item, target))\r\n\r\n >>> @move.when_type(str)\r\n ... def move_str(item, target):\r\n ... print(\"How are you %s!!\" % item)\r\n ... print(\"All your %s are belong to us.\" % (target,))\r\n\r\n >>> zig = object()\r\n >>> @move.when_object(zig)\r\n ... def move_zig(item, target):\r\n ... print(\"You know what you %s.\" % (target,))\r\n ... print(\"For great justice!\")\r\n\r\n >>> move(2101, \"war\")\r\n In AD 2101, war was beginning.\r\n\r\n >>> move(\"gentlemen\", \"base\")\r\n How are you gentlemen!!\r\n All your base are belong to us.\r\n\r\n >>> move(zig, \"doing\")\r\n You know what you doing.\r\n For great justice!\r\n\r\n >>> move(27.0, 56.2)\r\n what you say?!\r\n\r\n\r\nInheritance and Allowed Types\r\n-----------------------------\r\n\r\nDefining multiple methods for the same type or object is an error::\r\n\r\n >>> @move.when_type(str)\r\n ... def this_is_wrong(item, target):\r\n ... pass\r\n Traceback (most recent call last):\r\n ...\r\n TypeError: already has method for type <...'str'>\r\n\r\n >>> @move.when_object(zig)\r\n ... def this_is_wrong(item, target): pass\r\n Traceback (most recent call last):\r\n ...\r\n TypeError: already has method for object \r\n\r\nAnd the ``when_type()`` decorator only accepts classes or types::\r\n\r\n >>> @move.when_type(23)\r\n ... def move_23(item, target):\r\n ... print(\"You have no chance to survive!\")\r\n Traceback (most recent call last):\r\n ...\r\n TypeError: 23 is not a type or class\r\n\r\nMethods defined for supertypes are inherited following MRO order::\r\n\r\n >>> class MyString(str):\r\n ... \"\"\"String subclass\"\"\"\r\n\r\n >>> move(MyString(\"ladies\"), \"drinks\")\r\n How are you ladies!!\r\n All your drinks are belong to us.\r\n\r\nClassic class instances are also supported (although the lookup process\r\nis slower than for new-style instances)::\r\n\r\n >>> class X: pass\r\n >>> class Y(X): pass\r\n\r\n >>> @move.when_type(X)\r\n ... def move_x(item, target):\r\n ... print(\"Someone set us up the %s!!!\" % (target,))\r\n\r\n >>> move(X(), \"bomb\")\r\n Someone set us up the bomb!!!\r\n\r\n >>> move(Y(), \"dance\")\r\n Someone set us up the dance!!!\r\n\r\n\r\nMultiple Types or Objects\r\n-------------------------\r\n\r\nAs a convenience, you can now pass more than one type or object to the\r\nregistration methods::\r\n\r\n >>> @generic\r\n ... def isbuiltin(ob):\r\n ... return False\r\n >>> @isbuiltin.when_type(int, str, float, complex, type)\r\n ... @isbuiltin.when_object(None, Ellipsis)\r\n ... def yes(ob):\r\n ... return True\r\n \r\n >>> isbuiltin(1)\r\n True\r\n >>> isbuiltin(object)\r\n True\r\n >>> isbuiltin(object())\r\n False\r\n >>> isbuiltin(X())\r\n False\r\n >>> isbuiltin(None)\r\n True\r\n >>> isbuiltin(Ellipsis)\r\n True\r\n\r\n\r\nDefaults and Docs\r\n-----------------\r\n\r\nYou can obtain a function's default implementation using its ``default``\r\nattribute::\r\n\r\n >>> @move.when_type(Y)\r\n ... def move_y(item, target):\r\n ... print(\"Someone set us up the %s!!!\" % (target,))\r\n ... move.default(item, target)\r\n\r\n >>> move(Y(), \"dance\")\r\n Someone set us up the dance!!!\r\n what you say?!\r\n\r\n\r\n``help()`` and other documentation tools see generic functions as normal\r\nfunction objects, with the same name, attributes, docstring, and module as\r\nthe prototype/default function::\r\n\r\n >>> help(move)\r\n Help on function move:\r\n ...\r\n move(*args, **kw)\r\n Default implementation goes here\r\n ...\r\n\r\n\r\nInspection and Extension\r\n------------------------\r\n\r\nYou can find out if a generic function has a method for a type or object using\r\nthe ``has_object()`` and ``has_type()`` methods::\r\n\r\n >>> move.has_object(zig)\r\n True\r\n >>> move.has_object(42)\r\n False\r\n\r\n >>> move.has_type(X)\r\n True\r\n >>> move.has_type(float)\r\n False\r\n\r\nNote that ``has_type()`` only queries whether there is a method registered for\r\nthe *exact* type, not subtypes or supertypes::\r\n\r\n >>> class Z(X): pass\r\n >>> move.has_type(Z)\r\n False\r\n\r\nYou can create a generic function that \"inherits\" from an existing generic\r\nfunction by calling ``generic()`` on the existing function::\r\n\r\n >>> move2 = generic(move)\r\n >>> move(2101, \"war\")\r\n In AD 2101, war was beginning.\r\n\r\nAny methods added to the new generic function override *all* methods in the\r\n\"base\" function::\r\n\r\n >>> @move2.when_type(X)\r\n ... def move2_X(item, target):\r\n ... print(\"You have no chance to survive make your %s!\" % (target,))\r\n\r\n >>> move2(X(), \"time\")\r\n You have no chance to survive make your time!\r\n\r\n >>> move2(Y(), \"time\")\r\n You have no chance to survive make your time!\r\n\r\nNotice that even though ``move()`` has a method for type ``Y``, the method\r\ndefined for ``X`` in ``move2()`` takes precedence. This is because the\r\n``move`` function is used as the ``default`` method of ``move2``, and ``move2``\r\nhas no method for type ``Y``::\r\n\r\n >>> move2.default is move\r\n True\r\n >>> move.has_type(Y)\r\n True\r\n >>> move2.has_type(Y)\r\n False\r\n\r\n\r\nLimitations\r\n-----------\r\n\r\n* The first argument is always used for dispatching, and it must always be\r\n passed *positionally* when the function is called.\r\n\r\n* Documentation tools don't see the function's original argument signature, so\r\n you have to describe it in the docstring.\r\n\r\n* If you have optional arguments, you must duplicate them on every method in\r\n order for them to work correctly. (On the plus side, it means you can have\r\n different defaults or required arguments for each method, although relying on\r\n that quirk probably isn't a good idea.)\r\n\r\nThese restrictions may be lifted in later releases, if I feel the need. They\r\nwould require runtime code generation the way I do it in ``RuleDispatch``,\r\nhowever, which is somewhat of a pain. (Alternately I could use the\r\n``BytecodeAssembler`` package to do the code generation, as that's a lot easier\r\nto use than string-based code generation, but that would introduce more\r\ndependencies, and I'm trying to keep this simple so I can just\r\ntoss it into Chandler without a big footprint increase.)\r\n\r\n.. _excellent alternative to the Visitor pattern: http://peak.telecommunity.com/DevCenter/VisitorRevisited", - "release_date": "2012-04-01T23:39:06", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Phillip J. Eby", - "email": "peak@eby-sarna.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 6 - Mature", - "Development Status :: 7 - Inactive", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.4", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "http://cheeseshop.python.org/pypi/simplegeneric", - "download_url": "https://files.pythonhosted.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip", - "size": 12663, - "sha1": null, - "md5": "f9c1fab00fd981be588fc32759f474e3", - "sha256": "dc972e06094b9af5b855b3df4a646395e43d1c9d0d39ed345b7393560d0b9173", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "ZPL 2.1", - "classifiers": [ - "License :: OSI Approved :: Zope Public License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/simplegeneric/0.8.1/json", - "datasource_id": null, - "purl": "pkg:pypi/simplegeneric@0.8.1" - }, - { - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", - "release_date": "2024-12-04T17:35:26", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/benjaminp/six", - "download_url": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", - "size": 11050, - "sha1": null, - "md5": "090bac7d568f9c1f64b671de641ccdee", - "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", - "datasource_id": null, - "purl": "pkg:pypi/six@1.17.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", - "release_date": "2024-12-04T17:35:28", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/benjaminp/six", - "download_url": "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", - "size": 34031, - "sha1": null, - "md5": "a0387fe15662c71057b4fb2b7aa9056a", - "sha256": "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", - "datasource_id": null, - "purl": "pkg:pypi/six@1.17.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "speaklater", - "version": "1.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "implements a lazy string for python useful for use with gettext\nspeaklater\n~~~~~~~~~~\n\nA module that provides lazy strings for translations. Basically you\nget an object that appears to be a string but changes the value every\ntime the value is evaluated based on a callable you provide.\n\nFor example you can have a global `lazy_gettext` function that returns\na lazy string with the value of the current set language.\n\nExample:\n\n>>> from speaklater import make_lazy_string\n>>> sval = u'Hello World'\n>>> string = make_lazy_string(lambda: sval)\n\nThis lazy string will evaluate to the value of the `sval` variable.\n\n>>> string\nlu'Hello World'\n>>> unicode(string)\nu'Hello World'\n>>> string.upper()\nu'HELLO WORLD'\n\nIf you change the value, the lazy string will change as well:\n\n>>> sval = u'Hallo Welt'\n>>> string.upper()\nu'HALLO WELT'\n\nThis is especially handy when combined with a thread local and gettext\ntranslations or dicts of translatable strings:\n\n>>> from speaklater import make_lazy_gettext\n>>> from threading import local\n>>> l = local()\n>>> l.translations = {u'Yes': 'Ja'}\n>>> lazy_gettext = make_lazy_gettext(lambda: l.translations.get)\n>>> yes = lazy_gettext(u'Yes')\n>>> print yes\nJa\n>>> l.translations[u'Yes'] = u'Si'\n>>> print yes\nSi\n\nLazy strings are no real strings so if you pass this sort of string to\na function that performs an instance check, it will fail. In that case\nyou have to explicitly convert it with `unicode` and/or `string` depending\non what string type the lazy string encapsulates.\n\nTo check if a string is lazy, you can use the `is_lazy_string` function:\n\n>>> from speaklater import is_lazy_string\n>>> is_lazy_string(u'yes')\nFalse\n>>> is_lazy_string(yes)\nTrue\n\nNew in version 1.2: It's now also possible to pass keyword arguments to\nthe callback used with `make_lazy_string`.", - "release_date": "2012-07-01T18:01:30", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Topic :: Software Development :: Internationalization" + "Topic :: System :: Filesystems", + "Topic :: System :: Operating System" ], - "homepage_url": "http://github.com/mitsuhiko/speaklater", - "download_url": "https://files.pythonhosted.org/packages/11/92/5ae1effe0ccb8561c034a0111d53c8788660ddb7ed4992f0da1bb5c525e5/speaklater-1.3.tar.gz", - "size": 3582, + "homepage_url": "https://github.com/benhoyt/scandir", + "download_url": "https://files.pythonhosted.org/packages/df/f5/9c052db7bd54d0cbf1bc0bb6554362bba1012d03e5888950a4f5c5dadc4e/scandir-1.10.0.tar.gz", + "size": 33311, "sha1": null, - "md5": "e8d5dbe36e53d5a35cff227e795e8bbf", - "sha256": "59fea336d0eed38c1f0bf3181ee1222d0ef45f3a9dd34ebe65e6bfffdd6a65a9", + "md5": "f8378f4d9f95a6a78e97ab01aa900c1d", + "sha256": "4d4631f6062e658e9007ab3149a9b914f3548cb38bfb021c64f39a025ce578ae", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -7276,6 +3791,7 @@ "copyright": null, "license_expression": null, "declared_license": { + "license": "New BSD License", "classifiers": [ "License :: OSI Approved :: BSD License" ] @@ -7287,50 +3803,52 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/speaklater/1.3/json", + "api_data_url": "https://pypi.org/pypi/scandir/1.10.0/json", "datasource_id": null, - "purl": "pkg:pypi/speaklater@1.3" + "purl": "pkg:pypi/scandir@1.10.0" }, { "type": "pypi", "namespace": null, - "name": "traitlets", - "version": "4.3.3", + "name": "setuptools", + "version": "44.1.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Traitlets Python config system\nA configuration system for Python applications.", - "release_date": "2019-10-03T12:52:05", + "description": "Easily download, build, install, upgrade, and uninstall Python packages\n.. image:: https://img.shields.io/pypi/v/setuptools.svg\n :target: https://pypi.org/project/setuptools\n\n.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg\n :target: https://setuptools.readthedocs.io\n\n.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white\n :target: https://travis-ci.org/pypa/setuptools\n\n.. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20CI&logo=appveyor&logoColor=white\n :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master\n\n.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white\n :target: https://codecov.io/gh/pypa/setuptools\n\n.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat\n :target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme\n\n.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg\n\nSee the `Installation Instructions\n`_ in the Python Packaging\nUser's Guide for instructions on installing, upgrading, and uninstalling\nSetuptools.\n\nQuestions and comments should be directed to the `distutils-sig\nmailing list `_.\nBug reports and especially tested patches may be\nsubmitted directly to the `bug tracker\n`_.\n\nTo report a security vulnerability, please use the\n`Tidelift security contact `_.\nTidelift will coordinate the fix and disclosure.\n\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nSetuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more `_.\n\nCode of Conduct\n===============\n\nEveryone interacting in the setuptools project's codebases, issue trackers,\nchat rooms, and mailing lists is expected to follow the\n`PyPA Code of Conduct `_.", + "release_date": "2020-05-29T01:06:05", "parties": [ { "type": "person", "role": "author", - "name": "IPython Development Team", - "email": "ipython-dev@scipy.org", + "name": "Python Packaging Authority", + "email": "distutils-sig@python.org", "url": null } ], "keywords": [ - "Interactive", - "Interpreter", - "Shell", - "Web", + "CPAN PyPI distutils eggs package management", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: System Administrators", - "Programming Language :: Python", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5" + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Archiving :: Packaging", + "Topic :: System :: Systems Administration", + "Topic :: Utilities" ], - "homepage_url": "http://ipython.org", - "download_url": "https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl", - "size": 75680, + "homepage_url": "https://github.com/pypa/setuptools", + "download_url": "https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl", + "size": 583493, "sha1": null, - "md5": "ab0e31302283c86359e23c7789d75630", - "sha256": "70b4c6a1d9019d7b4f6846832288f86998aa3b9207c6821f3578a6a6a467fe44", + "md5": "a5d4ce18230f73d2973afa33b79110ec", + "sha256": "27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -7338,9 +3856,8 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -7350,50 +3867,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/traitlets/4.3.3/json", + "api_data_url": "https://pypi.org/pypi/setuptools/44.1.1/json", "datasource_id": null, - "purl": "pkg:pypi/traitlets@4.3.3" + "purl": "pkg:pypi/setuptools@44.1.1" }, { "type": "pypi", "namespace": null, - "name": "traitlets", - "version": "4.3.3", + "name": "simplegeneric", + "version": "0.8.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Traitlets Python config system\nA configuration system for Python applications.", - "release_date": "2019-10-03T12:52:07", + "description": "Simple generic functions (similar to Python's own len(), pickle.dump(), etc.)\n* New in 0.8: Source and tests are compatible with Python 3 (w/o ``setup.py``)\r\n\r\n * 0.8.1: setup.py is now compatible with Python 3 as well\r\n\r\n* New in 0.7: `Multiple Types or Objects`_\r\n\r\n* New in 0.6: `Inspection and Extension`_, and thread-safe method registration\r\n\r\nThe ``simplegeneric`` module lets you define simple single-dispatch\r\ngeneric functions, akin to Python's built-in generic functions like\r\n``len()``, ``iter()`` and so on. However, instead of using\r\nspecially-named methods, these generic functions use simple lookup\r\ntables, akin to those used by e.g. ``pickle.dump()`` and other\r\ngeneric functions found in the Python standard library.\r\n\r\nAs you can see from the above examples, generic functions are actually\r\nquite common in Python already, but there is no standard way to create\r\nsimple ones. This library attempts to fill that gap, as generic\r\nfunctions are an `excellent alternative to the Visitor pattern`_, as\r\nwell as being a great substitute for most common uses of adaptation.\r\n\r\nThis library tries to be the simplest possible implementation of generic\r\nfunctions, and it therefore eschews the use of multiple or predicate\r\ndispatch, as well as avoiding speedup techniques such as C dispatching\r\nor code generation. But it has absolutely no dependencies, other than\r\nPython 2.4, and the implementation is just a single Python module of\r\nless than 100 lines.\r\n\r\n\r\nUsage\r\n-----\r\n\r\nDefining and using a generic function is straightforward::\r\n\r\n >>> from simplegeneric import generic\r\n >>> @generic\r\n ... def move(item, target):\r\n ... \"\"\"Default implementation goes here\"\"\"\r\n ... print(\"what you say?!\")\r\n\r\n >>> @move.when_type(int)\r\n ... def move_int(item, target):\r\n ... print(\"In AD %d, %s was beginning.\" % (item, target))\r\n\r\n >>> @move.when_type(str)\r\n ... def move_str(item, target):\r\n ... print(\"How are you %s!!\" % item)\r\n ... print(\"All your %s are belong to us.\" % (target,))\r\n\r\n >>> zig = object()\r\n >>> @move.when_object(zig)\r\n ... def move_zig(item, target):\r\n ... print(\"You know what you %s.\" % (target,))\r\n ... print(\"For great justice!\")\r\n\r\n >>> move(2101, \"war\")\r\n In AD 2101, war was beginning.\r\n\r\n >>> move(\"gentlemen\", \"base\")\r\n How are you gentlemen!!\r\n All your base are belong to us.\r\n\r\n >>> move(zig, \"doing\")\r\n You know what you doing.\r\n For great justice!\r\n\r\n >>> move(27.0, 56.2)\r\n what you say?!\r\n\r\n\r\nInheritance and Allowed Types\r\n-----------------------------\r\n\r\nDefining multiple methods for the same type or object is an error::\r\n\r\n >>> @move.when_type(str)\r\n ... def this_is_wrong(item, target):\r\n ... pass\r\n Traceback (most recent call last):\r\n ...\r\n TypeError: already has method for type <...'str'>\r\n\r\n >>> @move.when_object(zig)\r\n ... def this_is_wrong(item, target): pass\r\n Traceback (most recent call last):\r\n ...\r\n TypeError: already has method for object \r\n\r\nAnd the ``when_type()`` decorator only accepts classes or types::\r\n\r\n >>> @move.when_type(23)\r\n ... def move_23(item, target):\r\n ... print(\"You have no chance to survive!\")\r\n Traceback (most recent call last):\r\n ...\r\n TypeError: 23 is not a type or class\r\n\r\nMethods defined for supertypes are inherited following MRO order::\r\n\r\n >>> class MyString(str):\r\n ... \"\"\"String subclass\"\"\"\r\n\r\n >>> move(MyString(\"ladies\"), \"drinks\")\r\n How are you ladies!!\r\n All your drinks are belong to us.\r\n\r\nClassic class instances are also supported (although the lookup process\r\nis slower than for new-style instances)::\r\n\r\n >>> class X: pass\r\n >>> class Y(X): pass\r\n\r\n >>> @move.when_type(X)\r\n ... def move_x(item, target):\r\n ... print(\"Someone set us up the %s!!!\" % (target,))\r\n\r\n >>> move(X(), \"bomb\")\r\n Someone set us up the bomb!!!\r\n\r\n >>> move(Y(), \"dance\")\r\n Someone set us up the dance!!!\r\n\r\n\r\nMultiple Types or Objects\r\n-------------------------\r\n\r\nAs a convenience, you can now pass more than one type or object to the\r\nregistration methods::\r\n\r\n >>> @generic\r\n ... def isbuiltin(ob):\r\n ... return False\r\n >>> @isbuiltin.when_type(int, str, float, complex, type)\r\n ... @isbuiltin.when_object(None, Ellipsis)\r\n ... def yes(ob):\r\n ... return True\r\n \r\n >>> isbuiltin(1)\r\n True\r\n >>> isbuiltin(object)\r\n True\r\n >>> isbuiltin(object())\r\n False\r\n >>> isbuiltin(X())\r\n False\r\n >>> isbuiltin(None)\r\n True\r\n >>> isbuiltin(Ellipsis)\r\n True\r\n\r\n\r\nDefaults and Docs\r\n-----------------\r\n\r\nYou can obtain a function's default implementation using its ``default``\r\nattribute::\r\n\r\n >>> @move.when_type(Y)\r\n ... def move_y(item, target):\r\n ... print(\"Someone set us up the %s!!!\" % (target,))\r\n ... move.default(item, target)\r\n\r\n >>> move(Y(), \"dance\")\r\n Someone set us up the dance!!!\r\n what you say?!\r\n\r\n\r\n``help()`` and other documentation tools see generic functions as normal\r\nfunction objects, with the same name, attributes, docstring, and module as\r\nthe prototype/default function::\r\n\r\n >>> help(move)\r\n Help on function move:\r\n ...\r\n move(*args, **kw)\r\n Default implementation goes here\r\n ...\r\n\r\n\r\nInspection and Extension\r\n------------------------\r\n\r\nYou can find out if a generic function has a method for a type or object using\r\nthe ``has_object()`` and ``has_type()`` methods::\r\n\r\n >>> move.has_object(zig)\r\n True\r\n >>> move.has_object(42)\r\n False\r\n\r\n >>> move.has_type(X)\r\n True\r\n >>> move.has_type(float)\r\n False\r\n\r\nNote that ``has_type()`` only queries whether there is a method registered for\r\nthe *exact* type, not subtypes or supertypes::\r\n\r\n >>> class Z(X): pass\r\n >>> move.has_type(Z)\r\n False\r\n\r\nYou can create a generic function that \"inherits\" from an existing generic\r\nfunction by calling ``generic()`` on the existing function::\r\n\r\n >>> move2 = generic(move)\r\n >>> move(2101, \"war\")\r\n In AD 2101, war was beginning.\r\n\r\nAny methods added to the new generic function override *all* methods in the\r\n\"base\" function::\r\n\r\n >>> @move2.when_type(X)\r\n ... def move2_X(item, target):\r\n ... print(\"You have no chance to survive make your %s!\" % (target,))\r\n\r\n >>> move2(X(), \"time\")\r\n You have no chance to survive make your time!\r\n\r\n >>> move2(Y(), \"time\")\r\n You have no chance to survive make your time!\r\n\r\nNotice that even though ``move()`` has a method for type ``Y``, the method\r\ndefined for ``X`` in ``move2()`` takes precedence. This is because the\r\n``move`` function is used as the ``default`` method of ``move2``, and ``move2``\r\nhas no method for type ``Y``::\r\n\r\n >>> move2.default is move\r\n True\r\n >>> move.has_type(Y)\r\n True\r\n >>> move2.has_type(Y)\r\n False\r\n\r\n\r\nLimitations\r\n-----------\r\n\r\n* The first argument is always used for dispatching, and it must always be\r\n passed *positionally* when the function is called.\r\n\r\n* Documentation tools don't see the function's original argument signature, so\r\n you have to describe it in the docstring.\r\n\r\n* If you have optional arguments, you must duplicate them on every method in\r\n order for them to work correctly. (On the plus side, it means you can have\r\n different defaults or required arguments for each method, although relying on\r\n that quirk probably isn't a good idea.)\r\n\r\nThese restrictions may be lifted in later releases, if I feel the need. They\r\nwould require runtime code generation the way I do it in ``RuleDispatch``,\r\nhowever, which is somewhat of a pain. (Alternately I could use the\r\n``BytecodeAssembler`` package to do the code generation, as that's a lot easier\r\nto use than string-based code generation, but that would introduce more\r\ndependencies, and I'm trying to keep this simple so I can just\r\ntoss it into Chandler without a big footprint increase.)\r\n\r\n.. _excellent alternative to the Visitor pattern: http://peak.telecommunity.com/DevCenter/VisitorRevisited", + "release_date": "2012-04-01T23:39:06", "parties": [ { "type": "person", "role": "author", - "name": "IPython Development Team", - "email": "ipython-dev@scipy.org", + "name": "Phillip J. Eby", + "email": "peak@eby-sarna.com", "url": null } ], "keywords": [ - "Interactive", - "Interpreter", - "Shell", - "Web", + "Development Status :: 6 - Mature", + "Development Status :: 7 - Inactive", "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: System Administrators", + "Operating System :: OS Independent", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.4", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5" + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://ipython.org", - "download_url": "https://files.pythonhosted.org/packages/75/b0/43deb021bc943f18f07cbe3dac1d681626a48997b7ffa1e7fb14ef922b21/traitlets-4.3.3.tar.gz", - "size": 89838, + "homepage_url": "http://cheeseshop.python.org/pypi/simplegeneric", + "download_url": "https://files.pythonhosted.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip", + "size": 12663, "sha1": null, - "md5": "3a4f263af65d3d79f1c279f0247077ef", - "sha256": "d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7", + "md5": "f9c1fab00fd981be588fc32759f474e3", + "sha256": "dc972e06094b9af5b855b3df4a646395e43d1c9d0d39ed345b7393560d0b9173", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -7401,9 +3917,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", + "license": "ZPL 2.1", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: Zope Public License" ] }, "notice_text": null, @@ -7413,55 +3929,53 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/traitlets/4.3.3/json", + "api_data_url": "https://pypi.org/pypi/simplegeneric/0.8.1/json", "datasource_id": null, - "purl": "pkg:pypi/traitlets@4.3.3" + "purl": "pkg:pypi/simplegeneric@0.8.1" }, { "type": "pypi", "namespace": null, - "name": "typing", - "version": "3.10.0.0", + "name": "six", + "version": "1.17.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Typing -- Type Hints for Python\n\nThis is a backport of the standard library typing module to Python\nversions older than 3.5. (See note below for newer versions.)\n\nTyping defines a standard notation for Python function and variable\ntype annotations. The notation can be used for documenting code in a\nconcise, standard format, and it has been designed to also be used by\nstatic and runtime type checkers, static analyzers, IDEs and other\ntools.\n\nNOTE: in Python 3.5 and later, the typing module lives in the stdlib,\nand installing this package has NO EFFECT, because stdlib takes higher\nprecedence than the installation directory. To get a newer version of\nthe typing module in Python 3.5 or later, you have to upgrade to a\nnewer Python (bugfix) version. For example, typing in Python 3.6.0 is\nmissing the definition of 'Type' -- upgrading to 3.6.2 will fix this.\n\nAlso note that most improvements to the typing module in Python 3.7\nwill not be included in this package, since Python 3.7 has some\nbuilt-in support that is not present in older versions (See PEP 560.)\n\nFor package maintainers, it is preferred to use\n``typing;python_version<\"3.5\"`` if your package requires it to support\nearlier Python versions. This will avoid shadowing the stdlib typing\nmodule when your package is installed via ``pip install -t .`` on\nPython 3.5 or later.", - "release_date": "2021-05-01T18:03:55", + "description": "Python 2 and 3 compatibility utilities\n.. image:: https://img.shields.io/pypi/v/six.svg\n :target: https://pypi.org/project/six/\n :alt: six on PyPI\n\n.. image:: https://readthedocs.org/projects/six/badge/?version=latest\n :target: https://six.readthedocs.io/\n :alt: six's documentation on Read the Docs\n\n.. image:: https://img.shields.io/badge/license-MIT-green.svg\n :target: https://github.com/benjaminp/six/blob/master/LICENSE\n :alt: MIT License badge\n\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports Python 2.7 and 3.3+. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://six.readthedocs.io/.\n\nBugs can be reported to https://github.com/benjaminp/six. The code can also\nbe found there.", + "release_date": "2024-12-04T17:35:26", "parties": [ { "type": "person", "role": "author", - "name": "Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Ivan Levkivskyi", - "email": "jukka.lehtosalo@iki.fi", + "name": "Benjamin Peterson", + "email": "benjamin@python.org", "url": null } ], "keywords": [ - "typing function annotations type hints hinting checking checker typehints typehinting typechecking backport", "Development Status :: 5 - Production/Stable", - "Environment :: Console", "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", - "Topic :: Software Development" + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities" ], - "homepage_url": "https://docs.python.org/3/library/typing.html", - "download_url": "https://files.pythonhosted.org/packages/0b/cb/da856e81731833b94da70a08712f658416266a5fb2a9d9e426c8061becef/typing-3.10.0.0-py2-none-any.whl", - "size": 26511, + "homepage_url": "https://github.com/benjaminp/six", + "download_url": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", + "size": 11050, "sha1": null, - "md5": "d98360a1877c628b048fecc5da649413", - "sha256": "c7219ef20c5fbf413b4567092adfc46fa6203cb8454eda33c3fc1afe1398a308", + "md5": "090bac7d568f9c1f64b671de641ccdee", + "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/python/typing", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "PSF", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -7471,55 +3985,49 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing/3.10.0.0/json", + "api_data_url": "https://pypi.org/pypi/six/1.17.0/json", "datasource_id": null, - "purl": "pkg:pypi/typing@3.10.0.0" + "purl": "pkg:pypi/six@1.17.0" }, { "type": "pypi", "namespace": null, - "name": "typing", - "version": "3.10.0.0", + "name": "speaklater", + "version": "1.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Typing -- Type Hints for Python\n\nThis is a backport of the standard library typing module to Python\nversions older than 3.5. (See note below for newer versions.)\n\nTyping defines a standard notation for Python function and variable\ntype annotations. The notation can be used for documenting code in a\nconcise, standard format, and it has been designed to also be used by\nstatic and runtime type checkers, static analyzers, IDEs and other\ntools.\n\nNOTE: in Python 3.5 and later, the typing module lives in the stdlib,\nand installing this package has NO EFFECT, because stdlib takes higher\nprecedence than the installation directory. To get a newer version of\nthe typing module in Python 3.5 or later, you have to upgrade to a\nnewer Python (bugfix) version. For example, typing in Python 3.6.0 is\nmissing the definition of 'Type' -- upgrading to 3.6.2 will fix this.\n\nAlso note that most improvements to the typing module in Python 3.7\nwill not be included in this package, since Python 3.7 has some\nbuilt-in support that is not present in older versions (See PEP 560.)\n\nFor package maintainers, it is preferred to use\n``typing;python_version<\"3.5\"`` if your package requires it to support\nearlier Python versions. This will avoid shadowing the stdlib typing\nmodule when your package is installed via ``pip install -t .`` on\nPython 3.5 or later.", - "release_date": "2021-05-01T18:03:58", + "description": "implements a lazy string for python useful for use with gettext\nspeaklater\n~~~~~~~~~~\n\nA module that provides lazy strings for translations. Basically you\nget an object that appears to be a string but changes the value every\ntime the value is evaluated based on a callable you provide.\n\nFor example you can have a global `lazy_gettext` function that returns\na lazy string with the value of the current set language.\n\nExample:\n\n>>> from speaklater import make_lazy_string\n>>> sval = u'Hello World'\n>>> string = make_lazy_string(lambda: sval)\n\nThis lazy string will evaluate to the value of the `sval` variable.\n\n>>> string\nlu'Hello World'\n>>> unicode(string)\nu'Hello World'\n>>> string.upper()\nu'HELLO WORLD'\n\nIf you change the value, the lazy string will change as well:\n\n>>> sval = u'Hallo Welt'\n>>> string.upper()\nu'HALLO WELT'\n\nThis is especially handy when combined with a thread local and gettext\ntranslations or dicts of translatable strings:\n\n>>> from speaklater import make_lazy_gettext\n>>> from threading import local\n>>> l = local()\n>>> l.translations = {u'Yes': 'Ja'}\n>>> lazy_gettext = make_lazy_gettext(lambda: l.translations.get)\n>>> yes = lazy_gettext(u'Yes')\n>>> print yes\nJa\n>>> l.translations[u'Yes'] = u'Si'\n>>> print yes\nSi\n\nLazy strings are no real strings so if you pass this sort of string to\na function that performs an instance check, it will fail. In that case\nyou have to explicitly convert it with `unicode` and/or `string` depending\non what string type the lazy string encapsulates.\n\nTo check if a string is lazy, you can use the `is_lazy_string` function:\n\n>>> from speaklater import is_lazy_string\n>>> is_lazy_string(u'yes')\nFalse\n>>> is_lazy_string(yes)\nTrue\n\nNew in version 1.2: It's now also possible to pass keyword arguments to\nthe callback used with `make_lazy_string`.", + "release_date": "2012-07-01T18:01:30", "parties": [ { "type": "person", "role": "author", - "name": "Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Ivan Levkivskyi", - "email": "jukka.lehtosalo@iki.fi", + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", "url": null } ], "keywords": [ - "typing function annotations type hints hinting checking checker typehints typehinting typechecking backport", "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", - "Topic :: Software Development" + "Programming Language :: Python", + "Topic :: Software Development :: Internationalization" ], - "homepage_url": "https://docs.python.org/3/library/typing.html", - "download_url": "https://files.pythonhosted.org/packages/b0/1b/835d4431805939d2996f8772aca1d2313a57e8860fec0e48e8e7dfe3a477/typing-3.10.0.0.tar.gz", - "size": 78962, + "homepage_url": "http://github.com/mitsuhiko/speaklater", + "download_url": "https://files.pythonhosted.org/packages/11/92/5ae1effe0ccb8561c034a0111d53c8788660ddb7ed4992f0da1bb5c525e5/speaklater-1.3.tar.gz", + "size": 3582, "sha1": null, - "md5": "d6dd450cfe0c8c6547eef09a0491775d", - "sha256": "13b4ad211f54ddbf93e5901a9967b1e07720c1d1b78d596ac6a439641aa1b130", + "md5": "e8d5dbe36e53d5a35cff227e795e8bbf", + "sha256": "59fea336d0eed38c1f0bf3181ee1222d0ef45f3a9dd34ebe65e6bfffdd6a65a9", "sha512": null, "bug_tracking_url": null, - "code_view_url": "https://github.com/python/typing", + "code_view_url": null, "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "PSF", "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -7529,52 +4037,50 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing/3.10.0.0/json", + "api_data_url": "https://pypi.org/pypi/speaklater/1.3/json", "datasource_id": null, - "purl": "pkg:pypi/typing@3.10.0.0" + "purl": "pkg:pypi/speaklater@1.3" }, { "type": "pypi", "namespace": null, - "name": "uritools", - "version": "2.2.0", + "name": "traitlets", + "version": "4.3.3", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse\nuritools\n========================================================================\n\nThis module defines RFC 3986 compliant replacements for the most\ncommonly used functions of the Python 2.7 Standard Library\n``urlparse`` and Python 3 ``urllib.parse`` modules.\n\n.. code-block:: pycon\n\n >>> from uritools import uricompose, urijoin, urisplit, uriunsplit\n >>> uricompose(scheme='foo', host='example.com', port=8042,\n ... path='/over/there', query={'name': 'ferret'},\n ... fragment='nose')\n 'foo://example.com:8042/over/there?name=ferret#nose'\n >>> parts = urisplit(_)\n >>> parts.scheme\n 'foo'\n >>> parts.authority\n 'example.com:8042'\n >>> parts.getport(default=80)\n 8042\n >>> parts.getquerydict().get('name')\n ['ferret']\n >>> urijoin(uriunsplit(parts), '/right/here?name=swallow#beak')\n 'foo://example.com:8042/right/here?name=swallow#beak'\n\nFor various reasons, the Python 2 ``urlparse`` module is not compliant\nwith current Internet standards, does not include Unicode support, and\nis generally unusable with proprietary URI schemes. Python 3's\n``urllib.parse`` improves on Unicode support, but the other issues still\nremain. As stated in `Lib/urllib/parse.py\n`_::\n\n RFC 3986 is considered the current standard and any future changes\n to urlparse module should conform with it. The urlparse module is\n currently not entirely compliant with this RFC due to defacto\n scenarios for parsing, and for backward compatibility purposes,\n some parsing quirks from older RFCs are retained.\n\nThis module aims to provide fully RFC 3986 compliant replacements for\nsome commonly used functions found in ``urlparse`` and\n``urllib.parse``, plus additional functions for conveniently composing\nURIs from their individual components.\n\n\nInstallation\n------------------------------------------------------------------------\n\nInstall uritools using pip::\n\n pip install uritools\n\n\nProject Resources\n------------------------------------------------------------------------\n\n.. image:: http://img.shields.io/pypi/v/uritools.svg?style=flat\n :target: https://pypi.python.org/pypi/uritools/\n :alt: Latest PyPI version\n\n.. image:: http://img.shields.io/travis/tkem/uritools/master.svg?style=flat\n :target: https://travis-ci.org/tkem/uritools/\n :alt: Travis CI build status\n\n.. image:: http://img.shields.io/coveralls/tkem/uritools/master.svg?style=flat\n :target: https://coveralls.io/r/tkem/uritools\n :alt: Test coverage\n\n.. image:: https://readthedocs.org/projects/uritools/badge/?version=latest&style=flat\n :target: http://uritools.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n- `Issue Tracker`_\n- `Source Code`_\n- `Change Log`_\n\n\nLicense\n------------------------------------------------------------------------\n\nCopyright (c) 2014-2018 Thomas Kemmer.\n\nLicensed under the `MIT License`_.\n\n\n.. _Issue Tracker: https://github.com/tkem/uritools/issues/\n.. _Source Code: https://github.com/tkem/uritools/\n.. _Change Log: https://github.com/tkem/uritools/blob/master/CHANGES.rst\n.. _MIT License: http://raw.github.com/tkem/uritools/master/LICENSE", - "release_date": "2018-05-17T20:43:19", + "description": "Traitlets Python config system\nA configuration system for Python applications.", + "release_date": "2019-10-03T12:52:05", "parties": [ { "type": "person", "role": "author", - "name": "Thomas Kemmer", - "email": "tkemmer@computer.org", + "name": "IPython Development Team", + "email": "ipython-dev@scipy.org", "url": null } ], "keywords": [ - "uri url urlparse urlsplit urljoin urldefrag", - "Development Status :: 5 - Production/Stable", - "Environment :: Other Environment", + "Interactive", + "Interpreter", + "Shell", + "Web", "Intended Audience :: Developers", - "Operating System :: OS Independent", + "Intended Audience :: Science/Research", + "Intended Audience :: System Administrators", "Programming Language :: Python", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.5" ], - "homepage_url": "https://github.com/tkem/uritools/", - "download_url": "https://files.pythonhosted.org/packages/8c/5d/ef3cd3c40b4b97f0cb50cee8e4c5a8a4abc30953e1c7ce7e0d25cb2534c3/uritools-2.2.0-py2.py3-none-any.whl", - "size": 14637, + "homepage_url": "http://ipython.org", + "download_url": "https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl", + "size": 75680, "sha1": null, - "md5": "2c345e371209cd50279b5f04b66685fd", - "sha256": "522c2027e51e70e0cc40aa703fbf8665a879776826317ff1b68069084030975b", + "md5": "ab0e31302283c86359e23c7789d75630", + "sha256": "70b4c6a1d9019d7b4f6846832288f86998aa3b9207c6821f3578a6a6a467fe44", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -7582,9 +4088,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "BSD", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: BSD License" ] }, "notice_text": null, @@ -7594,62 +4100,55 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/uritools/2.2.0/json", + "api_data_url": "https://pypi.org/pypi/traitlets/4.3.3/json", "datasource_id": null, - "purl": "pkg:pypi/uritools@2.2.0" + "purl": "pkg:pypi/traitlets@4.3.3" }, { "type": "pypi", "namespace": null, - "name": "uritools", - "version": "2.2.0", + "name": "typing", + "version": "3.10.0.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse\nuritools\n========================================================================\n\nThis module defines RFC 3986 compliant replacements for the most\ncommonly used functions of the Python 2.7 Standard Library\n``urlparse`` and Python 3 ``urllib.parse`` modules.\n\n.. code-block:: pycon\n\n >>> from uritools import uricompose, urijoin, urisplit, uriunsplit\n >>> uricompose(scheme='foo', host='example.com', port=8042,\n ... path='/over/there', query={'name': 'ferret'},\n ... fragment='nose')\n 'foo://example.com:8042/over/there?name=ferret#nose'\n >>> parts = urisplit(_)\n >>> parts.scheme\n 'foo'\n >>> parts.authority\n 'example.com:8042'\n >>> parts.getport(default=80)\n 8042\n >>> parts.getquerydict().get('name')\n ['ferret']\n >>> urijoin(uriunsplit(parts), '/right/here?name=swallow#beak')\n 'foo://example.com:8042/right/here?name=swallow#beak'\n\nFor various reasons, the Python 2 ``urlparse`` module is not compliant\nwith current Internet standards, does not include Unicode support, and\nis generally unusable with proprietary URI schemes. Python 3's\n``urllib.parse`` improves on Unicode support, but the other issues still\nremain. As stated in `Lib/urllib/parse.py\n`_::\n\n RFC 3986 is considered the current standard and any future changes\n to urlparse module should conform with it. The urlparse module is\n currently not entirely compliant with this RFC due to defacto\n scenarios for parsing, and for backward compatibility purposes,\n some parsing quirks from older RFCs are retained.\n\nThis module aims to provide fully RFC 3986 compliant replacements for\nsome commonly used functions found in ``urlparse`` and\n``urllib.parse``, plus additional functions for conveniently composing\nURIs from their individual components.\n\n\nInstallation\n------------------------------------------------------------------------\n\nInstall uritools using pip::\n\n pip install uritools\n\n\nProject Resources\n------------------------------------------------------------------------\n\n.. image:: http://img.shields.io/pypi/v/uritools.svg?style=flat\n :target: https://pypi.python.org/pypi/uritools/\n :alt: Latest PyPI version\n\n.. image:: http://img.shields.io/travis/tkem/uritools/master.svg?style=flat\n :target: https://travis-ci.org/tkem/uritools/\n :alt: Travis CI build status\n\n.. image:: http://img.shields.io/coveralls/tkem/uritools/master.svg?style=flat\n :target: https://coveralls.io/r/tkem/uritools\n :alt: Test coverage\n\n.. image:: https://readthedocs.org/projects/uritools/badge/?version=latest&style=flat\n :target: http://uritools.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n- `Issue Tracker`_\n- `Source Code`_\n- `Change Log`_\n\n\nLicense\n------------------------------------------------------------------------\n\nCopyright (c) 2014-2018 Thomas Kemmer.\n\nLicensed under the `MIT License`_.\n\n\n.. _Issue Tracker: https://github.com/tkem/uritools/issues/\n.. _Source Code: https://github.com/tkem/uritools/\n.. _Change Log: https://github.com/tkem/uritools/blob/master/CHANGES.rst\n.. _MIT License: http://raw.github.com/tkem/uritools/master/LICENSE", - "release_date": "2018-05-17T20:43:20", + "description": "Typing -- Type Hints for Python\n\nThis is a backport of the standard library typing module to Python\nversions older than 3.5. (See note below for newer versions.)\n\nTyping defines a standard notation for Python function and variable\ntype annotations. The notation can be used for documenting code in a\nconcise, standard format, and it has been designed to also be used by\nstatic and runtime type checkers, static analyzers, IDEs and other\ntools.\n\nNOTE: in Python 3.5 and later, the typing module lives in the stdlib,\nand installing this package has NO EFFECT, because stdlib takes higher\nprecedence than the installation directory. To get a newer version of\nthe typing module in Python 3.5 or later, you have to upgrade to a\nnewer Python (bugfix) version. For example, typing in Python 3.6.0 is\nmissing the definition of 'Type' -- upgrading to 3.6.2 will fix this.\n\nAlso note that most improvements to the typing module in Python 3.7\nwill not be included in this package, since Python 3.7 has some\nbuilt-in support that is not present in older versions (See PEP 560.)\n\nFor package maintainers, it is preferred to use\n``typing;python_version<\"3.5\"`` if your package requires it to support\nearlier Python versions. This will avoid shadowing the stdlib typing\nmodule when your package is installed via ``pip install -t .`` on\nPython 3.5 or later.", + "release_date": "2021-05-01T18:03:55", "parties": [ { "type": "person", "role": "author", - "name": "Thomas Kemmer", - "email": "tkemmer@computer.org", + "name": "Guido van Rossum, Jukka Lehtosalo, \u0141ukasz Langa, Ivan Levkivskyi", + "email": "jukka.lehtosalo@iki.fi", "url": null } ], "keywords": [ - "uri url urlparse urlsplit urljoin urldefrag", + "typing function annotations type hints hinting checking checker typehints typehinting typechecking backport", "Development Status :: 5 - Production/Stable", - "Environment :: Other Environment", + "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules" + "Programming Language :: Python :: 3.4", + "Topic :: Software Development" ], - "homepage_url": "https://github.com/tkem/uritools/", - "download_url": "https://files.pythonhosted.org/packages/ab/1c/e9aa4a907806743298171510042447adc20cd5cf5b95436206a067e14496/uritools-2.2.0.tar.gz", - "size": 23906, + "homepage_url": "https://docs.python.org/3/library/typing.html", + "download_url": "https://files.pythonhosted.org/packages/0b/cb/da856e81731833b94da70a08712f658416266a5fb2a9d9e426c8061becef/typing-3.10.0.0-py2-none-any.whl", + "size": 26511, "sha1": null, - "md5": "b233ab8184cacf75c5ab3ffd35dac066", - "sha256": "80e8e23cafad54fd85811b5d9ba0fc595d933f5727c61c3937945eec09f99e2b", + "md5": "d98360a1877c628b048fecc5da649413", + "sha256": "c7219ef20c5fbf413b4567092adfc46fa6203cb8454eda33c3fc1afe1398a308", "sha512": null, "bug_tracking_url": null, - "code_view_url": null, + "code_view_url": "https://github.com/python/typing", "vcs_url": null, "copyright": null, "license_expression": null, "declared_license": { - "license": "MIT", + "license": "PSF", "classifiers": [ - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: Python Software Foundation License" ] }, "notice_text": null, @@ -7659,51 +4158,52 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/uritools/2.2.0/json", + "api_data_url": "https://pypi.org/pypi/typing/3.10.0.0/json", "datasource_id": null, - "purl": "pkg:pypi/uritools@2.2.0" + "purl": "pkg:pypi/typing@3.10.0.0" }, { "type": "pypi", "namespace": null, - "name": "vine", - "version": "1.3.0", + "name": "uritools", + "version": "2.2.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", - "description": "Promises, promises, promises.\n=====================================================================\n vine - Python Promises\n=====================================================================\n\n|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|\n\n:Version: 1.3.0\n:Web: https://vine.readthedocs.io/\n:Download: https://pypi.org/project/vine/\n:Source: http://github.com/celery/vine/\n:Keywords: promise, async, future\n\nAbout\n=====\n\n\n.. |build-status| image:: https://secure.travis-ci.org/celery/vine.png?branch=master\n :alt: Build status\n :target: https://travis-ci.org/celery/vine\n\n.. |coverage| image:: https://codecov.io/github/celery/vine/coverage.svg?branch=master\n :target: https://codecov.io/github/celery/vine?branch=master\n\n.. |license| image:: https://img.shields.io/pypi/l/vine.svg\n :alt: BSD License\n :target: https://opensource.org/licenses/BSD-3-Clause\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/vine.svg\n :alt: Vine can be installed via wheel\n :target: https://pypi.org/project/vine/\n\n.. |pyversion| image:: https://img.shields.io/pypi/pyversions/vine.svg\n :alt: Supported Python versions.\n :target: https://pypi.org/project/vine/\n\n.. |pyimp| image:: https://img.shields.io/pypi/implementation/vine.svg\n :alt: Support Python implementations.\n :target: https://pypi.org/project/vine/", - "release_date": "2019-03-19T08:56:34", + "description": "RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse\nuritools\n========================================================================\n\nThis module defines RFC 3986 compliant replacements for the most\ncommonly used functions of the Python 2.7 Standard Library\n``urlparse`` and Python 3 ``urllib.parse`` modules.\n\n.. code-block:: pycon\n\n >>> from uritools import uricompose, urijoin, urisplit, uriunsplit\n >>> uricompose(scheme='foo', host='example.com', port=8042,\n ... path='/over/there', query={'name': 'ferret'},\n ... fragment='nose')\n 'foo://example.com:8042/over/there?name=ferret#nose'\n >>> parts = urisplit(_)\n >>> parts.scheme\n 'foo'\n >>> parts.authority\n 'example.com:8042'\n >>> parts.getport(default=80)\n 8042\n >>> parts.getquerydict().get('name')\n ['ferret']\n >>> urijoin(uriunsplit(parts), '/right/here?name=swallow#beak')\n 'foo://example.com:8042/right/here?name=swallow#beak'\n\nFor various reasons, the Python 2 ``urlparse`` module is not compliant\nwith current Internet standards, does not include Unicode support, and\nis generally unusable with proprietary URI schemes. Python 3's\n``urllib.parse`` improves on Unicode support, but the other issues still\nremain. As stated in `Lib/urllib/parse.py\n`_::\n\n RFC 3986 is considered the current standard and any future changes\n to urlparse module should conform with it. The urlparse module is\n currently not entirely compliant with this RFC due to defacto\n scenarios for parsing, and for backward compatibility purposes,\n some parsing quirks from older RFCs are retained.\n\nThis module aims to provide fully RFC 3986 compliant replacements for\nsome commonly used functions found in ``urlparse`` and\n``urllib.parse``, plus additional functions for conveniently composing\nURIs from their individual components.\n\n\nInstallation\n------------------------------------------------------------------------\n\nInstall uritools using pip::\n\n pip install uritools\n\n\nProject Resources\n------------------------------------------------------------------------\n\n.. image:: http://img.shields.io/pypi/v/uritools.svg?style=flat\n :target: https://pypi.python.org/pypi/uritools/\n :alt: Latest PyPI version\n\n.. image:: http://img.shields.io/travis/tkem/uritools/master.svg?style=flat\n :target: https://travis-ci.org/tkem/uritools/\n :alt: Travis CI build status\n\n.. image:: http://img.shields.io/coveralls/tkem/uritools/master.svg?style=flat\n :target: https://coveralls.io/r/tkem/uritools\n :alt: Test coverage\n\n.. image:: https://readthedocs.org/projects/uritools/badge/?version=latest&style=flat\n :target: http://uritools.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n- `Issue Tracker`_\n- `Source Code`_\n- `Change Log`_\n\n\nLicense\n------------------------------------------------------------------------\n\nCopyright (c) 2014-2018 Thomas Kemmer.\n\nLicensed under the `MIT License`_.\n\n\n.. _Issue Tracker: https://github.com/tkem/uritools/issues/\n.. _Source Code: https://github.com/tkem/uritools/\n.. _Change Log: https://github.com/tkem/uritools/blob/master/CHANGES.rst\n.. _MIT License: http://raw.github.com/tkem/uritools/master/LICENSE", + "release_date": "2018-05-17T20:43:19", "parties": [ { "type": "person", "role": "author", - "name": "Ask Solem", - "email": "ask@celeryproject.org", + "name": "Thomas Kemmer", + "email": "tkemmer@computer.org", "url": null } ], "keywords": [ - "promise promises lazy future futures", + "uri url urlparse urlsplit urljoin urldefrag", "Development Status :: 5 - Production/Stable", + "Environment :: Other Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules" ], - "homepage_url": "http://github.com/celery/vine", - "download_url": "https://files.pythonhosted.org/packages/7f/60/82c03047396126c8331ceb64da1dc52d4f1317209f32e8fe286d0c07365a/vine-1.3.0-py2.py3-none-any.whl", - "size": 14174, + "homepage_url": "https://github.com/tkem/uritools/", + "download_url": "https://files.pythonhosted.org/packages/8c/5d/ef3cd3c40b4b97f0cb50cee8e4c5a8a4abc30953e1c7ce7e0d25cb2534c3/uritools-2.2.0-py2.py3-none-any.whl", + "size": 14637, "sha1": null, - "md5": "b0fd55deefc4e7ae9f04608fe8c238d5", - "sha256": "ea4947cc56d1fd6f2095c8d543ee25dad966f78692528e68b4fada11ba3f98af", + "md5": "2c345e371209cd50279b5f04b66685fd", + "sha256": "522c2027e51e70e0cc40aa703fbf8665a879776826317ff1b68069084030975b", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -7711,9 +4211,9 @@ "copyright": null, "license_expression": null, "declared_license": { - "license": "BSD", + "license": "MIT", "classifiers": [ - "License :: OSI Approved :: BSD License" + "License :: OSI Approved :: MIT License" ] }, "notice_text": null, @@ -7723,9 +4223,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/vine/1.3.0/json", + "api_data_url": "https://pypi.org/pypi/uritools/2.2.0/json", "datasource_id": null, - "purl": "pkg:pypi/vine@1.3.0" + "purl": "pkg:pypi/uritools@2.2.0" }, { "type": "pypi", @@ -7736,7 +4236,7 @@ "subpath": null, "primary_language": "Python", "description": "Promises, promises, promises.\n=====================================================================\n vine - Python Promises\n=====================================================================\n\n|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|\n\n:Version: 1.3.0\n:Web: https://vine.readthedocs.io/\n:Download: https://pypi.org/project/vine/\n:Source: http://github.com/celery/vine/\n:Keywords: promise, async, future\n\nAbout\n=====\n\n\n.. |build-status| image:: https://secure.travis-ci.org/celery/vine.png?branch=master\n :alt: Build status\n :target: https://travis-ci.org/celery/vine\n\n.. |coverage| image:: https://codecov.io/github/celery/vine/coverage.svg?branch=master\n :target: https://codecov.io/github/celery/vine?branch=master\n\n.. |license| image:: https://img.shields.io/pypi/l/vine.svg\n :alt: BSD License\n :target: https://opensource.org/licenses/BSD-3-Clause\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/vine.svg\n :alt: Vine can be installed via wheel\n :target: https://pypi.org/project/vine/\n\n.. |pyversion| image:: https://img.shields.io/pypi/pyversions/vine.svg\n :alt: Supported Python versions.\n :target: https://pypi.org/project/vine/\n\n.. |pyimp| image:: https://img.shields.io/pypi/implementation/vine.svg\n :alt: Support Python implementations.\n :target: https://pypi.org/project/vine/", - "release_date": "2019-03-19T08:56:37", + "release_date": "2019-03-19T08:56:34", "parties": [ { "type": "person", @@ -7763,11 +4263,11 @@ "Programming Language :: Python :: Implementation :: PyPy" ], "homepage_url": "http://github.com/celery/vine", - "download_url": "https://files.pythonhosted.org/packages/1c/e1/79fb8046e607dd6c2ad05c9b8ebac9d0bd31d086a08f02699e96fc5b3046/vine-1.3.0.tar.gz", - "size": 51953, + "download_url": "https://files.pythonhosted.org/packages/7f/60/82c03047396126c8331ceb64da1dc52d4f1317209f32e8fe286d0c07365a/vine-1.3.0-py2.py3-none-any.whl", + "size": 14174, "sha1": null, - "md5": "5d125e0b4d759b39e03d11902dede8c9", - "sha256": "133ee6d7a9016f177ddeaf191c1f58421a1dcc6ee9a42c58b34bed40e1d2cd87", + "md5": "b0fd55deefc4e7ae9f04608fe8c238d5", + "sha256": "ea4947cc56d1fd6f2095c8d543ee25dad966f78692528e68b4fada11ba3f98af", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -7870,85 +4370,6 @@ "datasource_id": null, "purl": "pkg:pypi/wcwidth@0.2.13" }, - { - "type": "pypi", - "namespace": null, - "name": "wcwidth", - "version": "0.2.13", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Measures the displayed width of unicode strings in a terminal\n|pypi_downloads| |codecov| |license|\n\n============\nIntroduction\n============\n\nThis library is mainly for CLI programs that carefully produce output for\nTerminals, or make pretend to be an emulator.\n\n**Problem Statement**: The printable length of *most* strings are equal to the\nnumber of cells they occupy on the screen ``1 character : 1 cell``. However,\nthere are categories of characters that *occupy 2 cells* (full-wide), and\nothers that *occupy 0* cells (zero-width).\n\n**Solution**: POSIX.1-2001 and POSIX.1-2008 conforming systems provide\n`wcwidth(3)`_ and `wcswidth(3)`_ C functions of which this python module's\nfunctions precisely copy. *These functions return the number of cells a\nunicode string is expected to occupy.*\n\nInstallation\n------------\n\nThe stable version of this package is maintained on pypi, install using pip::\n\n pip install wcwidth\n\nExample\n-------\n\n**Problem**: given the following phrase (Japanese),\n\n >>> text = u'\u30b3\u30f3\u30cb\u30c1\u30cf'\n\nPython **incorrectly** uses the *string length* of 5 codepoints rather than the\n*printable length* of 10 cells, so that when using the `rjust` function, the\noutput length is wrong::\n\n >>> print(len('\u30b3\u30f3\u30cb\u30c1\u30cf'))\n 5\n\n >>> print('\u30b3\u30f3\u30cb\u30c1\u30cf'.rjust(20, '_'))\n _______________\u30b3\u30f3\u30cb\u30c1\u30cf\n\nBy defining our own \"rjust\" function that uses wcwidth, we can correct this::\n\n >>> def wc_rjust(text, length, padding=' '):\n ... from wcwidth import wcswidth\n ... return padding * max(0, (length - wcswidth(text))) + text\n ...\n\nOur **Solution** uses wcswidth to determine the string length correctly::\n\n >>> from wcwidth import wcswidth\n >>> print(wcswidth('\u30b3\u30f3\u30cb\u30c1\u30cf'))\n 10\n\n >>> print(wc_rjust('\u30b3\u30f3\u30cb\u30c1\u30cf', 20, '_'))\n __________\u30b3\u30f3\u30cb\u30c1\u30cf\n\n\nChoosing a Version\n------------------\n\nExport an environment variable, ``UNICODE_VERSION``. This should be done by\n*terminal emulators* or those developers experimenting with authoring one of\ntheir own, from shell::\n\n $ export UNICODE_VERSION=13.0\n\nIf unspecified, the latest version is used. If your Terminal Emulator does not\nexport this variable, you can use the `jquast/ucs-detect`_ utility to\nautomatically detect and export it to your shell.\n\nwcwidth, wcswidth\n-----------------\nUse function ``wcwidth()`` to determine the length of a *single unicode\ncharacter*, and ``wcswidth()`` to determine the length of many, a *string\nof unicode characters*.\n\nBriefly, return values of function ``wcwidth()`` are:\n\n``-1``\n Indeterminate (not printable).\n\n``0``\n Does not advance the cursor, such as NULL or Combining.\n\n``2``\n Characters of category East Asian Wide (W) or East Asian\n Full-width (F) which are displayed using two terminal cells.\n\n``1``\n All others.\n\nFunction ``wcswidth()`` simply returns the sum of all values for each character\nalong a string, or ``-1`` when it occurs anywhere along a string.\n\nFull API Documentation at https://wcwidth.readthedocs.org\n\n==========\nDeveloping\n==========\n\nInstall wcwidth in editable mode::\n\n pip install -e .\n\nExecute unit tests using tox_::\n\n tox -e py27,py35,py36,py37,py38,py39,py310,py311,py312\n\nUpdating Unicode Version\n------------------------\n\nRegenerate python code tables from latest Unicode Specification data files::\n\n tox -e update\n\nThe script is located at ``bin/update-tables.py``, requires Python 3.9 or\nlater. It is recommended but not necessary to run this script with the newest\nPython, because the newest Python has the latest ``unicodedata`` for generating\ncomments.\n\nBuilding Documentation\n----------------------\n\nThis project is using `sphinx`_ 4.5 to build documentation::\n\n tox -e sphinx\n\nThe output will be in ``docs/_build/html/``.\n\nUpdating Requirements\n---------------------\n\nThis project is using `pip-tools`_ to manage requirements.\n\nTo upgrade requirements for updating unicode version, run::\n\n tox -e update_requirements_update\n\nTo upgrade requirements for testing, run::\n\n tox -e update_requirements37,update_requirements39\n\nTo upgrade requirements for building documentation, run::\n\n tox -e update_requirements_docs\n\nUtilities\n---------\n\nSupplementary tools for browsing and testing terminals for wide unicode\ncharacters are found in the `bin/`_ of this project's source code. Just ensure\nto first ``pip install -r requirements-develop.txt`` from this projects main\nfolder. For example, an interactive browser for testing::\n\n python ./bin/wcwidth-browser.py\n\n====\nUses\n====\n\nThis library is used in:\n\n- `jquast/blessed`_: a thin, practical wrapper around terminal capabilities in\n Python.\n\n- `prompt-toolkit/python-prompt-toolkit`_: a Library for building powerful\n interactive command lines in Python.\n\n- `dbcli/pgcli`_: Postgres CLI with autocompletion and syntax highlighting.\n\n- `thomasballinger/curtsies`_: a Curses-like terminal wrapper with a display\n based on compositing 2d arrays of text.\n\n- `selectel/pyte`_: Simple VTXXX-compatible linux terminal emulator.\n\n- `astanin/python-tabulate`_: Pretty-print tabular data in Python, a library\n and a command-line utility.\n\n- `rspeer/python-ftfy`_: Fixes mojibake and other glitches in Unicode\n text.\n\n- `nbedos/termtosvg`_: Terminal recorder that renders sessions as SVG\n animations.\n\n- `peterbrittain/asciimatics`_: Package to help people create full-screen text\n UIs.\n\n- `python-cmd2/cmd2`_: A tool for building interactive command line apps\n\n- `stratis-storage/stratis-cli`_: CLI for the Stratis project\n\n- `ihabunek/toot`_: A Mastodon CLI/TUI client\n\n- `saulpw/visidata`_: Terminal spreadsheet multitool for discovering and\n arranging data\n\n===============\nOther Languages\n===============\n\n- `timoxley/wcwidth`_: JavaScript\n- `janlelis/unicode-display_width`_: Ruby\n- `alecrabbit/php-wcwidth`_: PHP\n- `Text::CharWidth`_: Perl\n- `bluebear94/Terminal-WCWidth`_: Perl 6\n- `mattn/go-runewidth`_: Go\n- `grepsuzette/wcwidth`_: Haxe\n- `aperezdc/lua-wcwidth`_: Lua\n- `joachimschmidt557/zig-wcwidth`_: Zig\n- `fumiyas/wcwidth-cjk`_: `LD_PRELOAD` override\n- `joshuarubin/wcwidth9`_: Unicode version 9 in C\n\n=======\nHistory\n=======\n\n0.2.13 *2024-01-06*\n * **Bugfix** zero-width support for Hangul Jamo (Korean)\n\n0.2.12 *2023-11-21*\n * re-release to remove .pyi file misplaced in wheel files `Issue #101`_.\n\n0.2.11 *2023-11-20*\n * Include tests files in the source distribution (`PR #98`_, `PR #100`_).\n\n0.2.10 *2023-11-13*\n * **Bugfix** accounting of some kinds of emoji sequences using U+FE0F\n Variation Selector 16 (`PR #97`_).\n * **Updated** `Specification `_.\n\n0.2.9 *2023-10-30*\n * **Bugfix** zero-width characters used in Emoji ZWJ sequences, Balinese,\n Jamo, Devanagari, Tamil, Kannada and others (`PR #91`_).\n * **Updated** to include `Specification `_ of\n character measurements.\n\n0.2.8 *2023-09-30*\n * Include requirements files in the source distribution (`PR #82`_).\n\n0.2.7 *2023-09-28*\n * **Updated** tables to include Unicode Specification 15.1.0.\n * Include ``bin``, ``docs``, and ``tox.ini`` in the source distribution\n\n0.2.6 *2023-01-14*\n * **Updated** tables to include Unicode Specification 14.0.0 and 15.0.0.\n * **Changed** developer tools to use pip-compile, and to use jinja2 templates\n for code generation in `bin/update-tables.py` to prepare for possible\n compiler optimization release.\n\n0.2.1 .. 0.2.5 *2020-06-23*\n * **Repository** changes to update tests and packaging issues, and\n begin tagging repository with matching release versions.\n\n0.2.0 *2020-06-01*\n * **Enhancement**: Unicode version may be selected by exporting the\n Environment variable ``UNICODE_VERSION``, such as ``13.0``, or ``6.3.0``.\n See the `jquast/ucs-detect`_ CLI utility for automatic detection.\n * **Enhancement**:\n API Documentation is published to readthedocs.org.\n * **Updated** tables for *all* Unicode Specifications with files\n published in a programmatically consumable format, versions 4.1.0\n through 13.0\n\n0.1.9 *2020-03-22*\n * **Performance** optimization by `Avram Lubkin`_, `PR #35`_.\n * **Updated** tables to Unicode Specification 13.0.0.\n\n0.1.8 *2020-01-01*\n * **Updated** tables to Unicode Specification 12.0.0. (`PR #30`_).\n\n0.1.7 *2016-07-01*\n * **Updated** tables to Unicode Specification 9.0.0. (`PR #18`_).\n\n0.1.6 *2016-01-08 Production/Stable*\n * ``LICENSE`` file now included with distribution.\n\n0.1.5 *2015-09-13 Alpha*\n * **Bugfix**:\n Resolution of \"combining_ character width\" issue, most especially\n those that previously returned -1 now often (correctly) return 0.\n resolved by `Philip Craig`_ via `PR #11`_.\n * **Deprecated**:\n The module path ``wcwidth.table_comb`` is no longer available,\n it has been superseded by module path ``wcwidth.table_zero``.\n\n0.1.4 *2014-11-20 Pre-Alpha*\n * **Feature**: ``wcswidth()`` now determines printable length\n for (most) combining_ characters. The developer's tool\n `bin/wcwidth-browser.py`_ is improved to display combining_\n characters when provided the ``--combining`` option\n (`Thomas Ballinger`_ and `Leta Montopoli`_ `PR #5`_).\n * **Feature**: added static analysis (prospector_) to testing\n framework.\n\n0.1.3 *2014-10-29 Pre-Alpha*\n * **Bugfix**: 2nd parameter of wcswidth was not honored.\n (`Thomas Ballinger`_, `PR #4`_).\n\n0.1.2 *2014-10-28 Pre-Alpha*\n * **Updated** tables to Unicode Specification 7.0.0.\n (`Thomas Ballinger`_, `PR #3`_).\n\n0.1.1 *2014-05-14 Pre-Alpha*\n * Initial release to pypi, Based on Unicode Specification 6.3.0\n\nThis code was originally derived directly from C code of the same name,\nwhose latest version is available at\nhttps://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c::\n\n * Markus Kuhn -- 2007-05-26 (Unicode 5.0)\n *\n * Permission to use, copy, modify, and distribute this software\n * for any purpose and without fee is hereby granted. The author\n * disclaims all warranties with regard to this software.\n\n.. _`Specification_from_pypi`: https://wcwidth.readthedocs.io/en/latest/specs.html\n.. _`tox`: https://tox.wiki/en/latest/\n.. _`prospector`: https://github.com/landscapeio/prospector\n.. _`combining`: https://en.wikipedia.org/wiki/Combining_character\n.. _`bin/`: https://github.com/jquast/wcwidth/tree/master/bin\n.. _`bin/wcwidth-browser.py`: https://github.com/jquast/wcwidth/blob/master/bin/wcwidth-browser.py\n.. _`Thomas Ballinger`: https://github.com/thomasballinger\n.. _`Leta Montopoli`: https://github.com/lmontopo\n.. _`Philip Craig`: https://github.com/philipc\n.. _`PR #3`: https://github.com/jquast/wcwidth/pull/3\n.. _`PR #4`: https://github.com/jquast/wcwidth/pull/4\n.. _`PR #5`: https://github.com/jquast/wcwidth/pull/5\n.. _`PR #11`: https://github.com/jquast/wcwidth/pull/11\n.. _`PR #18`: https://github.com/jquast/wcwidth/pull/18\n.. _`PR #30`: https://github.com/jquast/wcwidth/pull/30\n.. _`PR #35`: https://github.com/jquast/wcwidth/pull/35\n.. _`PR #82`: https://github.com/jquast/wcwidth/pull/82\n.. _`PR #91`: https://github.com/jquast/wcwidth/pull/91\n.. _`PR #97`: https://github.com/jquast/wcwidth/pull/97\n.. _`PR #98`: https://github.com/jquast/wcwidth/pull/98\n.. _`PR #100`: https://github.com/jquast/wcwidth/pull/100\n.. _`Issue #101`: https://github.com/jquast/wcwidth/issues/101\n.. _`jquast/blessed`: https://github.com/jquast/blessed\n.. _`selectel/pyte`: https://github.com/selectel/pyte\n.. _`thomasballinger/curtsies`: https://github.com/thomasballinger/curtsies\n.. _`dbcli/pgcli`: https://github.com/dbcli/pgcli\n.. _`prompt-toolkit/python-prompt-toolkit`: https://github.com/prompt-toolkit/python-prompt-toolkit\n.. _`timoxley/wcwidth`: https://github.com/timoxley/wcwidth\n.. _`wcwidth(3)`: https://man7.org/linux/man-pages/man3/wcwidth.3.html\n.. _`wcswidth(3)`: https://man7.org/linux/man-pages/man3/wcswidth.3.html\n.. _`astanin/python-tabulate`: https://github.com/astanin/python-tabulate\n.. _`janlelis/unicode-display_width`: https://github.com/janlelis/unicode-display_width\n.. _`rspeer/python-ftfy`: https://github.com/rspeer/python-ftfy\n.. _`alecrabbit/php-wcwidth`: https://github.com/alecrabbit/php-wcwidth\n.. _`Text::CharWidth`: https://metacpan.org/pod/Text::CharWidth\n.. _`bluebear94/Terminal-WCWidth`: https://github.com/bluebear94/Terminal-WCWidth\n.. _`mattn/go-runewidth`: https://github.com/mattn/go-runewidth\n.. _`grepsuzette/wcwidth`: https://github.com/grepsuzette/wcwidth\n.. _`jquast/ucs-detect`: https://github.com/jquast/ucs-detect\n.. _`Avram Lubkin`: https://github.com/avylove\n.. _`nbedos/termtosvg`: https://github.com/nbedos/termtosvg\n.. _`peterbrittain/asciimatics`: https://github.com/peterbrittain/asciimatics\n.. _`aperezdc/lua-wcwidth`: https://github.com/aperezdc/lua-wcwidth\n.. _`joachimschmidt557/zig-wcwidth`: https://github.com/joachimschmidt557/zig-wcwidth\n.. _`fumiyas/wcwidth-cjk`: https://github.com/fumiyas/wcwidth-cjk\n.. _`joshuarubin/wcwidth9`: https://github.com/joshuarubin/wcwidth9\n.. _`python-cmd2/cmd2`: https://github.com/python-cmd2/cmd2\n.. _`stratis-storage/stratis-cli`: https://github.com/stratis-storage/stratis-cli\n.. _`ihabunek/toot`: https://github.com/ihabunek/toot\n.. _`saulpw/visidata`: https://github.com/saulpw/visidata\n.. _`pip-tools`: https://pip-tools.readthedocs.io/\n.. _`sphinx`: https://www.sphinx-doc.org/\n.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/wcwidth.svg?logo=pypi\n :alt: Downloads\n :target: https://pypi.org/project/wcwidth/\n.. |codecov| image:: https://codecov.io/gh/jquast/wcwidth/branch/master/graph/badge.svg\n :alt: codecov.io Code Coverage\n :target: https://app.codecov.io/gh/jquast/wcwidth/\n.. |license| image:: https://img.shields.io/pypi/l/wcwidth.svg\n :target: https://pypi.org/project/wcwidth/\n :alt: MIT License", - "release_date": "2024-01-06T02:10:57", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Jeff Quast", - "email": "contact@jeffquast.com", - "url": null - } - ], - "keywords": [ - "cjk", - "combining", - "console", - "eastasian", - "emoji", - "emulator", - "terminal", - "unicode", - "wcswidth", - "wcwidth", - "xterm", - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: POSIX", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Software Development :: Internationalization", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Localization", - "Topic :: Terminals" - ], - "homepage_url": "https://github.com/jquast/wcwidth", - "download_url": "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz", - "size": 101301, - "sha1": null, - "md5": "5ce8dd9e6993dae268142feb1e605cd8", - "sha256": "72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/wcwidth/0.2.13/json", - "datasource_id": null, - "purl": "pkg:pypi/wcwidth@0.2.13" - }, { "type": "pypi", "namespace": null, @@ -8026,83 +4447,6 @@ "datasource_id": null, "purl": "pkg:pypi/werkzeug@1.0.1" }, - { - "type": "pypi", - "namespace": null, - "name": "werkzeug", - "version": "1.0.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The comprehensive WSGI web application library.\nWerkzeug\n========\n\n*werkzeug* German noun: \"tool\". Etymology: *werk* (\"work\"), *zeug* (\"stuff\")\n\nWerkzeug is a comprehensive `WSGI`_ web application library. It began as\na simple collection of various utilities for WSGI applications and has\nbecome one of the most advanced WSGI utility libraries.\n\nIt includes:\n\n- An interactive debugger that allows inspecting stack traces and\n source code in the browser with an interactive interpreter for any\n frame in the stack.\n- A full-featured request object with objects to interact with\n headers, query args, form data, files, and cookies.\n- A response object that can wrap other WSGI applications and handle\n streaming data.\n- A routing system for matching URLs to endpoints and generating URLs\n for endpoints, with an extensible system for capturing variables\n from URLs.\n- HTTP utilities to handle entity tags, cache control, dates, user\n agents, cookies, files, and more.\n- A threaded WSGI server for use while developing applications\n locally.\n- A test client for simulating HTTP requests during testing without\n requiring running a server.\n\nWerkzeug is Unicode aware and doesn't enforce any dependencies. It is up\nto the developer to choose a template engine, database adapter, and even\nhow to handle requests. It can be used to build all sorts of end user\napplications such as blogs, wikis, or bulletin boards.\n\n`Flask`_ wraps Werkzeug, using it to handle the details of WSGI while\nproviding more structure and patterns for defining powerful\napplications.\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n from werkzeug.wrappers import Request, Response\n\n @Request.application\n def application(request):\n return Response('Hello, World!')\n\n if __name__ == '__main__':\n from werkzeug.serving import run_simple\n run_simple('localhost', 4000, application)\n\n\nLinks\n-----\n\n- Website: https://palletsprojects.com/p/werkzeug/\n- Documentation: https://werkzeug.palletsprojects.com/\n- Releases: https://pypi.org/project/Werkzeug/\n- Code: https://github.com/pallets/werkzeug\n- Issue tracker: https://github.com/pallets/werkzeug/issues\n- Test status: https://dev.azure.com/pallets/werkzeug/_build\n- Official chat: https://discord.gg/t6rrQZH\n\n.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n.. _pip: https://pip.pypa.io/en/stable/quickstart/", - "release_date": "2020-03-31T18:03:37", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": "Pallets", - "email": "contact@palletsprojects.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Internet :: WWW/HTTP :: WSGI", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", - "Topic :: Software Development :: Libraries :: Application Frameworks", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://palletsprojects.com/p/werkzeug/", - "download_url": "https://files.pythonhosted.org/packages/10/27/a33329150147594eff0ea4c33c2036c0eadd933141055be0ff911f7f8d04/Werkzeug-1.0.1.tar.gz", - "size": 904455, - "sha1": null, - "md5": "5d499cfdd30de5d9c946994783772efd", - "sha256": "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://github.com/pallets/werkzeug", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "license": "BSD-3-Clause", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/werkzeug/1.0.1/json", - "datasource_id": null, - "purl": "pkg:pypi/werkzeug@1.0.1" - }, { "type": "pypi", "namespace": null, @@ -8155,59 +4499,6 @@ "api_data_url": "https://pypi.org/pypi/zipp/1.2.0/json", "datasource_id": null, "purl": "pkg:pypi/zipp@1.2.0" - }, - { - "type": "pypi", - "namespace": null, - "name": "zipp", - "version": "1.2.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Backport of pathlib-compatible object wrapper for zip files\n.. image:: https://img.shields.io/pypi/v/zipp.svg\n :target: https://pypi.org/project/zipp\n\n.. image:: https://img.shields.io/pypi/pyversions/zipp.svg\n\n.. image:: https://img.shields.io/travis/jaraco/zipp/master.svg\n :target: https://travis-ci.org/jaraco/zipp\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n :alt: Code style: Black\n\n.. image:: https://img.shields.io/appveyor/ci/jaraco/zipp/master.svg\n :target: https://ci.appveyor.com/project/jaraco/zipp/branch/master\n\n.. .. image:: https://readthedocs.org/projects/zipp/badge/?version=latest\n.. :target: https://zipp.readthedocs.io/en/latest/?badge=latest\n\n\nA pathlib-compatible Zipfile object wrapper. A backport of the\n`Path object `_.", - "release_date": "2020-02-17T18:32:53", - "parties": [ - { - "type": "person", - "role": "author", - "name": "Jason R. Coombs", - "email": "jaraco@jaraco.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3" - ], - "homepage_url": "https://github.com/jaraco/zipp", - "download_url": "https://files.pythonhosted.org/packages/78/08/d52f0ea643bc1068d6dc98b412f4966a9b63255d20911a23ac3220c033c4/zipp-1.2.0.tar.gz", - "size": 13357, - "sha1": null, - "md5": "c25d36db01d011eb2067c722cbd56279", - "sha256": "c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "source_packages": [], - "file_references": [], - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/zipp/1.2.0/json", - "datasource_id": null, - "purl": "pkg:pypi/zipp@1.2.0" } ], "resolved_dependencies_graph": [ From 3aad6f1855ea0b3c9f0a3ca43364beaaa3941097 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Thu, 24 Apr 2025 14:22:06 +0200 Subject: [PATCH 095/105] Regen tests expectations Signed-off-by: Philippe Ombredanne --- tests/data/azure-devops.req-310-expected.json | 50 +++++++++---------- tests/data/azure-devops.req-312-expected.json | 50 +++++++++---------- tests/data/azure-devops.req-313-expected.json | 50 +++++++++---------- tests/data/azure-devops.req-38-expected.json | 22 ++++---- ...e-requirements-ignore-errors-expected.json | 20 ++++---- tests/test_resolution.py | 2 +- 6 files changed, 91 insertions(+), 103 deletions(-) diff --git a/tests/data/azure-devops.req-310-expected.json b/tests/data/azure-devops.req-310-expected.json index 2c44d88b..347ad9bd 100644 --- a/tests/data/azure-devops.req-310-expected.json +++ b/tests/data/azure-devops.req-310-expected.json @@ -1174,12 +1174,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.1", + "version": "4.13.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-04-03T16:11:19", + "release_date": "2025-04-10T14:19:03", "parties": [ { "type": "person", @@ -1217,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", - "size": 45739, + "download_url": "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", + "size": 45806, "sha1": null, - "md5": "88648ecb0c5e2dfdb72097ec846b87c8", - "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", + "md5": "0d9ada689b5a7c88163dd4c3417b8cc8", + "sha256": "a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -1236,20 +1236,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.2/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.1" + "purl": "pkg:pypi/typing-extensions@4.13.2" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.3.0", + "version": "2.4.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-12-22T07:47:28", + "release_date": "2025-04-10T15:23:37", "parties": [ { "type": "person", @@ -1292,22 +1292,18 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", - "size": 128369, + "download_url": "https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl", + "size": 128680, "sha1": null, - "md5": "21cc339da6ff13770c290e665a50d1a6", - "sha256": "1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", + "md5": "b38b9d8501f98140c591986989a0985f", + "sha256": "4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, + "license_expression": "MIT", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -1315,9 +1311,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.4.0/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.3.0" + "purl": "pkg:pypi/urllib3@2.4.0" } ], "resolved_dependencies_graph": [ @@ -1326,7 +1322,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1341,7 +1337,7 @@ "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1407,7 +1403,7 @@ "pkg:pypi/certifi@2025.1.31", "pkg:pypi/charset-normalizer@3.4.1", "pkg:pypi/idna@3.10", - "pkg:pypi/urllib3@2.3.0" + "pkg:pypi/urllib3@2.4.0" ] }, { @@ -1415,11 +1411,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.1", + "package": "pkg:pypi/typing-extensions@4.13.2", "dependencies": [] }, { - "package": "pkg:pypi/urllib3@2.3.0", + "package": "pkg:pypi/urllib3@2.4.0", "dependencies": [] } ] diff --git a/tests/data/azure-devops.req-312-expected.json b/tests/data/azure-devops.req-312-expected.json index 1fd7a15b..0277e769 100644 --- a/tests/data/azure-devops.req-312-expected.json +++ b/tests/data/azure-devops.req-312-expected.json @@ -1174,12 +1174,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.1", + "version": "4.13.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-04-03T16:11:19", + "release_date": "2025-04-10T14:19:03", "parties": [ { "type": "person", @@ -1217,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", - "size": 45739, + "download_url": "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", + "size": 45806, "sha1": null, - "md5": "88648ecb0c5e2dfdb72097ec846b87c8", - "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", + "md5": "0d9ada689b5a7c88163dd4c3417b8cc8", + "sha256": "a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -1236,20 +1236,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.2/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.1" + "purl": "pkg:pypi/typing-extensions@4.13.2" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.3.0", + "version": "2.4.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-12-22T07:47:28", + "release_date": "2025-04-10T15:23:37", "parties": [ { "type": "person", @@ -1292,22 +1292,18 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", - "size": 128369, + "download_url": "https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl", + "size": 128680, "sha1": null, - "md5": "21cc339da6ff13770c290e665a50d1a6", - "sha256": "1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", + "md5": "b38b9d8501f98140c591986989a0985f", + "sha256": "4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, + "license_expression": "MIT", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -1315,9 +1311,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.4.0/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.3.0" + "purl": "pkg:pypi/urllib3@2.4.0" } ], "resolved_dependencies_graph": [ @@ -1326,7 +1322,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1341,7 +1337,7 @@ "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1407,7 +1403,7 @@ "pkg:pypi/certifi@2025.1.31", "pkg:pypi/charset-normalizer@3.4.1", "pkg:pypi/idna@3.10", - "pkg:pypi/urllib3@2.3.0" + "pkg:pypi/urllib3@2.4.0" ] }, { @@ -1415,11 +1411,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.1", + "package": "pkg:pypi/typing-extensions@4.13.2", "dependencies": [] }, { - "package": "pkg:pypi/urllib3@2.3.0", + "package": "pkg:pypi/urllib3@2.4.0", "dependencies": [] } ] diff --git a/tests/data/azure-devops.req-313-expected.json b/tests/data/azure-devops.req-313-expected.json index ca55f388..78ac4c11 100644 --- a/tests/data/azure-devops.req-313-expected.json +++ b/tests/data/azure-devops.req-313-expected.json @@ -1174,12 +1174,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.1", + "version": "4.13.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-04-03T16:11:19", + "release_date": "2025-04-10T14:19:03", "parties": [ { "type": "person", @@ -1217,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", - "size": 45739, + "download_url": "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", + "size": 45806, "sha1": null, - "md5": "88648ecb0c5e2dfdb72097ec846b87c8", - "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", + "md5": "0d9ada689b5a7c88163dd4c3417b8cc8", + "sha256": "a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -1236,20 +1236,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.2/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.1" + "purl": "pkg:pypi/typing-extensions@4.13.2" }, { "type": "pypi", "namespace": null, "name": "urllib3", - "version": "2.3.0", + "version": "2.4.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "HTTP library with thread-safe connection pooling, file post, and more.\n

\n\n![urllib3](https://github.com/urllib3/urllib3/raw/main/docs/_static/banner_github.svg)\n\n

\n\n

\n \"PyPI\n \"Python\n \"Join\n \"Coverage\n \"Build\n \"Documentation
\n \"OpenSSF\n \"SLSA\n \"CII\n

\n\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, brotli, and zstd encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n```python3\n>>> import urllib3\n>>> resp = urllib3.request(\"GET\", \"http://httpbin.org/robots.txt\")\n>>> resp.status\n200\n>>> resp.data\nb\"User-agent: *\\nDisallow: /deny\\n\"\n```\n\n## Installing\n\nurllib3 can be installed with [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install urllib3\n```\n\nAlternatively, you can grab the latest source code from [GitHub](https://github.com/urllib3/urllib3):\n\n```bash\n$ git clone https://github.com/urllib3/urllib3.git\n$ cd urllib3\n$ pip install .\n```\n\n\n## Documentation\n\nurllib3 has usage and reference documentation at [urllib3.readthedocs.io](https://urllib3.readthedocs.io).\n\n\n## Community\n\nurllib3 has a [community Discord channel](https://discord.gg/urllib3) for asking questions and\ncollaborating with other contributors. Drop by and say hello \ud83d\udc4b\n\n\n## Contributing\n\nurllib3 happily accepts contributions. Please see our\n[contributing documentation](https://urllib3.readthedocs.io/en/latest/contributing.html)\nfor some tips on getting started.\n\n\n## Security Disclosures\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\n## Maintainers\n\n- [@sethmlarson](https://github.com/sethmlarson) (Seth M. Larson)\n- [@pquentin](https://github.com/pquentin) (Quentin Pradet)\n- [@illia-v](https://github.com/illia-v) (Illia Volochii)\n- [@theacodes](https://github.com/theacodes) (Thea Flowers)\n- [@haikuginger](https://github.com/haikuginger) (Jess Shapiro)\n- [@lukasa](https://github.com/lukasa) (Cory Benfield)\n- [@sigmavirus24](https://github.com/sigmavirus24) (Ian Stapleton Cordasco)\n- [@shazow](https://github.com/shazow) (Andrey Petrov)\n\n\ud83d\udc4b\n\n\n## Sponsorship\n\nIf your company benefits from this library, please consider [sponsoring its\ndevelopment](https://urllib3.readthedocs.io/en/latest/sponsors.html).\n\n\n## For Enterprise\n\nProfessional support for urllib3 is available as part of the [Tidelift\nSubscription][1]. Tidelift gives software development teams a single source for\npurchasing and maintaining their software, with professional grade assurances\nfrom the experts who know it best, while seamlessly integrating with existing\ntools.\n\n[1]: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme", - "release_date": "2024-12-22T07:47:28", + "release_date": "2025-04-10T15:23:37", "parties": [ { "type": "person", @@ -1292,22 +1292,18 @@ "Topic :: Software Development :: Libraries" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", - "size": 128369, + "download_url": "https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl", + "size": 128680, "sha1": null, - "md5": "21cc339da6ff13770c290e665a50d1a6", - "sha256": "1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", + "md5": "b38b9d8501f98140c591986989a0985f", + "sha256": "4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/urllib3/urllib3", "vcs_url": null, "copyright": null, - "license_expression": null, - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, + "license_expression": "MIT", + "declared_license": {}, "notice_text": null, "source_packages": [], "file_references": [], @@ -1315,9 +1311,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/urllib3/2.3.0/json", + "api_data_url": "https://pypi.org/pypi/urllib3/2.4.0/json", "datasource_id": null, - "purl": "pkg:pypi/urllib3@2.3.0" + "purl": "pkg:pypi/urllib3@2.4.0" } ], "resolved_dependencies_graph": [ @@ -1326,7 +1322,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1341,7 +1337,7 @@ "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1407,7 +1403,7 @@ "pkg:pypi/certifi@2025.1.31", "pkg:pypi/charset-normalizer@3.4.1", "pkg:pypi/idna@3.10", - "pkg:pypi/urllib3@2.3.0" + "pkg:pypi/urllib3@2.4.0" ] }, { @@ -1415,11 +1411,11 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.1", + "package": "pkg:pypi/typing-extensions@4.13.2", "dependencies": [] }, { - "package": "pkg:pypi/urllib3@2.3.0", + "package": "pkg:pypi/urllib3@2.4.0", "dependencies": [] } ] diff --git a/tests/data/azure-devops.req-38-expected.json b/tests/data/azure-devops.req-38-expected.json index 29f6d6ed..0363a080 100644 --- a/tests/data/azure-devops.req-38-expected.json +++ b/tests/data/azure-devops.req-38-expected.json @@ -1174,12 +1174,12 @@ "type": "pypi", "namespace": null, "name": "typing-extensions", - "version": "4.13.1", + "version": "4.13.2", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Backported and Experimental Type Hints for Python 3.8+\n# Typing Extensions\n\n[![Chat at https://gitter.im/python/typing](https://badges.gitter.im/python/typing.svg)](https://gitter.im/python/typing)\n\n[Documentation](https://typing-extensions.readthedocs.io/en/latest/#) \u2013\n[PyPI](https://pypi.org/project/typing-extensions/)\n\n## Overview\n\nThe `typing_extensions` module serves two related purposes:\n\n- Enable use of new type system features on older Python versions. For example,\n `typing.TypeGuard` is new in Python 3.10, but `typing_extensions` allows\n users on previous Python versions to use it too.\n- Enable experimentation with new type system PEPs before they are accepted and\n added to the `typing` module.\n\n`typing_extensions` is treated specially by static type checkers such as\nmypy and pyright. Objects defined in `typing_extensions` are treated the same\nway as equivalent forms in `typing`.\n\n`typing_extensions` uses\n[Semantic Versioning](https://semver.org/). The\nmajor version will be incremented only for backwards-incompatible changes.\nTherefore, it's safe to depend\non `typing_extensions` like this: `typing_extensions >=x.y, <(x+1)`,\nwhere `x.y` is the first version that includes all features you need.\n\n## Included items\n\nSee [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a\ncomplete listing of module contents.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md)\nfor how to contribute to `typing_extensions`.", - "release_date": "2025-04-03T16:11:19", + "release_date": "2025-04-10T14:19:03", "parties": [ { "type": "person", @@ -1217,11 +1217,11 @@ "Topic :: Software Development" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/df/c5/e7a0b0f5ed69f94c8ab7379c599e6036886bffcde609969a5325f47f1332/typing_extensions-4.13.1-py3-none-any.whl", - "size": 45739, + "download_url": "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", + "size": 45806, "sha1": null, - "md5": "88648ecb0c5e2dfdb72097ec846b87c8", - "sha256": "4b6cf02909eb5495cfbc3f6e8fd49217e6cc7944e145cdda8caa3734777f9e69", + "md5": "0d9ada689b5a7c88163dd4c3417b8cc8", + "sha256": "a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", "sha512": null, "bug_tracking_url": "https://github.com/python/typing_extensions/issues", "code_view_url": null, @@ -1236,9 +1236,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.1/json", + "api_data_url": "https://pypi.org/pypi/typing-extensions/4.13.2/json", "datasource_id": null, - "purl": "pkg:pypi/typing-extensions@4.13.1" + "purl": "pkg:pypi/typing-extensions@4.13.2" }, { "type": "pypi", @@ -1327,7 +1327,7 @@ "dependencies": [ "pkg:pypi/requests@2.32.3", "pkg:pypi/six@1.17.0", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1342,7 +1342,7 @@ "pkg:pypi/azure-core@1.33.0", "pkg:pypi/cryptography@44.0.2", "pkg:pypi/isodate@0.7.2", - "pkg:pypi/typing-extensions@4.13.1" + "pkg:pypi/typing-extensions@4.13.2" ] }, { @@ -1416,7 +1416,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/typing-extensions@4.13.1", + "package": "pkg:pypi/typing-extensions@4.13.2", "dependencies": [] }, { diff --git a/tests/data/example-requirements-ignore-errors-expected.json b/tests/data/example-requirements-ignore-errors-expected.json index 9b303f24..623ac28b 100644 --- a/tests/data/example-requirements-ignore-errors-expected.json +++ b/tests/data/example-requirements-ignore-errors-expected.json @@ -224,12 +224,12 @@ "type": "pypi", "namespace": null, "name": "packaging", - "version": "24.2", + "version": "25.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Core utilities for Python packages\npackaging\n=========\n\n.. start-intro\n\nReusable core utilities for various Python Packaging\n`interoperability specifications `_.\n\nThis library provides utilities that implement the interoperability\nspecifications which have clearly one correct behaviour (eg: :pep:`440`)\nor benefit greatly from having a single shared implementation (eg: :pep:`425`).\n\n.. end-intro\n\nThe ``packaging`` project includes the following: version handling, specifiers,\nmarkers, requirements, tags, utilities.\n\nDocumentation\n-------------\n\nThe `documentation`_ provides information and the API for the following:\n\n- Version Handling\n- Specifiers\n- Markers\n- Requirements\n- Tags\n- Utilities\n\nInstallation\n------------\n\nUse ``pip`` to install these utilities::\n\n pip install packaging\n\nThe ``packaging`` library uses calendar-based versioning (``YY.N``).\n\nDiscussion\n----------\n\nIf you run into bugs, you can file them in our `issue tracker`_.\n\nYou can also join ``#pypa`` on Freenode to ask questions or get involved.\n\n\n.. _`documentation`: https://packaging.pypa.io/\n.. _`issue tracker`: https://github.com/pypa/packaging/issues\n\n\nCode of Conduct\n---------------\n\nEveryone interacting in the packaging project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.\n\n.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md\n\nContributing\n------------\n\nThe ``CONTRIBUTING.rst`` file outlines how to contribute to this project as\nwell as how to report a potential security issue. The documentation for this\nproject also covers information about `project development`_ and `security`_.\n\n.. _`project development`: https://packaging.pypa.io/en/latest/development/\n.. _`security`: https://packaging.pypa.io/en/latest/security/\n\nProject History\n---------------\n\nPlease review the ``CHANGELOG.rst`` file or the `Changelog documentation`_ for\nrecent changes and project history.\n\n.. _`Changelog documentation`: https://packaging.pypa.io/en/latest/changelog/", - "release_date": "2024-11-08T09:47:44", + "release_date": "2025-04-19T11:48:57", "parties": [ { "type": "person", @@ -256,11 +256,11 @@ "Typing :: Typed" ], "homepage_url": null, - "download_url": "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", - "size": 65451, + "download_url": "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", + "size": 66469, "sha1": null, - "md5": "137b07612433f1ad2cd27dd8ab38ce49", - "sha256": "09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", + "md5": "5fa4842e2eb0d7883b4b0e7c42d6229e", + "sha256": "29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/pypa/packaging", @@ -280,9 +280,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/packaging/24.2/json", + "api_data_url": "https://pypi.org/pypi/packaging/25.0/json", "datasource_id": null, - "purl": "pkg:pypi/packaging@24.2" + "purl": "pkg:pypi/packaging@25.0" }, { "type": "pypi", @@ -491,7 +491,7 @@ "dependencies": [] }, { - "package": "pkg:pypi/packaging@24.2", + "package": "pkg:pypi/packaging@25.0", "dependencies": [] }, { @@ -503,7 +503,7 @@ "dependencies": [ "pkg:pypi/exceptiongroup@1.2.2", "pkg:pypi/iniconfig@2.1.0", - "pkg:pypi/packaging@24.2", + "pkg:pypi/packaging@25.0", "pkg:pypi/pluggy@1.5.0", "pkg:pypi/tomli@2.2.1" ] diff --git a/tests/test_resolution.py b/tests/test_resolution.py index 68a25997..1207ba91 100644 --- a/tests/test_resolution.py +++ b/tests/test_resolution.py @@ -155,7 +155,7 @@ def test_get_resolved_dependencies_for_version_containing_local_version_identifi "pkg:pypi/markupsafe@2.1.5", "pkg:pypi/mpmath@1.3.0", "pkg:pypi/networkx@3.3", - "pkg:pypi/sympy@1.13.1", + "pkg:pypi/sympy@1.13.3", "pkg:pypi/torch@2.0.0%2Bcpu", "pkg:pypi/typing-extensions@4.12.2", ] From 49716cb8dafe374d3f5d27a850e4bd47a2e4dd1a Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 00:07:47 +0200 Subject: [PATCH 096/105] Update changelog Signed-off-by: Philippe Ombredanne --- CHANGELOG.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2c3f6dfa..1bb40076 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,7 @@ Changelog ========= -v0.13.2 +v0.14.0 ----------- - Speed up downloads with asyncio @@ -100,8 +100,7 @@ v0.9.5 v0.9.4 ------ -- Create PyPI cache location in the home directory if a cache directory cannot be made at the - project root. +- Create PyPI cache location in the home directory if a cache directory cannot be made at the project root. - Replace packaging with packvers. - Prevent duplicated package versions. From ea3e2994eb385f5bc02318107653d26262712341 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 00:09:42 +0200 Subject: [PATCH 097/105] Update test and format code Signed-off-by: Philippe Ombredanne --- .../pinned-pdt-requirements.txt-expected.json | 20 ++++++++--------- .../pinned-requirements.txt-expected.json | 22 +++++++++---------- tests/test_api.py | 1 - tests/test_cli.py | 6 ++--- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/tests/data/pinned-pdt-requirements.txt-expected.json b/tests/data/pinned-pdt-requirements.txt-expected.json index e5a238da..62dcb3f4 100644 --- a/tests/data/pinned-pdt-requirements.txt-expected.json +++ b/tests/data/pinned-pdt-requirements.txt-expected.json @@ -900,12 +900,12 @@ "type": "pypi", "namespace": null, "name": "boolean-py", - "version": "5.0", + "version": "4.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Define boolean algebras, create and parse boolean expressions and create custom boolean DSL.\nThis library helps you deal with boolean expressions and algebra with variables\nand the boolean functions AND, OR, NOT.\n\nYou can parse expressions from strings and simplify and compare expressions.\nYou can also easily create your custom algreba and mini DSL and create custom\ntokenizers to handle custom expressions.\n\nFor extensive documentation look either into the docs directory or view it online, at\nhttps://booleanpy.readthedocs.org/en/latest/\n\nhttps://github.com/bastikr/boolean.py\n\nCopyright (c) 2009-2020 Sebastian Kraemer, basti.kr@gmail.com and others\nSPDX-License-Identifier: BSD-2-Clause", - "release_date": "2025-04-03T10:39:48", + "release_date": "2022-05-05T08:18:58", "parties": [ { "type": "person", @@ -931,11 +931,11 @@ "Topic :: Utilities" ], "homepage_url": "https://github.com/bastikr/boolean.py", - "download_url": "https://files.pythonhosted.org/packages/e5/ca/78d423b324b8d77900030fa59c4aa9054261ef0925631cd2501dd015b7b7/boolean_py-5.0-py3-none-any.whl", - "size": 26577, + "download_url": "https://files.pythonhosted.org/packages/3f/02/6389ef0529af6da0b913374dedb9bbde8eabfe45767ceec38cc37801b0bd/boolean.py-4.0-py3-none-any.whl", + "size": 25909, "sha1": null, - "md5": "df9060a88bfb6ba3b9314783b16a0faa", - "sha256": "ef28a70bd43115208441b53a045d1549e2f0ec6e3d08a9d142cbc41c1938e8d9", + "md5": "73208a6fc38d6904a1d7e793e8da1292", + "sha256": "2876f2051d7d6394a531d82dc6eb407faa0b01a0a0b3083817ccd7323b8d96bd", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -952,9 +952,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/boolean-py/5.0/json", + "api_data_url": "https://pypi.org/pypi/boolean-py/4.0/json", "datasource_id": null, - "purl": "pkg:pypi/boolean-py@5.0" + "purl": "pkg:pypi/boolean-py@4.0" }, { "type": "pypi", @@ -2841,7 +2841,7 @@ { "key": "boolean-py", "package_name": "boolean-py", - "installed_version": "5.0", + "installed_version": "4.0", "dependencies": [] }, { @@ -2877,7 +2877,7 @@ { "key": "boolean-py", "package_name": "boolean-py", - "installed_version": "5.0", + "installed_version": "4.0", "dependencies": [] } ] diff --git a/tests/data/pinned-requirements.txt-expected.json b/tests/data/pinned-requirements.txt-expected.json index 77d69015..a5848345 100644 --- a/tests/data/pinned-requirements.txt-expected.json +++ b/tests/data/pinned-requirements.txt-expected.json @@ -900,12 +900,12 @@ "type": "pypi", "namespace": null, "name": "boolean-py", - "version": "5.0", + "version": "4.0", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "Define boolean algebras, create and parse boolean expressions and create custom boolean DSL.\nThis library helps you deal with boolean expressions and algebra with variables\nand the boolean functions AND, OR, NOT.\n\nYou can parse expressions from strings and simplify and compare expressions.\nYou can also easily create your custom algreba and mini DSL and create custom\ntokenizers to handle custom expressions.\n\nFor extensive documentation look either into the docs directory or view it online, at\nhttps://booleanpy.readthedocs.org/en/latest/\n\nhttps://github.com/bastikr/boolean.py\n\nCopyright (c) 2009-2020 Sebastian Kraemer, basti.kr@gmail.com and others\nSPDX-License-Identifier: BSD-2-Clause", - "release_date": "2025-04-03T10:39:48", + "release_date": "2022-05-05T08:18:58", "parties": [ { "type": "person", @@ -931,11 +931,11 @@ "Topic :: Utilities" ], "homepage_url": "https://github.com/bastikr/boolean.py", - "download_url": "https://files.pythonhosted.org/packages/e5/ca/78d423b324b8d77900030fa59c4aa9054261ef0925631cd2501dd015b7b7/boolean_py-5.0-py3-none-any.whl", - "size": 26577, + "download_url": "https://files.pythonhosted.org/packages/3f/02/6389ef0529af6da0b913374dedb9bbde8eabfe45767ceec38cc37801b0bd/boolean.py-4.0-py3-none-any.whl", + "size": 25909, "sha1": null, - "md5": "df9060a88bfb6ba3b9314783b16a0faa", - "sha256": "ef28a70bd43115208441b53a045d1549e2f0ec6e3d08a9d142cbc41c1938e8d9", + "md5": "73208a6fc38d6904a1d7e793e8da1292", + "sha256": "2876f2051d7d6394a531d82dc6eb407faa0b01a0a0b3083817ccd7323b8d96bd", "sha512": null, "bug_tracking_url": null, "code_view_url": null, @@ -952,9 +952,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/boolean-py/5.0/json", + "api_data_url": "https://pypi.org/pypi/boolean-py/4.0/json", "datasource_id": null, - "purl": "pkg:pypi/boolean-py@5.0" + "purl": "pkg:pypi/boolean-py@4.0" }, { "type": "pypi", @@ -2831,7 +2831,7 @@ "package": "pkg:pypi/aboutcode-toolkit@7.0.2", "dependencies": [ "pkg:pypi/attrs@21.4.0", - "pkg:pypi/boolean-py@5.0", + "pkg:pypi/boolean-py@4.0", "pkg:pypi/certifi@2022.5.18.1", "pkg:pypi/click@8.0.4", "pkg:pypi/jinja2@3.1.6", @@ -2852,7 +2852,7 @@ ] }, { - "package": "pkg:pypi/boolean-py@5.0", + "package": "pkg:pypi/boolean-py@4.0", "dependencies": [] }, { @@ -2918,7 +2918,7 @@ { "package": "pkg:pypi/license-expression@30.3.1", "dependencies": [ - "pkg:pypi/boolean-py@5.0" + "pkg:pypi/boolean-py@4.0" ] }, { diff --git a/tests/test_api.py b/tests/test_api.py index 55b79909..29f4afde 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -140,7 +140,6 @@ def test_api_with_partial_setup_py(): def test_get_index_urls(): - # pass as a tuple index_urls = get_index_urls( index_urls=("https://pypi.org/simple",), diff --git a/tests/test_cli.py b/tests/test_cli.py index 35697529..b3dc8da4 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -230,9 +230,9 @@ def test_cli_with_single_env_var_index_url_except_pypi_simple(): def test_cli_with_multiple_env_var_index_url_and_tilde_req(): expected_file = test_env.get_test_loc("tilde_req-expected-env.json", must_exist=False) specifier = "zipp~=3.8.0" - os.environ[ - "PYINSP_INDEX_URL" - ] = "https://pypi.org/simple https://thirdparty.aboutcode.org/pypi/simple/" + os.environ["PYINSP_INDEX_URL"] = ( + "https://pypi.org/simple https://thirdparty.aboutcode.org/pypi/simple/" + ) check_specs_resolution( specifier=specifier, expected_file=expected_file, From 5e4ba9363629d1a76b2dbcba6317f80578a9525d Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 08:59:36 +0200 Subject: [PATCH 098/105] Shorten doc line Signed-off-by: Philippe Ombredanne --- CHANGELOG.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1bb40076..116f6c8f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -100,7 +100,8 @@ v0.9.5 v0.9.4 ------ -- Create PyPI cache location in the home directory if a cache directory cannot be made at the project root. +- Create PyPI cache location in the home directory if a cache directory cannot be made at the + project root. - Replace packaging with packvers. - Prevent duplicated package versions. From fdf5aceb57fa73eccb347b8bda747feb77158088 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 11:21:27 +0200 Subject: [PATCH 099/105] Use config file for doc config CI fails otherwise Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a5bb8f96..11275b3f 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --quiet docs/ *.rst + @${ACTIVATE} doc8 --config pyproject.toml --quiet docs/ *.rst valid: @echo "-> Run Ruff format" From 1ac83be285023106e7fd7307a7918ffd0208ee7e Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 11:21:57 +0200 Subject: [PATCH 100/105] Remove --verbose from test results Signed-off-by: Philippe Ombredanne --- tests/test_cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index b3dc8da4..41a52f87 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -682,6 +682,9 @@ def clean_results(results): headers = results.get("headers", {}) or {} if "tool_version" in headers: del headers["tool_version"] + options = headers.get("options", []) or [] + if "--verbose" in options: + options.remove("--verbose") return results From 43f5287632f09ecb2be4ce48f1d2ff8f1afda1c4 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 11:59:45 +0200 Subject: [PATCH 101/105] Use lockfile on read too We need to use locks also on read, and not only on write Windows expereinces race conditions otherwise Reference: https://github.com/aboutcode-org/python-inspector/issues/215 Signed-off-by: Philippe Ombredanne --- src/_packagedcode/pypi.py | 62 ++++++++++++++++++------------ src/python_inspector/utils_pypi.py | 11 +++--- 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/src/_packagedcode/pypi.py b/src/_packagedcode/pypi.py index 4f5b2a61..e8fe5171 100644 --- a/src/_packagedcode/pypi.py +++ b/src/_packagedcode/pypi.py @@ -457,7 +457,7 @@ def parse_metadata(location, datasource_id, package_type): name=name, version=version, description=get_description(metainfo=meta, location=str(location)), - #TODO: https://github.com/aboutcode-org/scancode-toolkit/issues/3014 + # TODO: https://github.com/aboutcode-org/scancode-toolkit/issues/3014 declared_license=get_declared_license(meta), keywords=get_keywords(meta), parties=get_parties(meta), @@ -521,19 +521,25 @@ class PypiWheelHandler(BasePypiHandler): @classmethod def parse(cls, location): - with zipfile.ZipFile(location) as zf: - for path in ZipPath(zf).iterdir(): - if not path.name.endswith(META_DIR_SUFFIXES): - continue - for metapath in path.iterdir(): - if not metapath.name.endswith('METADATA'): - continue - yield parse_metadata( - location=metapath, - datasource_id=cls.datasource_id, - package_type=cls.default_package_type, - ) + from python_inspector import lockfile + from python_inspector.utils_pypi import PYINSP_CACHE_LOCK_TIMEOUT + lock_file = os.path.join(f"{location}.lockfile") + with lockfile.FileLock(lock_file).locked(timeout=PYINSP_CACHE_LOCK_TIMEOUT): + + with zipfile.ZipFile(location) as zf: + for path in ZipPath(zf).iterdir(): + if not path.name.endswith(META_DIR_SUFFIXES): + continue + for metapath in path.iterdir(): + if not metapath.name.endswith('METADATA'): + continue + + yield parse_metadata( + location=metapath, + datasource_id=cls.datasource_id, + package_type=cls.default_package_type, + ) class PypiEggHandler(BasePypiHandler): @@ -547,20 +553,26 @@ class PypiEggHandler(BasePypiHandler): @classmethod def parse(cls, location): - with zipfile.ZipFile(location) as zf: - for path in ZipPath(zf).iterdir(): - if not path.name.endswith(META_DIR_SUFFIXES): - continue - for metapath in path.iterdir(): - if not metapath.name.endswith('PKG-INFO'): + from python_inspector import lockfile + from python_inspector.utils_pypi import PYINSP_CACHE_LOCK_TIMEOUT + lock_file = os.path.join(f"{location}.lockfile") + with lockfile.FileLock(lock_file).locked(timeout=PYINSP_CACHE_LOCK_TIMEOUT): + + with zipfile.ZipFile(location) as zf: + for path in ZipPath(zf).iterdir(): + if not path.name.endswith(META_DIR_SUFFIXES): continue - yield parse_metadata( - location=metapath, - datasource_id=cls.datasource_id, - package_type=cls.default_package_type, - ) + for metapath in path.iterdir(): + if not metapath.name.endswith('PKG-INFO'): + continue + + yield parse_metadata( + location=metapath, + datasource_id=cls.datasource_id, + package_type=cls.default_package_type, + ) class PypiSdistArchiveHandler(BasePypiHandler): @@ -765,7 +777,6 @@ def parse(cls, location): ) ] - yield models.PackageData( datasource_id=cls.datasource_id, type=cls.default_package_type, @@ -818,6 +829,7 @@ def get_resolved_purl(purl: PackageURL, specifiers: SpecifierSet): is_resolved=is_resolved, ) + class PipfileHandler(BaseDependencyFileHandler): datasource_id = 'pipfile' path_patterns = ('*Pipfile',) diff --git a/src/python_inspector/utils_pypi.py b/src/python_inspector/utils_pypi.py index 844e6362..a65faa28 100644 --- a/src/python_inspector/utils_pypi.py +++ b/src/python_inspector/utils_pypi.py @@ -196,7 +196,6 @@ def get_python_dot_version(version): DEFAULT_PYTHON_VERSION = settings.DEFAULT_PYTHON_VERSION CACHE_THIRDPARTY_DIR = settings.CACHE_THIRDPARTY_DIR - ################################################################################ EXTENSIONS_SDIST = ( @@ -316,9 +315,10 @@ async def get_supported_and_valid_wheels( ): continue if TRACE_DEEP: + durl = await wheel.download_url(repo) print( f""" get_supported_and_valid_wheels: Getting wheel from index (or cache): - {await wheel.download_url(repo)}""" + {durl}""" ) wheels.append(wheel) return wheels @@ -1685,6 +1685,7 @@ async def get( # the cache key is a hash of the normalized path cache_key = self.sha256_hash(quote_plus(path_or_url.strip("/"))) cached = os.path.join(self.directory, cache_key) + lock_file = f"{cached}.lockfile" if force or not os.path.exists(cached): if TRACE_DEEP: @@ -1699,8 +1700,6 @@ async def get( wmode = "w" if as_text else "wb" # acquire lock and wait until timeout to get a lock or die - lock_file = os.path.join(self.directory, f"{cache_key}.lockfile") - with lockfile.FileLock(lock_file).locked(timeout=PYINSP_CACHE_LOCK_TIMEOUT): async with aiofiles.open(cached, mode=wmode) as fo: await fo.write(content) @@ -1708,7 +1707,9 @@ async def get( else: if TRACE_DEEP: print(f" FILE CACHE HIT: {path_or_url}") - return await get_local_file_content(path=cached, as_text=as_text), cached + # also lock on read to avoid race conditions + with lockfile.FileLock(lock_file).locked(timeout=PYINSP_CACHE_LOCK_TIMEOUT): + return await get_local_file_content(path=cached, as_text=as_text), cached CACHE = Cache() From 8d235a53025d80e94dce04dbedd43d575600db69 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 12:31:35 +0200 Subject: [PATCH 102/105] Fix CI checks Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 11275b3f..ef3941b6 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --config pyproject.toml --quiet docs/ *.rst + @${ACTIVATE} doc8 --config pyproject.toml --max-line-length 100 docs/ *.rst valid: @echo "-> Run Ruff format" From 8d5fad5b4d8db7a81cae38f5229ce628e951af39 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 12:40:11 +0200 Subject: [PATCH 103/105] Fix CI Get more detailed stack traces on test failure. Signed-off-by: Philippe Ombredanne --- src/python_inspector/resolution.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/python_inspector/resolution.py b/src/python_inspector/resolution.py index 7eca605a..39202374 100644 --- a/src/python_inspector/resolution.py +++ b/src/python_inspector/resolution.py @@ -12,6 +12,7 @@ import operator import os import tarfile +from traceback import format_exc from typing import Dict from typing import Generator from typing import Iterable @@ -92,7 +93,10 @@ def get_requirements_from_distribution( dependencies = package_data.dependencies reqs.extend(get_requirements_from_dependencies(dependencies=dependencies)) except Exception as e: - raise Exception(f"Failed to get_requirements_from_distribution for: {location!r}") from e + trace = format_exc() + raise Exception( + f"Failed to get_requirements_from_distribution for: {location!r}\n{trace}" + ) from e return reqs From 984af3fae73514a57c3a56ba5840ba4d54d74b08 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 14:02:45 +0200 Subject: [PATCH 104/105] Fix CI Force doc8 comman line args Signed-off-by: Philippe Ombredanne --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ef3941b6..98f5eddc 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ dev: doc8: @echo "-> Run doc8 validation" - @${ACTIVATE} doc8 --config pyproject.toml --max-line-length 100 docs/ *.rst + @${ACTIVATE} doc8 --config pyproject.toml --ignore-path docs/_build --max-line-length 100 docs/ *.rst valid: @echo "-> Run Ruff format" From 588f559b964bbaea548a81b1ea0f256453e29745 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Wed, 4 Jun 2025 15:42:46 +0200 Subject: [PATCH 105/105] Update changelog for 0.14.0 --- CHANGELOG.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 116f6c8f..0f4ea140 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,9 @@ v0.14.0 - Speed up downloads with asyncio +- Introduce file-based locking when reading and writing + python package archives to avoid accessing partial zip and tarballs. + - New settings featuring environment variables and .env file to store settings and defaults. - This also changes the CACHE_THIRDPARTY_DIR environment variable: it used to default first @@ -36,6 +39,8 @@ v0.14.0 - Merge latest skeleton and adopt ruff for code formatting. +- Fix misc bugs. + v0.13.1 -----------