decorators: improve the
Add a new optional
dynamic_params_callbacksparameter to the
This parameter accepts a tuple of callbacks that will be called by the decorator and allow them to modify the parameters of the decorator itself at runtime.
Fix the signature of retry now that the upstream bug in pylint has been fixed and the newer version is included in prospector. This allows to remove some type ingore that were required before.
idm: make the
logoutd_args()both required so that the logoutd scripts that adhere to this API can safely rely on both being present. The logout cookbook is already passing both parameters anyway.
idm: fix typo in docstring.
idm: add a new
idmmodule with support for global logout (T283242):
To ensure that all Python logout scripts will have the same set of arguments and to reduce everyone repeating the same argparse block, a
LogoutdBaseabstract class was added.
It features also a
logoutd_args()function that provides the common argparse setup for all the logoutd scripts.
See the module’s documentation for example usages.
DATACENTER_NUMBERING_PREFIXconstant to map datacenter names to their numbering prefix used in hostnames.
interactive: also check term for tmux in
tests: fix pip backtracking moving prospector tests to their own virtual environments.
Add official support for Python 3.9
fileio: uniform quotes used in the file.
setup.py: add types dependencies for mypy for the dependencies that don’t have yet type hints.
CHANGELOG: fix typo in the v0.0.7 release notes.
dns: update DNS to support multiple namservers.
This allows cookbooks to configure the Dns with multiple nameservers, for example:
dns = Dns(nameserver_addresses=['184.108.40.206', '220.127.116.11'])
and thus allow users to get authoritative answers whiles also making use of DNS failover to account for any on going work on a specific nameserver while the cookbook is running.
PUBLIC_AUTHDNSconstant holds the auth server ips, given that they change very infrequently.
fileio: add new module to manage file I/O operations.
locked_open()context manager to open a file with an exclusive lock to be used like the buil-in
tests: cover untested property in the irc module.
CHANGELOG: fix typo.
tests: pylint, remove unnecessary disable comments.
doc: improve installation and introduction documentation pages and some modules documentation.
type hints: mark the package as type hinted so that mypy can recognize its type hints when imported in other projects.
Port the decorators module from Spicerack (T257905).
Port the interactive module from Spicerack (T257905).
Port the prometheus module from Spicerack (T257905).
Port the IRC logger handler from Spickerack into an irc module (T257905).
interactive: improve confirmation capabilities
ask_input()generic function to ask the user for input and check that the answer is among a list of allowed choices, returning the user’s choice.
ask_confirmation()to use the
confirm_on_failure()function to run any callable, and on failure ask the user to either retry, skip the step or abort the whole execution.
docs: fix link to pywmflib Gerrit project.
tests: fix deprecated pytest argument.
requests: add new requests module that exposes an
http_session()function that instantiate a requests’s
Sessionwith configurable default timeout, retry logic on some failures as well as setting a well formatted User-Agent.
Import the action module from Spicerack
Import the config module from Spicerack
Import the phabricator module from Spicerack
Remove Spicerack references from docstrings.
Initial version of the package.
Import the dns module and tests from Spicerack.