Split reviewboard.accounts.backends into smaller modules.
Review Request #9988 — Created May 31, 2018 and submitted
Once upon a time,
reviewboard.account.backends
just housed a couple of
small authentication backends, but over time the number of backends grew
and the infrastructure around it evolved, turning it into a pretty large
module.This change splits up this module into smaller pieces, and adds
forwarding imports to ensure that all existing code works as before.
Each backend is now in its own module, with the base class being in a
base.py
and all tracking of modules and settings in aregistry.py
.Aside from code movement, there are two additional code changes:
AuthBackend
(the base class) has been renamed toBaseAuthBackend
.
An alias exists inreviewboard.accounts.backends
to prevent
existing code from breaking.
INVALID_USERNAME_CHAR_REGEX
is now a member ofBaseAuthBackend
,
instead of being a global variable. An alias exists for this as well.Documentation and any remaining code style improvements will be made in
an upcoming change.
Unit tests pass.
Ran Review Board and selected authentication backends. Didn't encounter
any issues loading a list of modules or their forms.Tested that the old entrypoints (without re-running
setup.py develop
)
continued to work due to the forwarding imports.Tested that the new entrypoints overrode the old ones and work.
Description | From | Last Updated |
---|---|---|
E722 do not use bare except' |
reviewbot |