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; 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 ]; }; } 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; 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; 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"; 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 ]; }; diff --git a/pkgs/development/python-modules/webtest-aiohttp/default.nix b/pkgs/development/python-modules/webtest-aiohttp/default.nix index 7d736d92862a..34c61524f173 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 ]; @@ -37,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;