Commit e836a47
committed
Make Labelle compatible with python-barcode v0.16
In python-barcode [1] v0.16.0, the API of the BaseWriter constructor was
narrowed [2] so two of its callbacks can no longer be None (see
issue #123 [3].)
Given we override the implementation that would use those callbacks
anyway, pass dummy callbacks. This ensures compatibility with both
pre-v0.16 and newer versions of python-barcode.
Additionally, loosen one of the assertions where the upstream wording of
an error message slightly changed.
Fixes #123.
[1]: https://pypi.org/project/python-barcode/
[2]: WhyNotHugo/python-barcode@v0.15.1...v0.16.0#diff-01c9de34453d29913aa28bb39e4c847e2ecf95cf81b1264c2759090f870152c9
[3]: #123
Reported-by: @blaisegarant1 parent c66b2ce commit e836a47
File tree
3 files changed
+16
-4
lines changed- src/labelle/lib
- render_engines/tests
3 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
| 133 | + | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
0 commit comments