From 7a8db96d4fa43f55e5cda659e45fe2fd11bd957a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 20 Jan 2023 14:45:58 -0800 Subject: [PATCH 1/8] python310Packages.pyquery: 1.4.3 -> 2.0.0 https://github.com/gawel/pyquery/blob/2.0.0/CHANGES.rst --- .../python-modules/pyquery/default.nix | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyquery/default.nix b/pkgs/development/python-modules/pyquery/default.nix index 40139c795677..0e1203b901b0 100644 --- a/pkgs/development/python-modules/pyquery/default.nix +++ b/pkgs/development/python-modules/pyquery/default.nix @@ -3,18 +3,23 @@ , cssselect , fetchPypi , lxml +, pytestCheckHook , pythonOlder +, requests +, webob +, webtest }: buildPythonPackage rec { pname = "pyquery"; - version = "1.4.3"; - disabled = pythonOlder "3.5"; + version = "2.0.0"; + disabled = pythonOlder "3.7"; + + format = "setuptools"; src = fetchPypi { inherit pname version; - extension = "zip"; - sha256 = "00p6f1dfma65192hc72dxd506491lsq3g5wgxqafi1xpg2w1xia6"; + hash = "sha256-lj6NTpAmL/bY3sBy6pcoXcN0ovacrXd29AgqvPah2K4="; }; propagatedBuildInputs = [ @@ -22,10 +27,23 @@ buildPythonPackage rec { lxml ]; - # circular dependency on webtest - doCheck = false; pythonImportsCheck = [ "pyquery" ]; + checkInputs = [ + pytestCheckHook + requests + webob + (webtest.overridePythonAttrs (_: { + # circular dependency + doCheck = false; + })) + ]; + + pytestFlagsArray = [ + # requires network + "--deselect=tests/test_pyquery.py::TestWebScrappingEncoding::test_get" + ]; + meta = with lib; { description = "A jquery-like library for Python"; homepage = "https://github.com/gawel/pyquery"; From e8ad29a8a9f4361a386208775417fcf9470df71f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Jan 2023 16:25:06 -0800 Subject: [PATCH 2/8] python310Packages.marshmallow: 3.16.0 -> 3.19.0 https://github.com/marshmallow-code/marshmallow/blob/3.19.0/CHANGELOG.rst --- pkgs/development/python-modules/marshmallow/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/marshmallow/default.nix b/pkgs/development/python-modules/marshmallow/default.nix index d23263771744..5fcaf478f186 100644 --- a/pkgs/development/python-modules/marshmallow/default.nix +++ b/pkgs/development/python-modules/marshmallow/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "marshmallow"; - version = "3.16.0"; + version = "3.19.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "marshmallow-code"; repo = pname; rev = version; - hash = "sha256-bR10hYViK7OrAaBpKaeM7S5XyHQZhlGUQTwH/EJ0kME="; + hash = "sha256-b1brLHM48t45bwUXk7QreLLmvTzU0sX7Uoc1ZAgGkrE="; }; propagatedBuildInputs = [ @@ -37,6 +37,7 @@ buildPythonPackage rec { ]; meta = with lib; { + changelog = "https://github.com/marshmallow-code/marshmallow/blob/${src.rev}/CHANGELOG.rst"; description = "Library for converting complex objects to and from simple Python datatypes"; homepage = "https://github.com/marshmallow-code/marshmallow"; license = licenses.mit; From 3db3e83674fdd0f6983ac763a6e73610b6fb2586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Jan 2023 16:24:54 -0800 Subject: [PATCH 3/8] python310Packages.marshmallow-oneofschema: 3.0.1 -> 3.0.2 https://github.com/marshmallow-code/marshmallow-oneofschema/blob/3.0.2/CHANGELOG.rst --- .../python-modules/marshmallow-oneofschema/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/marshmallow-oneofschema/default.nix b/pkgs/development/python-modules/marshmallow-oneofschema/default.nix index dc00e4bc60d8..3e4faf8c6031 100644 --- a/pkgs/development/python-modules/marshmallow-oneofschema/default.nix +++ b/pkgs/development/python-modules/marshmallow-oneofschema/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "marshmallow-oneofschema"; - version = "3.0.1"; + version = "3.0.2"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "marshmallow-code"; repo = pname; rev = version; - hash = "sha256-x0v8WkfjGkP2668QIQiewQViYFDIS2zBWMULcDThWas="; + hash = "sha256-Em2jQmvI5IiWREeOX/JAcdOQlpwP7k+cbCirkh82sf0="; }; propagatedBuildInputs = [ @@ -35,6 +35,7 @@ buildPythonPackage rec { ]; meta = with lib; { + changelog = "https://github.com/marshmallow-code/marshmallow-oneofschema/blob/${src.rev}/CHANGELOG.rst"; description = "Marshmallow library extension that allows schema (de)multiplexing"; homepage = "https://github.com/marshmallow-code/marshmallow-oneofschema"; license = licenses.mit; From bdfb499f4074e4918bdcbe3fd85e0e63a4cb194f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Jan 2023 16:25:16 -0800 Subject: [PATCH 4/8] python310Packages.apispec: add meta.changelog --- pkgs/development/python-modules/apispec/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/apispec/default.nix b/pkgs/development/python-modules/apispec/default.nix index 39a6a7662851..1a85922e5dd5 100644 --- a/pkgs/development/python-modules/apispec/default.nix +++ b/pkgs/development/python-modules/apispec/default.nix @@ -39,6 +39,7 @@ buildPythonPackage rec { ]; meta = with lib; { + changelog = "https://github.com/marshmallow-code/apispec/blob/${version}/CHANGELOG.rst"; description = "A pluggable API specification generator with support for the OpenAPI Specification"; homepage = "https://github.com/marshmallow-code/apispec"; license = licenses.mit; From 5ebf4e73e2c868e168e4243ba353a8685d96505d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Jan 2023 16:48:11 -0800 Subject: [PATCH 5/8] python311Packages.webtest-aiohttp: fix tests apply https://github.com/sloria/webtest-aiohttp/pull/7 --- .../python-modules/webtest-aiohttp/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/webtest-aiohttp/default.nix b/pkgs/development/python-modules/webtest-aiohttp/default.nix index 7d736d92862a..bfb30288120e 100644 --- a/pkgs/development/python-modules/webtest-aiohttp/default.nix +++ b/pkgs/development/python-modules/webtest-aiohttp/default.nix @@ -2,6 +2,7 @@ , aiohttp , buildPythonPackage , fetchFromGitHub +, fetchpatch , pytest-aiohttp , pytestCheckHook , pythonOlder @@ -22,6 +23,14 @@ buildPythonPackage rec { sha256 = "sha256-UuAz/k/Tnumupv3ybFR7PkYHwG3kH7M5oobZykEP+ao="; }; + patches = [ + (fetchpatch { + name = "python311-compat.patch"; + url = "https://github.com/sloria/webtest-aiohttp/commit/64e5ab1867ea9ef87901bb2a1a6142566bffc90b.patch"; + hash = "sha256-OKJGajqJLFMkcbGmGfU9G5hCpJaj24Gs363sI0z7YZw="; + }) + ]; + propagatedBuildInputs = [ webtest ]; From d972df3b1a41cf96d2f8f31aa8682bc9bd7a1908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Jan 2023 16:50:06 -0800 Subject: [PATCH 6/8] python310Packages.webtest-aiohttp: add meta.changelog --- pkgs/development/python-modules/webtest-aiohttp/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/webtest-aiohttp/default.nix b/pkgs/development/python-modules/webtest-aiohttp/default.nix index bfb30288120e..34c61524f173 100644 --- a/pkgs/development/python-modules/webtest-aiohttp/default.nix +++ b/pkgs/development/python-modules/webtest-aiohttp/default.nix @@ -46,6 +46,7 @@ buildPythonPackage rec { ]; meta = with lib; { + changelog = "https://github.com/sloria/webtest-aiohttp/blob/${src.rev}/CHANGELOG.rst"; description = "Provides integration of WebTest with aiohttp.web applications"; homepage = "https://github.com/sloria/webtest-aiohttp"; license = licenses.mit; From 460e16d242243dbfb843af2b0a1825e559b392b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 21 Jan 2023 16:24:30 +0100 Subject: [PATCH 7/8] python310Packages.cached-property: fix build for Python 3.11 --- .../cached-property/default.nix | 42 +++++++++++++++---- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/cached-property/default.nix b/pkgs/development/python-modules/cached-property/default.nix index 90cfc63b7626..555b1ce006e7 100644 --- a/pkgs/development/python-modules/cached-property/default.nix +++ b/pkgs/development/python-modules/cached-property/default.nix @@ -1,31 +1,55 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, fetchpatch , pytestCheckHook , freezegun +, pythonOlder }: buildPythonPackage rec { pname = "cached-property"; version = "1.5.2"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "pydanny"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-DGI8FaEjFd2bDeBDKcA0zDCE+5I6meapVNZgycE1gzs="; }; - nativeCheckInputs = [ pytestCheckHook freezegun ]; + patches = [ + # Don't use asyncio.coroutine if it's not available, https://github.com/pydanny/cached-property/pull/267 + (fetchpatch { + name = "asyncio-coroutine.patch"; + url = "https://github.com/pydanny/cached-property/commit/297031687679762849dedeaf24aa3a19116f095b.patch"; + hash = "sha256-qolrUdaX7db4hE125Lt9ICmPNYsD/uBmQrdO4q5NG3c="; + }) + ]; + + checkInputs = [ + pytestCheckHook + freezegun + ]; disabledTests = [ # https://github.com/pydanny/cached-property/issues/131 "test_threads_ttl_expiry" ]; - meta = { + pythonImportsCheck = [ + "cached_property" + ]; + + meta = with lib; { description = "A decorator for caching properties in classes"; homepage = "https://github.com/pydanny/cached-property"; - license = lib.licenses.bsd3; - platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ ericsagnes ]; + changelog = "https://github.com/pydanny/cached-property/releases/tag/${version}"; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ ericsagnes ]; }; } From fe2df4be99ed2ee3c6754662bbbe172215fb37de Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 21 Jan 2023 18:32:59 +0100 Subject: [PATCH 8/8] python311Packages.softlayer: update postPatch --- .../python-modules/softlayer/default.nix | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/softlayer/default.nix b/pkgs/development/python-modules/softlayer/default.nix index abdaf2d59ccf..25bc231b814e 100644 --- a/pkgs/development/python-modules/softlayer/default.nix +++ b/pkgs/development/python-modules/softlayer/default.nix @@ -1,50 +1,52 @@ -{ stdenv -, lib +{ lib +, stdenv , buildPythonPackage , click , fetchFromGitHub , mock +, prettytable , prompt-toolkit , ptable , pygments , pytestCheckHook , pythonOlder , requests +, rich , sphinx , testtools , tkinter , urllib3 -, prettytable -, rich , zeep }: buildPythonPackage rec { pname = "softlayer"; version = "6.1.3"; - disabled = pythonOlder "3.5"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = pname; repo = "softlayer-python"; rev = "refs/tags/v${version}"; - sha256 = "sha256-msNW0PeDbs5iq77FBPKKWH0js/PAQz6xfbM0ycMVg5U="; + hash = "sha256-msNW0PeDbs5iq77FBPKKWH0js/PAQz6xfbM0ycMVg5U="; }; postPatch = '' substituteInPlace setup.py \ - --replace 'rich == 12.3.0' 'rich >= 12.3.0' + --replace "rich ==" "rich >=" ''; propagatedBuildInputs = [ click + prettytable prompt-toolkit ptable pygments requests - urllib3 - prettytable rich + urllib3 ]; nativeCheckInputs = [ @@ -64,14 +66,17 @@ buildPythonPackage rec { disabledTestPaths = [ # Test fails with ConnectionError trying to connect to api.softlayer.com - "tests/transports/soap_tests.py" + "tests/transports/soap_tests.py.unstable" ]; - pythonImportsCheck = [ "SoftLayer" ]; + pythonImportsCheck = [ + "SoftLayer" + ]; meta = with lib; { description = "Python libraries that assist in calling the SoftLayer API"; homepage = "https://github.com/softlayer/softlayer-python"; + changelog = "https://github.com/softlayer/softlayer-python/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ onny ]; };