Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stay Python 2.6 compatible #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Elias481
Copy link

As there are many installations with only default 2.6 Python in place an no "supported" updates are available in official repos for OS we should try to stay Python 2.6 compatible... (At least all the Redhat/Centos 6 systems are affected.)

Up to now there is "nothing" in PyInotify that is not working with 2.6 and it would be fine if that could last for a while, at least as long enterprise operating systems like Centos/Redhat 6 are supported and offer no official update to Python 2.7.
I know there are Python 3.4 packages available for these two via epel, but unfortunately in some companies are still policies in place that enforce pyhton 2.6 for commonly used scripts...
And there are companies still having unsupported Centos/Redhat 5 systems in production where the latest version available via epel is 2.6.

  • Update .travis.yml
    include v2.6 and for that version do the following addtional tasks:
  • explicitly install pycparser version 2.18 needed by coverall as this is latest version that's 2.6 compatible
  • install unittest2 to have the newer unittest features available for 2.6 so only minimal change required for test_inotify.py
  • Update test_inotify.py
    import unittest2 as unittest for python version 2.6
  • Update adapters.py
    change debug code to format syntax understood by 2.6

Drawback of this: the travis test for 2.6 takes quite much time because some dependencies need to be compiled. But I think this is not a big issue.

As there are many installations with only default 2.6 Python in place an no "supported" updates are available in official repos for OS we should try to stay Python 2.6 compatible... (At least all the Redhat/Centos 6 systems are affected)

* Update .travis.yml
** include v2.6 and for that version do the following addtional tasks:
*** explicitly install pycparser version 2.18 needed by coverall as this is latest version that's 2.6 compatible
*** install unittest2 to have the newer unittest features available for 2.6 so only minimal change required for test_inotify.py
* Update test_inotify.py
** import unittest2 as unittest for python version 2.6
* Update adapters.py
** change debug code to format syntax understood by 2.6
@coveralls
Copy link

coveralls commented Sep 20, 2018

Coverage Status

Coverage remained the same at 85.069% when pulling 7da545d on Elias481:try-to-stay_2.6_compatible into 288a2b0 on dsoprea:master.

@Elias481 Elias481 force-pushed the try-to-stay_2.6_compatible branch 4 times, most recently from 6c6de48 to aebec5f Compare September 20, 2018 19:27
To speed up the Python 2.6 test enable travis-ci pip cache for Python 2.6.
Enable only for 2.6 because cache handling takes quite much time (but less time than installing the non-prebuilt dependencies on 2.6...)
inotify/adapters.py Show resolved Hide resolved
inotify/adapters.py Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
@dsoprea
Copy link
Owner

dsoprea commented Aug 25, 2020

Let's see if 2.6 is still available in CI. If so, then I'm good with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants