kiba-core 0.5.3.dev104__tar.gz → 0.5.3.dev105__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.
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/CHANGELOG.md +1 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/PKG-INFO +1 -1
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/caching/file_cache.py +5 -1
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/kiba_core.egg-info/PKG-INFO +1 -1
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/pyproject.toml +1 -1
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/caching/test_file_cache.py +16 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/.github/pull_request_template.md +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/.github/workflows/deploy.yml +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/.github/workflows/publish.yml +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/.github/workflows/pull-request.yml +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/.github/workflows/release.yml +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/.gitignore +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/Dockerfile +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/README.md +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/api_request.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/api_response.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/authorizer.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/default_routes.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/health.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/json_route.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/blocked_ip_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/database_connection_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/exception_handling_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/gzip_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/logging_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/origin_ip_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/public_cors_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/security_headers_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/server_headers_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/openapi.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/rate_limit.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/request_body.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/request_context.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/route.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/route_auth.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/route_metadata.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/streaming_json_route.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/uploaded_file.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/auth_tokens/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/auth_tokens/auth_token_invalidation_store.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/auth_tokens/dict_auth_token_invalidation_store.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/auth_tokens/sql_auth_token_invalidation_store.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/aws_requester.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/caching/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/caching/cache.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/caching/dict_cache.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/cron/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/cron/api_request_cron_job_processor.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/cron/cron_executor.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/cron/cron_job_processor.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/cron/model.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/exceptions.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/http/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/http/basic_authentication.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/http/jwt.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/http/rest_method.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/http/signed_token_manager.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/locks/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/locks/lock.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/locks/model.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/locks/sql.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/logging.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/mcp/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/mcp/mcp_identity_provider.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/mcp/mcp_oauth_server.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/mcp/mcp_routes.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/mcp/mcp_server.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/mcp/model.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/notifications/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/notifications/discord_client.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/notifications/notification_client.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/notifications/slack_client.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/py.typed +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/aqs.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/cosmos.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/message_queue.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/message_queue_processor.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/model.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/sql.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/queues/sqs.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/requester/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/requester/requester.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/s3_manager.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/service_client.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/store/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/store/database.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/store/entity_repository.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/store/retriever.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/store/saver.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/async_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/chain_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/date_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/dict_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/file_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/hashing_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/http_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/json_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/list_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/number_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/process_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/string_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/typing_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/url_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/util/value_holder.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/web3/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/web3/erc20.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/web3/erc4626.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/web3/eth_client.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/web3/eth_client_registry.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/web3/multicall3.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/kiba_core.egg-info/SOURCES.txt +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/kiba_core.egg-info/dependency_links.txt +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/kiba_core.egg-info/requires.txt +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/kiba_core.egg-info/top_level.txt +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/makefile +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/setup.cfg +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_api_response.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_authorizer.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_blocked_ip_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_database_connection_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_exception_handling_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_gzip_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_json_route.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_openapi.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_origin_ip_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_public_cors_middleware.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_rate_limit.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_request_context.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_route.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_streaming_json_route.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/auth_tokens/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/auth_tokens/test_auth_token_invalidation_store.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/caching/test_dict_cache.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/cron/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/cron/test_cron_executor.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/http/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/http/test_signed_token_manager.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/locks/test_sql_lock.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/mcp/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/mcp/conftest.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/mcp/test_mcp_oauth.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/mcp/test_mcp_server.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/conftest.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/test_aqs_queue.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/test_cosmos_queue.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/test_message_queue_processor.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/test_sql_queue.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/test_sqs_queue.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/requester/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/requester/test_requester.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/test_database.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/test_entity_repository.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/test_exceptions.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/test_logging.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_async_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_chain_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_date_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_dict_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_file_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_json_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_list_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_number_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_process_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_string_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/util/test_url_util.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/web3/__init__.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/web3/test_eth_client_registry.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/web3/test_rest_eth_client.py +0 -0
- {kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/uv.lock +0 -0
|
@@ -114,6 +114,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
|
114
114
|
- [MINOR] Added `SqlMessageQueue` and `CosmosMessageQueue` to support database backed queues
|
|
115
115
|
- [MINOR] Added `shouldAllowFailures` to `EthClient.multicall` to allow individual calls to fail without reverting the whole batch
|
|
116
116
|
- [MINOR] Added `KibaException.from_headers`/`outgoing_headers` hooks so exceptions can be built from and emit response headers; used by `TooManyRequestsException` (`Retry-After`, now also parsed automatically by `Requester` from 429 responses) and `RedirectException` (`Location`/`Cache-Control`), and applied generically by `ExceptionHandlingMiddleware`
|
|
117
|
+
- [PATCH] Fixed `FileCache.get` raising `FileNotFoundError` when another task expires the entry and removes its files during the read; it is now a miss
|
|
117
118
|
|
|
118
119
|
### Changed
|
|
119
120
|
|
|
@@ -55,7 +55,11 @@ class FileCache(Cache):
|
|
|
55
55
|
return await file_util.read_file(filePath=contentFilePath)
|
|
56
56
|
|
|
57
57
|
async def get(self, key: str) -> str | None:
|
|
58
|
-
|
|
58
|
+
# NOTE(krishan711): another task can expire the entry and remove its files between any two steps of the read, which is a miss
|
|
59
|
+
try:
|
|
60
|
+
return await self._internal_get(key=key)
|
|
61
|
+
except FileNotFoundError:
|
|
62
|
+
return None
|
|
59
63
|
|
|
60
64
|
async def delete(self, key: str) -> bool:
|
|
61
65
|
# NOTE(krishan711): we only delete content file for speed
|
|
@@ -7,6 +7,7 @@ import pytest
|
|
|
7
7
|
|
|
8
8
|
from core.caching.file_cache import FileCache
|
|
9
9
|
from core.util import date_util
|
|
10
|
+
from core.util import file_util
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class TestFileCache:
|
|
@@ -120,6 +121,21 @@ class TestFileCache:
|
|
|
120
121
|
assert not os.path.exists(content_file)
|
|
121
122
|
assert not os.path.exists(expiry_file)
|
|
122
123
|
|
|
124
|
+
async def test_get_is_a_miss_when_the_files_are_removed_during_the_read(self, cache: FileCache, cache_dir, monkeypatch):
|
|
125
|
+
key = "racing_key"
|
|
126
|
+
await cache.set(key=key, value="test_value", expirySeconds=60)
|
|
127
|
+
originalFileExists = file_util.file_exists
|
|
128
|
+
|
|
129
|
+
async def file_exists_then_removed(filePath: str) -> bool:
|
|
130
|
+
doesExist = await originalFileExists(filePath=filePath)
|
|
131
|
+
if filePath.endswith('expiryDate.txt'):
|
|
132
|
+
shutil.rmtree(os.path.join(cache_dir, key))
|
|
133
|
+
return doesExist
|
|
134
|
+
|
|
135
|
+
monkeypatch.setattr(file_util, "file_exists", file_exists_then_removed)
|
|
136
|
+
result = await cache.get(key=key)
|
|
137
|
+
assert result is None
|
|
138
|
+
|
|
123
139
|
async def test_malformed_expiry_file(self, cache: FileCache, cache_dir):
|
|
124
140
|
key = "malformed_key"
|
|
125
141
|
value = "test_value"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/blocked_ip_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/origin_ip_middleware.py
RENAMED
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/public_cors_middleware.py
RENAMED
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/security_headers_middleware.py
RENAMED
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/api/middleware/server_headers_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/auth_tokens/auth_token_invalidation_store.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/core/cron/api_request_cron_job_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_database_connection_middleware.py
RENAMED
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/api/test_exception_handling_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev104 → kiba_core-0.5.3.dev105}/tests/queues/test_message_queue_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|