A couple of fixes#7
Conversation
- don't eat AttributeError - use the parser's "error" method
WhyNotHugo
left a comment
There was a problem hiding this comment.
This generally looks great, I've just one question regarding a single change.
Thanks for your contribution!
| try: | ||
| from pathlib import Path | ||
| except ImportError: | ||
| from pathlib2 import Path |
There was a problem hiding this comment.
This would only affect Python < 3.4, but we really just support Python >= 3.5.
Does this actually make Python 3.4 work?
|
On 14.05.2018 17:07, Hugo Osvaldo Barrera wrote:
This would only affect Python < 3.4, but we really just support Python
>= 3.5.
While I don't have 3.4 on my machine any more, based on the fact that it
works with 2.7 the answer should be Yes.
$ PYTHONPATH=. python build/python-barcode create -t png --text foo hello /tmp/test
New barcode saved as /tmp/test.png.
$ python --version
Python 2.7.13
$ eog /tmp/test.png
[ observe perfectly reasonable barcode ]
$
…--
-- Matthias Urlichs
|
|
TBH, I don't really care about adding support for python2 at this point in time. I [and the community in general] am moving towards dropping python2 support, so, even thought it's "just three extra lines", it's just something that I don't see making much sense. I'd be happy to merge the rest of this PR (which looks great), but I'm not really in favour of python2 right now. |
|
Fair enough. Feel free to cherry-pick the other two then ;-) |
|
Closing; those two commits have been cherry-picked into master. |
|
Thanks! |
See individual changes.