Split reviewboard.accounts.backends into smaller modules.
Review Request #1299 — Created June 29, 2018 and updated
Information | |
---|---|
guest6460 | |
Review Board | |
7b2b4ae... | |
Reviewers | |
guest6490 |
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 a `registry.py`. Aside from code movement, there are two additional code changes: 1. `AuthBackend` (the base class) has been renamed to `BaseAuthBackend`. An alias exists in `reviewboard.accounts.backends` to prevent existing code from breaking. 2. `INVALID_USERNAME_CHAR_REGEX` is now a member of `BaseAuthBackend`, 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. Testing Done: 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. Reviewed at https://reviews.reviewboard.org/r/9988/
Please review