Unverified Commit affff94d authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

python312Packages.python-lsp-server: 1.12.0 -> 1.12.1 (#379878)

parents d677ad63 e1ab8dba
Loading
Loading
Loading
Loading
+10 −36
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonAtLeast,
  pythonOlder,

  # build-system
  setuptools-scm,
@@ -15,7 +13,6 @@
  python-lsp-jsonrpc,
  setuptools,
  ujson,
  importlib-metadata,

  # optional-dependencies
  autopep8,
@@ -30,7 +27,7 @@
  whatthepatch,
  yapf,

  # checks
  # tests
  flaky,
  matplotlib,
  numpy,
@@ -38,23 +35,20 @@
  pytest-cov-stub,
  pytestCheckHook,
  websockets,

  testers,
  python-lsp-server,
  versionCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "python-lsp-server";
  version = "1.12.0";
  version = "1.12.1";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "python-lsp";
    repo = "python-lsp-server";
    tag = "v${version}";
    hash = "sha256-oFqa7DtFpJmDZrw+GJqrFH3QqnMAu9159q3IWT9vRko=";
    hash = "sha256-1jWui48QmnTw18Dvl24lgxsUkm0/mxyjIZP6+ScjGY4=";
  };

  pythonRelaxDeps = [
@@ -75,7 +69,7 @@ buildPythonPackage rec {
    python-lsp-jsonrpc
    setuptools # `pkg_resources`imported in pylsp/config/config.py
    ujson
  ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
  ];

  optional-dependencies = {
    all = [
@@ -113,42 +107,22 @@ buildPythonPackage rec {
    pandas
    pytest-cov-stub
    pytestCheckHook
    versionCheckHook
    writableTmpDirAsHomeHook
  ] ++ optional-dependencies.all;
  versionCheckProgram = "${placeholder "out"}/bin/pylsp";
  versionCheckProgramArg = [ "--version" ];

  disabledTests = [
    # Don't run lint tests
    "test_pydocstyle"
    # https://github.com/python-lsp/python-lsp-server/issues/243
    # "test_numpy_completions"
    "test_workspace_loads_pycodestyle_config"
    "test_autoimport_code_actions_and_completions_for_notebook_document"
    # avoid dependencies on many Qt things just to run one singular test
    "test_pyqt_completion"
    # https://github.com/python-lsp/python-lsp-server/issues/602
    "test_jedi_completion_with_fuzzy_enabled"
  ];

  preCheck =
    ''
      export HOME=$(mktemp -d);
    ''
    # https://github.com/python-lsp/python-lsp-server/issues/605
    + lib.optionalString (pythonAtLeast "3.13") ''
      substituteInPlace test/conftest.py --replace-fail logging.DEBUG logging.INFO
    '';

  pythonImportsCheck = [
    "pylsp"
    "pylsp.python_lsp"
  ];

  passthru = {
    tests.version = testers.testVersion {
      package = python-lsp-server;
      version = "v${version}";
    };
  };

  meta = {
    description = "Python implementation of the Language Server Protocol";
    homepage = "https://github.com/python-lsp/python-lsp-server";