dycw-utilities 0.149.8__tar.gz → 0.149.10__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.149.8 → dycw_utilities-0.149.10}/PKG-INFO +1 -1
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/pyproject.toml +2 -2
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_asyncio.py +17 -1
- dycw_utilities-0.149.10/src/tests/test_contextvars.py +37 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_shelve.py +8 -5
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/__init__.py +1 -1
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/asyncio.py +35 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/contextvars.py +20 -1
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/shelve.py +4 -1
- dycw_utilities-0.149.8/src/tests/test_contextvars.py +0 -18
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/.gitignore +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/LICENSE +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/README.md +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/conftest.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_missing/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_missing/module.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/outer_1.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/outer_2.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/subpackage/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/subpackage/inner_1.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/subpackage/inner_2.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/subpackage/inner_3.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_without/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_without/module_1.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_without/module_2.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/standalone.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/with_imports.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__obj.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__series.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_int.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__false.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__true.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_nested.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_dataframe.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_series.json +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_altair.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_atomicwrites.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_atools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_cachetools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_click.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_concurrent.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_contextlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_cryptography.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_cvxpy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_dataclasses.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_dnspython.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_enum.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_errors.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_eventkit.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_fastapi.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_fpdf2.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_functions.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_functools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_getpass.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_gzip.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_hashlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_http.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_hypothesis.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_importlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_inflect.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_ipython.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_iterables.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_json.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_jupyter.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_libcst.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_lightweight_charts.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_logging.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_math.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_memory_profiler.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_modules.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_more_itertools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_numpy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_objects/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_objects/objects.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_operator.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_optuna.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_orjson.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_os.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_parse.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pathlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_period.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pickle.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_platform.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_polars.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_polars_ols.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_postgres.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pottery.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pqdm.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_psutil.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pyinstrument.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pytest.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pytest_randomly.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_pytest_regressions.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_random.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_re.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_redis.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_reprlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_scipy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_sentinel.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_slack_sdk.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_socket.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_sqlalchemy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_statsmodels.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_string.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_tempfile.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_text.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_threading.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_timer.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_traceback.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_typed_settings.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_types.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_typing.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_typing_funcs/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_typing_funcs/no_future.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_typing_funcs/with_future.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_tzdata.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_tzlocal.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_uuid.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_version.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_warnings.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_whenever.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_yield_access/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_yield_access/script.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_yield_access/script.sh +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_zipfile.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_zoneinfo.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/altair.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/atomicwrites.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/atools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/cachetools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/click.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/concurrent.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/contextlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/cryptography.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/cvxpy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/dataclasses.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/dnspython.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/enum.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/errors.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/eventkit.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/fastapi.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/fpdf2.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/functions.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/functools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/getpass.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/gzip.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/hashlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/http.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/hypothesis.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/importlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/inflect.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/ipython.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/iterables.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/json.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/jupyter.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/libcst.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/lightweight_charts.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/logging.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/math.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/memory_profiler.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/modules.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/more_itertools.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/numpy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/operator.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/optuna.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/orjson.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/os.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/parse.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pathlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/period.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pickle.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/platform.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/polars.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/polars_ols.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/postgres.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pottery.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pqdm.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/psutil.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/py.typed +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pyinstrument.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pytest.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pytest_plugins/__init__.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pytest_plugins/pytest_randomly.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pytest_plugins/pytest_regressions.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pytest_regressions.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/random.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/re.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/redis.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/reprlib.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/scipy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/sentinel.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/slack_sdk.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/socket.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/sqlalchemy.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/statsmodels.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/string.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/tempfile.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/text.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/threading.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/timer.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/traceback.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/typed_settings.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/types.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/typing.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/tzdata.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/tzlocal.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/uuid.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/version.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/warnings.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/whenever.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/zipfile.py +0 -0
- {dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/zoneinfo.py +0 -0
@@ -103,7 +103,7 @@ dependencies = [
|
|
103
103
|
name = "dycw-utilities"
|
104
104
|
readme = "README.md"
|
105
105
|
requires-python = ">= 3.12"
|
106
|
-
version = "0.149.
|
106
|
+
version = "0.149.10"
|
107
107
|
|
108
108
|
[project.entry-points.pytest11]
|
109
109
|
pytest-randomly = "utilities.pytest_plugins.pytest_randomly"
|
@@ -136,7 +136,7 @@ test = [
|
|
136
136
|
# bump-my-version
|
137
137
|
[tool.bumpversion]
|
138
138
|
allow_dirty = true
|
139
|
-
current_version = "0.149.
|
139
|
+
current_version = "0.149.10"
|
140
140
|
|
141
141
|
[[tool.bumpversion.files]]
|
142
142
|
filename = "src/utilities/__init__.py"
|
@@ -6,7 +6,7 @@ from contextlib import asynccontextmanager
|
|
6
6
|
from re import search
|
7
7
|
from typing import TYPE_CHECKING, ClassVar
|
8
8
|
|
9
|
-
from hypothesis import given
|
9
|
+
from hypothesis import HealthCheck, given, settings
|
10
10
|
from hypothesis.strategies import booleans, dictionaries, integers, lists, none
|
11
11
|
from pytest import LogCaptureFixture, RaisesGroup, mark, param, raises
|
12
12
|
|
@@ -25,6 +25,7 @@ from utilities.asyncio import (
|
|
25
25
|
sleep_until,
|
26
26
|
stream_command,
|
27
27
|
timeout_td,
|
28
|
+
yield_locked_shelf,
|
28
29
|
)
|
29
30
|
from utilities.hypothesis import pairs, text_ascii
|
30
31
|
from utilities.pytest import skipif_windows
|
@@ -34,6 +35,7 @@ from utilities.whenever import MILLISECOND, SECOND, get_now
|
|
34
35
|
|
35
36
|
if TYPE_CHECKING:
|
36
37
|
from collections.abc import AsyncIterator
|
38
|
+
from pathlib import Path
|
37
39
|
|
38
40
|
from whenever import TimeDelta
|
39
41
|
|
@@ -477,6 +479,20 @@ class TestTimeoutTD:
|
|
477
479
|
await sleep_td(2 * self.delta)
|
478
480
|
|
479
481
|
|
482
|
+
class TestYieldLockedShelf:
|
483
|
+
@given(key=text_ascii(), value=integers())
|
484
|
+
@settings(
|
485
|
+
max_examples=1, suppress_health_check={HealthCheck.function_scoped_fixture}
|
486
|
+
)
|
487
|
+
async def test_main(self, *, key: str, value: int, tmp_path: Path) -> None:
|
488
|
+
path = tmp_path.joinpath("shelf")
|
489
|
+
async with yield_locked_shelf(path) as shelf:
|
490
|
+
shelf[key] = value
|
491
|
+
async with yield_locked_shelf(path) as shelf:
|
492
|
+
result = shelf[key]
|
493
|
+
assert result == value
|
494
|
+
|
495
|
+
|
480
496
|
if __name__ == "__main__":
|
481
497
|
_ = run(
|
482
498
|
stream_command('echo "stdout message" && sleep 2 && echo "stderr message" >&2')
|
@@ -0,0 +1,37 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from contextvars import ContextVar
|
4
|
+
|
5
|
+
from utilities.contextvars import (
|
6
|
+
_GLOBAL_BREAKPOINT,
|
7
|
+
global_breakpoint,
|
8
|
+
set_global_breakpoint,
|
9
|
+
yield_set_context,
|
10
|
+
)
|
11
|
+
from utilities.text import unique_str
|
12
|
+
|
13
|
+
|
14
|
+
class TestGlobalBreakpoint:
|
15
|
+
def test_disabled(self) -> None:
|
16
|
+
global_breakpoint()
|
17
|
+
|
18
|
+
def test_set(self) -> None:
|
19
|
+
try:
|
20
|
+
set_global_breakpoint()
|
21
|
+
finally:
|
22
|
+
_ = _GLOBAL_BREAKPOINT.set(False)
|
23
|
+
|
24
|
+
|
25
|
+
class TestYieldSetContext:
|
26
|
+
def test_disabled(self) -> None:
|
27
|
+
context = ContextVar(unique_str(), default=False)
|
28
|
+
assert not context.get()
|
29
|
+
with yield_set_context(context):
|
30
|
+
assert context.get()
|
31
|
+
assert not context.get()
|
32
|
+
|
33
|
+
def test_set(self) -> None:
|
34
|
+
try:
|
35
|
+
set_global_breakpoint()
|
36
|
+
finally:
|
37
|
+
_ = _GLOBAL_BREAKPOINT.set(False)
|
@@ -2,10 +2,10 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
-
from hypothesis import given
|
5
|
+
from hypothesis import HealthCheck, given, settings
|
6
6
|
from hypothesis.strategies import integers
|
7
7
|
|
8
|
-
from utilities.hypothesis import
|
8
|
+
from utilities.hypothesis import text_ascii
|
9
9
|
from utilities.shelve import yield_shelf
|
10
10
|
|
11
11
|
if TYPE_CHECKING:
|
@@ -13,9 +13,12 @@ if TYPE_CHECKING:
|
|
13
13
|
|
14
14
|
|
15
15
|
class TestYieldShelf:
|
16
|
-
@given(
|
17
|
-
|
18
|
-
|
16
|
+
@given(key=text_ascii(), value=integers())
|
17
|
+
@settings(
|
18
|
+
max_examples=1, suppress_health_check={HealthCheck.function_scoped_fixture}
|
19
|
+
)
|
20
|
+
def test_main(self, *, key: str, value: int, tmp_path: Path) -> None:
|
21
|
+
path = tmp_path.joinpath("shelf")
|
19
22
|
with yield_shelf(path) as shelf:
|
20
23
|
shelf[key] = value
|
21
24
|
with yield_shelf(path) as shelf:
|
@@ -22,6 +22,7 @@ from contextlib import (
|
|
22
22
|
)
|
23
23
|
from dataclasses import dataclass
|
24
24
|
from io import StringIO
|
25
|
+
from pathlib import Path
|
25
26
|
from subprocess import PIPE
|
26
27
|
from sys import stderr, stdout
|
27
28
|
from typing import (
|
@@ -40,6 +41,7 @@ from utilities.functions import ensure_int, ensure_not_none, to_bool
|
|
40
41
|
from utilities.logging import get_logger
|
41
42
|
from utilities.random import SYSTEM_RANDOM
|
42
43
|
from utilities.sentinel import Sentinel, sentinel
|
44
|
+
from utilities.shelve import yield_shelf
|
43
45
|
from utilities.warnings import suppress_warnings
|
44
46
|
from utilities.whenever import get_now, round_date_or_date_time, to_nanoseconds
|
45
47
|
|
@@ -58,10 +60,12 @@ if TYPE_CHECKING:
|
|
58
60
|
)
|
59
61
|
from contextvars import Context
|
60
62
|
from random import Random
|
63
|
+
from shelve import Shelf
|
61
64
|
from types import TracebackType
|
62
65
|
|
63
66
|
from whenever import ZonedDateTime
|
64
67
|
|
68
|
+
from utilities.shelve import _Flag
|
65
69
|
from utilities.types import (
|
66
70
|
Coro,
|
67
71
|
Delta,
|
@@ -69,6 +73,7 @@ if TYPE_CHECKING:
|
|
69
73
|
LoggerOrName,
|
70
74
|
MaybeCallableBool,
|
71
75
|
MaybeType,
|
76
|
+
PathLike,
|
72
77
|
SupportsKeysAndGetItem,
|
73
78
|
)
|
74
79
|
|
@@ -547,6 +552,35 @@ async def timeout_td(
|
|
547
552
|
raise error from None
|
548
553
|
|
549
554
|
|
555
|
+
##
|
556
|
+
|
557
|
+
|
558
|
+
_LOCKS: AsyncDict[Path, Lock] = AsyncDict()
|
559
|
+
|
560
|
+
|
561
|
+
@asynccontextmanager
|
562
|
+
async def yield_locked_shelf(
|
563
|
+
path: PathLike,
|
564
|
+
/,
|
565
|
+
*,
|
566
|
+
flag: _Flag = "c",
|
567
|
+
protocol: int | None = None,
|
568
|
+
writeback: bool = False,
|
569
|
+
) -> AsyncIterator[Shelf[Any]]:
|
570
|
+
"""Yield a shelf, behind a lock."""
|
571
|
+
path = Path(path)
|
572
|
+
try:
|
573
|
+
lock = _LOCKS[path]
|
574
|
+
except KeyError:
|
575
|
+
lock = Lock()
|
576
|
+
await _LOCKS.set(path, lock)
|
577
|
+
async with lock:
|
578
|
+
with yield_shelf(
|
579
|
+
path, flag=flag, protocol=protocol, writeback=writeback
|
580
|
+
) as shelf:
|
581
|
+
yield shelf
|
582
|
+
|
583
|
+
|
550
584
|
__all__ = [
|
551
585
|
"AsyncDict",
|
552
586
|
"EnhancedTaskGroup",
|
@@ -563,4 +597,5 @@ __all__ = [
|
|
563
597
|
"sleep_until",
|
564
598
|
"stream_command",
|
565
599
|
"timeout_td",
|
600
|
+
"yield_locked_shelf",
|
566
601
|
]
|
@@ -1,6 +1,12 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
from contextlib import contextmanager
|
3
4
|
from contextvars import ContextVar
|
5
|
+
from typing import TYPE_CHECKING
|
6
|
+
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from collections.abc import Iterator
|
9
|
+
|
4
10
|
|
5
11
|
##
|
6
12
|
|
@@ -19,4 +25,17 @@ def set_global_breakpoint() -> None:
|
|
19
25
|
_ = _GLOBAL_BREAKPOINT.set(True)
|
20
26
|
|
21
27
|
|
22
|
-
|
28
|
+
##
|
29
|
+
|
30
|
+
|
31
|
+
@contextmanager
|
32
|
+
def yield_set_context(var: ContextVar[bool], /) -> Iterator[None]:
|
33
|
+
"""Yield a context var as being set."""
|
34
|
+
token = var.set(True)
|
35
|
+
try:
|
36
|
+
yield
|
37
|
+
finally:
|
38
|
+
_ = var.reset(token)
|
39
|
+
|
40
|
+
|
41
|
+
__all__ = ["global_breakpoint", "set_global_breakpoint", "yield_set_context"]
|
@@ -12,12 +12,15 @@ if TYPE_CHECKING:
|
|
12
12
|
from utilities.types import PathLike
|
13
13
|
|
14
14
|
|
15
|
+
type _Flag = Literal["r", "w", "c", "n"]
|
16
|
+
|
17
|
+
|
15
18
|
@contextmanager
|
16
19
|
def yield_shelf(
|
17
20
|
path: PathLike,
|
18
21
|
/,
|
19
22
|
*,
|
20
|
-
flag:
|
23
|
+
flag: _Flag = "c",
|
21
24
|
protocol: int | None = None,
|
22
25
|
writeback: bool = False,
|
23
26
|
) -> Iterator[Shelf[Any]]:
|
@@ -1,18 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from utilities.contextvars import (
|
4
|
-
_GLOBAL_BREAKPOINT,
|
5
|
-
global_breakpoint,
|
6
|
-
set_global_breakpoint,
|
7
|
-
)
|
8
|
-
|
9
|
-
|
10
|
-
class TestGlobalBreakpoint:
|
11
|
-
def test_disabled(self) -> None:
|
12
|
-
global_breakpoint()
|
13
|
-
|
14
|
-
def test_set(self) -> None:
|
15
|
-
try:
|
16
|
-
set_global_breakpoint()
|
17
|
-
finally:
|
18
|
-
_ = _GLOBAL_BREAKPOINT.set(False)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_missing/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_missing/module.py
RENAMED
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/outer_1.py
RENAMED
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_with/outer_2.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_without/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/modules/package_without/module_1.py
RENAMED
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/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
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/tests/test_typing_funcs/with_future.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
|
{dycw_utilities-0.149.8 → dycw_utilities-0.149.10}/src/utilities/pytest_plugins/pytest_randomly.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
|