From 1f293528ccc578ecdc7a7b34ebafdb65694ab467 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 24 Mar 2023 18:16:54 +0000 Subject: [PATCH 1/4] python310Packages.opencontainers: init at 0.0.14 Python implementation of Open Containers Initiative (OCI) specifications --- .../python-modules/opencontainers/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/opencontainers/default.nix diff --git a/pkgs/development/python-modules/opencontainers/default.nix b/pkgs/development/python-modules/opencontainers/default.nix new file mode 100644 index 000000000000..5aa376cbc585 --- /dev/null +++ b/pkgs/development/python-modules/opencontainers/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, requests +}: + +buildPythonPackage rec { + pname = "opencontainers"; + version = "0.0.14"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-/eO4CZtWtclWQV34kz4iJ+GRToBaJ3uETy+eUjQXOPI="; + }; + + postPatch = '' + sed -i "/pytest-runner/d" setup.py + ''; + + passthru.optional-dependencies.reggie = [ + requests + ]; + + pythonImportsCheck = [ + "opencontainers" + ]; + + nativeCheckInputs = [ + pytestCheckHook + ] ++ passthru.optional-dependencies.reggie; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python module for oci specifications"; + homepage = "https://github.com/vsoch/oci-python"; + license = licenses.mpl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a63f8797aacc..8a784017465c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6853,6 +6853,8 @@ self: super: with self; { opencensus-context = callPackage ../development/python-modules/opencensus-context { }; + opencontainers = callPackage ../development/python-modules/opencontainers { }; + opencv3 = toPythonModule (pkgs.opencv3.override { enablePython = true; pythonPackages = self; From 18bf35d603d20f31f878b94e236c16022ec6f5c9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 24 Mar 2023 20:00:14 +0000 Subject: [PATCH 2/4] python311Packages.django-redis: Fix tests by ignoring the DeprecationWarning for the cgi module removal in 3.13. --- pkgs/development/python-modules/django-redis/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/django-redis/default.nix b/pkgs/development/python-modules/django-redis/default.nix index 27f7d8d950e7..39c430f1be2a 100644 --- a/pkgs/development/python-modules/django-redis/default.nix +++ b/pkgs/development/python-modules/django-redis/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, pythonAtLeast , pythonOlder , buildPythonPackage @@ -66,6 +67,11 @@ buildPythonPackage { pytestCheckHook ]; + pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [ + # DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 + "-W" "ignore::DeprecationWarning" + ]; + disabledTests = [ # ModuleNotFoundError: No module named 'test_cache_options' "test_custom_key_function" From 93a48d2bf96757bd52c56019f5d2e9692c776030 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 24 Mar 2023 20:05:30 +0000 Subject: [PATCH 3/4] python311Packages.unittest-xml-reporting: Disable failing tests --- .../python-modules/unittest-xml-reporting/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/unittest-xml-reporting/default.nix b/pkgs/development/python-modules/unittest-xml-reporting/default.nix index fb4a3b543ce0..8497d17a5f37 100644 --- a/pkgs/development/python-modules/unittest-xml-reporting/default.nix +++ b/pkgs/development/python-modules/unittest-xml-reporting/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , buildPythonPackage , lxml +, pythonAtLeast , pythonOlder , pytestCheckHook }: @@ -26,6 +27,12 @@ buildPythonPackage rec { pytestCheckHook ]; + pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [ + # AttributeError: 'tuple' object has no attribute 'shortDescription' + "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs" + "--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success" + ]; + pythonImportsCheck = [ "xmlrunner" ]; meta = with lib; { From 5ae746ffbde9b79335a9f796f6a41bf82023b9bf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 20 Apr 2023 20:39:38 +0200 Subject: [PATCH 4/4] python310Packages.sentry-sdk: 1.18.0 -> 1.20.0 https://github.com/getsentry/sentry-python/releases/tag/1.19.0 https://github.com/getsentry/sentry-python/releases/tag/1.19.1 https://github.com/getsentry/sentry-python/releases/tag/1.20.0 --- pkgs/development/python-modules/sentry-sdk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index 34b0524a3a3f..557a77b1f3cd 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -40,7 +40,7 @@ buildPythonPackage rec { pname = "sentry-sdk"; - version = "1.18.0"; + version = "1.20.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -49,7 +49,7 @@ buildPythonPackage rec { owner = "getsentry"; repo = "sentry-python"; rev = "refs/tags/${version}"; - hash = "sha256-4HOJ6ouUU6RqtxYOsnoojT4aQ/h8YzcLHTO8lFZecZw="; + hash = "sha256-fAlEh3S95Dyw1xHK2XaqbA6xUsASXbhzELGZTH/G+kg="; }; propagatedBuildInputs = [