Several optimizations:
commit03bb57c8c2a47a08e19b20975622ebb2ef2b81c6
authorBarry Warsaw <barry@python.org>
Tue, 12 Jan 2016 03:52:33 +0000 (11 22:52 -0500)
committerBarry Warsaw <barry@python.org>
Tue, 12 Jan 2016 03:52:33 +0000 (11 22:52 -0500)
tree332bf1e5e36da0a3cb4271b1a471a62865071a62
parent58ee14bfb1c1c24d06fb0509e42e06e37a505479
Several optimizations:
* Use `yield from` wherever appropriate.
* Use SA's .one_or_none() where appropriate.

- Fix a bug in MailingList.pass_extensions.
- Use ValueError in other places for consistency.
- Remove unreached/nonsense code.
- Simplify the SubscriptionService.find_member() and .find_members()
  implementations.
- Boost coverage.
20 files changed:
src/mailman/chains/base.py
src/mailman/chains/tests/test_base.py
src/mailman/config/config.py
src/mailman/config/tests/test_configuration.py
src/mailman/core/pipelines.py
src/mailman/model/bounce.py
src/mailman/model/domain.py
src/mailman/model/listmanager.py
src/mailman/model/mailinglist.py
src/mailman/model/requests.py
src/mailman/model/roster.py
src/mailman/model/subscriptions.py
src/mailman/model/tests/test_mailinglist.py
src/mailman/model/tests/test_roster.py
src/mailman/model/tests/test_subscriptions.py
src/mailman/model/usermanager.py
src/mailman/mta/aliases.py
src/mailman/testing/helpers.py
src/mailman/testing/mta.py
src/mailman/utilities/modules.py