python310Packages.mistune: 0.8.4 -> 2.0.4

Remove mistune_0_8 because it's insecure.
This commit is contained in:
Robert Schütz 2022-08-12 11:25:56 +00:00 committed by Robert Schütz
parent 9f1da18a1e
commit 243053e521
11 changed files with 41 additions and 52 deletions

View File

@ -123,7 +123,7 @@ in rec {
inherit self;
includeSiteCustomize = true;
});
in self.withPackages (p: [ p.mistune_2_0 ]))
in self.withPackages (p: [ p.mistune ]))
];
options = builtins.toFile "options.json"
(builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));

View File

@ -39,5 +39,7 @@ buildPythonPackage rec {
description = "Markdown to reStructuredText converter";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
# https://github.com/miyakogi/m2r/issues/66
broken = versionAtLeast mistune.version "2";
};
}

View File

@ -1,11 +1,11 @@
{ lib, buildPythonPackage, fetchPypi, mistune_2_0, cjkwrap, wcwidth
{ lib, buildPythonPackage, fetchPypi, mistune, cjkwrap, wcwidth
, pytestCheckHook }:
buildPythonPackage rec {
pname = "md2gemini";
version = "1.9.0";
propagatedBuildInputs = [ mistune_2_0 cjkwrap wcwidth ];
propagatedBuildInputs = [ mistune cjkwrap wcwidth ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "md2gemini" ];

View File

@ -1,27 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, version
, sha256
, format ? "setuptools"
, extraMeta ? {}
}:
buildPythonPackage rec {
inherit version format;
pname = "mistune";
src = fetchPypi {
inherit pname version sha256;
};
buildInputs = [ nose ];
pythonImportsCheck = [ "mistune" ];
meta = with lib; {
description = "The fastest markdown parser in pure Python";
homepage = "https://github.com/lepture/mistune";
license = licenses.bsd3;
} // extraMeta;
}

View File

@ -1,15 +1,30 @@
self: rec {
mistune_0_8 = self.callPackage ./common.nix {
version = "0.8.4";
sha256 = "59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e";
extraMeta = {
knownVulnerabilities = [ "CVE-2022-34749" ];
};
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "mistune";
version = "2.0.4";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "9ee0a66053e2267aba772c71e06891fa8f1af6d4b01d5e84e267b4570d4d9808";
};
mistune_2_0 = self.callPackage ./common.nix {
version = "2.0.4";
sha256 = "sha256-nuCmYFPiJnq6dyxx4GiR+o8a9tSwHV6E4me0Vw1NmAg=";
format = "pyproject";
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "mistune" ];
meta = with lib; {
description = "A sane Markdown parser with useful plugins and renderers";
homepage = "https://github.com/lepture/mistune";
license = licenses.bsd3;
maintainers = with maintainers; [ dotlambda ];
};
mistune = mistune_0_8;
}

View File

@ -24,5 +24,7 @@ buildPythonPackage rec {
description = "Write man pages using Markdown, and convert them to Roff or HTML";
homepage = "https://github.com/refi64/mrkd";
license = licenses.bsd2;
# https://github.com/refi64/mrkd/pull/6
broken = versionAtLeast mistune.version "2";
};
}

View File

@ -14,7 +14,7 @@ python3Packages.buildPythonPackage rec {
pyyaml
pyfiglet
asciimatics
mistune_2_0
mistune
];
pythonImportsCheck = [ "present" ];

View File

@ -50,7 +50,7 @@ buildPythonPackage rec {
django-extensions
djangorestframework
flufl_lock
mistune_2_0
mistune
networkx
psycopg2
python-dateutil

View File

@ -15,8 +15,7 @@ buildPythonApplication rec {
substituteInPlace setup.py \
--replace "click>=7.0,<8.0" "click" \
--replace "wcwidth==0.1.9" "wcwidth" \
--replace "redis>=3.4.0,<4.0.0" "redis" \
--replace "mistune>=2.0,<3.0" "mistune"
--replace "redis>=3.4.0,<4.0.0" "redis"
'';
propagatedBuildInputs = [
@ -24,7 +23,7 @@ buildPythonApplication rec {
click
configobj
importlib-resources
mistune_2_0
mistune
packaging
pendulum
prompt-toolkit

View File

@ -103,6 +103,8 @@ mapAliases ({
mailman = throw "Please use pkgs.mailman"; # added 2022-04-29
mailman-hyperkitty = throw "Please use pkgs.mailmanPackages.mailman-hyperkitty"; # added 2022-04-29
mailman-web = throw "Please use pkgs.mailman-web"; # added 2022-04-29
mistune_0_8 = throw "mistune_0_8 was removed because it was outdated and insecure"; # added 2022-08-12
mistune_2_0 = mistune; # added 2022-08-12
net2grid = gridnet; # add 2022-04-22
nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16
ordereddict = throw "ordereddict has been removed because it is only useful on unsupported python versions."; # added 2022-05-28

View File

@ -5574,11 +5574,7 @@ in {
mistletoe = callPackage ../development/python-modules/mistletoe { };
inherit (import ../development/python-modules/mistune self)
mistune
mistune_0_8
mistune_2_0
;
mistune = callPackage ../development/python-modules/mistune { };
mitmproxy = callPackage ../development/python-modules/mitmproxy { };