Unverified Commit ec8f9ee3 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #299213 from fabaff/querystring-parser-bump

python312Packages.querystring-parser: refactor
parents 0077febe 3882105d
Loading
Loading
Loading
Loading
+67 −50
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, git
, python3
{
  lib,
  fetchFromGitHub,
  git,
  python3,
}:

python3.pkgs.buildPythonApplication rec {
let
  python = python3.override { packageOverrides = self: super: { pydantic = super.pydantic_1; }; };
in
python.pkgs.buildPythonApplication rec {
  pname = "dbx";
  version = "0.8.18";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "databrickslabs";
@@ -17,19 +20,21 @@ python3.pkgs.buildPythonApplication rec {
  };

  pythonRelaxDeps = [
    "cryptography"
    "databricks-cli"
    "rich"
    "typer"
  ];

  pythonRemoveDeps = [
    "mlflow-skinny"
  ];
  pythonRemoveDeps = [ "mlflow-skinny" ];

  nativeBuildInputs = with python3.pkgs; [
    pythonRelaxDepsHook
  ];
  build-system = with python.pkgs; [ setuptools ];

  nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ];

  propagatedBuildInputs = with python3.pkgs; [
  propagatedBuildInputs =
    with python.pkgs;
    [
      aiohttp
      click
      cookiecutter
@@ -46,24 +51,21 @@ python3.pkgs.buildPythonApplication rec {
      tenacity
      typer
      watchdog
  ] ++ typer.optional-dependencies.all;
    ]
    ++ typer.optional-dependencies.all;

  passthru.optional-dependencies = with python3.pkgs; {
    aws = [
      boto3
    ];
    aws = [ boto3 ];
    azure = [
      azure-storage-blob
      azure-identity
    ];
    gcp = [
      google-cloud-storage
    ];
    gcp = [ google-cloud-storage ];
  };

  nativeCheckInputs = [
    git
  ] ++ (with python3.pkgs; [
  nativeCheckInputs =
    [ git ]
    ++ (with python3.pkgs; [
      pytest-asyncio
      pytest-mock
      pytest-timeout
@@ -75,9 +77,7 @@ python3.pkgs.buildPythonApplication rec {
    export PATH="$PATH:$out/bin"
  '';

  pytestFlagsArray = [
    "tests/unit"
  ];
  pytestFlagsArray = [ "tests/unit" ];

  disabledTests = [
    # Fails because of dbfs CLI wrong call
@@ -87,10 +87,27 @@ python3.pkgs.buildPythonApplication rec {
    "test_python_basic_sanity_check"
  ];

  pythonImportsCheck = [
    "dbx"
  disabledTestPaths = [
    "tests/unit/api/"
    "tests/unit/api/test_build.py"
    "tests/unit/api/test_destroyer.py"
    "tests/unit/api/test_jinja.py"
    "tests/unit/commands/test_configure.py"
    "tests/unit/commands/test_deploy_jinja_variables_file.py"
    "tests/unit/commands/test_deploy.py"
    "tests/unit/commands/test_destroy.py"
    "tests/unit/commands/test_execute.py"
    "tests/unit/commands/test_help.py"
    "tests/unit/commands/test_launch.py"
    "tests/unit/models/test_deployment.py"
    "tests/unit/models/test_destroyer.py"
    "tests/unit/models/test_task.py"
    "tests/unit/sync/test_commands.py"
    "tests/unit/utils/test_common.py"
  ];

  pythonImportsCheck = [ "dbx" ];

  meta = with lib; {
    description = "CLI tool for advanced Databricks jobs management";
    homepage = "https://github.com/databrickslabs/dbx";
+23 −4
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchPypi}:
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pytestCheckHook,
  pythonAtLeast,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "gorilla";
  version = "0.4.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "005ab8853b037162a7c77bb824604c6e081878ee03c09ad01ef41744856019d3";
    hash = "sha256-AFq4hTsDcWKnx3u4JGBMbggYeO4DwJrQHvQXRIVgGdM=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "gorilla" ];

  disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_find_patches_2" ];

  meta = with lib; {
    homepage = "https://github.com/christophercrouzet/gorilla";
    description = "Convenient approach to monkey patching";
    homepage = "https://github.com/christophercrouzet/gorilla";
    changelog = "https://github.com/christophercrouzet/gorilla/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ tbenst ];
  };
+40 −33
Original line number Diff line number Diff line
{ lib
, addict
, buildPythonPackage
, coverage
, fetchFromGitHub
, lmdb
, matplotlib
, mlflow
, numpy
, opencv4
, parameterized
, pytestCheckHook
, pythonOlder
, pyyaml
, rich
, termcolor
, torch
, yapf
{
  lib,
  addict,
  buildPythonPackage,
  coverage,
  fetchFromGitHub,
  lmdb,
  matplotlib,
  mlflow,
  numpy,
  opencv4,
  parameterized,
  pytestCheckHook,
  pythonOlder,
  pyyaml,
  rich,
  setuptools,
  termcolor,
  torch,
  yapf,
}:

buildPythonPackage rec {
@@ -32,7 +34,9 @@ buildPythonPackage rec {
    hash = "sha256-fKtPDdeKB3vX2mD+Tsicq8KOkPDSACzKK1XLyugdPQ4=";
  };

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  dependencies = [
    addict
    matplotlib
    numpy
@@ -47,12 +51,13 @@ buildPythonPackage rec {
    coverage
    lmdb
    mlflow
    torch
    parameterized
    pytestCheckHook
    torch
  ];

  preCheck = ''
  preCheck =
    ''
      export HOME=$TMPDIR
    ''
    # Otherwise, the backprop hangs forever. More precisely, this exact line:
@@ -62,9 +67,7 @@ buildPythonPackage rec {
      export MKL_NUM_THREADS=1
    '';

  pythonImportsCheck = [
    "mmengine"
  ];
  pythonImportsCheck = [ "mmengine" ];

  disabledTestPaths = [
    # AttributeError
@@ -87,7 +90,6 @@ buildPythonPackage rec {
    "test_lazy_import"
    # AssertionError
    "test_lazy_module"

    # Require unpackaged aim
    "test_experiment"
    "test_add_config"
@@ -97,6 +99,11 @@ buildPythonPackage rec {
    "test_close"
  ];

  pytestFlagsArray = [
    "-W"
    "ignore::pytest.PytestRemovedIn8Warning"
  ];

  meta = with lib; {
    description = "Library for training deep learning models based on PyTorch";
    homepage = "https://github.com/open-mmlab/mmengine";
+21 −11
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchPypi, python, isPy27
, six
{
  lib,
  buildPythonPackage,
  fetchPypi,
  python,
  pythonOlder,
  setuptools,
  six,
}:

buildPythonPackage rec {
  pname = "querystring-parser";
  version = "1.2.4";
  disabled = isPy27;
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    pname = "querystring_parser";
    inherit version;
    sha256 = "644fce1cffe0530453b43a83a38094dbe422ccba8c9b2f2a1c00280e14ca8a62";
    hash = "sha256-ZE/OHP/gUwRTtDqDo4CU2+QizLqMmy8qHAAoDhTKimI=";
  };

  propagatedBuildInputs = [
    six
  ];
  build-system = [ setuptools ];

  dependencies = [ six ];

  # https://github.com/bernii/querystring-parser/issues/35
  doCheck = false;

  checkPhase = "${python.interpreter} querystring_parser/tests.py -k 'not test_parse_normalized'";
  # one test fails due to https://github.com/bernii/querystring-parser/issues/35
  doCheck = true;
  pythonImportsCheck = [ "querystring_parser" ];

  meta = with lib; {
    description = "Module to handle nested dictionaries";
    homepage = "https://github.com/bernii/querystring-parser";
    description = "QueryString parser for Python/Django that correctly handles nested dictionaries";
    changelog = "https://github.com/bernii/querystring-parser/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ tbenst ];
  };