semantic_release.hvcs.util module

semantic_release.hvcs.util.build_requests_session(raise_for_status: bool = True, retry: bool | int | Retry = True, auth: TokenAuth | None = None) Session[source]

Create a requests session. :param raise_for_status: If True, a hook to invoke raise_for_status be installed :param retry: If true, it will use default Retry configuration. if an integer, it

will use default Retry configuration with given integer as total retry count. if Retry instance, it will use this instance.

Parameters:

auth – Optional TokenAuth instance to be used to provide the Authorization header to the session

Returns:

configured requests Session

semantic_release.hvcs.util.suppress_http_error_for_codes(*codes: int) Callable[[Callable[[...], _R]], Callable[[...], _R | None]][source]

For the codes given, return a decorator that will suppress HTTPErrors that are raised from responses that came with one of those status codes. The function will return False instead of raising the HTTPError

semantic_release.hvcs.util.suppress_not_found(func: Callable[[...], _R]) Callable[[...], _R | None]