python3Packages.gradio: fix build (#356645)

This commit is contained in:
Pol Dellaiera
2024-11-17 15:55:25 +01:00
committed by GitHub
2 changed files with 81 additions and 75 deletions

View File

@@ -105,7 +105,10 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
passthru.updateScript = nix-update-script { passthru.updateScript = nix-update-script {
extraArgs = [ "--version-regex" "gradio_client@(.*)" ]; extraArgs = [
"--version-regex"
"gradio_client@(.*)"
];
}; };
meta = { meta = {

View File

@@ -87,6 +87,7 @@ buildPythonPackage rec {
"tomlkit" "tomlkit"
"aiofiles" "aiofiles"
"markupsafe" "markupsafe"
"pillow"
]; ];
pythonRemoveDeps = [ pythonRemoveDeps = [
@@ -169,87 +170,89 @@ buildPythonPackage rec {
ulimit -n 4096 ulimit -n 4096
''; '';
disabledTests = [ disabledTests =
# Actually broken [
"test_mount_gradio_app" # Actually broken
"test_processing_utils_backwards_compatibility" # type error "test_mount_gradio_app"
"test_processing_utils_backwards_compatibility" # type error
# requires network, it caught our xfail exception # requires network, it caught our xfail exception
"test_error_analytics_successful" "test_error_analytics_successful"
# Flaky, tries to pin dependency behaviour. Sensitive to dep versions # Flaky, tries to pin dependency behaviour. Sensitive to dep versions
# These error only affect downstream use of the check dependencies. # These error only affect downstream use of the check dependencies.
"test_no_color" "test_no_color"
"test_in_interface_as_output" "test_in_interface_as_output"
"test_should_warn_url_not_having_version" "test_should_warn_url_not_having_version"
# Flaky, unknown reason # Flaky, unknown reason
"test_in_interface" "test_in_interface"
# shap is too often broken in nixpkgs # shap is too often broken in nixpkgs
"test_shapley_text" "test_shapley_text"
# fails without network # fails without network
"test_download_if_url_correct_parse" "test_download_if_url_correct_parse"
# flaky: OSError: Cannot find empty port in range: 7860-7959 # flaky: OSError: Cannot find empty port in range: 7860-7959
"test_docs_url" "test_docs_url"
"test_orjson_serialization" "test_orjson_serialization"
"test_dataset_is_updated" "test_dataset_is_updated"
"test_multimodal_api" "test_multimodal_api"
# tests if pip and other tools are installed # tests if pip and other tools are installed
"test_get_executable_path" "test_get_executable_path"
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ]
# flaky on darwin (depend on port availability) ++ lib.optionals stdenv.hostPlatform.isDarwin [
"test_all_status_messages" # flaky on darwin (depend on port availability)
"test_async_generators" "test_all_status_messages"
"test_async_generators_interface" "test_async_generators"
"test_async_iterator_update_with_new_component" "test_async_generators_interface"
"test_concurrency_limits" "test_async_iterator_update_with_new_component"
"test_default_concurrency_limits" "test_concurrency_limits"
"test_default_flagging_callback" "test_default_concurrency_limits"
"test_end_to_end" "test_default_flagging_callback"
"test_end_to_end_cache_examples" "test_end_to_end"
"test_event_data" "test_end_to_end_cache_examples"
"test_every_does_not_block_queue" "test_event_data"
"test_example_caching_relaunch" "test_every_does_not_block_queue"
"test_example_caching_relaunch" "test_example_caching_relaunch"
"test_exit_called_at_launch" "test_example_caching_relaunch"
"test_file_component_uploads" "test_exit_called_at_launch"
"test_files_saved_as_file_paths" "test_file_component_uploads"
"test_flagging_does_not_create_unnecessary_directories" "test_files_saved_as_file_paths"
"test_flagging_no_permission_error_with_flagging_disabled" "test_flagging_does_not_create_unnecessary_directories"
"test_info_and_warning_alerts" "test_flagging_no_permission_error_with_flagging_disabled"
"test_info_isolation" "test_info_and_warning_alerts"
"test_launch_analytics_does_not_error_with_invalid_blocks" "test_info_isolation"
"test_no_empty_audio_files" "test_launch_analytics_does_not_error_with_invalid_blocks"
"test_no_empty_image_files" "test_no_empty_audio_files"
"test_no_empty_video_files" "test_no_empty_image_files"
"test_non_streaming_api" "test_no_empty_video_files"
"test_non_streaming_api_async" "test_non_streaming_api"
"test_pil_images_hashed" "test_non_streaming_api_async"
"test_progress_bar" "test_pil_images_hashed"
"test_progress_bar_track_tqdm" "test_progress_bar"
"test_queue_when_using_auth" "test_progress_bar_track_tqdm"
"test_restart_after_close" "test_queue_when_using_auth"
"test_set_share_in_colab" "test_restart_after_close"
"test_show_error" "test_set_share_in_colab"
"test_simple_csv_flagging_callback" "test_show_error"
"test_single_request" "test_simple_csv_flagging_callback"
"test_socket_reuse" "test_single_request"
"test_start_server" "test_socket_reuse"
"test_state_holder_is_used_in_postprocess" "test_start_server"
"test_state_stored_up_to_capacity" "test_state_holder_is_used_in_postprocess"
"test_static_files_single_app" "test_state_stored_up_to_capacity"
"test_streaming_api" "test_static_files_single_app"
"test_streaming_api_async" "test_streaming_api"
"test_streaming_api_with_additional_inputs" "test_streaming_api_async"
"test_sync_generators" "test_streaming_api_with_additional_inputs"
"test_time_to_live_and_delete_callback_for_state" "test_sync_generators"
"test_updates_stored_up_to_capacity" "test_time_to_live_and_delete_callback_for_state"
"test_varying_output_forms_with_generators" "test_updates_stored_up_to_capacity"
]; "test_varying_output_forms_with_generators"
];
disabledTestPaths = [ disabledTestPaths = [
# 100% touches network # 100% touches network
"test/test_networking.py" "test/test_networking.py"