Repository: opsdroid/opsdroid

Issue:
Should we drop Python 3.5 support
It has been raised a few times in the Matrix chat that we should consider dropping Python 3.5 support.

There are a number of improvements in [Python 3.6](https://docs.python.org/3/whatsnew/3.6.html) which we could benefit from. This would also be a breaking change for users still on 3.5 and will require them to upgrade to continue using opsdroid.

The reason this has cropped up for me again is because there appears to be a bug still in 3.5.7 which causes problems with catching exceptions within coroutines. This problem is not present in 3.6.8. I would rather not have to work around this bug if I can help it.

We decided to support 3.5+ because that is the default version which comes pre-installed on the latest release of Debian and variations like Raspbian. This should ensure good support for many users without them having to tinker with their Python and provide a good beginner experience.

As this is an open source software project with a motivation around self hosting and privacy it isn't possible to collect user metrics on Python versions being used. Otherwise we could use this data to asses the impact of dropping 3.5.

[Home Assistant](https://www.home-assistant.io/) (the project which inspired much of opsdroid's community practices) are moving to only supporting the two most recent minor versions of Python, which means they will also be dropping 3.5 in the near future.

My proposal would be to follow their lead. This does put a responsibility on us to keep an eye on Python releases (3.8 is [pencilled in](https://www.python.org/dev/peps/pep-0569/) for the end of the year) and remove support as versions are released.

I would love thoughts and feedback from the community.


Discussion:
I am all in favour of this. Supporting older versions of Python (and other libs) can cause a lot of extra work and it's really not that hard to find a way of installing a newer Python interpretor. (Docker, debian backports, conda etc)
I'm happy with this as well. I have got a raspbian and was pretty easy to update the python version so perhaps it could be good to drop 3.5 especially after the issues we were having on appveyor.
I'm also on board with dropping 3.5. All hail f-strings!

Resolving patch:
diff --git a/opsdroid/__main__.py b/opsdroid/__main__.py
--- a/opsdroid/__main__.py
+++ b/opsdroid/__main__.py
@@ -115,8 +115,8 @@ def get_logging_level(logging_level):
 
 def check_dependencies():
     """Check for system dependencies required by opsdroid."""
-    if sys.version_info.major < 3 or sys.version_info.minor < 5:
-        logging.critical(_("Whoops! opsdroid requires python 3.5 or above."))
+    if sys.version_info.major < 3 or sys.version_info.minor < 6:
+        logging.critical(_("Whoops! opsdroid requires python 3.6 or above."))
         sys.exit(1)
 
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -71,7 +71,6 @@ def run(self):
         'Programming Language :: Python',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3 :: Only',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Topic :: Communications :: Chat',


Test patch:
diff --git a/tests/test_main.py b/tests/test_main.py
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -157,6 +157,22 @@ def test_check_version_35(self):
         with mock.patch.object(sys, 'version_info') as version_info:
             version_info.major = 3
             version_info.minor = 5
+            with self.assertRaises(SystemExit):
+                opsdroid.check_dependencies()
+
+    def test_check_version_36(self):
+        with mock.patch.object(sys, 'version_info') as version_info:
+            version_info.major = 3
+            version_info.minor = 6
+            try:
+                opsdroid.check_dependencies()
+            except SystemExit:
+                self.fail("check_dependencies() exited unexpectedly!")
+
+    def test_check_version_37(self):
+        with mock.patch.object(sys, 'version_info') as version_info:
+            version_info.major = 3
+            version_info.minor = 7
             try:
                 opsdroid.check_dependencies()
             except SystemExit: