dnet / pySSTV

Python classes for generating Slow-scan Television transmissions
https://pypi.python.org/pypi/PySSTV
MIT License
138 stars 27 forks source link

Python 3 compatibility: imap->map, izip->zip, xrange->range #9

Closed KM4YRI closed 7 years ago

KM4YRI commented 7 years ago

See https://github.com/dnet/pySSTV/issues/8

KM4YRI commented 7 years ago

travis-ci build failed, the guide on this page was wrong or misleading: http://python-future.org/compatible_idioms.html#xrange

I just made another commit. Looks like git picked up the new commit automatically, and all tests are now passing. :+1:

dnet commented 7 years ago

Have you taken a look at the python3 branch or #7? Former even makes use of Python 3-only things like enums.

Seeing that it's a recurring issue, I'd thing a proper solution would be to use something like six. I'd merge a modified version if you

KM4YRI commented 7 years ago

No, in all my wisdom, I didn't even notice that there was a branch for python 3. The version pulled from pip / pypi failed and then I went off and grabbed the reciprocating saw. But from what you say above, it sounds like python3 is a Python3-only branch if it uses enums? I do agree that using six would probably be the way to go as you've already got a lot of people out in the field using the python2 version.

I can work on getting it up to date using six and handle the Travis CI config, I've got a bit of experience with both. I'm also sort of gearing up for creating a few of my own python-based amateur radio decoding / encoding libraries, so this will be good practice before I get started in that.

Give me a day or two (maybe 3). I've got some car troubles at the moment and a few other things that won't allow me to get to it right away, but I will absolutely get to it.

I do think though, that if you merged this pull request in the meantime, it does work for both python 2 and 3, even if it's a bit hacked. It's a band aid but it does work, I've verified it with both.

dnet commented 7 years ago

But from what you say above, it sounds like python3 is a Python3-only branch if it uses enums?

You're right, it was an experiment of mine to see what benefits would it give.

I'm also sort of gearing up for creating a few of my own python-based amateur radio decoding / encoding libraries, so this will be good practice before I get started in that.

Nice to hear that, please announce it on Reddit when it's public so I can check it out!

Give me a day or two (maybe 3).

I do think though, that if you merged this pull request in the meantime, it does work for both python 2 and 3, even if it's a bit hacked. It's a band aid but it does work, I've verified it with both.

Sure, I'll merge and release in the meantime, open another pull request when you're ready.

Thanks!

KM4YRI commented 7 years ago

:+1:

Just curious, will this change get auto-deployed to pypi / pip?

dnet commented 7 years ago

Released 0.2.8 on GitHub and PyPI

dnet commented 7 years ago

How is the implementation involving six going?

KM4YRI commented 7 years ago

Wasn't able to get to it this weekend due to compounding car problems and other things. My car was supposted to be done Saturday, but a few plastic coolant pipes broke, those will have to be ordered and that means next weekend will have to be spent putting it back together (instead of doing something fun like updating code and pushing commits).

The library changes are still on my radar though. I can't give an exact date, but I will get to it as soon as life lets me.

dnet commented 7 years ago

sure, no problem