sibson/vncdotool

Require Python 3.7+ / drop support for older versions

pmhahn opened this issue · 4 comments

vncdotool currently still supports Python 2.7, which is end-of-life since 3 years in a few months.
Also all versions of Python 3.0 up to and including to 3.6 are end-of-life.
Python 3.7 reaches end-of-life in half a year: 2023-06-27

See https://devguide.python.org/versions/

  • tox.ini is still using py35
  • .travis.yml is still using 2.7 and 3.5
  • setup.py ony lists Programming Language :: Python :: 3 but no individual versions.
  • requirements-dev.txt and requirements.txt seem to lock some old versions; maybe by design to support some older versions, but updating them might be worhwile.

Because of the Python 2.7 support there is still some compatibility code left to handle the bytes / unicode differences, which could be removed if Python 2.7 support was dropped, especially all that ord() handling #219. That would simplify some code paths and would also simplify adding PEP-484 type annotations (I have a local branch where I already started this.)

What are your plans regarding

  • removing tox.ini
  • replacing nosetest
  • removing Travis-CI support
  • removing Circle-CI support
  • removing Python 3.6 and older support
  • adding type annotations

PS: Some function tests use a tool called vncev, which I could not find. What is that and where can I get it?

I think it's time to retire 2.7 support. I'd kept it pass EOL as I knew there are users on platforms that are still using 2.7.

  • tox.ini, not thought about.
  • I've started removing nosetests and non-std mock.
  • Travis CI has got to go
  • CircleCI, could go. I don't know if it'll be easier to make the intergration tests work on GH Action vs Circle. That is probably the only reason to keep Circle around.
  • All EOL python should be dropped
  • On type annontations, I'm not sure. I'm not a fan but I've not used them. I'd be open to looking at a PR and if its not too "noisy" include them. If there is other value for static analisys or similar I could be convinced.

Maybe I'll make the next release the last py2.7 one, so at least there is a recentish one out there.

vncev is an example program from https://github.com/LibVNC/libvncserver. I use it for intergration testing, but never figured out a good way to build and test it using CI. I usually do a manual run before packaging a release.

Thank for the information. I have a local branch here which

  • drops support for Python 2.7 and before 3.7
  • adds type annotations (supported since Python 3.5 resp. Python 3.6)
  • rips out all that ord() / chr() handling as Python 3.0 works with bytes already¹
  • converts string formatting to f-string (available since Python 3.6+)

Currently that branch also has many more changes. I can either try to separate those changes into multiple commits, but that will take some time and even go to waste when you squash my branch into yours. Some things are even hard to separate as they depend on each other, but I tried to do that anyway.

I'll send you a PR to get your feedback.

keep it in one PR, it's mostly mechanical and shouldn't require too much to figure out.