Lines Matching +full:cache +full:- +full:dependency +full:- +full:path
1 :mod:`zoneinfo` --- IANA time zone support
14 --------------
20 first-party `tzdata`_ package available on PyPI.
29 First-party package maintained by the CPython core developers to supply
32 .. include:: ../includes/wasm-notavail.rst
35 ------------------
47 2020-10-31 12:00:00-07:00
58 2020-11-01 12:00:00-08:00
71 2020-11-01 01:00:00-07:00
74 2020-11-01 01:00:00-08:00
83 >>> # Before the PDT -> PST transition
85 2020-11-01 01:00:00-07:00
87 >>> # After the PDT -> PST transition
89 2020-11-01 01:00:00-08:00
92 ------------
96 first-party PyPI package `tzdata`_, if available. Some systems, including
98 projects targeting cross-platform compatibility that require time zone data, it
99 is recommended to declare a dependency on tzdata. If neither system data nor
117 3. At :ref:`runtime <zoneinfo_data_runtime_config>`, the search path can be
122 Compile-time configuration
126 time zone database (except on Windows, where there are no "well-known"
129 time zone data is deployed may change the default time zone path by specifying
130 the compile-time option ``TZPATH`` (or, more likely, the :option:`configure
131 flag --with-tzpath <--with-tzpath>`), which should be a string delimited by
145 path.
149 This is an :data:`os.pathsep`-separated string containing the time zone
150 search path to use. It must consist of only absolute rather than relative
152 but otherwise the behavior when a relative path is specified is
153 implementation-defined; CPython will raise :exc:`InvalidTZPathWarning`, but
165 The TZ search path can also be configured at runtime using the
168 specific time zone path (or require disabling access to the system time zones).
172 ----------------------
179 cache invalidation via :meth:`ZoneInfo.clear_cache`, for all values of
182 .. code-block:: python
188 ``key`` must be in the form of a relative, normalized POSIX path, with no
189 up-level references. The constructor will raise :exc:`ValueError` if a
190 non-conforming key is passed.
200 Constructs a ``ZoneInfo`` object from a file-like object returning bytes
211 An alternate constructor that bypasses the constructor's cache. It is
214 purposes, but it can also be used to create a system with a different cache
217 Objects created via this constructor will also bypass the cache of a
231 A method for invalidating the cache on the ``ZoneInfo`` class. If no
236 the specified keys will be removed from the cache. Keys passed to
237 ``only_keys`` but not found in the cache are ignored.
244 ``ZoneInfo`` in surprising ways; this modifies process-wide global state
245 and thus may have wide-ranging effects. Only use it if you know that you
252 This is a read-only :term:`attribute` that returns the value of ``key``
264 relevant zones and not necessarily user-facing elements. Projects like
266 more user-friendly strings from these keys.
281 '2020-04-01T03:15:00+12:00 [Pacific/Kwajalein]'
285 implementation-defined and not necessarily stable between versions, but it is
307 .. code-block:: pycon
314 2. ``ZoneInfo.no_cache(key)``: When constructed from the cache-bypassing
316 deserialized, the deserializing process uses the cache bypassing
321 .. code-block:: pycon
342 ---------
347 anywhere on the time zone path. This is recalculated on every call to the
357 determine if a file on the time zone path is a valid time zone is to
362 These values are not designed to be exposed to end-users; for user
364 Unicode Common Locale Data Repository) to get more user-friendly
369 Sets or resets the time zone search path (:data:`TZPATH`) for the module.
372 Calling ``reset_tzpath`` will not invalidate the :class:`ZoneInfo` cache,
374 ``TZPATH`` in the case of a cache miss.
378 :exc:`ValueError` will be raised if something other than an absolute path
382 -------
386 A read-only sequence representing the time zone search path -- when
396 assigning a long-lived variable to ``zoneinfo.TZPATH``.
398 For more information on configuring the time zone search path, see
402 -----------------------
413 be filtered out, such as a relative path.