Module Utilities

pcapkit.utilities holds the cross-cutting services pcapkit is built with: user-refined exceptions and warnings, logging, the tunable limits of config, a compatibility layer, and wrappers around third-party libraries. It imports nothing from pcapkit outside itself; see Choosing Between utilities and corekit.

Version Compatibility

pcapkit further provides a compatibility layer for the following objects and functions:

Compatibility Target

Minimal Required Version

pathlib

Python 3.5

ModuleNotFoundError

Python 3.6

collections.abc.Collection

Python 3.6

functools.cached_property()

Python 3.8

collections.abc.Mapping[KT, VT]

Python 3.9

tuple[T, ...]

Python 3.9

list[T]

Python 3.9

dict[KT, VT]

Python 3.9

urllib.parse.unquote() on bytes

Python 3.9

enum.StrEnum

Python 3.11

typing.final()

Python 3.11

decimal.localcontext(ctx=None, **kwargs)

Python 3.11

enum.show_flag_values()

Python 3.11

typing.TypeAlias

Python 3.10

threading.__excepthook__, as default_threading_excepthook

Python 3.10

inspect.get_annotations(), of a class

Python 3.10

types.UnionType, or None below it

Python 3.10