From cce678ab8258676e929118f15ab7df3d4601546a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 10 Apr 2022 14:00:06 -0400 Subject: gnu: python-flask: Update to 2.1.1. * gnu/packages/python-web.scm (python-flask): Update to 2.1.1. [propagated-inputs]: Add python-asgiref and python-importlib-metadata. [home-page]: Update. --- gnu/packages/python-web.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 0f9f1e8786..340f84c78f 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2991,13 +2991,13 @@ (define-public python-webtest (define-public python-flask (package (name "python-flask") - (version "2.0.2") + (version "2.1.1") (source (origin (method url-fetch) (uri (pypi-uri "Flask" version)) (sha256 (base32 - "1qilnrdakhbw5k951kczdy8ia0wczh0dpp1vi4qhgmfx6klvhbvv")))) + "1j0rjly2yhbm566lq2s8543fs7fz86f77abps539djcfalzbvjd8")))) (build-system python-build-system) (arguments '(#:phases @@ -3009,8 +3009,13 @@ (define-public python-flask (native-inputs (list python-pytest)) (propagated-inputs - (list python-itsdangerous python-jinja2 python-click python-werkzeug)) - (home-page "https://www.palletsprojects.com/p/flask/") + (list python-asgiref ;async extra + python-click + python-importlib-metadata + python-itsdangerous + python-jinja2 + python-werkzeug)) + (home-page "https://palletsprojects.com/p/flask/") (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions") (description "Flask is a micro web framework based on the Werkzeug toolkit and Jinja2 template engine. It is called a micro framework because it does not -- cgit v1.2.3 From 37caa64189b1cd35a806d42fcc9cad7001388164 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 17 Apr 2022 08:07:00 -0400 Subject: gnu: python-websockets: Update to 10.3 and enable tests. * gnu/packages/python-web.scm (python-websockets): Fetch from git. Update to 10.3. [arguments]: Delete field, enabling tests. --- gnu/packages/python-web.scm | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 340f84c78f..aaa45c5f4c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5345,24 +5345,18 @@ (define-public python-warcio (define-public python-websockets (package (name "python-websockets") - (version "8.1") + (version "10.3") (source - (origin - (method url-fetch) - (uri (pypi-uri "websockets" version)) - (sha256 - (base32 - "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw")))) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/aaugustin/websockets") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vk7g5z977mi89hamwiqawpmibwvv9ghrf3pqva1waxmyc7gyjb5")))) (build-system python-build-system) - (arguments - '(#:tests? #f ; Tests not included in release tarball. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-websockets-package-name-requirement - (lambda* (#:key inputs #:allow-other-keys) - ;; Python package names use dot as separator. - (substitute* "setup.py" - (("websockets/extensions") "websockets.extensions"))))))) (home-page "https://github.com/aaugustin/websockets") (synopsis "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)") -- cgit v1.2.3 From 27c49acf0662b9b1bcad070888d19bcef3ceb27d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 17 Apr 2022 09:10:38 -0400 Subject: gnu: Add python-openapi-schema-validator. * gnu/packages/python-web.scm (python-openapi-schema-validator): New variable. --- gnu/packages/python-web.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index aaa45c5f4c..4b7d01052d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1429,6 +1429,60 @@ (define-public python-webencodings (define-public python2-webencodings (package-with-python2 python-webencodings)) +(define-public python-openapi-schema-validator + (package + (name "python-openapi-schema-validator") + (version "0.2.3") + (source + (origin + (method git-fetch) ;no tests in pypi release + (uri (git-reference + (url "https://github.com/p1c2u/openapi-schema-validator") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1swm8h74nhg63nxk347blwq9f1qn6iiq3zisndcvm7axkq3pc2df")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-coverage-pytest-options + (lambda _ + (substitute* "pyproject.toml" + (("^--cov.*") "")))) + ;; XXX: PEP 517 manual build copied from python-isort. + (replace 'build + (lambda _ + (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest")))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl))))))) + (native-inputs (list python-poetry-core python-pypa-build python-pytest)) + (propagated-inputs + (list python-isodate + python-jsonschema + python-rfc3339-validator + python-strict-rfc3339)) + (home-page "https://github.com/p1c2u/openapi-schema-validator") + (synopsis "OpenAPI schema validation library for Python") + (description "Openapi-schema-validator is a Python library that validates +a schema against: +@itemize +@item OpenAPI Schema Specification v3.0 which is an extended subset of the +JSON Schema Specification Wright Draft 00. +@item OpenAPI Schema Specification v3.1 which is an extended superset of the +JSON Schema Specification Draft 2020-12. +@end itemize") + (license license:bsd-3))) + (define-public python-openid (package (name "python-openid") -- cgit v1.2.3 From a81161c1a484da7d54626f76f08aa8c3c6fec96b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 17 Apr 2022 14:22:02 -0400 Subject: gnu: Add python-openapi-spec-validator. * gnu/packages/python-web.scm (python-openapi-spec-validator): New variable. --- gnu/packages/python-web.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 4b7d01052d..9c026ba53c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1483,6 +1483,61 @@ (define-public python-openapi-schema-validator @end itemize") (license license:bsd-3))) +(define-public python-openapi-spec-validator + (package + (name "python-openapi-spec-validator") + (version "0.4.0") + (source + (origin + (method git-fetch) ;no tests in pypi release + (uri (git-reference + (url "https://github.com/p1c2u/openapi-spec-validator") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-coverage-pytest-options + (lambda _ + (substitute* "pyproject.toml" + (("^--cov.*") "")))) + ;; XXX: PEP 517 manual build copied from python-isort. + (replace 'build + (lambda _ + (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" + ;; The example tests attempt to fetch resources from + ;; the Internet (see: + ;; https://github.com/p1c2u/openapi-spec-validator/issues/151). + "-k" "not Example and not Exampe")))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl))))))) + (native-inputs (list python-poetry-core python-pypa-build python-pytest)) + (propagated-inputs + (list python-jsonschema + python-openapi-schema-validator + python-pyyaml + python-requests + python-setuptools)) + (home-page "https://github.com/p1c2u/openapi-spec-validator") + (synopsis "OpenAPI spec validator") + (description "OpenAPI Spec Validator is a Python library that validates an +OpenAPI specification against the OpenAPI 2.0 (also known as Swagger), OpenAPI +3.0 and OpenAPI 3.1 specifications. The validator aims to check for full +compliance with the specification.") + (license license:asl2.0))) + (define-public python-openid (package (name "python-openid") -- cgit v1.2.3 From c5d5c14101535b0a44ccb5fdfb72fad265702a8b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 17 Apr 2022 23:18:30 -0400 Subject: gnu: Add python-cbor2. * gnu/packages/python-web.scm (python-cbor2): New variable. --- gnu/packages/python-web.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9c026ba53c..36d7fb03f9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -575,6 +575,46 @@ (define-public python-aws-xray-sdk emit information from within their applications to the AWS X-Ray service.") (license license:asl2.0))) +(define-public python-cbor2 + (package + (name "python-cbor2") + (version "5.4.2.post1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cbor2" version)) + (sha256 + (base32 "15y78xcc3zkmvj1mdzz8gyhf3apbl91073kwhzbjk5abc1civwlw")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) + (native-inputs (list python-pytest python-pytest-cov python-setuptools-scm)) + (home-page "https://github.com/agronholm/cbor2") + (synopsis "Concise Binary Object Representation (CBOR) (de)serializer") + (description "This Python library provides encoding and decoding for the +Concise Binary Object +Representation (CBOR) (@url{https://www.rfc-editor.org/rfc/rfc8949.html, RFC +8949}) serialization format. The specification is fully compatible with the +original RFC 7049. Among its features are: +@itemize +@item Simple API like the @code{json} or @code{pickle} modules. +@item Support many CBOR tags with stdlib objects. +@item Generic tag decoding. +@item Shared value references including cyclic references. +@item String references compact encoding with repeated strings replaced with +indices. +@item Optional C module backend tested on big- and little-endian architectures. +@item Extensible tagged value handling using tag_hook and object_hook on +decode and default on encode. +@end itemize") + (license license:expat))) + (define-public python-cfn-lint (package (name "python-cfn-lint") -- cgit v1.2.3 From f17611f3bef3ee28a88b53a74e6e84bcfdbed966 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 00:07:48 -0400 Subject: gnu: python-httpcore: Update to 0.14.7 and enable tests. * gnu/packages/python-web.scm (python-httpcore): Update to 0.14.7. [tests?]: Delete argument. [phases]{check}: Streamline and delete coverage related pytest options. Strip trailing #t. [native-inputs]: Delete python-autoflake, python-flake8, python-flake8-bugbear, python-flake8-pie and python-mypy. Add python-pytest-httpbin. [propagated-inputs]: Add python-anyio, python-certifi and python-socksio. --- gnu/packages/python-web.scm | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 36d7fb03f9..d658985520 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5254,7 +5254,7 @@ (define-public python-vf-1 (define-public python-httpcore (package (name "python-httpcore") - (version "0.12.2") + (version "0.14.7") (source (origin ;; PyPI tarball does not contain tests. @@ -5264,34 +5264,31 @@ (define-public python-httpcore (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1nrwwfdqjfc2a1k3j41cdwkprwvplf95fwmypdl2aq2qgp3209q0")))) + (base32 "0wdr28vf03l6yxhk8nrvhh7y7x18rqdcfzv1sb6jgzk9zmycrvc7")))) (build-system python-build-system) (arguments - `(#:tests? #f ; Tests hang at 98% - #:phases + `(#:phases (modify-phases %standard-phases (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "--cov=httpcore" - "--cov=tests" "tests")) - #t))))) + (invoke "pytest" "-vv" "tests"))))))) (native-inputs - (list python-autoflake - python-flake8 - python-flake8-bugbear - python-flake8-pie - python-isort - python-mypy - python-pytest + (list python-pytest python-pytest-asyncio python-pytest-cov + python-pytest-httpbin python-pytest-trio python-uvicorn python-trustme)) (propagated-inputs - (list python-h11 python-h2 python-sniffio python-trio + (list python-anyio + python-certifi + python-h11 + python-h2 + python-sniffio + python-socksio + python-trio python-trio-typing)) (home-page "https://github.com/encode/httpcore") (synopsis "Minimal, low-level HTTP client") -- cgit v1.2.3 From b9fc4781925fd783c89d8c75ee47cafa2171a78a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 00:10:02 -0400 Subject: gnu: Add python-httpcore-bootstrap. * gnu/packages/python-web.scm (python-httpcore-bootstrap): New variable. --- gnu/packages/python-web.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index d658985520..28c2ae9b13 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5308,6 +5308,14 @@ (define-public python-httpcore @end itemize") (license license:bsd-3))) +;;; Variant used to break a cycle between python-httpx and python-uvicorn. +(define-public python-httpcore-bootstrap + (hidden-package + (package/inherit python-httpcore + (name "python-httpcore-bootstrap") + (arguments (list #:tests? #f)) + (native-inputs '())))) + (define-public python-httpx (package (name "python-httpx") -- cgit v1.2.3 From ef370c850115bcb5f158d4ac1bc386c3df9f7af1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 00:10:28 -0400 Subject: gnu: Add python-httpx-bootstrap. * gnu/packages/python-web.scm (python-httpx-bootstrap): New variable. --- gnu/packages/python-web.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 28c2ae9b13..1aa5342e8d 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5412,6 +5412,17 @@ (define-public python-httpx @end itemize") (license license:bsd-3))) +;;; Variant used to break a cycle with python-uvicorn. +(define-public python-httpx-bootstrap + (hidden-package + (package/inherit python-httpx + (name "python-httpx-bootstrap") + (arguments (list #:tests? #f)) + (native-inputs '()) + (propagated-inputs + (modify-inputs (package-propagated-inputs python-httpx) + (replace "python-httpcore" python-httpcore-bootstrap)))))) + (define-public python-wsgiprox (package (name "python-wsgiprox") -- cgit v1.2.3 From b4c4c2f82e91736bfc623df2b3f61335ec702231 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 00:10:52 -0400 Subject: gnu: python-httpx: Update to 0.22.0. * gnu/packages/python-web.scm (python-httpx): Update to 0.22.0. [phases]{check}: Add 'asyncio_mode=auto' pytest-asyncio option. Skip the 'test_main' test. [native-inputs]: Delete python-autoflake, python-black, python-cryptography, python-flake8, python-flake8-bugbear, python-flake8-pie, python-isort, python-mypy and python-pytest-cov. [propagated-inputs]: Add python-charset-normalizer. --- gnu/packages/python-web.scm | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 1aa5342e8d..3e024b4fae 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5319,7 +5319,7 @@ (define-public python-httpcore-bootstrap (define-public python-httpx (package (name "python-httpx") - (version "0.16.1") + (version "0.22.0") (source (origin ;; PyPI tarball does not contain tests. @@ -5329,7 +5329,7 @@ (define-public python-httpx (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "00gmq45fckcqkj910bvd7pyqz1mvgsdvz4s0k7dzbnc5czzq1f4a")))) + (base32 "1awr56488b66zyl3cx1f03lq2n07xdg5kb4l46vnsm59s6hr02c5")))) (build-system python-build-system) (arguments `(#:phases @@ -5337,7 +5337,8 @@ (define-public python-httpx (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "pytest" "-vv" "-k" + (invoke "pytest" "-vv" "-o" "asyncio_mode=auto" + "-k" ;; These tests try to open an outgoing connection. (string-append "not test_connect_timeout" @@ -5347,26 +5348,23 @@ (define-public python-httpx "being_deleted" " and not test_that_send_cause_client_to_be_not_closed" " and not test_async_proxy_close" - " and not test_sync_proxy_close")))))))) + " and not test_sync_proxy_close" + ;; This test is apparently incompatible with + ;; python-click 8, fails with " AttributeError: + ;; 'function' object has no attribute 'name'". + " and not test_main")))))))) (native-inputs - (list python-autoflake - python-black - python-cryptography - python-flake8 - python-flake8-bugbear - python-flake8-pie - python-isort - python-mypy + (list python-cryptography python-pytest python-pytest-asyncio python-pytest-trio - python-pytest-cov python-trio python-trio-typing python-trustme python-uvicorn)) (propagated-inputs - (list python-brotli + (list python-charset-normalizer + python-brotli python-certifi python-chardet python-httpcore -- cgit v1.2.3 From 634a798f51c7c31d882b7888e49697aa0e8f32e4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 00:11:32 -0400 Subject: gnu: python-uvicorn: Update to 0.17.6. * gnu/packages/python-web.scm (python-uvicorn): Update to 0.17.6. [phases]{check}: Delete extraneous add-installed-pythonpath and inputs/outputs arguments. Add the '-o' 'asyncio_mode=auto' option to pytest invocation, and skip two tests. [native-inputs]: Add python-httpx-bootstrap and python-pytest-asyncio. [propagated-inputs]: Add python-asgiref and python-dotenv. --- gnu/packages/python-web.scm | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 3e024b4fae..41de186b6f 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5014,7 +5014,7 @@ (define-public python-httptools (define-public python-uvicorn (package (name "python-uvicorn") - (version "0.13.2") + (version "0.17.6") (source (origin ;; PyPI tarball has no tests. @@ -5024,20 +5024,33 @@ (define-public python-uvicorn (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9")))) + (base32 "0npwls02nhna2lyw2nksxij16l9agf12c9f42pvxb5yrpi9l16c8")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv")))))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "-o" "asyncio_mode=auto" + "-k" + (string-append + ;; These error or fail due to networking. + "not test_keepalive " + "and not test_bind_unix_socket_works_with_" + "reload_or_workers ")))))))) (native-inputs - (list python-pytest python-pytest-mock python-requests - python-trustme python-wsproto)) + (list python-httpx-bootstrap + python-pytest + python-pytest-asyncio + python-pytest-mock + python-requests + python-trustme + python-wsproto)) (propagated-inputs - (list python-click + (list python-asgiref + python-click + python-dotenv python-h11 python-httptools python-pyyaml -- cgit v1.2.3 From 1f5f4cc1a2076ef40121f9e6c858e7c3081c7ef4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 00:21:31 -0400 Subject: gnu: Add python-socksio. * gnu/packages/python-web.scm (python-socksio): New variable. --- gnu/packages/python-web.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 41de186b6f..0e837c8180 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -6336,6 +6336,27 @@ (define-public python-socks functionality.") (license license:asl2.0))) +(define-public python-socksio + (package + (name "python-socksio") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "socksio" version)) + (sha256 + (base32 "1b64j45w35jzhjhnq44bnyad9ydh1iyyd7a6j2c8phxmllyyp2zq")))) + (build-system python-build-system) + (home-page "https://github.com/sethmlarson/socksio") + (synopsis "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5.") + (description "The @code{socksio} Python module is a client-side sans-I/O +SOCKS proxy implementation. It supports SOCKS4, SOCKS4A, and SOCKS5. +@code{socksio} is a sans-I/O library similar to @code{h11} or @code{h2}; this +means the library itself does not handle the actual sending of the bytes +through the network, it only deals with the implementation details of the +SOCKS protocols. It can be paired with any I/O library.") + (license license:expat))) + (define-public python-azure-nspkg (package (name "python-azure-nspkg") -- cgit v1.2.3 From 0d585039704e9c6848d92f4f85a90dec49049a97 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 01:35:21 -0400 Subject: gnu: Add python-pecan. * gnu/packages/python-web.scm (python-pecan): New variable. --- gnu/packages/python-web.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 0e837c8180..9e8ae40382 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -5901,6 +5901,53 @@ (define-public python-manuel "Manuel lets you mix and match traditional doctests with custom test syntax.") (license license:asl2.0))) +(define-public python-pecan + (package + (name "python-pecan") + (version "1.4.1") + (source + (origin + (method git-fetch) ;no tests in pypi release + (uri (git-reference + (url "https://github.com/pecan/pecan") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10lz0cqafx3j24m52vv9ph0bxrzyx6wv2dgz7g9kfm60lhaskqkh")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "test-requirements.txt" + ;; Drop extraneous virtualenv requirement. + ((".*virtualenv.*") "")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "pecan"))))))) + (native-inputs + (list gunicorn + python-genshi + python-jinja2 + python-pytest + python-sqlalchemy + uwsgi)) + (propagated-inputs + (list python-logutils + python-mako + python-six + python-webob + python-webtest)) + (home-page "http://github.com/pecan/pecan") + (synopsis "WSGI object-dispatching web framework") + (description "This package provides a WSGI object-dispatching web +framework, designed to be lean and fast, with few dependencies.") + (license license:bsd-3))) + (define-public python-persistent (package (name "python-persistent") -- cgit v1.2.3 From e5d34080229393b4f19fe312fbb667b9e3430afa Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 09:48:12 -0400 Subject: gnu: python-falcon: Update to 3.1.0. * gnu/packages/python-web.scm (python-falcon): Update to 3.1.0. [source]: Use git. Adjust snippet. [phases]{check}: Set HOME and invoke pytests with "-vv". [native-inputs]: Add python-aiofiles, python-cbor2, python-fakeredis, python-httpx, python-pecan, python-pillow, python-pytest-asyncio and python-websockets. [synopsis, description]: Fix indentation. --- gnu/packages/python-web.scm | 50 +++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 20 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9e8ae40382..e97630fc14 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -668,14 +668,16 @@ (define-public python-cfn-lint (define-public python-falcon (package (name "python-falcon") - (version "2.0.0") + (version "3.1.0") (source (origin - (method url-fetch) - (uri (pypi-uri "falcon" version)) - (sha256 - (base32 - "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf")) + ;; Use git, as there are some test files missing from the PyPI release, + ;; such as 'examples' directory. + (method git-fetch) + (uri (git-reference + (url "https://github.com/falconry/falcon") + (commit version))) + (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet '(begin @@ -683,11 +685,13 @@ (define-public python-falcon (substitute* "setup.py" ((".*falcon\\.vendor\\.mimeparse.*") "")) (substitute* '("falcon/media/handlers.py" - "falcon/request.py") - (("from falcon\\.vendor ") "")) - (substitute* "falcon.egg-info/SOURCES.txt" - (("falcon/vendor.*") "")) - #t)))) + "falcon/request.py" + "tests/test_deps.py") + (("from falcon\\.vendor ") "") + (("mimeparse.mimeparse") "mimeparse")))) + (sha256 + (base32 + "17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3")))) (build-system python-build-system) (arguments `(#:phases @@ -697,27 +701,33 @@ (define-public python-falcon ;; Skip orjson, which requires rust to build. (substitute* "tests/test_media_handlers.py" (("== 'CPython") "!= 'CPython")) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "--ignore" "falcon")))))) + (setenv "HOME" "/tmp") + (invoke "pytest" "-vv" "tests")))))) (propagated-inputs (list python-mimeparse)) (native-inputs - (list python-cython ;for faster binaries + (list python-aiofiles + python-cbor2 + python-cython ;for faster binaries + python-fakeredis + python-httpx python-mujson python-msgpack + python-pecan + python-pillow python-pytest + python-pytest-asyncio python-pytest-runner python-pyyaml python-rapidjson python-requests python-testtools - python-ujson)) + python-ujson + python-websockets)) (home-page "https://falconframework.org") - (synopsis - "Web framework for building APIs and application backends") - (description - "Falcon is a web API framework for building microservices, application -backends and higher-level frameworks. Among its features are: + (synopsis "Web framework for building APIs and application backends") + (description "Falcon is a web API framework for building microservices, +application backends and higher-level frameworks. Among its features are: @itemize @item Optimized and extensible code base @item Routing via URI templates and REST-inspired resource -- cgit v1.2.3 From 3f9eafbedd5a9c833aed1954f8ad18b3a7699222 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 11:57:03 -0400 Subject: gnu: Add python-openapi-core. * gnu/packages/python-web.scm (python-openapi-core): New variable. --- gnu/packages/python-web.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index e97630fc14..9836e81f6c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1588,6 +1588,71 @@ (define-public python-openapi-spec-validator compliance with the specification.") (license license:asl2.0))) +(define-public python-openapi-core + (package + (name "python-openapi-core") + (version "0.14.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/p1c2u/openapi-core") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1npsibyf8zx6z230yl19kyap8g25kqvgm7z1w6rm6jxv58yqsp7r")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "tests/unit" + ;; Ignore Pytest configuration in setup.cfg that adds + ;; unwanted flake8 and coverage options. + "-c" "/dev/null" + ;; This tests fails due to changes in Pytest; fixed + ;; but not yet released upstream + ;; (https://github.com/p1c2u/openapi-core/issues/158). + "-k" "not test_string_format_invalid_value"))))))) + (native-inputs (list python-django + python-falcon + python-flask + python-poetry-core + python-pypa-build + python-pytest + python-responses)) + (propagated-inputs + (list python-attrs + python-dictpath + python-isodate + python-jsonschema + python-lazy-object-proxy + python-more-itertools + python-openapi-schema-validator + python-openapi-spec-validator + python-parse + python-six + python-werkzeug)) + (home-page "https://github.com/p1c2u/openapi-core") + (synopsis "OpenAPI core library") + (description "Openapi-core is a Python library that adds client-side and +server-side support for the OpenAPI Specification v3. It has features such +as: +@itemize +@item Validation of requests and responses +@item Schema casting and unmarshalling +@item Media type and parameters deserialization +@item Security providers (API keys, Cookie, Basic and Bearer HTTP +authentications) +@item Custom deserializers and formats +@item Integration with libraries and frameworks. +@end itemize") + (license license:bsd-3))) + (define-public python-openid (package (name "python-openid") -- cgit v1.2.3 From bfe7f4065095fde94a44b511ae74186a2dbe880f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 18 Apr 2022 13:40:35 -0400 Subject: gnu: python-hypothesis-6.23: Update to 6.43.3. * gnu/packages/check.scm (python-hypothesis-6.23): Update to 6.43.3 and rename to... (python-hypothesis-next): ... this. [propagated-inputs]: Add python-pytest. * gnu/packages/matrix.scm (python-matrix-nio): Adjust accordingly. * gnu/packages/python-web.scm (python-h2): Likewise. * gnu/packages/check.scm (python-hypothesis)[home-page]: Update URL. --- gnu/packages/check.scm | 12 ++++++++---- gnu/packages/matrix.scm | 2 +- gnu/packages/python-web.scm | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 957d7a4262..8e6576208c 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2174,20 +2174,24 @@ (define-public python-hypothesis much larger range of examples than you would ever want to write by hand. It’s based on the Haskell library, Quickcheck, and is designed to integrate seamlessly into your existing Python unit testing work flow.") - (home-page "https://github.com/HypothesisWorks/hypothesis-python") + (home-page "https://github.com/HypothesisWorks/hypothesis") (license license:mpl2.0) (properties `((python2-variant . ,(delay python2-hypothesis)))))) -(define-public python-hypothesis-6.23 +;;; TODO: Make the default python-hypothesis in the next rebuild cycle. +(define-public python-hypothesis-next (package (inherit python-hypothesis) - (version "6.23.4") + (version "6.43.3") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "0wp8i9qmd5wl1sq1l2b97fgliyk5fyphssl6j7q5qn5zjlfgi4qs")))))) + "0d67dlc5a47i48fxzmji2mnybzby0h1wdscmj54555fghcyp1045")))) + (propagated-inputs + (modify-inputs (package-propagated-inputs python-hypothesis) + (append python-pytest))))) ;to satisfy the sanity-check phase ;; This is the last version of Hypothesis that supports Python 2. (define-public python2-hypothesis diff --git a/gnu/packages/matrix.scm b/gnu/packages/matrix.scm index 5f94eb2075..9ac999b5fd 100644 --- a/gnu/packages/matrix.scm +++ b/gnu/packages/matrix.scm @@ -187,7 +187,7 @@ (define-public python-matrix-nio (native-inputs `(("python-pytest" ,python-pytest-6) ("python-hyperframe" ,python-hyperframe) - ("python-hypothesis" ,python-hypothesis-6.23) + ("python-hypothesis" ,python-hypothesis-next) ("python-hpack" ,python-hpack) ("python-faker" ,python-faker) ("python-pytest-aiohttp" ,python-pytest-aiohttp) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9836e81f6c..89b688da32 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1114,7 +1114,7 @@ (define-public python-h2 (add-installed-pythonpath inputs outputs) (invoke "python" "-m" "pytest" "-vv" "test"))))))) (native-inputs - (list python-hypothesis-6.23 python-pytest)) + (list python-hypothesis-next python-pytest)) (propagated-inputs (list python-hpack python-hyperframe)) (home-page "https://github.com/python-hyper/h2") -- cgit v1.2.3 From dff469209e14b867b1f3f6e946526b4654cc4d08 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 20 Apr 2022 01:26:34 -0400 Subject: gnu: python-flask-wtf: Update to 1.0.1. * gnu/packages/python-web.scm (python-flask-wtf): Update to 1.0.1. [propagated-inputs]: Remove python-flask-babel and python-babel. Add python-flask and python-itsdangerous. --- gnu/packages/python-web.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 89b688da32..f98f824daa 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3249,14 +3249,14 @@ (define-public python-flask (define-public python-flask-wtf (package (name "python-flask-wtf") - (version "0.14.3") + (version "1.0.1") (source (origin (method url-fetch) (uri (pypi-uri "Flask-WTF" version)) (sha256 (base32 - "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl")))) + "1jd614662r6ifh4svs8zfwm4k8bal5z3n6pq607bas8gxrpmrzil")))) (build-system python-build-system) (arguments '(#:phases @@ -3265,7 +3265,7 @@ (define-public python-flask-wtf (lambda _ (invoke "pytest" "-vv")))))) (propagated-inputs - (list python-flask-babel python-babel python-wtforms)) + (list python-flask python-itsdangerous python-wtforms)) (native-inputs (list python-pytest)) (home-page "https://github.com/lepture/flask-wtf") -- cgit v1.2.3 From 7d882da0ebdb64b7d0dbdfe964bc75d3274a3265 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 20 Apr 2022 01:47:20 -0400 Subject: gnu: python-flask-login: Update to 0.6.0. * gnu/packages/python-web.scm (python-flask-login): Update to 0.6.0. [arguments]: New field. [native-inputs]: Remove python-coverage, python-pycodestyle and python-pyflakes. --- gnu/packages/python-web.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index f98f824daa..094ec10e4b 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3837,7 +3837,7 @@ (define-public python-jsmin (define-public python-flask-login (package (name "python-flask-login") - (version "0.5.0") + (version "0.6.0") (source (origin (method git-fetch) @@ -3846,17 +3846,21 @@ (define-public python-flask-login (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg")))) + (base32 "12yw01ccgjn9c88cbkrd6k1ykjxd8fxip2b1isvxjirphnlqhn9g")))) (build-system python-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "-c" "/dev/null"))))))) (propagated-inputs (list python-flask)) (native-inputs ;; For tests. (list python-blinker - python-coverage python-mock - python-pycodestyle - python-pyflakes python-pytest python-semantic-version python-werkzeug)) -- cgit v1.2.3 From f6b001be16ab7f35bcdb2e5bfac5cbcb11e09ffb Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 27 Apr 2022 09:48:24 +0200 Subject: gnu: Add python-sanic-routing. * gnu/packages/python-web.scm (python-sanic-routing): New variable. Signed-off-by: Maxim Cournoyer --- gnu/packages/python-web.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 094ec10e4b..ff0f961849 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -6341,6 +6341,27 @@ (define-public python-hstspreload as a Python package.") (license license:bsd-3))) +(define-public python-sanic-routing + (package + (name "python-sanic-routing") + (version "0.7.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sanic-routing" version)) + (sha256 + (base32 "0k9paln0jd4sc2bklp977c82n29pk12wiv726siplkh57y5yi70k")))) + (build-system python-build-system) + (arguments + ;; PyPi sources does not contain tests, recursive dependency on + ;; python-sanic. + (list #:tests? #f)) + (home-page "https://github.com/sanic-org/sanic-routing/") + (synopsis "Routing component for Sanic") + (description "Internal package for @code{python-sanic}, which provides +the @code{BasicRouter}.") + (license license:expat))) + (define-public python-sanic (package (name "python-sanic") -- cgit v1.2.3 From 207065aa6e2eedbbded0f69743b25f61d9b0ca4a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 27 Apr 2022 09:49:13 +0200 Subject: gnu: Add python-sanic-bootstrap. * gnu/packages/python-web.scm (python-sanic-bootstrap): New variable. Signed-off-by: Maxim Cournoyer --- gnu/packages/python-web.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index ff0f961849..574b7958cb 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -6424,6 +6424,13 @@ (define-public python-sanic your code non-blocking and speedy.") (license license:expat))) +(define-public python-sanic-bootstrap + (package + (inherit python-sanic) + (name "python-sanic-bootstrap") + (arguments (list #:tests? #f)) + (native-inputs '()))) + (define-public python-socketio (package (name "python-socketio") -- cgit v1.2.3 From 7acd0122307016477293df878d775d0b79eaeb34 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 27 Apr 2022 09:50:22 +0200 Subject: gnu: Add python-sanic-testing. * gnu/packages/python-web.scm (python-sanic-testing): New variable. Signed-off-by: Maxim Cournoyer --- gnu/packages/python-web.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 574b7958cb..8b6d454780 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -6362,6 +6362,30 @@ (define-public python-sanic-routing the @code{BasicRouter}.") (license license:expat))) +(define-public python-sanic-testing + (package + (name "python-sanic-testing") + (version "22.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sanic-testing" version)) + (sha256 + (base32 "1vkgi9d3xyik507j4jy9s74mkl81hgx3c2d5y3aa1av9h6wjjivp")))) + (build-system python-build-system) + (arguments + ;; PyPi sources does not contain tests, recursive dependency on + ;; python-sanic. + (list #:tests? #f)) + (propagated-inputs (list python-httpx python-sanic-bootstrap + python-websockets)) + (home-page "https://github.com/sanic-org/sanic-testing/") + (synopsis "Test clients for Sanic") + (description "Internal package for @code{python-sanic}, which is +meant to be the core testing utility and clients for testing Sanic +applications.") + (license license:expat))) + (define-public python-sanic (package (name "python-sanic") -- cgit v1.2.3 From 93baba64753d4f8543b38a3a6092b7a71b79b246 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 27 Apr 2022 09:51:09 +0200 Subject: gnu: python-sanic: Update to 21.12.1. * gnu/packages/python-web.scm (python-sanic): Update to 21.12.1. [arguments]<#:phases>: Remove 'use-recent-pytest, update skipped tests in 'check. [propagated-inputs]: Remove python-httpx, replace python-multidict with python-multidict-5, add python-sanic-routing. [native-inputs]: Add python-bandit, python-chardet, python-isort and python-sanic-testing. Remove python-hstspreload, python-httpcore, python-pytest-cov and python-urllib3. Signed-off-by: Maxim Cournoyer --- gnu/packages/python-web.scm | 51 ++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 24 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 8b6d454780..7636931091 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -86,6 +86,7 @@ (define-module (gnu packages python-web) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages node) + #:use-module (gnu packages openstack) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -6389,53 +6390,55 @@ (define-public python-sanic-testing (define-public python-sanic (package (name "python-sanic") - (version "20.12.4") + ;; We provide the latest LTS version of python-sanic. + (version "21.12.1") (source (origin (method url-fetch) (uri (pypi-uri "sanic" version)) (sha256 (base32 - "0axfc151s7nrykzypzciyvkxxrs5ayx8kxv4r620hjb9w3jjhfnp")))) + "0b8mcd1q9qkwcv2qz8nlyaacs0bp7a1l31sdq2m8hhkxykzfq5bg")))) (build-system python-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'use-recent-pytest - ;; Allow using recent dependencies. - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "setup.py" - (("pytest==5.2.1") "pytest") - (("multidict>=5.0,<6.0") "multidict") - (("httpx==0\\.15\\.4") "httpx")) - #t)) - (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "./tests" "-k" - (string-append "not test_zero_downtime " - "and not test_gunicorn_worker " - "and not test_logo_"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "./tests" "-k" + (string-append + ;; PyPi sources lack examples module. + "not test_gunicorn_" + ;; Does not expect brotli and reordered headers. + " and not test_raw_headers" + ;; These look like buggy testcases. + " and not test_zero_downtime" + " and not test_non_default_uvloop_config_raises_warning" + " and not test_listeners_triggered" + " and not test_keep_alive_connection_context" + " and not test_keep_alive_client_timeout")))))))) (propagated-inputs (list python-aiofiles python-httptools - python-httpx python-multidict + python-sanic-routing python-ujson python-uvloop python-websockets)) (native-inputs (list gunicorn + python-bandit python-beautifulsoup4 - python-hstspreload - python-httpcore + python-chardet + python-isort python-pytest - python-pytest-cov python-pytest-benchmark python-pytest-sanic python-pytest-sugar python-pytest-asyncio - python-urllib3 + python-sanic-testing python-uvicorn)) (home-page "https://github.com/sanic-org/sanic/") -- cgit v1.2.3