dycw-utilities 0.136.1__tar.gz → 0.136.3__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.136.1 → dycw_utilities-0.136.3}/PKG-INFO +1 -1
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/pyproject.toml +2 -2
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_asyncio.py +33 -24
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_functions.py +13 -1
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_os.py +7 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/__init__.py +1 -1
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/asyncio.py +17 -7
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/functions.py +33 -1
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/os.py +9 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/traceback.py +10 -18
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/types.py +2 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/.gitignore +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/LICENSE +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/README.md +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/conftest.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_missing/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_missing/module.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/outer_1.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/outer_2.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/subpackage/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/subpackage/inner_1.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/subpackage/inner_2.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_with/subpackage/inner_3.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_without/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_without/module_1.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_without/module_2.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/standalone.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/with_imports.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__obj.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__series.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_int.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__false.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__true.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_nested.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_dataframe.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_series.json +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_aiolimiter.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_altair.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_arq.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_asyncio_classes/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_asyncio_classes/loopers.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_asyncio_classes/redis.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_atomicwrites.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_atools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_cachetools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_click.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_concurrent.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_contextlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_contextvars.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_cryptography.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_cvxpy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_dataclasses.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_enum.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_errors.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_eventkit.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_fastapi.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_fpdf2.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_functools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_getpass.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_git.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_hashlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_http.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_hypothesis.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_importlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_inflect.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_ipython.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_iterables.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_jupyter.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_libcst.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_lightweight_charts.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_logging.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_luigi.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_math.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_memory_profiler.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_modules.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_more_itertools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_numpy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_objects/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_objects/objects.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_operator.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_optuna.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_orjson.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_parse.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pathlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_period.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pickle.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_platform.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_polars.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_polars_ols.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pottery.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pqdm.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_psutil.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pydantic.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pyinstrument.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pytest.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_pytest_regressions.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_python_dotenv.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_random.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_re.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_redis.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_reprlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_scipy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_sentinel.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_shelve.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_slack_sdk.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_socket.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_sqlalchemy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_statsmodels.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_streamlit.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_string.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_tempfile.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_text.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_threading.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_timer.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_traceback.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_typed_settings.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_types.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_typing.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_typing_funcs/__init__.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_typing_funcs/no_future.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_typing_funcs/with_future.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_tzdata.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_tzlocal.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_uuid.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_version.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_warnings.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_whenever.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_zipfile.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_zoneinfo.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/aiolimiter.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/altair.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/arq.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/atomicwrites.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/atools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/cachetools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/click.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/concurrent.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/contextlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/contextvars.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/cryptography.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/cvxpy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/dataclasses.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/enum.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/errors.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/eventkit.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/fastapi.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/fpdf2.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/functools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/getpass.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/git.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/hashlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/http.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/hypothesis.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/importlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/inflect.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/ipython.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/iterables.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/jupyter.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/libcst.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/lightweight_charts.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/logging.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/luigi.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/math.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/memory_profiler.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/modules.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/more_itertools.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/numpy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/operator.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/optuna.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/orjson.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/parse.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pathlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/period.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pickle.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/platform.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/polars.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/polars_ols.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pottery.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pqdm.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/psutil.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/py.typed +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pydantic.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pyinstrument.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pytest.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/pytest_regressions.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/python_dotenv.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/random.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/re.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/redis.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/reprlib.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/scipy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/sentinel.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/shelve.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/slack_sdk.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/socket.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/sqlalchemy.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/statsmodels.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/streamlit.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/string.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/tempfile.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/text.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/threading.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/timer.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/typed_settings.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/typing.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/tzdata.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/tzlocal.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/uuid.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/version.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/warnings.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/whenever.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/zipfile.py +0 -0
- {dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/utilities/zoneinfo.py +0 -0
@@ -106,7 +106,7 @@ dependencies = [
|
|
106
106
|
name = "dycw-utilities"
|
107
107
|
readme = "README.md"
|
108
108
|
requires-python = ">= 3.12"
|
109
|
-
version = "0.136.
|
109
|
+
version = "0.136.3"
|
110
110
|
|
111
111
|
[project.optional-dependencies]
|
112
112
|
logging = [
|
@@ -134,7 +134,7 @@ test = [
|
|
134
134
|
# bump-my-version
|
135
135
|
[tool.bumpversion]
|
136
136
|
allow_dirty = true
|
137
|
-
current_version = "0.136.
|
137
|
+
current_version = "0.136.3"
|
138
138
|
|
139
139
|
[[tool.bumpversion.files]]
|
140
140
|
filename = "src/utilities/__init__.py"
|
@@ -175,29 +175,6 @@ class TestEnhancedTaskGroup:
|
|
175
175
|
await sleep_td(self.delta)
|
176
176
|
assert looper._core_attempts >= 1
|
177
177
|
|
178
|
-
async def test_debug_true(self) -> None:
|
179
|
-
class CustomError(Exception): ...
|
180
|
-
|
181
|
-
async def func() -> None:
|
182
|
-
await sleep_td(self.delta)
|
183
|
-
raise CustomError
|
184
|
-
|
185
|
-
with raises(CustomError):
|
186
|
-
async with EnhancedTaskGroup(debug=True) as tg:
|
187
|
-
_ = await tg.run_or_create_task(func())
|
188
|
-
|
189
|
-
async def test_debug_false(self) -> None:
|
190
|
-
class CustomError(Exception): ...
|
191
|
-
|
192
|
-
async def func() -> None:
|
193
|
-
await sleep_td(self.delta)
|
194
|
-
raise CustomError
|
195
|
-
|
196
|
-
with raises(ExceptionGroup) as exc_info:
|
197
|
-
async with EnhancedTaskGroup(debug=False) as tg:
|
198
|
-
_ = await tg.run_or_create_task(func())
|
199
|
-
assert isinstance(one(exc_info.value.exceptions), CustomError)
|
200
|
-
|
201
178
|
async def test_max_tasks_disabled(self) -> None:
|
202
179
|
with Timer() as timer:
|
203
180
|
async with EnhancedTaskGroup() as tg:
|
@@ -210,7 +187,39 @@ class TestEnhancedTaskGroup:
|
|
210
187
|
async with EnhancedTaskGroup(max_tasks=2) as tg:
|
211
188
|
for _ in range(10):
|
212
189
|
_ = tg.create_task(sleep_td(self.delta))
|
213
|
-
assert timer >= self.delta
|
190
|
+
assert timer >= 5 * self.delta
|
191
|
+
|
192
|
+
async def test_run_or_create_task_parallel_with_max_tasks_none(self) -> None:
|
193
|
+
with Timer() as timer:
|
194
|
+
async with EnhancedTaskGroup() as tg:
|
195
|
+
assert not tg._is_debug()
|
196
|
+
for _ in range(10):
|
197
|
+
_ = await tg.run_or_create_task(sleep_td(self.delta))
|
198
|
+
assert timer <= 2 * self.delta
|
199
|
+
|
200
|
+
async def test_run_or_create_task_parallel_with_max_tasks_two(self) -> None:
|
201
|
+
with Timer() as timer:
|
202
|
+
async with EnhancedTaskGroup(max_tasks=2) as tg:
|
203
|
+
assert not tg._is_debug()
|
204
|
+
for _ in range(10):
|
205
|
+
_ = await tg.run_or_create_task(sleep_td(self.delta))
|
206
|
+
assert timer >= 5 * self.delta
|
207
|
+
|
208
|
+
async def test_run_or_create_task_serial_with_max_tasks_negative(self) -> None:
|
209
|
+
with Timer() as timer:
|
210
|
+
async with EnhancedTaskGroup(max_tasks=-1) as tg:
|
211
|
+
assert tg._is_debug()
|
212
|
+
for _ in range(10):
|
213
|
+
_ = await tg.run_or_create_task(sleep_td(self.delta))
|
214
|
+
assert timer >= 10 * self.delta
|
215
|
+
|
216
|
+
async def test_run_or_create_task_serial_with_debug(self) -> None:
|
217
|
+
with Timer() as timer:
|
218
|
+
async with EnhancedTaskGroup(debug=True) as tg:
|
219
|
+
assert tg._is_debug()
|
220
|
+
for _ in range(10):
|
221
|
+
_ = await tg.run_or_create_task(sleep_td(self.delta))
|
222
|
+
assert timer >= 10 * self.delta
|
214
223
|
|
215
224
|
async def test_timeout_pass(self) -> None:
|
216
225
|
async with EnhancedTaskGroup(timeout=2 * self.delta) as tg:
|
@@ -90,11 +90,13 @@ from utilities.functions import (
|
|
90
90
|
min_nullable,
|
91
91
|
not_func,
|
92
92
|
second,
|
93
|
+
to_bool,
|
93
94
|
yield_object_attributes,
|
94
95
|
yield_object_cached_properties,
|
95
96
|
yield_object_properties,
|
96
97
|
)
|
97
|
-
from utilities.
|
98
|
+
from utilities.hypothesis import sentinels
|
99
|
+
from utilities.sentinel import Sentinel, sentinel
|
98
100
|
from utilities.whenever import NOW_UTC, ZERO_TIME, get_now, get_today
|
99
101
|
|
100
102
|
if TYPE_CHECKING:
|
@@ -915,6 +917,16 @@ class TestSecond:
|
|
915
917
|
assert second(pair) == y
|
916
918
|
|
917
919
|
|
920
|
+
class TestToBool:
|
921
|
+
@given(bool_=booleans() | none() | sentinels())
|
922
|
+
def test_bool_none_or_sentinel(self, *, bool_: bool | None | Sentinel) -> None:
|
923
|
+
assert to_bool(bool_=bool_) is bool_
|
924
|
+
|
925
|
+
@given(bool_=booleans())
|
926
|
+
def test_callable(self, *, bool_: bool) -> None:
|
927
|
+
assert to_bool(bool_=lambda: bool_) is bool_
|
928
|
+
|
929
|
+
|
918
930
|
class TestYieldObjectAttributes:
|
919
931
|
@given(n=integers())
|
920
932
|
def test_main(self, *, n: int) -> None:
|
@@ -21,6 +21,7 @@ from utilities.os import (
|
|
21
21
|
get_cpu_count,
|
22
22
|
get_cpu_use,
|
23
23
|
get_env_var,
|
24
|
+
is_debug,
|
24
25
|
temp_environ,
|
25
26
|
)
|
26
27
|
from utilities.pytest import skipif_windows
|
@@ -117,6 +118,12 @@ class TestGetEnvVar:
|
|
117
118
|
_ = get_env_var(key, case_sensitive=case_sensitive)
|
118
119
|
|
119
120
|
|
121
|
+
class TestIsDebug:
|
122
|
+
def test_main(self) -> None:
|
123
|
+
result = is_debug()
|
124
|
+
assert isinstance(result, bool)
|
125
|
+
|
126
|
+
|
120
127
|
class TestTempEnviron:
|
121
128
|
@given(key=text.map(_prefix), value=text)
|
122
129
|
def test_set(self, *, key: str, value: str) -> None:
|
@@ -36,10 +36,10 @@ from typing_extensions import deprecated
|
|
36
36
|
|
37
37
|
from utilities.dataclasses import replace_non_sentinel
|
38
38
|
from utilities.errors import repr_error
|
39
|
-
from utilities.functions import ensure_int, ensure_not_none
|
39
|
+
from utilities.functions import ensure_int, ensure_not_none, to_bool
|
40
40
|
from utilities.random import SYSTEM_RANDOM
|
41
41
|
from utilities.sentinel import Sentinel, sentinel
|
42
|
-
from utilities.types import SupportsRichComparison
|
42
|
+
from utilities.types import MaybeCallableBool, SupportsRichComparison
|
43
43
|
from utilities.whenever import SECOND, get_now
|
44
44
|
|
45
45
|
if TYPE_CHECKING:
|
@@ -220,10 +220,11 @@ class EnhancedQueue[T](Queue[T]):
|
|
220
220
|
class EnhancedTaskGroup(TaskGroup):
|
221
221
|
"""Task group with enhanced features."""
|
222
222
|
|
223
|
+
_max_tasks: int | None
|
223
224
|
_semaphore: Semaphore | None
|
224
225
|
_timeout: TimeDelta | None
|
225
226
|
_error: MaybeType[BaseException]
|
226
|
-
_debug:
|
227
|
+
_debug: MaybeCallableBool
|
227
228
|
_stack: AsyncExitStack
|
228
229
|
_timeout_cm: _AsyncGeneratorContextManager[None] | None
|
229
230
|
|
@@ -234,10 +235,14 @@ class EnhancedTaskGroup(TaskGroup):
|
|
234
235
|
max_tasks: int | None = None,
|
235
236
|
timeout: TimeDelta | None = None,
|
236
237
|
error: MaybeType[BaseException] = TimeoutError,
|
237
|
-
debug:
|
238
|
+
debug: MaybeCallableBool = False,
|
238
239
|
) -> None:
|
239
240
|
super().__init__()
|
240
|
-
self.
|
241
|
+
self._max_tasks = max_tasks
|
242
|
+
if (max_tasks is None) or (max_tasks <= 0):
|
243
|
+
self._semaphore = None
|
244
|
+
else:
|
245
|
+
self._semaphore = Semaphore(max_tasks)
|
241
246
|
self._timeout = timeout
|
242
247
|
self._error = error
|
243
248
|
self._debug = debug
|
@@ -257,7 +262,7 @@ class EnhancedTaskGroup(TaskGroup):
|
|
257
262
|
tb: TracebackType | None,
|
258
263
|
) -> None:
|
259
264
|
_ = await self._stack.__aexit__(et, exc, tb)
|
260
|
-
match self.
|
265
|
+
match self._is_debug():
|
261
266
|
case True:
|
262
267
|
with suppress(Exception):
|
263
268
|
_ = await super().__aexit__(et, exc, tb)
|
@@ -293,7 +298,7 @@ class EnhancedTaskGroup(TaskGroup):
|
|
293
298
|
name: str | None = None,
|
294
299
|
context: Context | None = None,
|
295
300
|
) -> T | Task[T]:
|
296
|
-
match self.
|
301
|
+
match self._is_debug():
|
297
302
|
case True:
|
298
303
|
return await coro
|
299
304
|
case False:
|
@@ -301,6 +306,11 @@ class EnhancedTaskGroup(TaskGroup):
|
|
301
306
|
case _ as never:
|
302
307
|
assert_never(never)
|
303
308
|
|
309
|
+
def _is_debug(self) -> bool:
|
310
|
+
return to_bool(bool_=self._debug) or (
|
311
|
+
(self._max_tasks is not None) and (self._max_tasks <= 0)
|
312
|
+
)
|
313
|
+
|
304
314
|
async def _wrap_with_semaphore[T](
|
305
315
|
self, semaphore: Semaphore, coroutine: _CoroutineLike[T], /
|
306
316
|
) -> T:
|
@@ -14,7 +14,16 @@ from types import (
|
|
14
14
|
MethodWrapperType,
|
15
15
|
WrapperDescriptorType,
|
16
16
|
)
|
17
|
-
from typing import
|
17
|
+
from typing import (
|
18
|
+
TYPE_CHECKING,
|
19
|
+
Any,
|
20
|
+
Literal,
|
21
|
+
TypeGuard,
|
22
|
+
assert_never,
|
23
|
+
cast,
|
24
|
+
overload,
|
25
|
+
override,
|
26
|
+
)
|
18
27
|
|
19
28
|
from whenever import Date, PlainDateTime, Time, TimeDelta, ZonedDateTime
|
20
29
|
|
@@ -22,6 +31,7 @@ from utilities.reprlib import get_repr, get_repr_and_class
|
|
22
31
|
from utilities.sentinel import Sentinel, sentinel
|
23
32
|
from utilities.types import (
|
24
33
|
Dataclass,
|
34
|
+
MaybeCallableBool,
|
25
35
|
Number,
|
26
36
|
StrMapping,
|
27
37
|
SupportsRichComparison,
|
@@ -935,6 +945,28 @@ def second[U](pair: tuple[Any, U], /) -> U:
|
|
935
945
|
##
|
936
946
|
|
937
947
|
|
948
|
+
@overload
|
949
|
+
def to_bool(*, bool_: MaybeCallableBool) -> bool: ...
|
950
|
+
@overload
|
951
|
+
def to_bool(*, bool_: None) -> None: ...
|
952
|
+
@overload
|
953
|
+
def to_bool(*, bool_: Sentinel) -> Sentinel: ...
|
954
|
+
def to_bool(
|
955
|
+
*, bool_: MaybeCallableBool | None | Sentinel = sentinel
|
956
|
+
) -> bool | None | Sentinel:
|
957
|
+
"""Get the bool."""
|
958
|
+
match bool_:
|
959
|
+
case bool() | None | Sentinel():
|
960
|
+
return bool_
|
961
|
+
case Callable() as func:
|
962
|
+
return to_bool(bool_=func())
|
963
|
+
case _ as never:
|
964
|
+
assert_never(never)
|
965
|
+
|
966
|
+
|
967
|
+
##
|
968
|
+
|
969
|
+
|
938
970
|
def yield_object_attributes(
|
939
971
|
obj: Any,
|
940
972
|
/,
|
@@ -123,6 +123,14 @@ class GetEnvVarError(Exception):
|
|
123
123
|
##
|
124
124
|
|
125
125
|
|
126
|
+
def is_debug() -> bool:
|
127
|
+
"""Check if we are in `DEBUG` mode."""
|
128
|
+
return get_env_var("DEBUG", nullable=True) is not None
|
129
|
+
|
130
|
+
|
131
|
+
##
|
132
|
+
|
133
|
+
|
126
134
|
@contextmanager
|
127
135
|
def temp_environ(
|
128
136
|
env: Mapping[str, str | None] | None = None, **env_kwargs: str | None
|
@@ -154,5 +162,6 @@ __all__ = [
|
|
154
162
|
"get_cpu_count",
|
155
163
|
"get_cpu_use",
|
156
164
|
"get_env_var",
|
165
|
+
"is_debug",
|
157
166
|
"temp_environ",
|
158
167
|
]
|
@@ -3,7 +3,6 @@ from __future__ import annotations
|
|
3
3
|
import re
|
4
4
|
import sys
|
5
5
|
from asyncio import run
|
6
|
-
from collections.abc import Callable
|
7
6
|
from dataclasses import dataclass
|
8
7
|
from functools import partial
|
9
8
|
from getpass import getuser
|
@@ -11,12 +10,12 @@ from itertools import repeat
|
|
11
10
|
from pathlib import Path
|
12
11
|
from socket import gethostname
|
13
12
|
from traceback import TracebackException
|
14
|
-
from typing import TYPE_CHECKING,
|
13
|
+
from typing import TYPE_CHECKING, override
|
15
14
|
|
16
15
|
from utilities.atomicwrites import writer
|
17
16
|
from utilities.errors import repr_error
|
17
|
+
from utilities.functions import to_bool
|
18
18
|
from utilities.iterables import OneEmptyError, one
|
19
|
-
from utilities.os import get_env_var
|
20
19
|
from utilities.pathlib import get_path
|
21
20
|
from utilities.reprlib import (
|
22
21
|
RICH_EXPAND_ALL,
|
@@ -31,11 +30,12 @@ from utilities.version import get_version
|
|
31
30
|
from utilities.whenever import format_compact, get_now, to_zoned_date_time
|
32
31
|
|
33
32
|
if TYPE_CHECKING:
|
34
|
-
from collections.abc import Iterator, Sequence
|
33
|
+
from collections.abc import Callable, Iterator, Sequence
|
35
34
|
from traceback import FrameSummary
|
36
35
|
from types import TracebackType
|
37
36
|
|
38
37
|
from utilities.types import (
|
38
|
+
MaybeCallableBool,
|
39
39
|
MaybeCallablePathLike,
|
40
40
|
MaybeCallableZonedDateTime,
|
41
41
|
PathLike,
|
@@ -203,7 +203,7 @@ def make_except_hook(
|
|
203
203
|
max_depth: int | None = RICH_MAX_DEPTH,
|
204
204
|
expand_all: bool = RICH_EXPAND_ALL,
|
205
205
|
slack_url: str | None = None,
|
206
|
-
pudb:
|
206
|
+
pudb: MaybeCallableBool = False,
|
207
207
|
) -> Callable[
|
208
208
|
[type[BaseException] | None, BaseException | None, TracebackType | None], None
|
209
209
|
]:
|
@@ -240,7 +240,7 @@ def _make_except_hook_inner(
|
|
240
240
|
max_depth: int | None = RICH_MAX_DEPTH,
|
241
241
|
expand_all: bool = RICH_EXPAND_ALL,
|
242
242
|
slack_url: str | None = None,
|
243
|
-
pudb:
|
243
|
+
pudb: MaybeCallableBool = False,
|
244
244
|
) -> None:
|
245
245
|
"""Exception hook to log the traceback."""
|
246
246
|
_ = (exc_type, traceback)
|
@@ -272,18 +272,10 @@ def _make_except_hook_inner(
|
|
272
272
|
|
273
273
|
send = f"```{slim}```"
|
274
274
|
run(send_to_slack(slack_url, send))
|
275
|
-
if pudb
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
case Callable() as func:
|
280
|
-
call_pudb = func()
|
281
|
-
case _ as never:
|
282
|
-
assert_never(never)
|
283
|
-
if call_pudb:
|
284
|
-
from pudb import post_mortem
|
285
|
-
|
286
|
-
post_mortem(tb=traceback, e_type=exc_type, e_value=exc_val)
|
275
|
+
if to_bool(bool_=pudb): # pragma: no cover
|
276
|
+
from pudb import post_mortem
|
277
|
+
|
278
|
+
post_mortem(tb=traceback, e_type=exc_type, e_value=exc_val)
|
287
279
|
|
288
280
|
|
289
281
|
@dataclass(kw_only=True, slots=True)
|
@@ -59,6 +59,7 @@ type OpenMode = Literal[
|
|
59
59
|
"a+b",
|
60
60
|
]
|
61
61
|
type MaybeCallable[T] = T | Callable[[], T]
|
62
|
+
type MaybeCallableBool = MaybeCallable[bool]
|
62
63
|
type MaybeStr[T] = T | str
|
63
64
|
type MaybeType[T] = T | type[T]
|
64
65
|
type StrMapping = Mapping[str, Any]
|
@@ -254,6 +255,7 @@ __all__ = [
|
|
254
255
|
"LoggerOrName",
|
255
256
|
"MathRoundMode",
|
256
257
|
"MaybeCallable",
|
258
|
+
"MaybeCallableBool",
|
257
259
|
"MaybeCallableDate",
|
258
260
|
"MaybeCallableEvent",
|
259
261
|
"MaybeCallablePathLike",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_missing/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_missing/module.py
RENAMED
File without changes
|
{dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/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.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_without/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/modules/package_without/module_1.py
RENAMED
File without changes
|
{dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/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
|
{dycw_utilities-0.136.1 → dycw_utilities-0.136.3}/src/tests/test_asyncio_classes/__init__.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
|