diff --git a/pkgs/by-name/pa/paperless-ngx/package.nix b/pkgs/by-name/pa/paperless-ngx/package.nix index 8f6a53ea7034..93fb9c165ce2 100644 --- a/pkgs/by-name/pa/paperless-ngx/package.nix +++ b/pkgs/by-name/pa/paperless-ngx/package.nix @@ -8,7 +8,7 @@ nixosTests, gettext, # tests fail and eventually lock up on 3.14 - python313, + python313Packages, ghostscript_headless, imagemagickBig, jbig2enc, @@ -42,27 +42,12 @@ let # tesseract5 may be overwritten in the paperless module and we need to propagate that to make the closure reduction effective ocrmypdf = prev.ocrmypdf_16.override { tesseract = tesseract5; }; - - # these are broken on 3.13 - google-cloud-firestore = null; - google-cloud-iam = null; - google-cloud-kms = null; - google-cloud-monitoring = null; - google-cloud-pubsub = null; - google-cloud-storage = null; - - # these depend on google-cloud stuff in tests - celery = prev.celery.overridePythonAttrs { doCheck = false; }; - kombu = prev.kombu.overridePythonAttrs { doCheck = false; }; }; - python = python313.override { - self = python; - packageOverrides = lib.composeManyExtensions [ - defaultPythonPackageOverrides - extraPythonPackageOverrides - ]; - }; + pythonPackages = python313Packages.overrideScope ( + final: prev: + lib.composeManyExtensions [ defaultPythonPackageOverrides extraPythonPackageOverrides ] final prev + ); path = lib.makeBinPath [ ghostscript_headless @@ -84,7 +69,7 @@ let ]; }; in -python.pkgs.buildPythonApplication (finalAttrs: { +pythonPackages.buildPythonApplication (finalAttrs: { pname = "paperless-ngx"; pyproject = true; @@ -116,7 +101,7 @@ python.pkgs.buildPythonApplication (finalAttrs: { --replace-fail '--maxprocesses=16' "--numprocesses=$NIX_BUILD_CORES" ''; - build-system = [ python.pkgs.setuptools ]; + build-system = [ pythonPackages.setuptools ]; nativeBuildInputs = [ gettext @@ -141,7 +126,7 @@ python.pkgs.buildPythonApplication (finalAttrs: { ]; dependencies = - with python.pkgs; + with pythonPackages; [ babel bleach @@ -207,18 +192,18 @@ python.pkgs.buildPythonApplication (finalAttrs: { postBuild = '' # Compile manually because `pythonRecompileBytecodeHook` only works # for files in `python.sitePackages` - ${python.pythonOnBuildForHost.interpreter} -OO -m compileall src + ${pythonPackages.python.pythonOnBuildForHost.interpreter} -OO -m compileall src # Collect static files - ${python.pythonOnBuildForHost.interpreter} src/manage.py collectstatic --clear --no-input + ${pythonPackages.python.pythonOnBuildForHost.interpreter} src/manage.py collectstatic --clear --no-input # Compile string translations using gettext - ${python.pythonOnBuildForHost.interpreter} src/manage.py compilemessages + ${pythonPackages.python.pythonOnBuildForHost.interpreter} src/manage.py compilemessages ''; installPhase = let - pythonPath = python.pkgs.makePythonPath finalAttrs.passthru.dependencies; + pythonPath = pythonPackages.makePythonPath finalAttrs.passthru.dependencies; in '' runHook preInstall @@ -230,7 +215,7 @@ python.pkgs.buildPythonApplication (finalAttrs: { makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \ --prefix PYTHONPATH : "${pythonPath}" \ --prefix PATH : "${path}" - makeWrapper ${lib.getExe python.pkgs.celery} $out/bin/celery \ + makeWrapper ${lib.getExe pythonPackages.celery} $out/bin/celery \ --prefix PYTHONPATH : "${pythonPath}:$out/lib/paperless-ngx/src" \ --prefix PATH : "${path}" @@ -242,7 +227,7 @@ python.pkgs.buildPythonApplication (finalAttrs: { find $out/lib/paperless-ngx -type d -name tests -exec rm -rv {} + ''; - nativeCheckInputs = with python.pkgs; [ + nativeCheckInputs = with pythonPackages; [ daphne factory-boy imagehash @@ -310,9 +295,9 @@ python.pkgs.buildPythonApplication (finalAttrs: { inherit nltkDataDir path - python tesseract5 ; + inherit (pythonPackages) python; tests = { inherit (nixosTests) paperless; }; updateScript = nix-update-script { extraArgs = [ diff --git a/pkgs/by-name/pr/pretix/package.nix b/pkgs/by-name/pr/pretix/package.nix index 22f3855b68e9..b16dc8903405 100644 --- a/pkgs/by-name/pr/pretix/package.nix +++ b/pkgs/by-name/pr/pretix/package.nix @@ -17,6 +17,7 @@ let python = python3.override { self = python; packageOverrides = self: super: { + chardet = super.chardet_5; django = super.django_5; django-oauth-toolkit = super.django-oauth-toolkit.overridePythonAttrs (oldAttrs: rec { diff --git a/pkgs/development/python-modules/anyio/default.nix b/pkgs/development/python-modules/anyio/default.nix index 2337ee8f6c8b..2aa45bf41a62 100644 --- a/pkgs/development/python-modules/anyio/default.nix +++ b/pkgs/development/python-modules/anyio/default.nix @@ -32,14 +32,14 @@ buildPythonPackage rec { pname = "anyio"; - version = "4.14.0"; + version = "4.14.1"; pyproject = true; src = fetchFromGitHub { owner = "agronholm"; repo = "anyio"; tag = version; - hash = "sha256-g+2d/j3ke+RjwIYq0JyFfYxg80QXrura9Dsx7cQyMIQ="; + hash = "sha256-LPNRNb1RuSVQqsI6aAAiYWC2c2CZAhFS67XW9OfbIiE="; }; build-system = [ setuptools-scm ]; @@ -91,6 +91,7 @@ buildPythonPackage rec { "test_nonexistent_main_module" # 3 second timeout expired "test_keyboardinterrupt_during_test" + "test_dynamic_async_fixture_access_does_not_hang" # racy with high thread count, see https://github.com/NixOS/nixpkgs/issues/448125 "test_multiple_threads" diff --git a/pkgs/development/python-modules/chardet/5.nix b/pkgs/development/python-modules/chardet/5.nix new file mode 100644 index 000000000000..50959e4753fd --- /dev/null +++ b/pkgs/development/python-modules/chardet/5.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + hypothesis, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "chardet"; + version = "5.2.0"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchPypi { + inherit (finalAttrs) pname version; + hash = "sha256-Gztv9HmoxBS8P6LAhSmVaVxKAm3NbQYzst0JLKOcHPc="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; + + disabledTests = [ + # flaky; https://github.com/chardet/chardet/issues/256 + "test_detect_all_and_detect_one_should_agree" + ]; + + pythonImportsCheck = [ "chardet" ]; + + meta = { + changelog = "https://github.com/chardet/chardet/releases/tag/${finalAttrs.version}"; + description = "Universal encoding detector"; + mainProgram = "chardetect"; + homepage = "https://github.com/chardet/chardet"; + license = lib.licenses.lgpl21Plus; + maintainers = [ ]; + }; +}) diff --git a/pkgs/development/python-modules/db-dtypes/default.nix b/pkgs/development/python-modules/db-dtypes/default.nix index c2bb9a49595a..4393f725aafe 100644 --- a/pkgs/development/python-modules/db-dtypes/default.nix +++ b/pkgs/development/python-modules/db-dtypes/default.nix @@ -45,6 +45,10 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pytestCheckHook ]; + pytestFlags = [ + "-Wignore::DeprecationWarning" + ]; + pythonImportsCheck = [ "db_dtypes" ]; meta = { diff --git a/pkgs/development/python-modules/django-compressor/default.nix b/pkgs/development/python-modules/django-compressor/default.nix index eedf03e28863..6e1686fe0b8b 100644 --- a/pkgs/development/python-modules/django-compressor/default.nix +++ b/pkgs/development/python-modules/django-compressor/default.nix @@ -15,7 +15,6 @@ # tests beautifulsoup4, brotli, - calmjs, csscompressor, django-sekizai, jinja2, @@ -52,7 +51,6 @@ buildPythonPackage rec { nativeCheckInputs = [ beautifulsoup4 brotli - calmjs csscompressor django-sekizai jinja2 @@ -68,6 +66,8 @@ buildPythonPackage rec { disabledTests = [ # we set mtime to 1980-01-02 "test_css_mtimes" + # calmjs removed from test deps, because it requires pkg_resources at runtime + "test_calmjs_filter" ]; pythonImportsCheck = [ "compressor" ]; diff --git a/pkgs/development/python-modules/django-q2/default.nix b/pkgs/development/python-modules/django-q2/default.nix index e5ebe7e58eda..f114e4a24eb7 100644 --- a/pkgs/development/python-modules/django-q2/default.nix +++ b/pkgs/development/python-modules/django-q2/default.nix @@ -19,14 +19,14 @@ buildPythonPackage rec { pname = "django-q2"; - version = "1.9.0"; + version = "1.10.0"; pyproject = true; src = fetchFromGitHub { owner = "django-q2"; repo = "django-q2"; tag = "v${version}"; - hash = "sha256-xqRm9vv/lD9HLX+ekdPgIGGwr5H7QZBATPx0CCjQAmw="; + hash = "sha256-VwB3pvDAGsMvcKblRnmCYHzvEBCz8E13Qov4LjWEqxc="; }; build-system = [ @@ -74,6 +74,9 @@ buildPythonPackage rec { disabledTestPaths = [ "django_q/tests/test_commands.py" + # assert 0 == 1 where 0 = .reincarnations + "django_q/tests/test_cluster.py::test_recycle" + "django_q/tests/test_cluster.py::test_max_rss" ]; pytestFlags = [ "-vv" ]; diff --git a/pkgs/development/python-modules/encutils/chardet6-compat.patch b/pkgs/development/python-modules/encutils/chardet6-compat.patch new file mode 100644 index 000000000000..11730056e5c9 --- /dev/null +++ b/pkgs/development/python-modules/encutils/chardet6-compat.patch @@ -0,0 +1,79 @@ +diff --git a/encutils/__init__.py b/encutils/__init__.py +index 02922be..8a85574 100644 +--- a/encutils/__init__.py ++++ b/encutils/__init__.py +@@ -442,7 +442,7 @@ def tryEncodings(text, log=None): # noqa: C901 + + encoding = chardet.detect(text)["encoding"] + +- except ImportError: ++ except (ImportError, AttributeError): + msg = 'Using simplified encoding detection, you might want to install chardet.' + if log: + log.warn(msg) +encutils-1.0.0 on  main [!] is 📦 v1.0.0 via 🐍 v3.13.13 +❯ hx encutils/__init__.py +encutils-1.0.0 on  main [!] is 📦 v1.0.0 via 🐍 v3.13.13 took 59s +❯ git diff +diff --git a/encutils/__init__.py b/encutils/__init__.py +index 02922be..100e06e 100644 +--- a/encutils/__init__.py ++++ b/encutils/__init__.py +@@ -441,6 +441,8 @@ def tryEncodings(text, log=None): # noqa: C901 + import chardet + + encoding = chardet.detect(text)["encoding"] ++ if encoding is not None: ++ return encoding + + except ImportError: + msg = 'Using simplified encoding detection, you might want to install chardet.' +@@ -449,27 +451,27 @@ def tryEncodings(text, log=None): # noqa: C901 + else: + print(msg) + +- encodings = ( +- 'ascii', +- 'iso-8859-1', +- # 'windows-1252', # test later +- 'utf-8', +- ) +- encoding = None +- for e in encodings: +- try: +- text.decode(e) +- except UnicodeDecodeError: +- pass +- else: +- if 'iso-8859-1' == e: +- try: +- if '€' in text.decode('windows-1252'): +- return 'windows-1252' +- except UnicodeDecodeError: +- pass +- +- return e ++ encodings = ( ++ 'ascii', ++ 'iso-8859-1', ++ # 'windows-1252', # test later ++ 'utf-8', ++ ) ++ encoding = None ++ for e in encodings: ++ try: ++ text.decode(e) ++ except UnicodeDecodeError: ++ pass ++ else: ++ if 'iso-8859-1' == e: ++ try: ++ if '€' in text.decode('windows-1252'): ++ return 'windows-1252' ++ except UnicodeDecodeError: ++ pass ++ ++ return e + + return encoding + diff --git a/pkgs/development/python-modules/encutils/default.nix b/pkgs/development/python-modules/encutils/default.nix index 37f91db5a007..84b77e0f840e 100644 --- a/pkgs/development/python-modules/encutils/default.nix +++ b/pkgs/development/python-modules/encutils/default.nix @@ -18,6 +18,9 @@ buildPythonPackage (finalAttrs: { hash = "sha256-OOylrxjOur2L5DwX8UydP7uoPMX3rI46schuJMSyuRo="; }; + # expect chardet.detect to return None + patches = [ ./chardet6-compat.patch ]; + build-system = [ flit-core ]; dependencies = [ diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 886b6ecccd7c..e7c8a426fae7 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -126,7 +126,7 @@ buildPythonPackage rec { disabledTestPaths = [ # Don't test docs and examples "docs_src" - "tests/test_tutorial/test_sql_databases" + "tests/test_tutorial" # Infinite recursion with strawberry-graphql "tests/test_tutorial/test_graphql/test_tutorial001.py" ]; diff --git a/pkgs/development/python-modules/fastmcp/default.nix b/pkgs/development/python-modules/fastmcp/default.nix index 3879e40bb830..43f7c474f2dc 100644 --- a/pkgs/development/python-modules/fastmcp/default.nix +++ b/pkgs/development/python-modules/fastmcp/default.nix @@ -114,6 +114,11 @@ buildPythonPackage (finalAttrs: { "test_multi_server" "test_server_starts_without_auth" "test_canonical_multi_client_with_transforms" + + # RuntimeError: Attempted to exit a cancel scope that isn't the current tasks's current cancel scope + "test_stateful_proxy" + "test_concurrent_log_requests_no_mixing" + "test_multi_proxies_no_mixing" ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ # floating point error diff --git a/pkgs/development/python-modules/flatdict/default.nix b/pkgs/development/python-modules/flatdict/default.nix index 93d495a6de6c..7cf444e08893 100644 --- a/pkgs/development/python-modules/flatdict/default.nix +++ b/pkgs/development/python-modules/flatdict/default.nix @@ -2,20 +2,27 @@ lib, buildPythonPackage, fetchFromGitHub, + hatchling, + hatch-vcs, }: buildPythonPackage rec { pname = "flatdict"; - version = "4.0.1"; - format = "setuptools"; + version = "4.1.0"; + pyproject = true; src = fetchFromGitHub { owner = "gmr"; repo = "flatdict"; - rev = version; - hash = "sha256-CWsTiCNdIKSQtjpQC07lhZoU1hXT/MGpXdj649x2GlU="; + tag = version; + hash = "sha256-sLeW92F473H90+EMHaIWPt9ETqSeL/DoLmlMAg9Thj4="; }; + build-system = [ + hatchling + hatch-vcs + ]; + pythonImportsCheck = [ "flatdict" ]; meta = { diff --git a/pkgs/development/python-modules/genshi/default.nix b/pkgs/development/python-modules/genshi/default.nix index 1dee12d5bb70..7531c484cc15 100644 --- a/pkgs/development/python-modules/genshi/default.nix +++ b/pkgs/development/python-modules/genshi/default.nix @@ -2,7 +2,7 @@ lib, buildPythonPackage, fetchPypi, - setuptools, + setuptools_80, pytestCheckHook, }: @@ -16,7 +16,7 @@ buildPythonPackage rec { hash = "sha256-hbDbETYlMU8PRPP+bvDrJWTWw03S7lZ3tJXRUUK7SXM="; }; - build-system = [ setuptools ]; + build-system = [ setuptools_80 ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/google-cloud-artifact-registry/default.nix b/pkgs/development/python-modules/google-cloud-artifact-registry/default.nix index 6ecf3a920149..e10f2d5e3850 100644 --- a/pkgs/development/python-modules/google-cloud-artifact-registry/default.nix +++ b/pkgs/development/python-modules/google-cloud-artifact-registry/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "google-cloud-artifact-registry"; - version = "1.19.0"; + version = "1.22.0"; pyproject = true; src = fetchPypi { pname = "google_cloud_artifact_registry"; inherit version; - hash = "sha256-QVAy29BzPd9EO4RDKo3kiZqktupkGWDJjd8v6x10mpE="; + hash = "sha256-DoFzqXrmld/PAsgyd6D9V04aOb5AnaY0W5Rb6+V3rZQ="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/google-cloud-asset/default.nix b/pkgs/development/python-modules/google-cloud-asset/default.nix index f1be9e6ea0b4..9e8c9995c8fb 100644 --- a/pkgs/development/python-modules/google-cloud-asset/default.nix +++ b/pkgs/development/python-modules/google-cloud-asset/default.nix @@ -20,14 +20,14 @@ buildPythonPackage (finalAttrs: { pname = "google-cloud-asset"; - version = "4.2.0"; + version = "4.4.0"; pyproject = true; src = fetchFromGitHub { owner = "googleapis"; repo = "google-cloud-python"; tag = "google-cloud-asset-v${finalAttrs.version}"; - sha256 = "sha256-dVgcnnInqjUjySL7wjxGzI33t1YZJ8e9mSsmjAJ+fBI="; + sha256 = "sha256-M/7uDWWz4YCfxa4gyM9BaAo10iyTMvtR2MhNpdFYnis="; }; sourceRoot = "${finalAttrs.src.name}/packages/google-cloud-asset"; diff --git a/pkgs/development/python-modules/google-cloud-dlp/default.nix b/pkgs/development/python-modules/google-cloud-dlp/default.nix index 4d6e46b35c30..cee8ca896753 100644 --- a/pkgs/development/python-modules/google-cloud-dlp/default.nix +++ b/pkgs/development/python-modules/google-cloud-dlp/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "google-cloud-dlp"; - version = "3.34.0"; + version = "3.38.0"; pyproject = true; src = fetchPypi { pname = "google_cloud_dlp"; inherit version; - hash = "sha256-bfoxclINWn+ozM5HqWIs3oFfA3tKpvttaZhP1Ze/gAc="; + hash = "sha256-BcdlhL62CzBcE9xRMhp9Aebj7DHd8QXxjVDy+DT3toQ="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/google-cloud-firestore/default.nix b/pkgs/development/python-modules/google-cloud-firestore/default.nix index 072ba065326f..86f06063126e 100644 --- a/pkgs/development/python-modules/google-cloud-firestore/default.nix +++ b/pkgs/development/python-modules/google-cloud-firestore/default.nix @@ -21,14 +21,14 @@ buildPythonPackage (finalAttrs: { pname = "google-cloud-firestore"; - version = "2.27.0"; + version = "2.28.0"; pyproject = true; src = fetchFromGitHub { owner = "googleapis"; repo = "google-cloud-python"; tag = "google-cloud-firestore-v${finalAttrs.version}"; - hash = "sha256-hdUT4SRPOL+ArpU4RcsNCUCV3UCW3vQgwtHuxJiyZeU="; + hash = "sha256-dct5yBerIMNQgVIvOWdO9yTxSrH1JDUen6I7CYHftC0="; }; sourceRoot = "${finalAttrs.src.name}/packages/google-cloud-firestore"; @@ -71,6 +71,11 @@ buildPythonPackage (finalAttrs: { # Test requires credentials "tests/system/test_pipeline_acceptance.py" ] + ++ lib.optionals (pythonOlder "3.14") [ + # RuntimeError: There is no current event loop in thread 'MainThread'. + "tests/unit/v1/test_base_client.py::test_baseclient__emulator_channel" + "tests/unit/v1/test_bundle.py::TestAsyncBundle::test_async_query" + ] ++ lib.optionals (pythonAtLeast "3.14") [ # RuntimeError: There is no current event loop in thread 'MainThread' # due to eliding aiounittest diff --git a/pkgs/development/python-modules/google-cloud-iam/default.nix b/pkgs/development/python-modules/google-cloud-iam/default.nix index 1f6f48522359..b1108657a84f 100644 --- a/pkgs/development/python-modules/google-cloud-iam/default.nix +++ b/pkgs/development/python-modules/google-cloud-iam/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "google-cloud-iam"; - version = "2.21.0"; + version = "2.24.0"; pyproject = true; src = fetchFromGitHub { owner = "googleapis"; repo = "google-cloud-python"; tag = "google-cloud-iam-v${version}"; - hash = "sha256-dVgcnnInqjUjySL7wjxGzI33t1YZJ8e9mSsmjAJ+fBI="; + hash = "sha256-ywRS1BfK6s+gcU8QRem0cSnfZq4BUQ2ABNcgnOa01LI="; }; sourceRoot = "${src.name}/packages/google-cloud-iam"; diff --git a/pkgs/development/python-modules/google-cloud-kms/default.nix b/pkgs/development/python-modules/google-cloud-kms/default.nix index 46d1df626da1..7afa896fad59 100644 --- a/pkgs/development/python-modules/google-cloud-kms/default.nix +++ b/pkgs/development/python-modules/google-cloud-kms/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "google-cloud-kms"; - version = "3.9.0"; + version = "3.14.0"; pyproject = true; src = fetchFromGitHub { owner = "googleapis"; repo = "google-cloud-python"; tag = "google-cloud-kms-v${version}"; - hash = "sha256-JR3fcwCuMZkHyJHnMt4EGvTZZ7MLgQrgxCaTlJZ1zYE="; + hash = "sha256-ywRS1BfK6s+gcU8QRem0cSnfZq4BUQ2ABNcgnOa01LI="; }; sourceRoot = "${src.name}/packages/google-cloud-kms"; diff --git a/pkgs/development/python-modules/google-cloud-logging/default.nix b/pkgs/development/python-modules/google-cloud-logging/default.nix index b422a3dceab8..f4de6a36e21a 100644 --- a/pkgs/development/python-modules/google-cloud-logging/default.nix +++ b/pkgs/development/python-modules/google-cloud-logging/default.nix @@ -23,13 +23,13 @@ buildPythonPackage rec { pname = "google-cloud-logging"; - version = "3.13.0"; + version = "3.16.0"; pyproject = true; src = fetchPypi { pname = "google_cloud_logging"; inherit version; - hash = "sha256-Oq4Fc7GhpPWezfRXH054gbWCO9Ep/kaVYcHEmn+opME="; + hash = "sha256-CKMHa48PckIZ1vc7KiQu9p1R6LziJhM66+QaJfI/VAA="; }; build-system = [ setuptools ]; @@ -77,8 +77,6 @@ buildPythonPackage rec { # Tests require credentials "tests/system/test_system.py" "tests/unit/test__gapic.py" - # Exclude performance tests - "tests/performance/test_performance.py" ]; pythonImportsCheck = [ @@ -88,8 +86,8 @@ buildPythonPackage rec { meta = { description = "Stackdriver Logging API client library"; - homepage = "https://github.com/googleapis/python-logging"; - changelog = "https://github.com/googleapis/python-logging/blob/v${version}/CHANGELOG.md"; + homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-logging"; + changelog = "https://github.com/googleapis/google-cloud-python/blob/${version}/packages/google-cloud-logging/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = [ ]; }; diff --git a/pkgs/development/python-modules/google-cloud-monitoring/default.nix b/pkgs/development/python-modules/google-cloud-monitoring/default.nix index eaa6fb87b374..ceeb26b8db3f 100644 --- a/pkgs/development/python-modules/google-cloud-monitoring/default.nix +++ b/pkgs/development/python-modules/google-cloud-monitoring/default.nix @@ -15,13 +15,13 @@ buildPythonPackage (finalAttrs: { pname = "google-cloud-monitoring"; - version = "2.30.0"; + version = "2.31.0"; pyproject = true; src = fetchPypi { pname = "google_cloud_monitoring"; inherit (finalAttrs) version; - hash = "sha256-qVMKqaokbEkIEN+nvjLWfoNA0ZEIrMmcvALR7UlPunY="; + hash = "sha256-tMnTUoyGQ9TrS51ojLs8WRS8X2mzFP98XhtHvcBzqa4="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/google-cloud-pubsub/default.nix b/pkgs/development/python-modules/google-cloud-pubsub/default.nix index a2a635cd758a..1ce8e8f571db 100644 --- a/pkgs/development/python-modules/google-cloud-pubsub/default.nix +++ b/pkgs/development/python-modules/google-cloud-pubsub/default.nix @@ -19,13 +19,13 @@ buildPythonPackage rec { pname = "google-cloud-pubsub"; - version = "2.34.0"; + version = "2.39.0"; pyproject = true; src = fetchPypi { pname = "google_cloud_pubsub"; inherit version; - hash = "sha256-JfmMO6FqaYcfnruteuzj/mPIr+e6OSqtIJS+cw1UWXY="; + hash = "sha256-7tZeJfV/lb8+AtltfuFxaIsjkiRx+fIbWpHtkOEoLA8="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/google-cloud-storage/default.nix b/pkgs/development/python-modules/google-cloud-storage/default.nix index 55e252a4f12c..10ca5fc8ec98 100644 --- a/pkgs/development/python-modules/google-cloud-storage/default.nix +++ b/pkgs/development/python-modules/google-cloud-storage/default.nix @@ -25,16 +25,18 @@ buildPythonPackage rec { pname = "google-cloud-storage"; - version = "3.10.1"; + version = "3.12.0"; pyproject = true; src = fetchFromGitHub { owner = "googleapis"; - repo = "python-storage"; - tag = "v${version}"; - hash = "sha256-pKy1A9RNyRlAn4bXclcdvbfW4kZOP9Z4HqKWwcrDePo="; + repo = "google-cloud-python"; + tag = "google-cloud-storage-v${version}"; + hash = "sha256-4rmrRvYW9FOpvYY4a+vbDzQRcLXfFHGSCnv7yL6S1FM="; }; + sourceRoot = "${src.name}/packages/google-cloud-storage"; + build-system = [ setuptools ]; dependencies = [ @@ -94,6 +96,16 @@ buildPythonPackage rec { "test_update_user_agent_when_default_clientinfo_provided" "test_update_user_agent_when_none_clientinfo_provided" "test_update_user_agent_with_existing_user_agent" + "test_403_permission_cache_fallback" + "test_404_on_blob_bucket_deleted" + "test_404_on_blob_but_bucket_exists" + "test_cache_eviction_on_bucket_404" + "test_cache_eviction_on_bucket_delete" + "test_cache_stampede_protection" + "test_disable_bucket_md_env_flag" + "test_lru_bounded_capacity_eviction" + "test_sequential_cache_priming" + "test_sequential_cache_priming_multi_region" ]; disabledTestPaths = [ @@ -117,8 +129,8 @@ buildPythonPackage rec { meta = { description = "Google Cloud Storage API client library"; - homepage = "https://github.com/googleapis/python-storage"; - changelog = "https://github.com/googleapis/python-storage/blob/${src.tag}/CHANGELOG.md"; + homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-storage"; + changelog = "https://github.com/googleapis/google-cloud-python/blob/${src.tag}/packages/google-cloud-storage/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ sarahec ]; }; diff --git a/pkgs/development/python-modules/ibis-framework/default.nix b/pkgs/development/python-modules/ibis-framework/default.nix index 70d05e492e23..61c2d9daedea 100644 --- a/pkgs/development/python-modules/ibis-framework/default.nix +++ b/pkgs/development/python-modules/ibis-framework/default.nix @@ -148,10 +148,11 @@ buildPythonPackage (finalAttrs: { "-Wignore:fetch_arrow_table:DeprecationWarning" # DeprecationWarning: fetch_record_batch() is deprecated, use to_arrow_reader() instead. "-Wignore:fetch_record_batch:DeprecationWarning" + # DeprecationWarning: '_UnionGenericAlias' is deprecated and slated for removal in Python 3.17 + # DeprecationWarning: The 'generic' unit for NumPy timedelta is deprecated, and will raise an error in the future. This includes implicit conversion of bare integers (e.g. `+ 1`).Please use a specific unit instead. + "-Wignore::DeprecationWarning" ] ++ lib.optionals (pythonAtLeast "3.14") [ - # DeprecationWarning: '_UnionGenericAlias' is deprecated and slated for removal in Python 3.17 - "-Wignore::DeprecationWarning" # Multiple tests with warnings fail without it "-Wignore::pytest.PytestUnraisableExceptionWarning" ]; diff --git a/pkgs/development/python-modules/influxdb/default.nix b/pkgs/development/python-modules/influxdb/default.nix index d6785f77f8a9..71c865ed28e0 100644 --- a/pkgs/development/python-modules/influxdb/default.nix +++ b/pkgs/development/python-modules/influxdb/default.nix @@ -79,6 +79,21 @@ buildPythonPackage rec { "test_write_points_from_dataframe_with_tag_escaped" # AssertionError: 2 != 1 : .WarnBulkSizeNoEffect'> call should have generated one warning. "testWarnBulkSizeNoEffect" + # Timestamp precision 10^9 vs 10^12 + "test_dataframe_write_points_with_whitespace_in_column_names" + "test_dataframe_write_points_with_whitespace_measurement" + "test_write_points_from_dataframe" + "test_write_points_from_dataframe_with_leading_none_column" + "test_write_points_from_dataframe_with_line_of_none" + "test_write_points_from_dataframe_with_nan_line" + "test_write_points_from_dataframe_with_none" + "test_write_points_from_dataframe_with_numeric_column_names" + "test_write_points_from_dataframe_with_period_index" + "test_write_points_from_dataframe_with_tag_cols_and_defaults" + "test_write_points_from_dataframe_with_tag_cols_and_global_tags" + "test_write_points_from_dataframe_with_tag_columns" + "test_write_points_from_dataframe_with_tags_and_nan_line" + "test_write_points_from_dataframe_with_time_precision" ]; pythonImportsCheck = [ "influxdb" ]; diff --git a/pkgs/development/python-modules/libsass/default.nix b/pkgs/development/python-modules/libsass/default.nix index 348014d5fca4..f26c4bcb09be 100644 --- a/pkgs/development/python-modules/libsass/default.nix +++ b/pkgs/development/python-modules/libsass/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchFromGitHub, libsass, - six, + setuptools_80, pytestCheckHook, werkzeug, }: @@ -11,7 +11,7 @@ buildPythonPackage (finalAttrs: { pname = "libsass"; version = "0.23.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "sass"; @@ -20,13 +20,11 @@ buildPythonPackage (finalAttrs: { hash = "sha256-CiSr9/3EDwpDEzu6VcMBAlm3CtKTmGYbZMnMEjyZVxI="; }; + build-system = [ setuptools_80 ]; + buildInputs = [ libsass ]; - propagatedBuildInputs = [ six ]; - - preBuild = '' - export SYSTEM_SASS=true; - ''; + env.SYSTEM_SASS = "true"; nativeCheckInputs = [ pytestCheckHook @@ -41,6 +39,7 @@ buildPythonPackage (finalAttrs: { description = "Python binding for libsass to compile Sass/SCSS"; mainProgram = "pysassc"; homepage = "https://sass.github.io/libsass-python/"; + downloadPage = "https://github.com/sass/libsass-python"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sigmanificient ]; }; diff --git a/pkgs/development/python-modules/mistralai/default.nix b/pkgs/development/python-modules/mistralai/default.nix index 7fc33720d0a2..ab19f5aa4b11 100644 --- a/pkgs/development/python-modules/mistralai/default.nix +++ b/pkgs/development/python-modules/mistralai/default.nix @@ -25,6 +25,7 @@ # tests opentelemetry-sdk, + pytest-asyncio, pytestCheckHook, }: @@ -79,6 +80,7 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ opentelemetry-sdk + pytest-asyncio pytestCheckHook ] ++ finalAttrs.passthru.optional-dependencies.agents @@ -87,6 +89,8 @@ buildPythonPackage (finalAttrs: { disabledTests = [ # AssertionError: is not an instance of "TestOtelTracing" + # '062f2cad7f1fee8c3e409b73d431e71b' not found in '00-e5d29cde482d5d796428c10d13e86060-468fe44f7efdb086-01' + "test_propagates_sampled_active_span" ]; meta = { diff --git a/pkgs/development/python-modules/morfessor/default.nix b/pkgs/development/python-modules/morfessor/default.nix index 969e2f347a99..0fda02a714f4 100644 --- a/pkgs/development/python-modules/morfessor/default.nix +++ b/pkgs/development/python-modules/morfessor/default.nix @@ -2,13 +2,14 @@ lib, buildPythonPackage, fetchPypi, + setuptools_80, + pytestCheckHook, }: buildPythonPackage rec { pname = "morfessor"; version = "2.0.6"; - - format = "setuptools"; + pyproject = true; src = fetchPypi { pname = "Morfessor"; @@ -16,7 +17,13 @@ buildPythonPackage rec { sha256 = "bb3beac234341724c5f640f65803071f62373a50dba854d5a398567f9aefbab2"; }; - checkPhase = "python -m unittest -v morfessor/test/*"; + build-system = [ setuptools_80 ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + enabledTestPaths = [ + "morfessor/test/*" + ]; pythonImportsCheck = [ "morfessor" ]; diff --git a/pkgs/development/python-modules/narwhals/default.nix b/pkgs/development/python-modules/narwhals/default.nix index c37327e9ea01..7e2aa326772b 100644 --- a/pkgs/development/python-modules/narwhals/default.nix +++ b/pkgs/development/python-modules/narwhals/default.nix @@ -5,8 +5,7 @@ dask, duckdb, fetchFromGitHub, - fetchpatch2, - hatchling, + uv-build, hypothesis, ibis-framework, packaging, @@ -24,37 +23,17 @@ buildPythonPackage rec { pname = "narwhals"; - version = "2.16.0"; + version = "2.23.0"; pyproject = true; src = fetchFromGitHub { owner = "narwhals-dev"; repo = "narwhals"; tag = "v${version}"; - hash = "sha256-k7CeM8Q4JgKbkLisAaVrljro4diOf0K0immek6AI0vM="; + hash = "sha256-fT3v7T2S7cmv0tX60kjRBrUq+89TG2/Ar9Qh9O4LP8U="; }; - patches = [ - (fetchpatch2 { - name = "fix-dask-deprecationwarning.patch"; - url = "https://github.com/narwhals-dev/narwhals/commit/254655af21872e8127f7fee9a9afbfb279f1eda2.patch?full_index=1"; - # Exclude unrelated change to non-test code. - includes = [ "pyproject.toml" ]; - hash = "sha256-tgz0b08P36CENOYFBILbicHhdB4BytXgFQk3nIxpw0A="; - }) - (fetchpatch2 { - name = "fix-dask-deprecationwarning.patch"; - url = "https://github.com/narwhals-dev/narwhals/commit/b92d5a840e08bdf7806947ffde27de856900c5ab.patch?full_index=1"; - hash = "sha256-2lct6/MfViKnRjpEehNKqF6zdZVIkXi7tYxycDh/Hn8="; - }) - (fetchpatch2 { - name = "ignore-polars-deprecation-warning-in-tests.patch"; - url = "https://github.com/narwhals-dev/narwhals/commit/fb798716eb5f8835096d8f88d422baae2b22b3ce.patch?full_index=1"; - hash = "sha256-pWi0y4S48aADJ1MA3kB9FsLuoA+HfZp5+AgEn69pUuA="; - }) - ]; - - build-system = [ hatchling ]; + build-system = [ uv-build ]; optional-dependencies = { # cudf = [ cudf ]; @@ -108,6 +87,10 @@ buildPythonPackage rec { "test_first_expr_broadcasting" # sqlframe improvements cause strict XPASS failures (tests expected to fail now pass) "test_unique_expr" + # sqlframe issues + "test_over_quantile" + "test_quantile_expr" + "test_join_duplicate_column_names" ]; disabledTestPaths = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ diff --git a/pkgs/development/python-modules/phply/default.nix b/pkgs/development/python-modules/phply/default.nix index 392c5e264a33..087da4f1a8d2 100644 --- a/pkgs/development/python-modules/phply/default.nix +++ b/pkgs/development/python-modules/phply/default.nix @@ -2,7 +2,7 @@ lib, buildPythonPackage, fetchPypi, - setuptools, + setuptools_80, ply, pytestCheckHook, }: @@ -18,7 +18,7 @@ buildPythonPackage rec { hash = "sha256-Cyd3TShfUHo0RYBaBfj7KZj1bXCScPeLiSCLZbDYSRc="; }; - build-system = [ setuptools ]; + build-system = [ setuptools_80 ]; dependencies = [ ply ]; diff --git a/pkgs/development/python-modules/pydeck/default.nix b/pkgs/development/python-modules/pydeck/default.nix index d7c7de2030eb..866834959dfd 100644 --- a/pkgs/development/python-modules/pydeck/default.nix +++ b/pkgs/development/python-modules/pydeck/default.nix @@ -16,12 +16,12 @@ buildPythonPackage rec { pname = "pydeck"; - version = "0.9.1"; + version = "0.9.2"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-90R1rmN5UdY/LuWDJnV/jU+c2fKkV89ClQcVAD4stgU="; + hash = "sha256-wQ2QNegerWOFJkysjRlAJHH2hmoVyh998UAPUhQrz4c="; }; # upstream has an invalid pyproject.toml diff --git a/pkgs/development/python-modules/rpy2-rinterface/default.nix b/pkgs/development/python-modules/rpy2-rinterface/default.nix index 726311ba8e3c..4ec273c8ea1f 100644 --- a/pkgs/development/python-modules/rpy2-rinterface/default.nix +++ b/pkgs/development/python-modules/rpy2-rinterface/default.nix @@ -1,5 +1,4 @@ { - stdenv, lib, buildPythonPackage, fetchurl, @@ -11,6 +10,7 @@ zlib, zstd, icu, + libdeflate, pytestCheckHook, setuptools, cffi, @@ -39,7 +39,8 @@ buildPythonPackage rec { ]; postPatch = '' - substituteInPlace 'src/rpy2/rinterface_lib/embedded.py' --replace '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE" + substituteInPlace 'src/rpy2/rinterface_lib/embedded.py' \ + --replace-fail '@NIX_R_LIBS_SITE@' "$R_LIBS_SITE" ''; buildInputs = [ @@ -48,6 +49,7 @@ buildPythonPackage rec { zlib zstd icu + libdeflate ] ++ rWrapper.recommendedPackages; @@ -55,11 +57,14 @@ buildPythonPackage rec { R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly) ]; - propagatedBuildInputs = [ - cffi + build-system = [ setuptools ]; + dependencies = [ + cffi + ]; + nativeCheckInputs = [ pytestCheckHook ]; # https://github.com/rpy2/rpy2/issues/1111 diff --git a/pkgs/development/python-modules/rpy2-robjects/default.nix b/pkgs/development/python-modules/rpy2-robjects/default.nix index 72034f447237..637a76b82a5e 100644 --- a/pkgs/development/python-modules/rpy2-robjects/default.nix +++ b/pkgs/development/python-modules/rpy2-robjects/default.nix @@ -1,5 +1,4 @@ { - stdenv, lib, buildPythonPackage, fetchurl, @@ -11,6 +10,7 @@ jinja2, numpy, pandas, + setuptools, tzlocal, pytestCheckHook, }: @@ -42,7 +42,9 @@ buildPythonPackage rec { R # needed at setup time to detect R_HOME (alternatively set R_HOME explicitly) ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ ipython jinja2 numpy @@ -58,6 +60,11 @@ buildPythonPackage rec { "-Wignore::pytest.PytestRemovedIn9Warning" ]; + disabledTests = [ + # panda 3.0 type mismatch + "test_ri2pandas" + ]; + meta = { homepage = "https://rpy2.github.io/"; description = "Python interface to R"; diff --git a/pkgs/development/python-modules/rpy2/default.nix b/pkgs/development/python-modules/rpy2/default.nix index 053bceb0b9ab..cd506db94100 100644 --- a/pkgs/development/python-modules/rpy2/default.nix +++ b/pkgs/development/python-modules/rpy2/default.nix @@ -1,12 +1,11 @@ { - stdenv, lib, buildPythonPackage, fetchPypi, isPyPy, rpy2-rinterface, rpy2-robjects, - pytestCheckHook, + setuptools, }: buildPythonPackage rec { @@ -20,7 +19,9 @@ buildPythonPackage rec { hash = "sha256-8ftGSc59FOk1EzCI3sl82ifrN858xxA4X4HcpVb+jJ8="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ rpy2-rinterface rpy2-robjects ]; diff --git a/pkgs/development/python-modules/sigstore/default.nix b/pkgs/development/python-modules/sigstore/default.nix index 6cc24de623ba..365356b0dd8e 100644 --- a/pkgs/development/python-modules/sigstore/default.nix +++ b/pkgs/development/python-modules/sigstore/default.nix @@ -52,6 +52,7 @@ buildPythonPackage (finalAttrs: { pythonRelaxDeps = [ "cryptography" + "rich" "sigstore-models" ]; diff --git a/pkgs/development/python-modules/systemrdl-compiler/default.nix b/pkgs/development/python-modules/systemrdl-compiler/default.nix index 7763a6a78b19..4c655d0df55e 100644 --- a/pkgs/development/python-modules/systemrdl-compiler/default.nix +++ b/pkgs/development/python-modules/systemrdl-compiler/default.nix @@ -8,6 +8,7 @@ markdown, setuptools, setuptools-scm, + typing-extensions, }: buildPythonPackage (finalAttrs: { @@ -32,6 +33,7 @@ buildPythonPackage (finalAttrs: { antlr4-python3-runtime colorama markdown + typing-extensions ]; passthru.updateScript = gitUpdater { rev-prefix = "v"; }; diff --git a/pkgs/development/python-modules/textual-fastdatatable/default.nix b/pkgs/development/python-modules/textual-fastdatatable/default.nix index d97f7d3730f4..691f3031cfb6 100644 --- a/pkgs/development/python-modules/textual-fastdatatable/default.nix +++ b/pkgs/development/python-modules/textual-fastdatatable/default.nix @@ -50,6 +50,7 @@ buildPythonPackage rec { pythonRelaxDeps = [ "numpy" + "pandas" "pyarrow" ]; diff --git a/pkgs/development/python-modules/vega-datasets/default.nix b/pkgs/development/python-modules/vega-datasets/default.nix index efe73ec81ce7..8de4b62fc21d 100644 --- a/pkgs/development/python-modules/vega-datasets/default.nix +++ b/pkgs/development/python-modules/vega-datasets/default.nix @@ -26,6 +26,12 @@ buildPythonPackage rec { pytestFlags = [ "--doctest-modules" ]; + disabledTests = [ + # timestamp precision mismatch + "test_date_types" + "test_stock_date_parsing" + ]; + pythonImportsCheck = [ "vega_datasets" ]; meta = diff --git a/pkgs/development/python-modules/zconfig/default.nix b/pkgs/development/python-modules/zconfig/default.nix index bb739b974cca..83db908d50b0 100644 --- a/pkgs/development/python-modules/zconfig/default.nix +++ b/pkgs/development/python-modules/zconfig/default.nix @@ -23,6 +23,11 @@ buildPythonPackage rec { patches = lib.optional stdenv.hostPlatform.isMusl ./remove-setlocale-test.patch; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools >= 78.1.1,< 81" setuptools + ''; + build-system = [ setuptools ]; buildInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 623c83d48724..0f47434af46d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2785,6 +2785,8 @@ self: super: with self; { chardet = callPackage ../development/python-modules/chardet { }; + chardet_5 = callPackage ../development/python-modules/chardet/5.nix { }; + charset-normalizer = callPackage ../development/python-modules/charset-normalizer { }; chat-downloader = callPackage ../development/python-modules/chat-downloader { };