diff --git a/docs/changelog/v3.0.0.rst b/docs/changelog/v3.0.0.rst index 289f492ca..edc7ee838 100644 --- a/docs/changelog/v3.0.0.rst +++ b/docs/changelog/v3.0.0.rst @@ -1,6 +1,8 @@ What's new in v3.0.0 -------------------- +(released 02/05/2023) + New Features ^^^^^^^^^^^^ @@ -62,12 +64,6 @@ New Features ``Session*DateUtc`` (#253). Timezone information and UTC timestamps are only available when using one of ``'fastf1'`` or ``'f1timing'`` as backend. - ``Session*Date`` is now a timezone aware timestamp for the session start time - as local time (was not timezone aware previously). ``Session*DateUtc`` was - added and provides a non-timezone-aware Utc timestamp for the session start - time. Timezone aware local timestamps are only available when the primary - schedule backend is used. - - Added ``strict_search`` parameter to :func:`fastf1.get_event` that disables fuzzy matching for exact matching of session names. (by @Neron-png) @@ -235,6 +231,6 @@ Deprecations If you currently require functionality from there, please open an issue on Github with details about what you require and why. -- :mod:`utils.delta_time` is considered deprecated and will be modified or +- :mod:`fastf1.utils.delta_time` is considered deprecated and will be modified or removed in a future release because it has a tendency to give inaccurate results. diff --git a/fastf1/__init__.py b/fastf1/__init__.py index 0f64d3bfc..cd7ec978a 100644 --- a/fastf1/__init__.py +++ b/fastf1/__init__.py @@ -50,7 +50,8 @@ ......... .. autoclass:: Cache - :members: enable_cache, clear_cache, disabled, set_disabled, set_enabled + :members: enable_cache, clear_cache, disabled, set_disabled, set_enabled, + offline_mode :autosummary: diff --git a/fastf1/req.py b/fastf1/req.py index 7da36658f..9c01dc1f9 100644 --- a/fastf1/req.py +++ b/fastf1/req.py @@ -156,6 +156,7 @@ class Cache: fastf1.Cache.disabled fastf1.Cache.set_disabled fastf1.Cache.set_enabled + fastf1.Cache.offline_mode The parsed API data will be saved as a pickled object. Raw GET and POST requests are cached in a sqlite db using the @@ -580,6 +581,10 @@ def offline_mode(cls, enabled: bool): In this mode, no actual requests will be sent and only cached data is returned. This can be useful for freezing the state of the cache or working with an unstable internet connection. + + Args: + enabled: sets the state of offline mode to 'enabled' (``True``) + or 'disabled' (``False``) """ if cls._requests_session_cached is None: cls._enable_default_cache()