mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-12-06 04:40:10 +00:00
python3Packages.extractcode: disable failing tests, python3Packages.scancode-toolkit: add patch for pluggy 1.4 (#587135)
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
patch,
|
||||
six,
|
||||
typecode,
|
||||
zlib,
|
||||
|
||||
# tests
|
||||
pytest-xdist,
|
||||
@@ -40,6 +41,7 @@ buildPythonPackage (finalAttrs: {
|
||||
patch
|
||||
six
|
||||
typecode
|
||||
zlib
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
@@ -76,6 +78,15 @@ buildPythonPackage (finalAttrs: {
|
||||
"test_get_best_handler_nuget_is_selected_over_zip"
|
||||
"test_get_best_handler_nuget_is_selected_over_zip2"
|
||||
"test_get_best_handler_nuget_is_selected_over_zip3"
|
||||
# AssertionError: extracted file list differs from expected JSON
|
||||
"test_extract_directory_of_windows_ar_archives"
|
||||
# assertRaisesInstance fails to match expected exception
|
||||
"test_extract_ar_with_relative_path_libarch"
|
||||
# AssertionError: extracted file list differs from expected
|
||||
"test_extract_ar_with_permissions"
|
||||
"test_extract_ar_with_permissions_libarchive"
|
||||
# AssertionError: Exception not raised
|
||||
"test_extract_ar_with_relative_path_and_backslashes_in_names_libarch"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "extractcode" ];
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
From: Fabian Affolter <fabian.affolter@gmail.com>
|
||||
Date: Thu, 12 Nov 2026 00:00:00 +0000
|
||||
Subject: [PATCH] Remove add_hookspecs call incompatible with pluggy >= 1.4
|
||||
|
||||
pluggy 1.4 introduced a ValueError when add_hookspecs finds no hook
|
||||
specifications in the given module or class. The AdditionalLicensePluginManager
|
||||
decorates the plugin base class (not individual methods) with HookspecMarker,
|
||||
which pluggy no longer recognises, causing the import to fail.
|
||||
|
||||
The plugincode upstream SimplePluginManager (which this class mirrors) never
|
||||
called add_hookspecs, so removing this call restores parity with that design.
|
||||
|
||||
--- a/src/licensedcode/additional_license_location_provider.py
|
||||
+++ b/src/licensedcode/additional_license_location_provider.py
|
||||
@@ -77,7 +77,6 @@ class AdditionalLicensePluginManager(object):
|
||||
self.manager = PluggyPluginManager(project_name=project_name)
|
||||
self.entrypoint = entrypoint
|
||||
self.plugin_base_class = plugin_base_class
|
||||
- self.manager.add_hookspecs(sys.modules[project_name])
|
||||
|
||||
# set to True once this manager is initialized by running its setup()
|
||||
self.initialized = False
|
||||
@@ -70,6 +70,8 @@ buildPythonPackage (finalAttrs: {
|
||||
hash = "sha256-WXAZCk0aRmKb1UU1ud95mZFHAMC9U+gDRd9w7TZTVSA=";
|
||||
};
|
||||
|
||||
patches = [ ./0001-remove-add_hookspecs-call-incompatible-with-pluggy-1.4.patch ];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
Reference in New Issue
Block a user