python-jaraco.context
Subpackage Descriptions
| single |
:alt: tests
:alt: Ruff
Highlights
==========
See the docs linked from the badge above for the full details, but here are
some features that may be of interest.
- ExceptionTrap provides a general-purpose wrapper for trapping exceptions
and then acting on the outcome. Includes passes and raises decorators to
replace the result of a wrapped function by a boolean indicating the
outcome of the exception trap. See [this keyring commit] for an example of
it in production.
- suppress simply enables ``contextlib.suppress`` as a decorator.
- on_interrupt is a decorator used by CLI entry points to affect the
handling of a KeyboardInterrupt. Inspired by `Lucretiel/autocommand#18
`_.
- pushd is similar to pytest's ``monkeypatch.chdir`` or path's [default
context], changes the current working directory for the duration of the
context.
- tarball will download a tarball, extract it, change directory, yield,
then clean up after. Convenient when working with web assets.
- null is there for those times when one code branch needs a context and
the other doesn't; this null context provides symmetry across those
branches.
For Enterprise
==============
Available as part of the Tidelift Subscription.
This project and the maintainers of thousands of other packages are working
with Tidelift to deliver one enterprise subscription that covers all of the
open source you use.
[Learn more].
|
Configuration Switches (platform-specific settings discarded)
PY313 OFF Build using Python 3.13
PY314 ON Build using Python 3.14
Package Dependencies by Type
Download groups
| main |
mirror://PYPIWHL/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db |
Distribution File Information
bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535 7871 python-src/jaraco_context-6.1.2-py3-none-any.whl
Ports that require python-jaraco.context:v14