Skip to content

Commit

Permalink
python310Packages.mistune: 0.8.4 -> 2.0.4
Browse files Browse the repository at this point in the history
Remove mistune_0_8 because it's insecure.
  • Loading branch information
dotlambda committed Aug 15, 2022
1 parent 9f1da18 commit 243053e
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 52 deletions.
2 changes: 1 addition & 1 deletion nixos/lib/make-options-doc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/m2r/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
}
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/md2gemini/default.nix
Original file line number Diff line number Diff line change
@@ -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" ];

Expand Down
27 changes: 0 additions & 27 deletions pkgs/development/python-modules/mistune/common.nix

This file was deleted.

39 changes: 27 additions & 12 deletions pkgs/development/python-modules/mistune/default.nix
Original file line number Diff line number Diff line change
@@ -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;
}
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/mrkd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
}
2 changes: 1 addition & 1 deletion pkgs/misc/present/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python3Packages.buildPythonPackage rec {
pyyaml
pyfiglet
asciimatics
mistune_2_0
mistune
];

pythonImportsCheck = [ "present" ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/mail/mailman/hyperkitty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ buildPythonPackage rec {
django-extensions
djangorestframework
flufl_lock
mistune_2_0
mistune
networkx
psycopg2
python-dateutil
Expand Down
5 changes: 2 additions & 3 deletions pkgs/tools/admin/iredis/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ 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 = [
pygments
click
configobj
importlib-resources
mistune_2_0
mistune
packaging
pendulum
prompt-toolkit
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand Down

0 comments on commit 243053e

Please sign in to comment.