Whole file
pavlov99/ajsonrpc
The author described this change as “FIX: notification detection”. It counts as a record because the check below fails on the code as it stood at bf73bce02 and passes on c9a3e90e5, with nothing else changed between the two runs.
Projectpavlov99/ajsonrpc
Fix saved2019-02-19
Sharing licenceMIT · LICENSE.txt
Change size+2 −2
What the code was meant to do, written into the code itself as a save note
FIX: notification detection
The change
| 29 | 29 | method: str, | |
| 30 | 30 | params: Optional[Union[Mapping[str, Any], Iterable[Any]]] = None, | |
| 31 | 31 | id: Optional[Union[str, int]] = None, | |
| 32 | - | is_notification: bool = False, | |
| 32 | + | is_notification: bool = False | |
| 33 | 33 | ) -> None: | |
| 34 | 34 | ||
| 35 | 35 | self.payload = { | |
| ⋯ | |||
| 78 | 78 | ||
| 79 | 79 | @property | |
| 80 | 80 | def is_notification(self): | |
| 81 | - | return 'id' in self.payload | |
| 81 | + | return 'id' not in self.payload | |
| 82 | 82 | ||
| 83 | 83 | @property | |
| 84 | 84 | def args(self): | |
The check that tells the two apart
fail→pass·ajsonrpc/tests/test_core.py::TestJSONRPC20Request::test_default_not_notification
Check file ajsonrpc/tests/test_core.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 itbf73bce02d38fcd2a391fa34044c6537897c22c1
Broken version dated2019-02-12
Moduleajsonrpc.core
Units changedJSONRPC20Request
Fingerprint755282caec1bc43a
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/ajsonrpc
- 2021-01-31FIX: request validation