dycw-utilities 0.120.0__tar.gz → 0.121.0__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.
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/PKG-INFO +1 -1
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/pyproject.toml +2 -2
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_asyncio.py +33 -46
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/__init__.py +1 -1
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/asyncio.py +21 -13
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/types.py +2 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/.gitignore +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/LICENSE +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/README.md +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/conftest.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_missing/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_missing/module.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/outer_1.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/outer_2.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/subpackage/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/subpackage/inner_1.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/subpackage/inner_2.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/subpackage/inner_3.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_without/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_without/module_1.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_without/module_2.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/standalone.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/with_imports.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__obj.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__series.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_int.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__false.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__true.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_nested.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_dataframe.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_series.json +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_altair.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_astor.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_atomicwrites.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_atools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_cachetools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_click.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_concurrent.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_contextlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_contextvars.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_cryptography.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_cvxpy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_dataclasses.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_datetime.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_enum.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_errors.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_eventkit.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_fastapi.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_fpdf2.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_functions.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_functools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_getpass.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_git.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_hashlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_http.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_hypothesis.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_importlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_ipython.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_iterables.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_jupyter.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_lightweight_charts.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_logging.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_loguru.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_luigi.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_math.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_memory_profiler.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_modules.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_more_itertools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_numpy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_operator.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_optuna.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_orjson.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_os.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_parse.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pathlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_period.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pickle.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_platform.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_polars.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_polars_ols.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pqdm.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pydantic.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pyinstrument.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pyrsistent.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pytest.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_pytest_regressions.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_python_dotenv.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_random.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_re.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_redis.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_reprlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_rich.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_scipy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_sentinel.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_shelve.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_slack_sdk.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_socket.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_sqlalchemy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_statsmodel.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_streamlit.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_sys.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_tempfile.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_tenacity.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_text.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_threading.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_timer.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/chain.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/decorated_async.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/decorated_sync.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/error_bind.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/many.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/one.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/recursive.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/task_group_one.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/task_group_two.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/two.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/untraced.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_types.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_typing.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_typing_funcs/__init__.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_typing_funcs/no_future.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_typing_funcs/with_future.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_tzdata.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_tzlocal.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_uuid.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_version.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_warnings.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_whenever.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_zipfile.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_zoneinfo.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/altair.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/astor.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/atomicwrites.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/atools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/cachetools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/click.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/concurrent.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/contextlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/contextvars.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/cryptography.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/cvxpy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/dataclasses.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/datetime.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/enum.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/errors.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/eventkit.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/fastapi.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/fpdf2.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/functions.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/functools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/getpass.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/git.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/hashlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/http.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/hypothesis.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/importlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/ipython.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/iterables.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/jupyter.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/lightweight_charts.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/logging.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/loguru.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/luigi.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/math.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/memory_profiler.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/modules.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/more_itertools.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/numpy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/operator.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/optuna.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/orjson.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/os.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/parse.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pathlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/period.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pickle.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/platform.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/polars.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/polars_ols.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pqdm.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/py.typed +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pydantic.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pyinstrument.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pyrsistent.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pytest.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/pytest_regressions.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/python_dotenv.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/random.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/re.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/redis.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/reprlib.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/rich.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/scipy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/sentinel.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/shelve.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/slack_sdk.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/socket.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/sqlalchemy.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/statsmodels.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/streamlit.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/sys.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/tempfile.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/tenacity.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/text.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/threading.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/timer.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/traceback.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/typing.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/tzdata.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/tzlocal.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/uuid.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/version.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/warnings.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/whenever.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/zipfile.py +0 -0
- {dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/utilities/zoneinfo.py +0 -0
@@ -92,7 +92,7 @@ dependencies = [
|
|
92
92
|
name = "dycw-utilities"
|
93
93
|
readme = "README.md"
|
94
94
|
requires-python = ">= 3.12"
|
95
|
-
version = "0.
|
95
|
+
version = "0.121.0"
|
96
96
|
|
97
97
|
[project.optional-dependencies]
|
98
98
|
test = [
|
@@ -334,7 +334,7 @@ zzz-test-zoneinfo = [
|
|
334
334
|
# bump-my-version
|
335
335
|
[tool.bumpversion]
|
336
336
|
allow_dirty = true
|
337
|
-
current_version = "0.
|
337
|
+
current_version = "0.121.0"
|
338
338
|
|
339
339
|
[[tool.bumpversion.files]]
|
340
340
|
filename = "src/utilities/__init__.py"
|
@@ -5,7 +5,7 @@ from dataclasses import dataclass, field
|
|
5
5
|
from functools import partial
|
6
6
|
from itertools import chain, count
|
7
7
|
from re import search
|
8
|
-
from typing import TYPE_CHECKING, Self, override
|
8
|
+
from typing import TYPE_CHECKING, Any, Self, cast, override
|
9
9
|
|
10
10
|
from hypothesis import HealthCheck, Phase, given, settings
|
11
11
|
from hypothesis.strategies import (
|
@@ -23,12 +23,12 @@ from pytest import LogCaptureFixture, mark, raises
|
|
23
23
|
from utilities.asyncio import (
|
24
24
|
EnhancedTaskGroup,
|
25
25
|
InfiniteLooper,
|
26
|
-
InfiniteLooperError,
|
27
26
|
InfiniteQueueLooper,
|
28
27
|
InfiniteQueueLooperError,
|
29
28
|
UniquePriorityQueue,
|
30
29
|
UniqueQueue,
|
31
|
-
|
30
|
+
_InfiniteLooperDefaultEventError,
|
31
|
+
_InfiniteLooperNoSuchEventError,
|
32
32
|
get_event,
|
33
33
|
get_items,
|
34
34
|
get_items_nowait,
|
@@ -56,7 +56,13 @@ from utilities.timer import Timer
|
|
56
56
|
if TYPE_CHECKING:
|
57
57
|
from collections.abc import Callable, Iterator
|
58
58
|
|
59
|
-
from utilities.types import
|
59
|
+
from utilities.types import (
|
60
|
+
Coroutine1,
|
61
|
+
Duration,
|
62
|
+
DurationOrEveryDuration,
|
63
|
+
MaybeCallableEvent,
|
64
|
+
MaybeType,
|
65
|
+
)
|
60
66
|
|
61
67
|
|
62
68
|
class TestEnhancedTaskGroup:
|
@@ -130,7 +136,7 @@ class TestGetEvent:
|
|
130
136
|
|
131
137
|
class TestInfiniteLooper:
|
132
138
|
@given(n=integers(10, 11), sleep_core=sampled_from([0.1, ("every", 0.1)]))
|
133
|
-
async def test_main(self, *, n: int, sleep_core:
|
139
|
+
async def test_main(self, *, n: int, sleep_core: DurationOrEveryDuration) -> None:
|
134
140
|
class TrueError(BaseException): ...
|
135
141
|
|
136
142
|
class FalseError(BaseException): ...
|
@@ -147,7 +153,7 @@ class TestInfiniteLooper:
|
|
147
153
|
async def _core(self) -> None:
|
148
154
|
self.counter += 1
|
149
155
|
if self.counter >= n:
|
150
|
-
self._set_event(n % 2 == 0)
|
156
|
+
self._set_event(event=n % 2 == 0)
|
151
157
|
|
152
158
|
@override
|
153
159
|
def _yield_events_and_exceptions(
|
@@ -166,15 +172,8 @@ class TestInfiniteLooper:
|
|
166
172
|
_ = await looper()
|
167
173
|
|
168
174
|
async def test_hashable(self) -> None:
|
169
|
-
class CustomError(Exception): ...
|
170
|
-
|
171
175
|
@dataclass(kw_only=True, unsafe_hash=True)
|
172
|
-
class Example(InfiniteLooper[None]):
|
173
|
-
@override
|
174
|
-
def _yield_events_and_exceptions(
|
175
|
-
self,
|
176
|
-
) -> Iterator[tuple[None, MaybeType[Exception]]]:
|
177
|
-
yield (None, CustomError)
|
176
|
+
class Example(InfiniteLooper[None]): ...
|
178
177
|
|
179
178
|
looper = Example(sleep_core=0.1)
|
180
179
|
_ = hash(looper)
|
@@ -189,8 +188,6 @@ class TestInfiniteLooper:
|
|
189
188
|
obj.counter += 1
|
190
189
|
await sleep(0.05)
|
191
190
|
|
192
|
-
class CustomError(Exception): ...
|
193
|
-
|
194
191
|
@dataclass(kw_only=True)
|
195
192
|
class Example(InfiniteLooper[None]):
|
196
193
|
initializations: int = 0
|
@@ -205,18 +202,12 @@ class TestInfiniteLooper:
|
|
205
202
|
async def _core(self) -> None:
|
206
203
|
self.counter += 1
|
207
204
|
if self.counter >= 5:
|
208
|
-
self._set_event(
|
205
|
+
self._set_event()
|
209
206
|
|
210
207
|
@override
|
211
208
|
def _yield_coroutines(self) -> Iterator[Callable[[], Coroutine1[None]]]:
|
212
209
|
yield partial(inc_external, self)
|
213
210
|
|
214
|
-
@override
|
215
|
-
def _yield_events_and_exceptions(
|
216
|
-
self,
|
217
|
-
) -> Iterator[tuple[None, MaybeType[BaseException]]]:
|
218
|
-
yield (None, CustomError)
|
219
|
-
|
220
211
|
looper = Example(sleep_core=0.05, sleep_restart=0.05)
|
221
212
|
with raises(TimeoutError):
|
222
213
|
async with timeout_dur(duration=1.0):
|
@@ -251,12 +242,6 @@ class TestInfiniteLooper:
|
|
251
242
|
def _yield_coroutines(self) -> Iterator[Callable[[], Coroutine1[None]]]:
|
252
243
|
yield dummy
|
253
244
|
|
254
|
-
@override
|
255
|
-
def _yield_events_and_exceptions(
|
256
|
-
self,
|
257
|
-
) -> Iterator[tuple[None, MaybeType[BaseException]]]:
|
258
|
-
yield (None, CustomError)
|
259
|
-
|
260
245
|
looper = Example(sleep_core=0.05, sleep_restart=0.05)
|
261
246
|
with raises(TimeoutError):
|
262
247
|
async with timeout_dur(duration=1.0):
|
@@ -294,12 +279,6 @@ class TestInfiniteLooper:
|
|
294
279
|
def _yield_coroutines(self) -> Iterator[Callable[[], Coroutine1[None]]]:
|
295
280
|
yield dummy
|
296
281
|
|
297
|
-
@override
|
298
|
-
def _yield_events_and_exceptions(
|
299
|
-
self,
|
300
|
-
) -> Iterator[tuple[None, MaybeType[BaseException]]]:
|
301
|
-
yield (None, CustomError)
|
302
|
-
|
303
282
|
looper = Example(sleep_core=0.05, sleep_restart=0.05, logger=logger)
|
304
283
|
with raises(CancelledError):
|
305
284
|
async with timeout_dur(duration=1.0):
|
@@ -307,6 +286,17 @@ class TestInfiniteLooper:
|
|
307
286
|
assert 3 <= looper.initializations <= 5
|
308
287
|
assert 1 <= looper.counter <= 6
|
309
288
|
|
289
|
+
async def test_error_default_event(self) -> None:
|
290
|
+
@dataclass(kw_only=True)
|
291
|
+
class Example(InfiniteLooper[None]): ...
|
292
|
+
|
293
|
+
looper = Example()
|
294
|
+
|
295
|
+
with raises(
|
296
|
+
_InfiniteLooperDefaultEventError, match=r"'Example' default event error"
|
297
|
+
):
|
298
|
+
raise _InfiniteLooperDefaultEventError(looper=looper)
|
299
|
+
|
310
300
|
@given(logger=just("logger") | none())
|
311
301
|
@mark.parametrize(
|
312
302
|
("sleep_restart", "desc"),
|
@@ -321,7 +311,7 @@ class TestInfiniteLooper:
|
|
321
311
|
async def test_error_upon_initialize(
|
322
312
|
self,
|
323
313
|
*,
|
324
|
-
sleep_restart:
|
314
|
+
sleep_restart: DurationOrEveryDuration,
|
325
315
|
desc: str,
|
326
316
|
logger: str | None,
|
327
317
|
caplog: LogCaptureFixture,
|
@@ -361,7 +351,7 @@ class TestInfiniteLooper:
|
|
361
351
|
async def test_error_group_upon_coroutines(
|
362
352
|
self,
|
363
353
|
*,
|
364
|
-
sleep_restart:
|
354
|
+
sleep_restart: DurationOrEveryDuration,
|
365
355
|
desc: str,
|
366
356
|
logger: str | None,
|
367
357
|
caplog: LogCaptureFixture,
|
@@ -374,12 +364,6 @@ class TestInfiniteLooper:
|
|
374
364
|
async def _core(self) -> None:
|
375
365
|
raise CustomError
|
376
366
|
|
377
|
-
@override
|
378
|
-
def _yield_events_and_exceptions(
|
379
|
-
self,
|
380
|
-
) -> Iterator[tuple[None, MaybeType[BaseException]]]:
|
381
|
-
yield (None, CustomError)
|
382
|
-
|
383
367
|
looper = Example(sleep_core=0.1, sleep_restart=sleep_restart, logger=logger)
|
384
368
|
with raises(TimeoutError):
|
385
369
|
async with timeout_dur(duration=0.5):
|
@@ -402,10 +386,13 @@ class TestInfiniteLooper:
|
|
402
386
|
async def _core(self) -> None:
|
403
387
|
self.counter += 1
|
404
388
|
if self.counter >= 10:
|
405
|
-
self._set_event(
|
389
|
+
self._set_event(event=cast("Any", "invalid"))
|
406
390
|
|
407
|
-
looper = Example(
|
408
|
-
with raises(
|
391
|
+
looper = Example()
|
392
|
+
with raises(
|
393
|
+
_InfiniteLooperNoSuchEventError,
|
394
|
+
match="'Example' does not have an event 'invalid'",
|
395
|
+
):
|
409
396
|
_ = await looper()
|
410
397
|
|
411
398
|
|
@@ -26,7 +26,6 @@ from typing import (
|
|
26
26
|
TYPE_CHECKING,
|
27
27
|
Any,
|
28
28
|
Generic,
|
29
|
-
Literal,
|
30
29
|
NoReturn,
|
31
30
|
TextIO,
|
32
31
|
TypeVar,
|
@@ -49,6 +48,7 @@ from utilities.reprlib import get_repr
|
|
49
48
|
from utilities.sentinel import Sentinel, sentinel
|
50
49
|
from utilities.types import (
|
51
50
|
Coroutine1,
|
51
|
+
DurationOrEveryDuration,
|
52
52
|
MaybeCallableEvent,
|
53
53
|
MaybeType,
|
54
54
|
THashable,
|
@@ -121,17 +121,14 @@ class EnhancedTaskGroup(TaskGroup):
|
|
121
121
|
##
|
122
122
|
|
123
123
|
|
124
|
-
type _DurationOrEvery = Duration | tuple[Literal["every"], Duration]
|
125
|
-
|
126
|
-
|
127
124
|
@dataclass(kw_only=True, unsafe_hash=True)
|
128
125
|
class InfiniteLooper(ABC, Generic[THashable]):
|
129
126
|
"""An infinite loop which can throw exceptions by setting events."""
|
130
127
|
|
131
|
-
sleep_core:
|
132
|
-
sleep_restart:
|
128
|
+
sleep_core: DurationOrEveryDuration = SECOND
|
129
|
+
sleep_restart: DurationOrEveryDuration = MINUTE
|
133
130
|
logger: str | None = None
|
134
|
-
_events: Mapping[THashable, Event] = field(
|
131
|
+
_events: Mapping[THashable | None, Event] = field(
|
135
132
|
default_factory=dict, init=False, repr=False, hash=False
|
136
133
|
)
|
137
134
|
|
@@ -229,7 +226,7 @@ class InfiniteLooper(ABC, Generic[THashable]):
|
|
229
226
|
msgs.append(f"Sleeping {self._sleep_restart_desc}...")
|
230
227
|
getLogger(name=self.logger).error("\n".join(msgs))
|
231
228
|
|
232
|
-
def _raise_error(self, event: THashable, /) -> NoReturn:
|
229
|
+
def _raise_error(self, event: THashable | None, /) -> NoReturn:
|
233
230
|
"""Raise the error corresponding to given event."""
|
234
231
|
mapping = dict(self._yield_events_and_exceptions())
|
235
232
|
error = mapping.get(event, InfiniteLooperError)
|
@@ -241,7 +238,7 @@ class InfiniteLooper(ABC, Generic[THashable]):
|
|
241
238
|
event: Event() for event, _ in self._yield_events_and_exceptions()
|
242
239
|
}
|
243
240
|
|
244
|
-
async def _run_sleep(self, sleep:
|
241
|
+
async def _run_sleep(self, sleep: DurationOrEveryDuration, /) -> None:
|
245
242
|
"""Sleep until the next part of the loop."""
|
246
243
|
match sleep:
|
247
244
|
case int() | float() | dt.timedelta() as duration:
|
@@ -264,12 +261,12 @@ class InfiniteLooper(ABC, Generic[THashable]):
|
|
264
261
|
case _ as never:
|
265
262
|
assert_never(never)
|
266
263
|
|
267
|
-
def _set_event(self, event: THashable
|
264
|
+
def _set_event(self, *, event: THashable | None = None) -> None:
|
268
265
|
"""Set the given event."""
|
269
266
|
try:
|
270
267
|
event_obj = self._events[event]
|
271
268
|
except KeyError:
|
272
|
-
raise
|
269
|
+
raise _InfiniteLooperNoSuchEventError(looper=self, event=event) from None
|
273
270
|
event_obj.set()
|
274
271
|
|
275
272
|
def _yield_coroutines(self) -> Iterator[Callable[[], Coroutine1[None]]]:
|
@@ -278,14 +275,18 @@ class InfiniteLooper(ABC, Generic[THashable]):
|
|
278
275
|
|
279
276
|
def _yield_events_and_exceptions(
|
280
277
|
self,
|
281
|
-
) -> Iterator[tuple[THashable, MaybeType[BaseException]]]:
|
278
|
+
) -> Iterator[tuple[THashable | None, MaybeType[BaseException]]]:
|
282
279
|
"""Yield the events & exceptions."""
|
283
|
-
yield
|
280
|
+
yield (None, _InfiniteLooperDefaultEventError)
|
284
281
|
|
285
282
|
|
286
283
|
@dataclass(kw_only=True, slots=True)
|
287
284
|
class InfiniteLooperError(Exception):
|
288
285
|
looper: InfiniteLooper[Any]
|
286
|
+
|
287
|
+
|
288
|
+
@dataclass(kw_only=True, slots=True)
|
289
|
+
class _InfiniteLooperNoSuchEventError(InfiniteLooperError):
|
289
290
|
event: Hashable
|
290
291
|
|
291
292
|
@override
|
@@ -293,6 +294,13 @@ class InfiniteLooperError(Exception):
|
|
293
294
|
return f"{get_class_name(self.looper)!r} does not have an event {self.event!r}"
|
294
295
|
|
295
296
|
|
297
|
+
@dataclass(kw_only=True, slots=True)
|
298
|
+
class _InfiniteLooperDefaultEventError(InfiniteLooperError):
|
299
|
+
@override
|
300
|
+
def __str__(self) -> str:
|
301
|
+
return f"{get_class_name(self.looper)!r} default event error"
|
302
|
+
|
303
|
+
|
296
304
|
##
|
297
305
|
|
298
306
|
|
@@ -92,6 +92,7 @@ type DateTimeLike = MaybeStr[dt.datetime]
|
|
92
92
|
type DateOrDateTime = dt.date | dt.datetime
|
93
93
|
type Duration = Number | dt.timedelta
|
94
94
|
type DurationLike = MaybeStr[Duration]
|
95
|
+
type DurationOrEveryDuration = Duration | tuple[Literal["every"], Duration]
|
95
96
|
type MaybeCallableDate = MaybeCallable[dt.date]
|
96
97
|
type MaybeCallableDateTime = MaybeCallable[dt.datetime]
|
97
98
|
type TimeLike = MaybeStr[dt.time]
|
@@ -270,6 +271,7 @@ __all__ = [
|
|
270
271
|
"DateTimeLike",
|
271
272
|
"Duration",
|
272
273
|
"DurationLike",
|
274
|
+
"DurationOrEveryDuration",
|
273
275
|
"EnumLike",
|
274
276
|
"ExcInfo",
|
275
277
|
"IterableHashable",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_missing/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_missing/module.py
RENAMED
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_with/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_without/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_without/module_1.py
RENAMED
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/modules/package_without/module_2.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
|
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
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/__init__.py
RENAMED
File without changes
|
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/decorated_async.py
RENAMED
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/decorated_sync.py
RENAMED
File without changes
|
{dycw_utilities-0.120.0 → dycw_utilities-0.121.0}/src/tests/test_traceback_funcs/error_bind.py
RENAMED
File without changes
|
File without changes
|