fleche 0.22.3__tar.gz → 0.22.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/test-minimum-deps.yml +6 -1
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/tests.yml +23 -0
- {fleche-0.22.3 → fleche-0.22.4}/.gitignore +4 -0
- fleche-0.22.4/.release-please-manifest.json +3 -0
- {fleche-0.22.3 → fleche-0.22.4}/CHANGELOG.md +7 -0
- {fleche-0.22.3 → fleche-0.22.4}/PKG-INFO +1 -1
- {fleche-0.22.3 → fleche-0.22.4}/agents/DEVELOPING.md +1 -2
- {fleche-0.22.3 → fleche-0.22.4/docs}/notebooks/ConcurrentExecution.ipynb +2 -2
- {fleche-0.22.3 → fleche-0.22.4}/docs/parallel_execution.rst +3 -33
- {fleche-0.22.3/docs → fleche-0.22.4}/notebooks/ConcurrentExecution.ipynb +2 -2
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/_version.py +3 -3
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/call.py +3 -1
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/PKG-INFO +1 -1
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/scm_version.json +2 -2
- {fleche-0.22.3 → fleche-0.22.4}/tests/conftest.py +7 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_cache.py +9 -9
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_operation_context_cache.py +1 -1
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_size_limited.py +1 -1
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/call/test_dehydrate.py +22 -27
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/call/test_prepared_call.py +56 -1
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/test_digest.py +56 -78
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_fleche.py +24 -1
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_query_iterator.py +15 -30
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_thread_safe.py +29 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/test_pickle.py +1 -1
- fleche-0.22.3/.release-please-manifest.json +0 -3
- {fleche-0.22.3 → fleche-0.22.4}/.claude/CLAUDE.md +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.claude/settings.json +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/dependabot.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/benchmarks-main.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/benchmarks.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/ci-failure-summary.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/claude.yaml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/perf-triage.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/pypi-publish.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/reflow-agent-docs.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/reflow_agent_docs.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/release-please.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/rendernb.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/ty.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.github/workflows/updatebenchmarks.yml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/.readthedocs.yaml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/AGENTS.md +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/LICENSE +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/README.md +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/agents/USAGE.md +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/benchmark_digest.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/benchmark_integration.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/benchmark_storage.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/compare_results.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/profile_digest_types.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/results.csv +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/run_benchmarks.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/benchmarks/utils.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/_static/custom.css +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/conf.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/call_lifecycle.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/custom_digests.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/extending_destructurer.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/function_profile.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/sql_test_backends.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/ssh_cache.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/dev/storage_hierarchy.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/digests/digest_equivalence.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/digests/digests_as_args.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/digests/entry_points.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/cache_sequence.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/dedup_forest.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/gen_diagrams.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/gen_sequence.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/remaining_depth.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/special_cases.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/storage_hierarchy.dot +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/storage_hierarchy.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/storage_mro.dot +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/storage_mro.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/figures/storage_sequence.svg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/index.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/installation.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/CacheStack.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/Caches.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/Destructuring.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/ExtraMethods.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/FiveMinuteTour.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/GettingStarted.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/SecureStorage.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/StorageBackends.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/notebooks/TransferWorkflow.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/storage/cache_stack.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/storage/configuration.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/storage/destructuring.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/storage/security.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/usage/helpers.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/usage/lazy_call.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/usage/query.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/docs/usage/tldr.rst +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/CacheStack.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/Caches.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/Destructuring.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/ExtraMethods.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/FiveMinuteTour.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/GettingStarted.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/SecureStorage.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/StorageBackends.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/notebooks/TransferWorkflow.ipynb +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/pyproject.toml +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/release-please-config.json +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/setup.cfg +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/__main__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/_attrs.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/_hashing.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/_numbers.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/_numpy.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/_pandas.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/caches.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/config.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/digest.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/executor.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/metadata.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/query.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/remote.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/security.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/state.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/bagofholding_file.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/base.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/destructuring.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/file.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/memory.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/pickle_file.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/sql.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/thread_safe.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/storage/void.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche/wrapper.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/SOURCES.txt +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/dependency_links.txt +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/requires.txt +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/scm_file_list.json +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/src/fleche.egg-info/top_level.txt +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/fixtures.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_hash_code_integration.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_integration.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_methods.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_notebooks.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_parallel_execution.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_remote.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/integration/test_wrapper_query_integration.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_builtin_signature.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_1004.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_217.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_297.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_319.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_352.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_451.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_452.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_485.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_578.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_592.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_issue_691.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_sql_concurrent_save.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_sql_non_sqlite_backends.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_sql_table_uniqueness.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/regression/test_wrap_executor_cloudpickle_lock.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/smoke/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/smoke/test_optional_deps.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/strategies.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_cache_pool.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_cache_stack.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_expand_shrink.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_filter.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_gc.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_lazy_call.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_readonly_cache.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_redigest.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/caches/test_refreshing_cache.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/call/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/call/test_code_digest.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/call/test_matches.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/call/test_partial_binding.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/config/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/config/test_cache_from_config.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/config/test_cache_to_config.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/config/test_config.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/config/test_storage_to_config.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/test_attrs.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/test_attrs_optional_dep.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/test_digest_methods.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/test_entry_points.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/digest/test_hashing.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_bound_wrapper.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_dataclass_input.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_decorator_attributes.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_digest_args.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_futures.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_hash_code.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_ignore_digest.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_process_args.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_processpool.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_rerun.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_signature_binding.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_type_hints.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/fleche/test_workdir.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/metadata/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/metadata/test_metadata.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/__init__.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_bagofholding_file.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_destructuring_dataclasses.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_destructuring_storage.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_file_storage.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_mixins.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_operation_context.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_optional_deps.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_overwrite.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_pickle_file.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_secure_storage.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_short_digest.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_sql_digest_types.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_sql_evict.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_sql_pragmas.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_sql_query.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_sql_url_coercion.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_storage.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_transform.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/storage/test_void.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/test_cache_sticky.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/test_executor.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/test_main.py +0 -0
- {fleche-0.22.3 → fleche-0.22.4}/tests/unit/test_remote.py +0 -0
|
@@ -35,7 +35,12 @@ jobs:
|
|
|
35
35
|
fetch-depth: 0
|
|
36
36
|
- uses: astral-sh/setup-uv@v5
|
|
37
37
|
if: needs.changes.outputs.run == 'true'
|
|
38
|
-
|
|
38
|
+
# Pin the interpreter to the oldest Python allowed by requires-python
|
|
39
|
+
# (keep in sync with pyproject.toml). Without it, uv picks the runner's
|
|
40
|
+
# system Python, which drifts with the image (ubuntu-26.04 ships 3.14),
|
|
41
|
+
# and the floors may have no wheels there, so they get built from source.
|
|
42
|
+
# uv downloads a managed 3.11 if the image lacks one.
|
|
43
|
+
- run: uv venv --python 3.11
|
|
39
44
|
if: needs.changes.outputs.run == 'true'
|
|
40
45
|
# --resolution lowest-direct pins every direct dependency to the lowest
|
|
41
46
|
# version its bound allows, exercising the floors declared in pyproject.
|
|
@@ -62,6 +62,29 @@ jobs:
|
|
|
62
62
|
if-no-files-found: ignore
|
|
63
63
|
retention-days: 90
|
|
64
64
|
|
|
65
|
+
executorlib:
|
|
66
|
+
needs: changes
|
|
67
|
+
if: needs.changes.outputs.run == 'true'
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v5
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@v6
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.12"
|
|
75
|
+
cache: pip
|
|
76
|
+
- name: Setup
|
|
77
|
+
shell: bash -l {0}
|
|
78
|
+
run: |
|
|
79
|
+
pip install -e .[tests,executorlib]
|
|
80
|
+
- name: Run executorlib tests
|
|
81
|
+
shell: bash -l {0}
|
|
82
|
+
env:
|
|
83
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
84
|
+
run: |
|
|
85
|
+
# The main build job doesn't install executorlib, so it skips these.
|
|
86
|
+
pytest tests/integration/test_parallel_execution.py -k executorlib -v -rs
|
|
87
|
+
|
|
65
88
|
sql-backends:
|
|
66
89
|
needs: changes
|
|
67
90
|
if: needs.changes.outputs.run == 'true'
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.22.4](https://github.com/pmrv/fleche/compare/0.22.3...0.22.4) (2026-11-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **call:** keep an explicit __version__ when the module cannot be imported ([#1028](https://github.com/pmrv/fleche/issues/1028)) ([f47005c](https://github.com/pmrv/fleche/commit/f47005c572d6c5eed65f6a28fab96b58bebef815))
|
|
9
|
+
|
|
3
10
|
## [0.22.3](https://github.com/pmrv/fleche/compare/0.22.2...0.22.3) (2026-11-06)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1063,8 +1063,7 @@ Git history is the changelog.
|
|
|
1063
1063
|
an addon package (`fleche-mpi` or similar) is the preferred home, and the close-out comment on #870 is its reference.
|
|
1064
1064
|
Branch `claude/fleche-mpi-executor-caching-zxjazw` keeps the helper, 13 subprocess-isolated integration tests, and `docs/mpi_execution.rst`.
|
|
1065
1065
|
Findings that stand regardless: lookup keys carry no rank, so all ranks contend for one record — warm runs flip the `[result, None]` return shape, and divergent per-rank hit/miss decisions make some ranks skip the body's collectives (silently wrong, or a hang).
|
|
1066
|
-
|
|
1067
|
-
The per-rank cold/warm caveat (an MPI-decorated call runs once per rank cold and serves one rank's record warm) is now documented in `docs/parallel_execution.rst` (#989, merged 2026-10-22).
|
|
1066
|
+
User docs stay silent on MPI-native functions: fleche makes no promises either way, so #1037 removed the per-rank caveat #989 had added to `docs/parallel_execution.rst`, and the executorlib example uses task parallelism (`max_workers`) rather than `resource_dict={"cores": N}`.
|
|
1068
1067
|
- Optional skip-saving of input arguments (#170), corruption-tolerant loads (#93), method-state restoration (#99), metadata-into-value-storage (#82) — parked for milestone 2.0.
|
|
1069
1068
|
- Refactors flagged `backburner`: `_digest` dispatch registry (#333), `DigestedCall`/`LazyCall` consolidation (#404).
|
|
1070
1069
|
- Terminology shift "cache" → "stash" and unifying "hash"/"digest" on "digest" (#350) — targeted for 1.0, not started.
|
|
@@ -454,11 +454,11 @@
|
|
|
454
454
|
"\n",
|
|
455
455
|
"```python\n",
|
|
456
456
|
"with cache(shared_cache):\n",
|
|
457
|
-
" with SingleNodeExecutor() as executor
|
|
457
|
+
" with SingleNodeExecutor(max_workers=4) as executor: # 4 tasks at once\n",
|
|
458
458
|
" wrap_executor(executor)\n",
|
|
459
459
|
" future = executor.submit(\n",
|
|
460
460
|
" expensive, 5,\n",
|
|
461
|
-
" resource_dict={\"
|
|
461
|
+
" resource_dict={\"threads_per_core\": 2}, # goes to SingleNodeExecutor.submit\n",
|
|
462
462
|
" )\n",
|
|
463
463
|
" future.result() # goes to expensive\n",
|
|
464
464
|
"```\n",
|
|
@@ -211,19 +211,6 @@ processes, the same rules as ``ProcessPoolExecutor`` apply:
|
|
|
211
211
|
- In-memory caches are **not** shared with workers.
|
|
212
212
|
- Use **file-** or **SQL-backed** storage with :class:`~fleche.BoundWrapper`.
|
|
213
213
|
|
|
214
|
-
.. warning::
|
|
215
|
-
|
|
216
|
-
A fleche cache key has no concept of MPI rank. If a fleche-decorated
|
|
217
|
-
function wraps a collective MPI call, every rank computes the same
|
|
218
|
-
lookup key for the same arguments, so a cold run executes the
|
|
219
|
-
function **once per rank** rather than once overall, and a warm
|
|
220
|
-
cache serves every rank the *same* cached record — the one whichever
|
|
221
|
-
rank happened to save it — instead of each rank running its own
|
|
222
|
-
collective. Don't decorate MPI-collective code directly; cache above
|
|
223
|
-
or below the collective instead, at a point where each rank's
|
|
224
|
-
arguments (or the absence of a cache call at all) make this a
|
|
225
|
-
non-issue.
|
|
226
|
-
|
|
227
214
|
.. code-block:: pycon
|
|
228
215
|
|
|
229
216
|
>>> # file_cache and heavy_computation as set up in the ProcessPoolExecutor example above
|
|
@@ -354,30 +341,13 @@ payload:
|
|
|
354
341
|
>>> from executorlib import SingleNodeExecutor
|
|
355
342
|
|
|
356
343
|
>>> with fleche.cache(file_cache):
|
|
357
|
-
... with SingleNodeExecutor() as executor:
|
|
344
|
+
... with SingleNodeExecutor(max_workers=4) as executor: # 4 tasks at once
|
|
358
345
|
... fleche.wrap_executor(executor)
|
|
359
346
|
... future = executor.submit(
|
|
360
347
|
... heavy_computation, 5,
|
|
361
|
-
... resource_dict={"
|
|
348
|
+
... resource_dict={"threads_per_core": 2}, # goes to SingleNodeExecutor.submit
|
|
362
349
|
... )
|
|
363
|
-
... assert future.result() ==
|
|
364
|
-
|
|
365
|
-
.. note::
|
|
366
|
-
|
|
367
|
-
``resource_dict={"cores": N}`` with ``N > 1`` (as above) routes through
|
|
368
|
-
executorlib's MPI spawner, which requires ``mpi4py`` plus a system MPI
|
|
369
|
-
runtime (``mpiexec``) installed separately — neither is pulled in by the
|
|
370
|
-
``fleche[executorlib]`` extra. Without them, this path fails with a
|
|
371
|
-
``FileNotFoundError: mpiexec`` raised inside a background thread, where it
|
|
372
|
-
is swallowed rather than propagated to ``future.result()`` — the call
|
|
373
|
-
hangs indefinitely instead of raising.
|
|
374
|
-
|
|
375
|
-
With MPI available, executorlib runs the callable on every rank and a cache
|
|
376
|
-
miss resolves to a list with one result per rank, as above. The cache,
|
|
377
|
-
however, holds the plain result under the call's key, so a later cache hit —
|
|
378
|
-
served by :func:`~fleche.wrap_executor` without touching the executor —
|
|
379
|
-
resolves to ``125``, not the list. Code consuming the future must handle
|
|
380
|
-
both shapes.
|
|
350
|
+
... assert future.result() == 125
|
|
381
351
|
|
|
382
352
|
.. note::
|
|
383
353
|
|
|
@@ -454,11 +454,11 @@
|
|
|
454
454
|
"\n",
|
|
455
455
|
"```python\n",
|
|
456
456
|
"with cache(shared_cache):\n",
|
|
457
|
-
" with SingleNodeExecutor() as executor
|
|
457
|
+
" with SingleNodeExecutor(max_workers=4) as executor: # 4 tasks at once\n",
|
|
458
458
|
" wrap_executor(executor)\n",
|
|
459
459
|
" future = executor.submit(\n",
|
|
460
460
|
" expensive, 5,\n",
|
|
461
|
-
" resource_dict={\"
|
|
461
|
+
" resource_dict={\"threads_per_core\": 2}, # goes to SingleNodeExecutor.submit\n",
|
|
462
462
|
" )\n",
|
|
463
463
|
" future.result() # goes to expensive\n",
|
|
464
464
|
"```\n",
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.22.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 22,
|
|
21
|
+
__version__ = version = '0.22.4'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 22, 4)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gb6188dbd7'
|
|
@@ -101,9 +101,11 @@ class FunctionProfile:
|
|
|
101
101
|
module = info.module
|
|
102
102
|
version = getattr(func, "__version__", info.version)
|
|
103
103
|
except ModuleNotFoundError:
|
|
104
|
+
# The module cannot be imported to scrape a version from, but an
|
|
105
|
+
# explicit __version__ (set by fleche(version=...)) still counts.
|
|
104
106
|
module = get_module(func)
|
|
105
107
|
qualname = get_qualname(func) or module
|
|
106
|
-
version = None
|
|
108
|
+
version = getattr(func, "__version__", None)
|
|
107
109
|
|
|
108
110
|
code_digest = _code_digest(func) if hasattr(func, "__code__") else None
|
|
109
111
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import sys
|
|
2
3
|
|
|
3
4
|
from hypothesis import settings
|
|
4
5
|
from hypothesis.database import (
|
|
@@ -10,6 +11,12 @@ from hypothesis.database import (
|
|
|
10
11
|
|
|
11
12
|
pytest_plugins = ["tests.fixtures"]
|
|
12
13
|
|
|
14
|
+
# Make CPython's own `test` package unimportable on every interpreter, as it
|
|
15
|
+
# already is on builds that leave it out (uv's managed Pythons). Tests must
|
|
16
|
+
# never name `test` as a module: where the package exists, an import of it
|
|
17
|
+
# succeeds and silently takes a different code path than in CI.
|
|
18
|
+
sys.modules["test"] = None # type: ignore[assignment]
|
|
19
|
+
|
|
13
20
|
if os.environ.get("GITHUB_ACTIONS") == "true":
|
|
14
21
|
_local = DirectoryBasedExampleDatabase(".hypothesis/examples")
|
|
15
22
|
_shared = ReadOnlyDatabase(
|
|
@@ -102,7 +102,7 @@ def test_base_cache_transfer():
|
|
|
102
102
|
name="f1",
|
|
103
103
|
arguments={"a": 1},
|
|
104
104
|
result=2,
|
|
105
|
-
module="
|
|
105
|
+
module="example_module",
|
|
106
106
|
version="1.0",
|
|
107
107
|
metadata={},
|
|
108
108
|
)
|
|
@@ -110,7 +110,7 @@ def test_base_cache_transfer():
|
|
|
110
110
|
name="f2",
|
|
111
111
|
arguments={"b": 3},
|
|
112
112
|
result=4,
|
|
113
|
-
module="
|
|
113
|
+
module="example_module",
|
|
114
114
|
version="1.0",
|
|
115
115
|
metadata={},
|
|
116
116
|
)
|
|
@@ -134,7 +134,7 @@ def test_base_cache_transfer_overwrite():
|
|
|
134
134
|
name="f1",
|
|
135
135
|
arguments={"a": 1},
|
|
136
136
|
result=2,
|
|
137
|
-
module="
|
|
137
|
+
module="example_module",
|
|
138
138
|
version="1.0",
|
|
139
139
|
metadata={},
|
|
140
140
|
)
|
|
@@ -143,7 +143,7 @@ def test_base_cache_transfer_overwrite():
|
|
|
143
143
|
name="f1",
|
|
144
144
|
arguments={"a": 1},
|
|
145
145
|
result="conflict",
|
|
146
|
-
module="
|
|
146
|
+
module="example_module",
|
|
147
147
|
version="1.0",
|
|
148
148
|
metadata={},
|
|
149
149
|
)
|
|
@@ -172,7 +172,7 @@ def test_base_cache_transfer_pop():
|
|
|
172
172
|
name="f1",
|
|
173
173
|
arguments={"a": 1},
|
|
174
174
|
result=2,
|
|
175
|
-
module="
|
|
175
|
+
module="example_module",
|
|
176
176
|
version="1.0",
|
|
177
177
|
metadata={},
|
|
178
178
|
)
|
|
@@ -180,7 +180,7 @@ def test_base_cache_transfer_pop():
|
|
|
180
180
|
name="f2",
|
|
181
181
|
arguments={"b": 3},
|
|
182
182
|
result=4,
|
|
183
|
-
module="
|
|
183
|
+
module="example_module",
|
|
184
184
|
version="1.0",
|
|
185
185
|
metadata={},
|
|
186
186
|
)
|
|
@@ -208,7 +208,7 @@ def test_base_cache_transfer_no_overwrite_and_pop(caplog):
|
|
|
208
208
|
name="f1",
|
|
209
209
|
arguments={"a": 1},
|
|
210
210
|
result=2,
|
|
211
|
-
module="
|
|
211
|
+
module="example_module",
|
|
212
212
|
version="1.0",
|
|
213
213
|
metadata={},
|
|
214
214
|
)
|
|
@@ -216,7 +216,7 @@ def test_base_cache_transfer_no_overwrite_and_pop(caplog):
|
|
|
216
216
|
name="f2",
|
|
217
217
|
arguments={"b": 3},
|
|
218
218
|
result=4,
|
|
219
|
-
module="
|
|
219
|
+
module="example_module",
|
|
220
220
|
version="1.0",
|
|
221
221
|
metadata={},
|
|
222
222
|
)
|
|
@@ -225,7 +225,7 @@ def test_base_cache_transfer_no_overwrite_and_pop(caplog):
|
|
|
225
225
|
name="f1",
|
|
226
226
|
arguments={"a": 1},
|
|
227
227
|
result="existing",
|
|
228
|
-
module="
|
|
228
|
+
module="example_module",
|
|
229
229
|
version="1.0",
|
|
230
230
|
metadata={},
|
|
231
231
|
)
|
|
@@ -16,7 +16,7 @@ from tests.fixtures import run_workers
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def make_call(name: str, x: int, result: int) -> Call:
|
|
19
|
-
return Call(name=name, arguments={"x": x}, result=result, module="
|
|
19
|
+
return Call(name=name, arguments={"x": x}, result=result, module="example_module", version=1, metadata={})
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
# ---------------------------------------------------------------------------
|
|
@@ -11,7 +11,7 @@ def make_slcache(max_size: int) -> SizeLimitedCache:
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def make_call(name: str, x: int, result: int) -> Call:
|
|
14
|
-
return Call(name=name, arguments={"x": x}, result=result, module="
|
|
14
|
+
return Call(name=name, arguments={"x": x}, result=result, module="example_module", version=1, metadata={})
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def test_size_limit_enforced():
|
|
@@ -128,23 +128,19 @@ class TestDigestedCallFetch:
|
|
|
128
128
|
# ---------------------------------------------------------------------------
|
|
129
129
|
|
|
130
130
|
class TestCallStash:
|
|
131
|
-
def
|
|
132
|
-
|
|
133
|
-
call = _call()
|
|
134
|
-
result = call.stash(values)
|
|
135
|
-
assert isinstance(result, DigestedCall)
|
|
131
|
+
def test_returns_a_digested_call_of_digests(self):
|
|
132
|
+
"""stash() returns a DigestedCall whose every value is a Digest.
|
|
136
133
|
|
|
137
|
-
|
|
134
|
+
One shape, three properties: three tests asserting one property each
|
|
135
|
+
of the very same return value were three runs of one code path.
|
|
136
|
+
"""
|
|
138
137
|
values = _mem()
|
|
139
138
|
call = _call()
|
|
140
|
-
digested = call.stash(values)
|
|
141
|
-
for v in digested.arguments.values():
|
|
142
|
-
assert isinstance(v, Digest)
|
|
143
139
|
|
|
144
|
-
def test_result_is_digest(self):
|
|
145
|
-
values = _mem()
|
|
146
|
-
call = _call()
|
|
147
140
|
digested = call.stash(values)
|
|
141
|
+
|
|
142
|
+
assert isinstance(digested, DigestedCall)
|
|
143
|
+
assert all(isinstance(v, Digest) for v in digested.arguments.values())
|
|
148
144
|
assert isinstance(digested.result, Digest)
|
|
149
145
|
|
|
150
146
|
def test_already_digest_argument_preserved(self):
|
|
@@ -192,15 +188,17 @@ class TestCallStash:
|
|
|
192
188
|
# ---------------------------------------------------------------------------
|
|
193
189
|
|
|
194
190
|
class TestCallDigest:
|
|
195
|
-
def
|
|
196
|
-
|
|
191
|
+
def test_returns_a_digested_call_of_digests(self):
|
|
192
|
+
"""digest() produces the same record shape as stash(), without storing.
|
|
197
193
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
194
|
+
The stash-side twin is
|
|
195
|
+
``TestCallStash::test_returns_a_digested_call_of_digests``.
|
|
196
|
+
"""
|
|
197
|
+
digested = _call().digest()
|
|
201
198
|
|
|
202
|
-
|
|
203
|
-
assert isinstance(
|
|
199
|
+
assert isinstance(digested, DigestedCall)
|
|
200
|
+
assert all(isinstance(v, Digest) for v in digested.arguments.values())
|
|
201
|
+
assert isinstance(digested.result, Digest)
|
|
204
202
|
|
|
205
203
|
def test_same_lookup_key_as_stash(self):
|
|
206
204
|
values = _mem()
|
|
@@ -240,15 +238,12 @@ class TestDigestedCallDigestEquivalence:
|
|
|
240
238
|
dc = call.digest()
|
|
241
239
|
assert digest(dc) == digest(call)
|
|
242
240
|
|
|
243
|
-
def test_stash_digest_matches_original_call(self):
|
|
244
|
-
"""digest(stash) == digest(call) — stash stores values but same hash as original."""
|
|
245
|
-
values = _mem()
|
|
246
|
-
call = _call(arguments={"x": 10, "y": 20}, result=99)
|
|
247
|
-
stashed = call.stash(values)
|
|
248
|
-
assert digest(stashed) == digest(call)
|
|
249
|
-
|
|
250
241
|
def test_digested_call_digest_matches_lazy_call(self):
|
|
251
|
-
"""digest(DigestedCall) == digest(LazyCall) — three-way equivalence.
|
|
242
|
+
"""digest(DigestedCall) == digest(LazyCall) — three-way equivalence.
|
|
243
|
+
|
|
244
|
+
Its two assertions chain to ``digest(stashed) == digest(call)``, which
|
|
245
|
+
is why the stash-vs-call leg needs no test of its own.
|
|
246
|
+
"""
|
|
252
247
|
values = _mem()
|
|
253
248
|
cache = _cache(values)
|
|
254
249
|
call = _call(arguments={"x": 10, "y": 20}, result=99)
|
|
@@ -7,11 +7,13 @@ an argument was recorded under post-mutation content and could never be found
|
|
|
7
7
|
by an honest repeat call. Under the two-phase protocol the recorded identity
|
|
8
8
|
is sealed at prepare time.
|
|
9
9
|
"""
|
|
10
|
+
from concurrent.futures import Future
|
|
11
|
+
|
|
10
12
|
import pytest
|
|
11
13
|
|
|
12
14
|
from fleche import fleche
|
|
13
15
|
import fleche as fl
|
|
14
|
-
from fleche.call import Call
|
|
16
|
+
from fleche.call import Call, PreparedCall
|
|
15
17
|
from fleche.caches import Cache, CacheStack, RefreshingCache, Rejected
|
|
16
18
|
from fleche.digest import digest
|
|
17
19
|
from fleche.storage.memory import ValueMemory, CallMemory
|
|
@@ -240,3 +242,56 @@ def test_body_exception_leaves_no_record(cache):
|
|
|
240
242
|
boom(1)
|
|
241
243
|
assert len(runs) == 2 # nothing cached, body ran twice
|
|
242
244
|
assert not boom.contains(1)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def _abandon_recording_cache(abandoned: list) -> Cache:
|
|
248
|
+
"""A cache whose prepared calls record their own abandonment.
|
|
249
|
+
|
|
250
|
+
``PreparedCall.abandon`` is documented as a subclass hook, so overriding
|
|
251
|
+
it is the supported way to observe that the protocol was finished — the
|
|
252
|
+
default implementation is a no-op, and "nothing was recorded" alone holds
|
|
253
|
+
whether the call was abandoned or merely dropped on the floor.
|
|
254
|
+
"""
|
|
255
|
+
|
|
256
|
+
class RecordingPrepared(PreparedCall):
|
|
257
|
+
def abandon(self) -> None:
|
|
258
|
+
abandoned.append(self.to_lookup_key())
|
|
259
|
+
super().abandon()
|
|
260
|
+
|
|
261
|
+
class RecordingCache(Cache):
|
|
262
|
+
def prepare(self, call):
|
|
263
|
+
prepared = super().prepare(call)
|
|
264
|
+
return RecordingPrepared(digested=prepared.digested, cache=prepared.cache)
|
|
265
|
+
|
|
266
|
+
return RecordingCache(ValueMemory({}), CallMemory({}))
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def test_failed_future_abandons_the_prepared_call():
|
|
270
|
+
"""The deferred twin of ``test_body_exception_leaves_no_record``.
|
|
271
|
+
|
|
272
|
+
A body that returns a :class:`~concurrent.futures.Future` has already
|
|
273
|
+
returned by the time the work fails, so the wrapper cannot abandon inline:
|
|
274
|
+
the call is sealed, the future is handed back to the caller, and the
|
|
275
|
+
failure only surfaces in the done callback — which is where the two-phase
|
|
276
|
+
save has to be finished off.
|
|
277
|
+
|
|
278
|
+
The future is resolved before it is returned so the callback runs inline
|
|
279
|
+
in ``add_done_callback``; a worker thread would resolve the caller's
|
|
280
|
+
``result()`` before the callback had necessarily run.
|
|
281
|
+
"""
|
|
282
|
+
abandoned: list = []
|
|
283
|
+
cache = _abandon_recording_cache(abandoned)
|
|
284
|
+
|
|
285
|
+
@fleche
|
|
286
|
+
def compute(x):
|
|
287
|
+
future: Future = Future()
|
|
288
|
+
future.set_exception(ValueError("boom"))
|
|
289
|
+
return future
|
|
290
|
+
|
|
291
|
+
with fl.cache(cache):
|
|
292
|
+
future = compute(5)
|
|
293
|
+
|
|
294
|
+
assert abandoned == [compute.digest(5)] # sealed call released, not left in limbo
|
|
295
|
+
with pytest.raises(ValueError):
|
|
296
|
+
future.result() # the failure still reaches the caller
|
|
297
|
+
assert not compute.contains(5)
|