Unverified Commit 09714939 authored by Theodore Ni's avatar Theodore Ni Committed by GitHub
Browse files

python{27,310}Packages.deprecation: remove unittest2, break on Python 2 (#202236)

parent f241e87c
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchPypi
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, packaging
, python
, pythonAtLeast
, pythonOlder
, unittest2
, unittestCheckHook
}:

@@ -17,7 +15,7 @@ buildPythonPackage rec {
    sha256 = "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj";
  };

  patches = lib.optionals (pythonAtLeast "3.10") [
  patches = [
    # fixes for python 3.10 test suite
    (fetchpatch {
      url = "https://github.com/briancurtin/deprecation/pull/57/commits/e13e23068cb8d653a02a434a159e8b0b7226ffd6.patch";
@@ -28,11 +26,7 @@ buildPythonPackage rec {

  propagatedBuildInputs = [ packaging ];

  # avoiding mass rebuilds for python3.9, but no longer
  # needed with patch
  checkInputs = [ unittestCheckHook ] ++ lib.optionals (pythonOlder "3.10") [
    unittest2
  ];
  checkInputs = [ unittestCheckHook ];

  meta = with lib; {
    description = "A library to handle automated deprecations";