diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9457437..bb60625 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,10 @@ v0.9.3 ------ - Add support for recursive requirements. +- Add python 3.11 as a valid python version in choices. +- Operating system and python version are now required fields in CLI. +- Add dot versions (3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 2.7) with + current python version choices for CLI (36, 37, 38, 39, 310, 311, 27). v0.9.2 diff --git a/src/python_inspector/api.py b/src/python_inspector/api.py index ef83671..4271156 100644 --- a/src/python_inspector/api.py +++ b/src/python_inspector/api.py @@ -40,8 +40,8 @@ from python_inspector.resolution import get_requirements_from_python_manifest from python_inspector.utils_pypi import PLATFORMS_BY_OS from python_inspector.utils_pypi import PYPI_SIMPLE_URL -from python_inspector.utils_pypi import PYTHON_DOT_VERSIONS_BY_VER from python_inspector.utils_pypi import Environment +from python_inspector.utils_pypi import valid_python_versions class Resolution(NamedTuple): @@ -103,9 +103,6 @@ def resolve_dependencies( f"Must be one of: {', '.join(PLATFORMS_BY_OS.keys())}" ) - valid_python_versions = list(PYTHON_DOT_VERSIONS_BY_VER.keys()) - valid_python_versions.extend([dot_ver for pyver, dot_ver in PYTHON_DOT_VERSIONS_BY_VER.items()]) - if not python_version: raise Exception(f"No python version provided.") if python_version not in valid_python_versions: diff --git a/src/python_inspector/resolve_cli.py b/src/python_inspector/resolve_cli.py index 7b81cc9..8330b0f 100644 --- a/src/python_inspector/resolve_cli.py +++ b/src/python_inspector/resolve_cli.py @@ -70,9 +70,10 @@ def print_version(ctx, param, value): "-p", "--python-version", "python_version", - type=click.Choice(utils_pypi.PYTHON_VERSIONS), + type=click.Choice(utils_pypi.valid_python_versions), metavar="PYVER", show_default=True, + required=True, help="Python version to use for dependency resolution.", ) @click.option( @@ -82,6 +83,7 @@ def print_version(ctx, param, value): type=click.Choice(utils_pypi.PLATFORMS_BY_OS), metavar="OS", show_default=True, + required=True, help="OS to use for dependency resolution.", ) @click.option( diff --git a/src/python_inspector/utils_pypi.py b/src/python_inspector/utils_pypi.py index be320df..7b30525 100644 --- a/src/python_inspector/utils_pypi.py +++ b/src/python_inspector/utils_pypi.py @@ -98,7 +98,7 @@ TRACE_ULTRA_DEEP = False # Supported environments -PYTHON_VERSIONS = "36", "37", "38", "39", "310", "27" +PYTHON_VERSIONS = "36", "37", "38", "39", "310", "311", "27" PYTHON_DOT_VERSIONS_BY_VER = { "36": "3.6", @@ -107,8 +107,12 @@ "39": "3.9", "310": "3.10", "27": "2.7", + "311": "3.11", } +valid_python_versions = list(PYTHON_DOT_VERSIONS_BY_VER.keys()) +valid_python_versions.extend([dot_ver for pyver, dot_ver in PYTHON_DOT_VERSIONS_BY_VER.items()]) + def get_python_dot_version(version): """ @@ -123,6 +127,7 @@ def get_python_dot_version(version): "38": ["cp38", "cp38m", "abi3"], "39": ["cp39", "cp39m", "abi3"], "310": ["cp310", "cp310m", "abi3"], + "311": ["cp311", "cp311m", "abi3"], "27": ["cp27", "cp27m"], } diff --git a/tests/data/frozen-requirements.txt-expected.json b/tests/data/frozen-requirements.txt-expected.json index e6d9235..5d2d4b8 100644 --- a/tests/data/frozen-requirements.txt-expected.json +++ b/tests/data/frozen-requirements.txt-expected.json @@ -6013,12 +6013,12 @@ "type": "pypi", "namespace": null, "name": "pip", - "version": "22.3", + "version": "22.3.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The PyPA recommended tool for installing Python packages.\npip - The Python Package Installer\n==================================\n\n.. image:: https://img.shields.io/pypi/v/pip.svg\n :target: https://pypi.org/project/pip/\n\n.. image:: https://readthedocs.org/projects/pip/badge/?version=latest\n :target: https://pip.pypa.io/en/latest\n\npip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.\n\nPlease take a look at our documentation for how to install and use pip:\n\n* `Installation`_\n* `Usage`_\n\nWe release updates regularly, with a new version every 3 months. Find more details in our documentation:\n\n* `Release notes`_\n* `Release process`_\n\nIn pip 20.3, we've `made a big improvement to the heart of pip`_; `learn more`_. We want your input, so `sign up for our user experience research studies`_ to help us do it right.\n\n**Note**: pip 21.0, in January 2021, removed Python 2 support, per pip's `Python 2 support policy`_. Please migrate to Python 3.\n\nIf you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:\n\n* `Issue tracking`_\n* `Discourse channel`_\n* `User IRC`_\n\nIf you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:\n\n* `GitHub page`_\n* `Development documentation`_\n* `Development IRC`_\n\nCode of Conduct\n---------------\n\nEveryone interacting in the pip project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.\n\n.. _package installer: https://packaging.python.org/guides/tool-recommendations/\n.. _Python Package Index: https://pypi.org\n.. _Installation: https://pip.pypa.io/en/stable/installation/\n.. _Usage: https://pip.pypa.io/en/stable/\n.. _Release notes: https://pip.pypa.io/en/stable/news.html\n.. _Release process: https://pip.pypa.io/en/latest/development/release-process/\n.. _GitHub page: https://github.com/pypa/pip\n.. _Development documentation: https://pip.pypa.io/en/latest/development\n.. _made a big improvement to the heart of pip: https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html\n.. _learn more: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020\n.. _sign up for our user experience research studies: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html\n.. _Python 2 support policy: https://pip.pypa.io/en/latest/development/release-process/#python-2-support\n.. _Issue tracking: https://github.com/pypa/pip/issues\n.. _Discourse channel: https://discuss.python.org/c/packaging\n.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa\n.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev\n.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md", - "release_date": "2022-10-15T11:41:14", + "release_date": "2022-11-05T15:56:17", "parties": [ { "type": "person", @@ -6044,11 +6044,11 @@ "Topic :: Software Development :: Build Tools" ], "homepage_url": "https://pip.pypa.io/", - "download_url": "https://files.pythonhosted.org/packages/47/ef/8b5470b5b94b36231ed9c0bde90caa71c0d4322d4a15f009b2b7f4287fe0/pip-22.3-py3-none-any.whl", - "size": 2051507, + "download_url": "https://files.pythonhosted.org/packages/09/bd/2410905c76ee14c62baf69e3f4aa780226c1bbfc9485731ad018e35b0cb5/pip-22.3.1-py3-none-any.whl", + "size": 2051534, "sha1": null, - "md5": "6123dc5fc3483ebb12becce7faa4cd28", - "sha256": "1daab4b8d3b97d1d763caeb01a4640a2250a0ea899e257b1e44b9eded91e15ab", + "md5": "74d0d338e0af6ca545d6ce7ef9734d75", + "sha256": "908c78e6bc29b676ede1c4d57981d490cb892eb45cd8c214ab6298125119e077", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/pypa/pip", @@ -6068,20 +6068,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pip/22.3/json", + "api_data_url": "https://pypi.org/pypi/pip/22.3.1/json", "datasource_id": null, - "purl": "pkg:pypi/pip@22.3" + "purl": "pkg:pypi/pip@22.3.1" }, { "type": "pypi", "namespace": null, "name": "pip", - "version": "22.3", + "version": "22.3.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The PyPA recommended tool for installing Python packages.\npip - The Python Package Installer\n==================================\n\n.. image:: https://img.shields.io/pypi/v/pip.svg\n :target: https://pypi.org/project/pip/\n\n.. image:: https://readthedocs.org/projects/pip/badge/?version=latest\n :target: https://pip.pypa.io/en/latest\n\npip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.\n\nPlease take a look at our documentation for how to install and use pip:\n\n* `Installation`_\n* `Usage`_\n\nWe release updates regularly, with a new version every 3 months. Find more details in our documentation:\n\n* `Release notes`_\n* `Release process`_\n\nIn pip 20.3, we've `made a big improvement to the heart of pip`_; `learn more`_. We want your input, so `sign up for our user experience research studies`_ to help us do it right.\n\n**Note**: pip 21.0, in January 2021, removed Python 2 support, per pip's `Python 2 support policy`_. Please migrate to Python 3.\n\nIf you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:\n\n* `Issue tracking`_\n* `Discourse channel`_\n* `User IRC`_\n\nIf you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:\n\n* `GitHub page`_\n* `Development documentation`_\n* `Development IRC`_\n\nCode of Conduct\n---------------\n\nEveryone interacting in the pip project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.\n\n.. _package installer: https://packaging.python.org/guides/tool-recommendations/\n.. _Python Package Index: https://pypi.org\n.. _Installation: https://pip.pypa.io/en/stable/installation/\n.. _Usage: https://pip.pypa.io/en/stable/\n.. _Release notes: https://pip.pypa.io/en/stable/news.html\n.. _Release process: https://pip.pypa.io/en/latest/development/release-process/\n.. _GitHub page: https://github.com/pypa/pip\n.. _Development documentation: https://pip.pypa.io/en/latest/development\n.. _made a big improvement to the heart of pip: https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html\n.. _learn more: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020\n.. _sign up for our user experience research studies: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html\n.. _Python 2 support policy: https://pip.pypa.io/en/latest/development/release-process/#python-2-support\n.. _Issue tracking: https://github.com/pypa/pip/issues\n.. _Discourse channel: https://discuss.python.org/c/packaging\n.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa\n.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev\n.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md", - "release_date": "2022-10-15T11:41:17", + "release_date": "2022-11-05T15:56:20", "parties": [ { "type": "person", @@ -6107,11 +6107,11 @@ "Topic :: Software Development :: Build Tools" ], "homepage_url": "https://pip.pypa.io/", - "download_url": "https://files.pythonhosted.org/packages/f8/08/7f92782ff571c7c7cb6c5eeb8ebbb1f68cb02bdb24e55c5de4dd9ce98bc3/pip-22.3.tar.gz", - "size": 2077961, + "download_url": "https://files.pythonhosted.org/packages/a3/50/c4d2727b99052780aad92c7297465af5fe6eec2dbae490aa9763273ffdc1/pip-22.3.1.tar.gz", + "size": 2078129, "sha1": null, - "md5": "f0dd02265e7ccd2f8758c840fba64810", - "sha256": "8182aec21dad6c0a49a2a3d121a87cd524b950e0b6092b181625f07ebdde7530", + "md5": "996f58a94fe0b8b82b6795c42bd171ba", + "sha256": "65fd48317359f3af8e593943e6ae1506b66325085ea64b706a998c6e83eeaf38", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/pypa/pip", @@ -6131,9 +6131,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pip/22.3/json", + "api_data_url": "https://pypi.org/pypi/pip/22.3.1/json", "datasource_id": null, - "purl": "pkg:pypi/pip@22.3" + "purl": "pkg:pypi/pip@22.3.1" }, { "type": "pypi", @@ -10940,7 +10940,7 @@ { "key": "pip", "package_name": "pip", - "installed_version": "22.3", + "installed_version": "22.3.1", "dependencies": [] } ] diff --git a/tests/data/test-api-with-python-311.json b/tests/data/test-api-with-python-311.json new file mode 100644 index 0000000..563efac --- /dev/null +++ b/tests/data/test-api-with-python-311.json @@ -0,0 +1,424 @@ +{ + "files": [], + "packages": [ + { + "type": "pypi", + "namespace": null, + "name": "click", + "version": "8.1.3", + "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/getting-started/\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- Documentation: https://click.palletsprojects.com/\n- Changes: https://click.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/click/\n- Source Code: https://github.com/pallets/click\n- Issue Tracker: https://github.com/pallets/click/issues\n- Website: https://palletsprojects.com/p/click\n- Twitter: https://twitter.com/PalletsTeam\n- Chat: https://discord.gg/pallets", + "release_date": "2022-04-28T17:36:09", + "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", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python" + ], + "homepage_url": "https://palletsprojects.com/p/click/", + "download_url": "https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz", + "size": 331147, + "sha1": null, + "md5": "a804b085de7a3ff96968e38e0f6f2e05", + "sha256": "7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e", + "sha512": null, + "bug_tracking_url": "https://github.com/pallets/click/issues/", + "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/8.1.3/json", + "datasource_id": null, + "purl": "pkg:pypi/click@8.1.3" + }, + { + "type": "pypi", + "namespace": null, + "name": "flask", + "version": "2.1.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.. _WSGI: https://wsgi.readthedocs.io/\n.. _Werkzeug: https://werkzeug.palletsprojects.com/\n.. _Jinja: https://jinja.palletsprojects.com/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n $ pip install -U Flask\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\n\n\nA Simple Example\n----------------\n\n.. code-block:: python\n\n # save this as app.py\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 $ flask run\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/main/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://palletsprojects.com/donate\n\n\nLinks\n-----\n\n- Documentation: https://flask.palletsprojects.com/\n- Changes: https://flask.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Flask/\n- Source Code: https://github.com/pallets/flask/\n- Issue Tracker: https://github.com/pallets/flask/issues/\n- Website: https://palletsprojects.com/p/flask/\n- Twitter: https://twitter.com/PalletsTeam\n- Chat: https://discord.gg/pallets", + "release_date": "2022-04-28T17:47:40", + "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", + "Framework :: Flask", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Internet :: WWW/HTTP :: WSGI", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + "Topic :: Software Development :: Libraries :: Application Frameworks" + ], + "homepage_url": "https://palletsprojects.com/p/flask", + "download_url": "https://files.pythonhosted.org/packages/d3/3c/94f38d4db919a9326a706ad56f05a7e6f0c8f7b7d93e2997cca54d3bc14b/Flask-2.1.2.tar.gz", + "size": 631846, + "sha1": null, + "md5": "93f1832e5be704ef6ff2a4124579cd85", + "sha256": "315ded2ddf8a6281567edb27393010fe3406188bafbfe65a3339d5787d89e477", + "sha512": null, + "bug_tracking_url": "https://github.com/pallets/flask/issues/", + "code_view_url": "https://github.com/pallets/flask/", + "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/flask/2.1.2/json", + "datasource_id": null, + "purl": "pkg:pypi/flask@2.1.2" + }, + { + "type": "pypi", + "namespace": null, + "name": "itsdangerous", + "version": "2.1.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Safely 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/getting-started/\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- Documentation: https://itsdangerous.palletsprojects.com/\n- Changes: https://itsdangerous.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/ItsDangerous/\n- Source Code: https://github.com/pallets/itsdangerous/\n- Issue Tracker: https://github.com/pallets/itsdangerous/issues/\n- Website: https://palletsprojects.com/p/itsdangerous/\n- Twitter: https://twitter.com/PalletsTeam\n- Chat: https://discord.gg/pallets", + "release_date": "2022-03-24T15:12:15", + "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", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python" + ], + "homepage_url": "https://palletsprojects.com/p/itsdangerous/", + "download_url": "https://files.pythonhosted.org/packages/7f/a1/d3fb83e7a61fa0c0d3d08ad0a94ddbeff3731c05212617dff3a94e097f08/itsdangerous-2.1.2.tar.gz", + "size": 56143, + "sha1": null, + "md5": "c1bc730ddf53b8374eaa823f24eb6438", + "sha256": "5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a", + "sha512": null, + "bug_tracking_url": "https://github.com/pallets/itsdangerous/issues/", + "code_view_url": "https://github.com/pallets/itsdangerous/", + "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/itsdangerous/2.1.2/json", + "datasource_id": null, + "purl": "pkg:pypi/itsdangerous@2.1.2" + }, + { + "type": "pypi", + "namespace": null, + "name": "jinja2", + "version": "3.1.2", + "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/getting-started/\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\nDonate\n------\n\nThe Pallets organization develops and supports Jinja 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- Documentation: https://jinja.palletsprojects.com/\n- Changes: https://jinja.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Jinja2/\n- Source Code: https://github.com/pallets/jinja/\n- Issue Tracker: https://github.com/pallets/jinja/issues/\n- Website: https://palletsprojects.com/p/jinja/\n- Twitter: https://twitter.com/PalletsTeam\n- Chat: https://discord.gg/pallets", + "release_date": "2022-04-28T17:21:27", + "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", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Text Processing :: Markup :: HTML" + ], + "homepage_url": "https://palletsprojects.com/p/jinja/", + "download_url": "https://files.pythonhosted.org/packages/7a/ff/75c28576a1d900e87eb6335b063fab47a8ef3c8b4d88524c4bf78f670cce/Jinja2-3.1.2.tar.gz", + "size": 268239, + "sha1": null, + "md5": "d31148abd89c1df1cdb077a55db27d02", + "sha256": "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852", + "sha512": null, + "bug_tracking_url": "https://github.com/pallets/jinja/issues/", + "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/3.1.2/json", + "datasource_id": null, + "purl": "pkg:pypi/jinja2@3.1.2" + }, + { + "type": "pypi", + "namespace": null, + "name": "markupsafe", + "version": "2.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/getting-started/\n\n\nExamples\n--------\n\n.. code-block:: pycon\n\n >>> from markupsafe import Markup, escape\n\n >>> # escape replaces special characters and wraps in Markup\n >>> escape(\"\")\n Markup('<script>alert(document.cookie);</script>')\n\n >>> # wrap in Markup to mark text \"safe\" and prevent escaping\n >>> Markup(\"Hello\")\n Markup('hello')\n\n >>> escape(Markup(\"Hello\"))\n Markup('hello')\n\n >>> # Markup is a str subclass\n >>> # methods and operators escape their arguments\n >>> template = Markup(\"Hello {name}\")\n >>> template.format(name='\"World\"')\n Markup('Hello "World"')\n\n\nDonate\n------\n\nThe Pallets organization develops and supports MarkupSafe 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- Documentation: https://markupsafe.palletsprojects.com/\n- Changes: https://markupsafe.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/MarkupSafe/\n- Source Code: https://github.com/pallets/markupsafe/\n- Issue Tracker: https://github.com/pallets/markupsafe/issues/\n- Website: https://palletsprojects.com/p/markupsafe/\n- Twitter: https://twitter.com/PalletsTeam\n- Chat: https://discord.gg/pallets", + "release_date": "2022-03-15T13:23:27", + "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", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Text Processing :: Markup :: HTML" + ], + "homepage_url": "https://palletsprojects.com/p/markupsafe/", + "download_url": "https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz", + "size": 18668, + "sha1": null, + "md5": "9809f9fdd98bc835b0c21aa8f79cbf30", + "sha256": "7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b", + "sha512": null, + "bug_tracking_url": "https://github.com/pallets/markupsafe/issues/", + "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/2.1.1/json", + "datasource_id": null, + "purl": "pkg:pypi/markupsafe@2.1.1" + }, + { + "type": "pypi", + "namespace": null, + "name": "werkzeug", + "version": "2.2.2", + "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 doesn't enforce any dependencies. It is up to the developer to\nchoose a template engine, database adapter, and even how to handle\nrequests. It can be used to build all sorts of end user applications\nsuch 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.. _WSGI: https://wsgi.readthedocs.io/en/latest/\n.. _Flask: https://www.palletsprojects.com/p/flask/\n\n\nInstalling\n----------\n\nInstall and update using `pip`_:\n\n.. code-block:: text\n\n pip install -U Werkzeug\n\n.. _pip: https://pip.pypa.io/en/stable/getting-started/\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\nDonate\n------\n\nThe Pallets organization develops and supports Werkzeug 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- Documentation: https://werkzeug.palletsprojects.com/\n- Changes: https://werkzeug.palletsprojects.com/changes/\n- PyPI Releases: https://pypi.org/project/Werkzeug/\n- Source Code: https://github.com/pallets/werkzeug/\n- Issue Tracker: https://github.com/pallets/werkzeug/issues/\n- Website: https://palletsprojects.com/p/werkzeug/\n- Twitter: https://twitter.com/PalletsTeam\n- Chat: https://discord.gg/pallets", + "release_date": "2022-08-08T21:44:15", + "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", + "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" + ], + "homepage_url": "https://palletsprojects.com/p/werkzeug/", + "download_url": "https://files.pythonhosted.org/packages/f8/c1/1c8e539f040acd80f844c69a5ef8e2fccdf8b442dabb969e497b55d544e1/Werkzeug-2.2.2.tar.gz", + "size": 844378, + "sha1": null, + "md5": "9d7e50c5bb3a9fc12823b5faf374b90e", + "sha256": "7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f", + "sha512": null, + "bug_tracking_url": "https://github.com/pallets/werkzeug/issues/", + "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/2.2.2/json", + "datasource_id": null, + "purl": "pkg:pypi/werkzeug@2.2.2" + } + ], + "resolution": [ + { + "package": "pkg:pypi/click@8.1.3", + "dependencies": [] + }, + { + "package": "pkg:pypi/flask@2.1.2", + "dependencies": [ + "pkg:pypi/click@8.1.3", + "pkg:pypi/itsdangerous@2.1.2", + "pkg:pypi/jinja2@3.1.2", + "pkg:pypi/werkzeug@2.2.2" + ] + }, + { + "package": "pkg:pypi/itsdangerous@2.1.2", + "dependencies": [] + }, + { + "package": "pkg:pypi/jinja2@3.1.2", + "dependencies": [ + "pkg:pypi/markupsafe@2.1.1" + ] + }, + { + "package": "pkg:pypi/markupsafe@2.1.1", + "dependencies": [] + }, + { + "package": "pkg:pypi/werkzeug@2.2.2", + "dependencies": [ + "pkg:pypi/markupsafe@2.1.1" + ] + } + ] +} \ No newline at end of file diff --git a/tests/data/test-api-with-requirement-file.json b/tests/data/test-api-with-requirement-file.json index 5dd9148..5d55a3a 100644 --- a/tests/data/test-api-with-requirement-file.json +++ b/tests/data/test-api-with-requirement-file.json @@ -5998,12 +5998,12 @@ "type": "pypi", "namespace": null, "name": "pip", - "version": "22.3", + "version": "22.3.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The PyPA recommended tool for installing Python packages.\npip - The Python Package Installer\n==================================\n\n.. image:: https://img.shields.io/pypi/v/pip.svg\n :target: https://pypi.org/project/pip/\n\n.. image:: https://readthedocs.org/projects/pip/badge/?version=latest\n :target: https://pip.pypa.io/en/latest\n\npip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.\n\nPlease take a look at our documentation for how to install and use pip:\n\n* `Installation`_\n* `Usage`_\n\nWe release updates regularly, with a new version every 3 months. Find more details in our documentation:\n\n* `Release notes`_\n* `Release process`_\n\nIn pip 20.3, we've `made a big improvement to the heart of pip`_; `learn more`_. We want your input, so `sign up for our user experience research studies`_ to help us do it right.\n\n**Note**: pip 21.0, in January 2021, removed Python 2 support, per pip's `Python 2 support policy`_. Please migrate to Python 3.\n\nIf you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:\n\n* `Issue tracking`_\n* `Discourse channel`_\n* `User IRC`_\n\nIf you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:\n\n* `GitHub page`_\n* `Development documentation`_\n* `Development IRC`_\n\nCode of Conduct\n---------------\n\nEveryone interacting in the pip project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.\n\n.. _package installer: https://packaging.python.org/guides/tool-recommendations/\n.. _Python Package Index: https://pypi.org\n.. _Installation: https://pip.pypa.io/en/stable/installation/\n.. _Usage: https://pip.pypa.io/en/stable/\n.. _Release notes: https://pip.pypa.io/en/stable/news.html\n.. _Release process: https://pip.pypa.io/en/latest/development/release-process/\n.. _GitHub page: https://github.com/pypa/pip\n.. _Development documentation: https://pip.pypa.io/en/latest/development\n.. _made a big improvement to the heart of pip: https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html\n.. _learn more: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020\n.. _sign up for our user experience research studies: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html\n.. _Python 2 support policy: https://pip.pypa.io/en/latest/development/release-process/#python-2-support\n.. _Issue tracking: https://github.com/pypa/pip/issues\n.. _Discourse channel: https://discuss.python.org/c/packaging\n.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa\n.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev\n.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md", - "release_date": "2022-10-15T11:41:14", + "release_date": "2022-11-05T15:56:17", "parties": [ { "type": "person", @@ -6029,11 +6029,11 @@ "Topic :: Software Development :: Build Tools" ], "homepage_url": "https://pip.pypa.io/", - "download_url": "https://files.pythonhosted.org/packages/47/ef/8b5470b5b94b36231ed9c0bde90caa71c0d4322d4a15f009b2b7f4287fe0/pip-22.3-py3-none-any.whl", - "size": 2051507, + "download_url": "https://files.pythonhosted.org/packages/09/bd/2410905c76ee14c62baf69e3f4aa780226c1bbfc9485731ad018e35b0cb5/pip-22.3.1-py3-none-any.whl", + "size": 2051534, "sha1": null, - "md5": "6123dc5fc3483ebb12becce7faa4cd28", - "sha256": "1daab4b8d3b97d1d763caeb01a4640a2250a0ea899e257b1e44b9eded91e15ab", + "md5": "74d0d338e0af6ca545d6ce7ef9734d75", + "sha256": "908c78e6bc29b676ede1c4d57981d490cb892eb45cd8c214ab6298125119e077", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/pypa/pip", @@ -6053,20 +6053,20 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pip/22.3/json", + "api_data_url": "https://pypi.org/pypi/pip/22.3.1/json", "datasource_id": null, - "purl": "pkg:pypi/pip@22.3" + "purl": "pkg:pypi/pip@22.3.1" }, { "type": "pypi", "namespace": null, "name": "pip", - "version": "22.3", + "version": "22.3.1", "qualifiers": {}, "subpath": null, "primary_language": "Python", "description": "The PyPA recommended tool for installing Python packages.\npip - The Python Package Installer\n==================================\n\n.. image:: https://img.shields.io/pypi/v/pip.svg\n :target: https://pypi.org/project/pip/\n\n.. image:: https://readthedocs.org/projects/pip/badge/?version=latest\n :target: https://pip.pypa.io/en/latest\n\npip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.\n\nPlease take a look at our documentation for how to install and use pip:\n\n* `Installation`_\n* `Usage`_\n\nWe release updates regularly, with a new version every 3 months. Find more details in our documentation:\n\n* `Release notes`_\n* `Release process`_\n\nIn pip 20.3, we've `made a big improvement to the heart of pip`_; `learn more`_. We want your input, so `sign up for our user experience research studies`_ to help us do it right.\n\n**Note**: pip 21.0, in January 2021, removed Python 2 support, per pip's `Python 2 support policy`_. Please migrate to Python 3.\n\nIf you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:\n\n* `Issue tracking`_\n* `Discourse channel`_\n* `User IRC`_\n\nIf you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:\n\n* `GitHub page`_\n* `Development documentation`_\n* `Development IRC`_\n\nCode of Conduct\n---------------\n\nEveryone interacting in the pip project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.\n\n.. _package installer: https://packaging.python.org/guides/tool-recommendations/\n.. _Python Package Index: https://pypi.org\n.. _Installation: https://pip.pypa.io/en/stable/installation/\n.. _Usage: https://pip.pypa.io/en/stable/\n.. _Release notes: https://pip.pypa.io/en/stable/news.html\n.. _Release process: https://pip.pypa.io/en/latest/development/release-process/\n.. _GitHub page: https://github.com/pypa/pip\n.. _Development documentation: https://pip.pypa.io/en/latest/development\n.. _made a big improvement to the heart of pip: https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html\n.. _learn more: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020\n.. _sign up for our user experience research studies: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html\n.. _Python 2 support policy: https://pip.pypa.io/en/latest/development/release-process/#python-2-support\n.. _Issue tracking: https://github.com/pypa/pip/issues\n.. _Discourse channel: https://discuss.python.org/c/packaging\n.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa\n.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev\n.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md", - "release_date": "2022-10-15T11:41:17", + "release_date": "2022-11-05T15:56:20", "parties": [ { "type": "person", @@ -6092,11 +6092,11 @@ "Topic :: Software Development :: Build Tools" ], "homepage_url": "https://pip.pypa.io/", - "download_url": "https://files.pythonhosted.org/packages/f8/08/7f92782ff571c7c7cb6c5eeb8ebbb1f68cb02bdb24e55c5de4dd9ce98bc3/pip-22.3.tar.gz", - "size": 2077961, + "download_url": "https://files.pythonhosted.org/packages/a3/50/c4d2727b99052780aad92c7297465af5fe6eec2dbae490aa9763273ffdc1/pip-22.3.1.tar.gz", + "size": 2078129, "sha1": null, - "md5": "f0dd02265e7ccd2f8758c840fba64810", - "sha256": "8182aec21dad6c0a49a2a3d121a87cd524b950e0b6092b181625f07ebdde7530", + "md5": "996f58a94fe0b8b82b6795c42bd171ba", + "sha256": "65fd48317359f3af8e593943e6ae1506b66325085ea64b706a998c6e83eeaf38", "sha512": null, "bug_tracking_url": null, "code_view_url": "https://github.com/pypa/pip", @@ -6116,9 +6116,9 @@ "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pip/22.3/json", + "api_data_url": "https://pypi.org/pypi/pip/22.3.1/json", "datasource_id": null, - "purl": "pkg:pypi/pip@22.3" + "purl": "pkg:pypi/pip@22.3.1" }, { "type": "pypi", @@ -10788,13 +10788,13 @@ ] }, { - "package": "pkg:pypi/pip@22.3", + "package": "pkg:pypi/pip@22.3.1", "dependencies": [] }, { "package": "pkg:pypi/pipdeptree@2.2.1", "dependencies": [ - "pkg:pypi/pip@22.3" + "pkg:pypi/pip@22.3.1" ] }, { diff --git a/tests/test_api.py b/tests/test_api.py index 4df13f5..a554af1 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -160,3 +160,24 @@ def test_api_with_wrong_pyver(): python_version="3.12", operating_system="linux", ) + + +def test_api_with_python_311(): + result_file = test_env.get_temp_file("json") + expected_file = test_env.get_test_loc("test-api-with-python-311.json", must_exist=False) + with open(result_file, "w") as result: + result.write( + json.dumps( + resolver_api( + specifiers=["flask==2.1.2"], + python_version="3.11", + operating_system="linux", + prefer_source=True, + ).to_dict() + ) + ) + check_json_results( + result_file=result_file, + expected_file=expected_file, + clean=True, + ) diff --git a/tests/test_cli.py b/tests/test_cli.py index 471ac64..d5ba5ef 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -399,18 +399,12 @@ def test_passing_of_no_json_output_flag(): def test_passing_of_no_os(): options = ["--specifier", "foo", "--json", "-", "--python-version", "38"] - message = "No operating system" - result = run_cli(options=options, expected_rc=1, get_env=False) - if message: - assert message in result.output + run_cli(options=options, expected_rc=2, get_env=False) def test_passing_of_no_pyver(): options = ["--specifier", "foo", "--json", "-", "--operating-system", "linux"] - message = "No python version" - result = run_cli(options=options, expected_rc=1, get_env=False) - if message: - assert message in result.output + run_cli(options=options, expected_rc=2, get_env=False) def test_passing_of_wrong_pyver(): diff --git a/tests/test_resolution.py b/tests/test_resolution.py index 331230f..d470b08 100644 --- a/tests/test_resolution.py +++ b/tests/test_resolution.py @@ -150,7 +150,7 @@ def test_without_supported_wheels(): "pkg:pypi/hyperlink@21.0.0", "pkg:pypi/idna@3.4", "pkg:pypi/pycparser@2.21", - "pkg:pypi/setuptools@65.5.0", + "pkg:pypi/setuptools@65.5.1", "pkg:pypi/txaio@22.2.1", ]