tamentis / rpdb

Wrapper around pdb allowing remote debugging via netcat or telnet. This is especially useful in a Tomcat/Jython environment where little debugging tools are available.
BSD 2-Clause "Simplified" License
130 stars 44 forks source link

Read the README file with UTF-8 encoding. #14

Closed bowlofeggs closed 8 years ago

bowlofeggs commented 8 years ago

This commit fixes an install issue in Python 3.5 where the read() function raises an encoding error. It uses the open function from the io module so that the code will be compatible with both Python 2 and 3.

tamentis commented 8 years ago

Did you mean to change the shebang line to python3?

bowlofeggs commented 8 years ago

Hi @tamentis!

I did alter the shebang on purpose, though to me it would also work if we changed it to python2 if you prefer. The reason I altered it is per the recommendation in PEP-394:

https://www.python.org/dev/peps/pep-0394/

The short of it is that /usr/bin/python should point at Python 2 on most distributions, but Arch Linux has already changed it to point at Python 3. Due to that, the recommendation is that software use an explicit Python version (i.e., /usr/bin/python{2,3}) rather than just python so that it's clear.

This particular setup.py will work with Python 2 or 3, and most of the change is about getting it to work with Python 3. The RPM package I have built explicitly calls it with each interpreter as it builds. To me it's not important that it specifically be 3, just that it be explicit.

Would you prefer it if I set it to python2?

bowlofeggs commented 8 years ago

I suppose you could easily argue that it's not important anyway, since it does work with either. So I can also just change it back if you prefer that too. I was just trying to follow the recommendation but in this case it really isn't important.

tamentis commented 8 years ago

Yes it makes sense.