Unverified Commit 4b9c0fa1 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

python3{11,12}Packages.boto: drop (#343727)

parents f9d0bb0d d1a97b0d
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -19,13 +19,13 @@ let
    };

    plugins = ps: _super: with ps; rec {
      nixops-aws = callPackage ./plugins/nixops-aws.nix { };
      nixops-digitalocean = callPackage ./plugins/nixops-digitalocean.nix { };
      nixops-encrypted-links = callPackage ./plugins/nixops-encrypted-links.nix { };
      nixops-hercules-ci = callPackage ./plugins/nixops-hercules-ci.nix { };
      nixops-vbox = callPackage ./plugins/nixops-vbox.nix { };
      nixos-modules-contrib = callPackage ./plugins/nixos-modules-contrib.nix { };

      nixops-aws = throw "nixops-aws was broken and was removed from nixpkgs";
      nixops-gce = throw "nixops-gce was broken and was removed from nixpkgs";
      nixops-libvirtd = throw "nixops-libvirtd was broken and was removed from nixpkgs";
      nixops-hetzner = throw "nixops-hetzner was broken and was removed from nixpkgs";
@@ -42,7 +42,7 @@ let
    selectedPlugins = [];

    # selector is a function mapping pythonPackages to a list of plugins
    # e.g. nixops_unstable.withPlugins (ps: with ps; [ nixops-aws ])
    # e.g. nixops_unstable.withPlugins (ps: with ps; [ nixops-digitalocean ])
    withPlugins = selector:
      this.extend (this: _old: {
        selectedPlugins = selector this.availablePlugins;
@@ -109,8 +109,6 @@ in

  # Not recommended; too fragile.
  nixops_unstable_full = minimal.withPlugins (ps: [
    # currently broken
    # ps.nixops-aws
    ps.nixops-digitalocean
    ps.nixops-encrypted-links
    ps.nixops-hercules-ci
+0 −59
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, boto
, boto3
, nixops
, nixos-modules-contrib
, typing-extensions
}:

buildPythonPackage {
  pname = "nixops-aws";
  version = "1.0.0-unstable-2024-02-29";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "NixOS";
    repo = "nixops-aws";
    rev = "d173b2f14ec767d782ceab45fb22b32fe3b5a1f7";
    hash = "sha256-ocTtc7POt1bugb9Bki2ew2Eh5uc933GftNw1twoOJsc=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
    --replace poetry.masonry.api poetry.core.masonry.api \
    --replace "poetry>=" "poetry-core>="
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    nixops
  ];

  propagatedBuildInputs = [
    boto
    boto3
    nixos-modules-contrib
    typing-extensions
  ];

  pythonImportsCheck = [ "nixops_aws" ];

  passthru.updateScript = unstableGitUpdater {
    tagPrefix = "v";
  };

  meta = with lib; {
    description = "AWS plugin for NixOps";
    homepage = "https://github.com/NixOS/nixops-aws";
    license = licenses.lgpl3Only;
    broken = true; # fails with `nose-1.3.7 not supported for interpreter python3.12`
    maintainers = nixops.meta.maintainers;
  };
}
+0 −90
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, python3
, rsync
}:

python3.pkgs.buildPythonApplication rec {
  pname = "toil";
  version = "5.12.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "DataBiosphere";
    repo = pname;
    rev = "refs/tags/releases/${version}";
    hash = "sha256-cTpbQo9tPZifUO59vbnIa3XUinFJ2/5Slfe4yszglFM=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    addict
    dill
    docker
    enlighten
    psutil
    py-tes
    pypubsub
    python-dateutil
    pytz
    pyyaml
    requests
    typing-extensions
  ];

  nativeCheckInputs = [
    rsync
  ] ++ (with python3.pkgs; [
    boto
    botocore
    flask
    pytestCheckHook
    stubserver
  ]);

  pytestFlagsArray = [
    "src/toil/test"
  ];

  pythonImportsCheck = [
    "toil"
  ];

  disabledTestPaths = [
    # Tests are reaching their timeout
    "src/toil/test/docs/scriptsTest.py"
    "src/toil/test/jobStores/jobStoreTest.py"
    "src/toil/test/provisioners/aws/awsProvisionerTest.py"
    "src/toil/test/src"
    "src/toil/test/wdl"
    "src/toil/test/utils/utilsTest.py"
    "src/toil/test/cwl/cwlTest.py"
    "src/toil/test/lib/test_ec2.py"
    "src/toil/test/lib/aws/test_iam.py"
    "src/toil/test/lib/aws/test_s3.py"
  ];

  disabledTests = [
    # Tests fail starting with 5.7.1
    "testServices"
    "testConcurrencyWithDisk"
    "testJobConcurrency"
    "testNestedResourcesDoNotBlock"
    "test_omp_threads"
    "testFileSingle"
    "testFileSingle10000"
    "testFileSingleCheckpoints"
    "testFileSingleNonCaching"
    "testFetchJobStoreFiles"
    "testFetchJobStoreFilesWSymlinks"
    "testJobStoreContents"
    "test_cwl_on_arm"
    "test_cwl_toil_kill"
  ];

  meta = with lib; {
    description = "Workflow engine written in pure Python";
    homepage = "https://toil.ucsc-cgl.org/";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ veprbl ];
  };
}
+0 −21
Original line number Diff line number Diff line
From: Jochen Sprickerhof <jspricke@debian.org>
Date: Thu, 15 Dec 2022 07:44:54 +0100
Subject: Don't mock list subclass

