From 9daa809fe83d13f2ae75a012d0a82ae0d06344f1 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 15 Jul 2026 00:36:52 +0200 Subject: [PATCH 1/3] python3Packages.stone: 3.3.9 -> 3.5.2 --- .../python-modules/stone/default.nix | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/stone/default.nix b/pkgs/development/python-modules/stone/default.nix index 7fc25bd40763..bc097a2b19e0 100644 --- a/pkgs/development/python-modules/stone/default.nix +++ b/pkgs/development/python-modules/stone/default.nix @@ -8,33 +8,37 @@ ply, pytestCheckHook, setuptools, - six, + setuptools-scm, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "stone"; - version = "3.3.9"; + version = "3.5.2"; pyproject = true; src = fetchFromGitHub { owner = "dropbox"; repo = "stone"; - tag = "v${version}"; - hash = "sha256-3tUV2JrE3S2Tj/9aHvzfBTkIWUmWzkWNsVLr5yWRE/Q="; + tag = "v${finalAttrs.version}"; + hash = "sha256-05sAhyQx3IalHqNkSrJgRDJz85M331hF5Crc/gtP6jE="; }; postPatch = '' - substituteInPlace setup.py \ - --replace-fail "'pytest-runner == 5.3.2'," "" + # https://github.com/dropbox/stone/pull/373 pins setuptools-scm to <9, + # but that version is not in nixpkgs and it seems to work anyway? + substituteInPlace pyproject.toml \ + --replace-fail "setuptools-scm>=8,<9" "setuptools-scm" ''; - build-system = [ setuptools ]; + build-system = [ + setuptools + setuptools-scm + ]; dependencies = [ jinja2 - ply - six packaging + ply ]; nativeCheckInputs = [ @@ -47,9 +51,9 @@ buildPythonPackage rec { meta = { description = "Official API Spec Language for Dropbox API V2"; homepage = "https://github.com/dropbox/stone"; - changelog = "https://github.com/dropbox/stone/releases/tag/${src.tag}"; + changelog = "https://github.com/dropbox/stone/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = [ ]; mainProgram = "stone"; }; -} +}) From e3313e6d3458a4599bbb5015d3b1f625fc5aa199 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 15 Jul 2026 00:37:09 +0200 Subject: [PATCH 2/3] python3Packages.dropbox: 12.0.2 -> 12.2.0 --- .../python-modules/dropbox/default.nix | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/dropbox/default.nix b/pkgs/development/python-modules/dropbox/default.nix index c4fd3dd51b3b..7e7b0788b6fd 100644 --- a/pkgs/development/python-modules/dropbox/default.nix +++ b/pkgs/development/python-modules/dropbox/default.nix @@ -2,9 +2,8 @@ lib, buildPythonPackage, fetchFromGitHub, - setuptools_80, + setuptools, requests, - six, stone, mock, pytest-mock, @@ -13,9 +12,9 @@ sphinx-rtd-theme, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "dropbox"; - version = "12.0.2"; + version = "12.2.0"; pyproject = true; outputs = [ @@ -26,15 +25,14 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "dropbox"; repo = "dropbox-sdk-python"; - tag = "v${version}"; - hash = "sha256-9Fsh06V226vIyJhrlLkh9Xr4UGoEIISnIFCtuKqI218="; + tag = "v${finalAttrs.version}"; + hash = "sha256-Hkfv9+nofc9PMCw7crF3bw4bOFlzbJCHTW8hGxc91Pc="; }; - build-system = [ setuptools_80 ]; + build-system = [ setuptools ]; dependencies = [ requests - six stone ]; @@ -44,11 +42,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.py \ - --replace-fail "'pytest-runner==5.2.0'," "" - ''; - pythonImportsCheck = [ "dropbox" ]; nativeBuildInputs = [ @@ -56,17 +49,11 @@ buildPythonPackage rec { sphinx-rtd-theme ]; - # Version 12.0.0 re-introduced Python 2 support and set some very restrictive version bounds - # https://github.com/dropbox/dropbox-sdk-python/commit/75596daf316b4a806f18057e2797a15bdf83cf6d - # This will be the last major version to support Python 2, so version bounds might be more reasonable again in the future. - pythonRelaxDeps = [ - "stone" - ]; - # Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value. disabledTests = [ - "test_default_oauth2_urls" "test_bad_auth" + "test_bad_pins" + "test_bad_pins_session" "test_multi_auth" "test_refresh" "test_app_auth" @@ -83,15 +70,14 @@ buildPythonPackage rec { "test_as_user" "test_as_admin" "test_clone_when_team_linked" - "test_bad_pins" - "test_bad_pins_session" + "test_upload_auto_content_hash" ]; meta = { description = "Python library for Dropbox's HTTP-based Core and Datastore APIs"; homepage = "https://github.com/dropbox/dropbox-sdk-python"; - changelog = "https://github.com/dropbox/dropbox-sdk-python/releases/tag/${src.tag}"; + changelog = "https://github.com/dropbox/dropbox-sdk-python/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ sfrijters ]; }; -} +}) From efcdef32c3b747d2d7bd3d1afe55748805205558 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 15 Jul 2026 01:21:35 +0200 Subject: [PATCH 3/3] python3Packages.maestral: fix for dropbox 12.2.0 --- pkgs/development/python-modules/maestral/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/maestral/default.nix b/pkgs/development/python-modules/maestral/default.nix index 027768672711..7872d821bc2c 100644 --- a/pkgs/development/python-modules/maestral/default.nix +++ b/pkgs/development/python-modules/maestral/default.nix @@ -41,6 +41,13 @@ buildPythonPackage (finalAttrs: { hash = "sha256-mYFiQL4FumJWP2y1u5tIo1CZL027J8/EIYqJQde7G/c="; }; + postPatch = '' + # is_not_closed was removed from dropbox in https://github.com/dropbox/dropbox-sdk-python/pull/537 + # Upstream has been archived so we cannot expect a fix - use this workaround to keep the package alive a bit longer + substituteInPlace src/maestral/errorhandling.py \ + --replace-fail "elif session_lookup_error.is_not_closed():" "elif False:" + ''; + build-system = [ setuptools ]; dependencies = [