Merge lp:~elachuni/txstatsd/straight into lp:txstatsd
Proposed by
Anthony Lenton
Status: | Merged |
---|---|
Approved by: | Anthony Lenton |
Approved revision: | 101 |
Merged at revision: | 99 |
Proposed branch: | lp:~elachuni/txstatsd/straight |
Merge into: | lp:txstatsd |
Diff against target: |
318 lines (+169/-109) 3 files modified
txstatsd/client.py (+11/-109) txstatsd/protocol.py (+131/-0) txstatsd/tests/test_client.py (+27/-0) |
To merge this branch: | bzr merge lp:~elachuni/txstatsd/straight |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sidnei da Silva | Approve | ||
Review via email:
|
Commit message
Made it possible to use the non-twisted client code even if twisted is unavailable.
Description of the change
This branch makes it possible to import the non-twisted client code without having twisted installed.
It also adds a test that ensures this can be installed, by marking everything twisted-ish as unavailable and then reloading the txstats client and metrics modules.
The code works as intended afaict, and the test fails if you add a random import twisted.something anywhere in txstatsd.client or txstatsd.metrics, but I'm still unsure if it's the best way to test. I tried a couple of permutations with import hooks, but that was even messier.
To post a comment you must log in.
[1] Please add the license header to protocol.py
[2] The restore_modules cleanup should reload() the modules again after restoring the unloaded twisted modules.
Once you fix those, set a commit message and flip the MP to approved, and tarmac will take care of landing it.
Thanks!