---
 tests/unit/ec2/test_volume.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/unit/ec2/test_volume.py b/tests/unit/ec2/test_volume.py
index 81d7f55..d4d8e4f 100644
--- a/tests/unit/ec2/test_volume.py
+++ b/tests/unit/ec2/test_volume.py
@@ -55,7 +55,7 @@ class VolumeTests(unittest.TestCase):
     @mock.patch("boto.resultset.ResultSet")
     def test_startElement_with_name_tagSet_calls_ResultSet(self, ResultSet, startElement):
         startElement.return_value = None
-        result_set = mock.Mock(ResultSet([("item", Tag)]))
+        result_set = ResultSet([("item", Tag)])
         volume = Volume()
         volume.tags = result_set
         retval = volume.startElement("tagSet", None, None)
+0 −53
Original line number Diff line number Diff line
Index: python-boto/tests/unit/utils/test_utils.py
===================================================================
--- python-boto.orig/tests/unit/utils/test_utils.py
+++ python-boto/tests/unit/utils/test_utils.py
@@ -85,7 +85,7 @@ class TestPassword(unittest.TestCase):
         def hmac_hashfunc(cls, msg):
             if not isinstance(msg, bytes):
                 msg = msg.encode('utf-8')
-            return hmac.new(b'mysecretkey', msg)
+            return hmac.new(b'mysecretkey', msg, digestmod='sha256')

         class HMACPassword(Password):
             hashfunc = hmac_hashfunc
@@ -95,15 +95,15 @@ class TestPassword(unittest.TestCase):
         password.set('foo')

         self.assertEquals(str(password),
-                          hmac.new(b'mysecretkey', b'foo').hexdigest())
+                          hmac.new(b'mysecretkey', b'foo', digestmod='sha256').hexdigest())

     def test_constructor(self):
-        hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg)
+        hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg, digestmod='sha256')

         password = Password(hashfunc=hmac_hashfunc)
         password.set('foo')
         self.assertEquals(password.str,
-                          hmac.new(b'mysecretkey', b'foo').hexdigest())
+                          hmac.new(b'mysecretkey', b'foo', digestmod='sha256').hexdigest())


 class TestPythonizeName(unittest.TestCase):
Index: python-boto/boto/ecs/item.py
===================================================================
--- python-boto.orig/boto/ecs/item.py
+++ python-boto/boto/ecs/item.py
@@ -22,6 +22,7 @@

 import xml.sax
 import cgi
+from html import escape
 from boto.compat import six, StringIO

 class ResponseGroup(xml.sax.ContentHandler):
@@ -67,7 +68,7 @@ class ResponseGroup(xml.sax.ContentHandl
         return None

     def endElement(self, name, value, connection):
-        self._xml.write("%s</%s>" % (cgi.escape(value).replace("&amp;amp;", "&amp;"), name))
+        self._xml.write("%s</%s>" % (escape(value).replace("&amp;amp;", "&amp;"), name))
         if len(self._nodepath) == 0:
             return
         obj = None
Loading