File: //usr/local/lib/python3.10/test/test_zoneinfo/__pycache__/_support.cpython-310.pyc
o
�i� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZ e�� Ze�� Z e�� Z
dd� Zedd� �Ze j
dd� �ZG d d
� d
ej�ZdS )� N)�import_fresh_modulec s2 t �� �t�d�| �� t�| �� �fdd��}|S )z;Decorator that ensures a function is only ever called once.Nc s. �� � � W d � S 1 sw Y d S �N� r ��cached�lockr �8/usr/local/lib/python3.10/test/test_zoneinfo/_support.py�inner s $�zcall_once.<locals>.inner)� threading�Lock� functools� lru_cache�wraps)�fr r r r � call_once
s
r c C s ddl } tddgd�}|| fS )u� Retrieve two copies of zoneinfo: pure Python and C accelerated.
Because this function manipulates the import system in a way that might
be fragile or do unexpected things if it is run many times, it uses a
`call_once` decorator to ensure that this is only ever called exactly
one time — in other words, when using this function you will only ever
get one copy of each module rather than a fresh import each time.
r N�zoneinfoZ _zoneinfo)Zblocked)r r )Zc_moduleZ py_moduler r r �get_modules s
r c c sL � t � }tj�d|�}| tjd<