Commit fc11345
authored
🚫🥒 do not pickle the unpickleable RWLock (#199)
* 🚫🥒 do not pickle the unpickleable RWLock
* As requested, acquired the lock before copying PointJacobi. When failing to acquire the lock, it now returns None. Think that's fine or prefer something else?
Added `__ne__` for CurveFp.
I think `test_inaquality_points_diff_types` from test_ellipticcurve.py was not actually testing equality. Because there was no `__ne__`, it was falling back to identity comparison, causing the test to pass. Now that there's a `__ne__`, it was getting NotImplemented which surprisingly bool casts to True. I changed the `__eq__` to return False for different types.
Fix typo in `test_inaquality_points_diff_types` name.
As requested, ran black on modified files. It reformmated some lines I hadn't modified.
* ran black with `--line-length 79` as configured in travis-ci for the project
* Revert to returning NotImplemented.
For __ne__ use == instead of __eq__ so it handles NotImplemented when the types are different.
Remove the not needed state declaration.1 parent a776084 commit fc11345
File tree
3 files changed
+29
-2
lines changed- src/ecdsa
3 files changed
+29
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
188 | 204 | | |
189 | 205 | | |
190 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
384 | 386 | | |
385 | 387 | | |
386 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
0 commit comments