From b35a7e8ef97bd71a1f09b8c402b8f489c54656d8 Mon Sep 17 00:00:00 2001 From: Bad3r Date: Fri, 29 May 2026 20:38:29 +0300 Subject: [PATCH 1/2] python3Packages.markitdown: 0.1.4 -> 0.1.6 v0.1.6 drops ffmpeg-headless, numpy, openai, pathvalidate, and puremagic from its dependency set and adds charset-normalizer (core), pdfplumber, azure-ai-documentintelligence, and azure-identity (optional/all extras). azure-ai-contentunderstanding is also new in the optional set but is not yet packaged in nixpkgs; skip it for now. Relax mammoth (~=1.11.0 vs nixpkgs 1.12.0) and youtube-transcript-api (~=1.0.0 vs nixpkgs 1.2.4) in pythonRelaxDeps alongside the existing magika relaxation. The 0.1.6 test suite adds tests/test_cu_converter.py. Its Azure imports share one try block, so the missing azure-ai-contentunderstanding makes the whole block fall back to stub classes, including a no-arg UserAgentPolicy. test_nonexistent_analyzer_raises_value_error and test_cu_registered_before_docintel patch _dependency_exc_info=None to bypass the MissingDependencyException guard, then instantiate the converter and hit UserAgentPolicy(user_agent=...), failing with "TypeError: UserAgentPolicy() takes no arguments". Add both to disabledTests; runtime is unaffected (the converter still raises MissingDependencyException without the optional extra). Validation: nix-build -A python3Packages.markitdown (159 passed, 2 skipped, 175 deselected). --- .../python-modules/markitdown/default.nix | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/markitdown/default.nix b/pkgs/development/python-modules/markitdown/default.nix index 22ed0b7bd6f3..20fea4f4ef5c 100644 --- a/pkgs/development/python-modules/markitdown/default.nix +++ b/pkgs/development/python-modules/markitdown/default.nix @@ -8,21 +8,20 @@ hatchling, # dependencies + azure-ai-documentintelligence, + azure-identity, beautifulsoup4, + charset-normalizer, defusedxml, - ffmpeg-headless, lxml, magika, mammoth, markdownify, - numpy, olefile, - openai, openpyxl, pandas, - pathvalidate, pdfminer-six, - puremagic, + pdfplumber, pydub, python-pptx, requests, @@ -42,14 +41,14 @@ let in buildPythonPackage (finalAttrs: { pname = "markitdown"; - version = "0.1.4"; + version = "0.1.6"; pyproject = true; src = fetchFromGitHub { owner = "microsoft"; repo = "markitdown"; tag = "v${finalAttrs.version}"; - hash = "sha256-WKA2eY8wY3SM9xZ7Cek5eUcJbO5q6eMDx2aTKfQnFvE="; + hash = "sha256-pLL44w2jVj5X5/TmPqSveQe/9WLj0ddDUYPoSQlz+9E="; }; sourceRoot = "${finalAttrs.src.name}/packages/markitdown"; @@ -58,23 +57,24 @@ buildPythonPackage (finalAttrs: { pythonRelaxDeps = [ "magika" + "mammoth" + "youtube-transcript-api" ]; dependencies = [ + azure-ai-documentintelligence + azure-identity beautifulsoup4 + charset-normalizer defusedxml - ffmpeg-headless lxml magika mammoth markdownify - numpy olefile - openai openpyxl pandas - pathvalidate pdfminer-six - puremagic + pdfplumber pydub python-pptx requests @@ -98,6 +98,11 @@ buildPythonPackage (finalAttrs: { "test_module_vectors" "test_cli_vectors" "test_module_misc" + + # Require optional azure-ai-contentunderstanding, unavailable in nixpkgs. + # The fallback stubs hit `UserAgentPolicy() takes no arguments`. + "test_nonexistent_analyzer_raises_value_error" + "test_cu_registered_before_docintel" ]; passthru.updateScript = gitUpdater { }; From aff8c2ae29763aa1e0b4d0703ad769341c137290 Mon Sep 17 00:00:00 2001 From: Bad3r Date: Fri, 29 May 2026 21:51:25 +0300 Subject: [PATCH 2/2] python3Packages.markitdown: fix passthru.updateScript gitUpdater {} never selected a version: list-git-tags returns v-prefixed tags (v0.1.6, matching src.tag = "v${version}"), and generic-updater's `grep "^[0-9]"` filter drops every tag that does not start with a digit, so the script always printed [] and made no change. Set rev-prefix = "v" so versions are compared as 0.1.6, and add ignoredVersions = "(a|b|rc)[0-9]+$" to skip the PEP 440 pre-release tags (v0.1.5b1, v0.1.0a1, ...) that version_is_unstable's odd-minor and patchlevel>=90 heuristics do not recognise. Validation: - nix-shell maintainers/scripts/update.nix --argstr package python3Packages.markitdown --argstr skip-prompt true (0.1.4 -> 0.1.6 selected, pre-releases skipped, correct hash resolved). - nix fmt -- pkgs/development/python-modules/markitdown/default.nix - git diff --check --- pkgs/development/python-modules/markitdown/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/markitdown/default.nix b/pkgs/development/python-modules/markitdown/default.nix index 20fea4f4ef5c..8ed51e46c207 100644 --- a/pkgs/development/python-modules/markitdown/default.nix +++ b/pkgs/development/python-modules/markitdown/default.nix @@ -105,7 +105,12 @@ buildPythonPackage (finalAttrs: { "test_cu_registered_before_docintel" ]; - passthru.updateScript = gitUpdater { }; + passthru.updateScript = gitUpdater { + # Drop the "v" tag prefix before version comparison. + rev-prefix = "v"; + # Skip PEP 440 pre-release tags. + ignoredVersions = "(a|b|rc)[0-9]+$"; + }; meta = { description = "Python tool for converting files and office documents to Markdown";