Unverified Commit a6de1790 authored by Emily's avatar Emily Committed by GitHub
Browse files

python3Packages.js2py: remove (#349550)

parents b1b0ce00 0f79dd41
Loading
Loading
Loading
Loading
+17 −19
Original line number Diff line number Diff line
@@ -30,13 +30,12 @@ python3.pkgs.buildPythonApplication rec {
    sed -i -E 's/([A-z0-9]*)~=[^;]*(.*)/\1\2/' setup.cfg
  '';

  dependencies =
    with python3.pkgs;
    [
  dependencies = with python3.pkgs; [
    bitmath
    certifi
    cheroot
    cryptography
    dukpy
    filetype
    flask
    flask-babel
@@ -47,8 +46,7 @@ python3.pkgs.buildPythonApplication rec {
    pycurl
    semver
    setuptools
    ]
    ++ (if pythonOlder "3.12" then [ js2py ] else [ dukpy ]);
  ];

  optional-dependencies = {
    plugins = with python3.pkgs; [
+3 −2
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
  django,
  packaging,
  nodejs,
  js2py,
  six,
}:

@@ -25,9 +24,11 @@ buildPythonPackage rec {

  propagatedBuildInputs = [ django ] ++ lib.optionals (pythonAtLeast "3.7") [ packaging ];

  # Js2py is needed for tests but it's unmaintained and insecure
  doCheck = false;

  nativeCheckInputs = [
    nodejs
    js2py
    six
  ];

+0 −47
Original line number Diff line number Diff line
{
  lib,
  fetchPypi,
  buildPythonPackage,
  pythonAtLeast,
  setuptools,
  tzlocal,
  six,
  pyjsparser,
}:

buildPythonPackage rec {
  pname = "js2py";
  version = "0.74";
  pyproject = true;

  # broken with Python 3.12
  # https://github.com/PiotrDabkowski/Js2Py/issues/317
  disabled = pythonAtLeast "3.12";

  src = fetchPypi {
    pname = "Js2Py";
    inherit version;
    hash = "sha256-OfOmqoRpGA77o8hncnHfJ8MTMv0bRx3xryr1i4e4ly8=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    pyjsparser
    six
    tzlocal
  ];

  # Test require network connection
  doCheck = false;

  pythonImportsCheck = [ "js2py" ];

  meta = with lib; {
    description = "JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python";
    homepage = "https://github.com/PiotrDabkowski/Js2Py";
    license = licenses.mit;
    maintainers = with maintainers; [ onny ];
    knownVulnerabilities = [ "CVE-2024-28397" ];
  };
}
+3 −2
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
  grpcio,
  ipython,
  ipywidgets,
  js2py,
  matplotlib,
  numpy,
  pandas,
@@ -69,7 +68,6 @@ buildPythonPackage rec {
    grpcio
    ipython
    ipywidgets
    js2py
    matplotlib
    numpy
    pandas
@@ -101,6 +99,9 @@ buildPythonPackage rec {
    "src/tests/test_plot.py"
    "src/tests/test_magic.py"
    "src/tests/test_magic_plot.py"

    # require js2py (which is unmaintained and insecure)
    "src/tests/test_widget.py"
  ];

  preCheck = ''
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ buildPythonPackage rec {
    "lark.grammars"
  ];

  # Js2py is needed for tests but it's marked as insecure
  # Js2py is needed for tests but it's unmaintained and insecure
  doCheck = false;

  meta = with lib; {
Loading