One function
Dispatcher in pavlov99/json-rpc
The author described this change as “Fix dispatcher add_method.”. It counts as a record because the check below fails on the code as it stood at 35f60596d and passes on 2ee80aca8, with nothing else changed between the two runs.
Projectpavlov99/json-rpc
Fix saved2014-05-14
Sharing licenceMIT · LICENSE.txt
Change size+2 −0
What the code was meant to do, written into the code itself as a docstring
Method dispatcher. Dictionary like object which holds map method_name to method.
The change
| 40 | 40 | :param name: Name to register | |
| 41 | 41 | :type name: None or str | |
| 42 | 42 | ||
| 43 | + | When used as a decorator keep callable object unmodified. | |
| 43 | 44 | """ | |
| 44 | 45 | self.method_map[name or f.__name__] = f | |
| 46 | + | return f | |
| 45 | 47 | ||
| 46 | 48 | def build_method_map(self, prototype): | |
| 47 | 49 | """ Add prototype methods to the dispatcher. |
The check that tells the two apart
fail→pass·jsonrpc/tests/test_dispatcher.py::TestDispatcher::test_add_method_keep_function_definitions
Check file jsonrpc/tests/test_dispatcher.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it35f60596db443d509a7f41e40578899f02050471
Broken version dated2014-05-08
Modulejsonrpc.dispatcher
Units changedDispatcher
Fingerprint30ae08f4d9d62c80
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in pavlov99/json-rpc
- 2013-11-09cover jsonrpc1, fix _id error