pyopenvr icon indicating copy to clipboard operation
pyopenvr copied to clipboard

Python 2.7 compatibility

Open HWiese1980 opened this issue 5 years ago • 6 comments

Hi

is it really necessary to drop Python 2 support? So far the only thing incompatible that I've seen are the type hints for example in openvr/__init__.py:2719.

I'm using pyOpenVR in a ROS environment which so far still uses Python 2. I know, Python 2 is going to be EOL by the end of this year. But working around these issues is a pain in the butt when you have a million packages that still require it while others simply don't work with it. I would suggest keeping Python 2 compatibility up as long as possible or at least make a backwards compatible branch.

So, a little more concrete suggestion from my side: make an intermediate release with the latest still Python 2.7 compatible code. That would be awesome!

Cheers

HWiese1980 avatar Jul 23 '19 09:07 HWiese1980

@HWiese1980 Can you use pyopenvr version 1.3.2201? That version might still work with python 2.

cmbruns avatar Jul 23 '19 19:07 cmbruns

Yes, that version works. Ah, and there's the corresponding tag. Just out of curiosity... without having taken a deeper look into it myself, what else makes it Python 2 incompatible other than the mentioned type hints?

HWiese1980 avatar Jul 23 '19 19:07 HWiese1980

I don't know of anything specifically other than the type hints that breaks python 2 compatibility. The problem is that I lost all interest in python 2 two years ago, and I can only test and maintain things here that interest me. I like type hints. I no longer maintain a sister installation of python 2 for testing. I don't want to support something that I cannot personally test.

On the other hand, if you, or someone else interested in python 2, were to express a genuine commitment to testing and debugging python 2 support on an ongoing basis, with each new release of pyopenvr, for, say, at least the next year, I might be willing to work with you. But I'm not going to maintain such support on my own.

cmbruns avatar Jul 23 '19 20:07 cmbruns

I can comprehend. I've personally also lost interest in Python 2 because of its imminent EOL. It's just that my job requires using stuff that is not yet supported by Python 3, like ROS and its many packages for instance (unfortunately). It's an inconvenient situation. On one hand we all know that it's going to end, on the other we have to stick with it because others don't seem to really care. I'm really curious to see what happens 2020 when Python 2 is killed off.

Anyway, there are other ways to do the testing. I suppose you've heard of continuous integration? TravisCI? CircleCI? That way you could have your code tested for Python 2 compatibility at every push without the need of a local installation of Python 2.

HWiese1980 avatar Jul 24 '19 04:07 HWiese1980

@HWiese1980 are you able to get by for now using version 1.3.2201?

cmbruns avatar Jul 24 '19 15:07 cmbruns

Yes. I do for the time being. I just hope that triad_openvr will not break anything and stay compatible. I mean, after all I could stick with some older versions of everything but if there were bugfixes and new, fancy features that I need, it'd be a pity if compatibility breaks in the process.

HWiese1980 avatar Jul 25 '19 09:07 HWiese1980