From f474b1e72990b99385522f1260bc3f06ddf92a27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 14 Jul 2019 21:32:26 +0200 Subject: [PATCH] Drop Python 3.4 support. It was EOL'd in March 2019 and I don't want to bother with it anymore. --- doc/plugins/math-and-code.rst | 5 ----- doc/plugins/plots-and-graphs.rst | 5 ----- doc/themes/pelican.rst | 8 +++----- plugins/m/test/test_dot.py | 11 ++++------- plugins/m/test/test_math.py | 7 ++----- 5 files changed, 9 insertions(+), 27 deletions(-) diff --git a/doc/plugins/math-and-code.rst b/doc/plugins/math-and-code.rst index e00dfadb..aa803507 100644 --- a/doc/plugins/math-and-code.rst +++ b/doc/plugins/math-and-code.rst @@ -60,11 +60,6 @@ files, put them including the ``m/`` directory into one of your ``pelicanconf.py``. This plugin assumes presence of `m.htmlsanity <{filename}/plugins/htmlsanity.rst>`_. -.. note-danger:: - - Note that this plugin, unlike most of the others, requires at least Python - 3.5 to run properly. - .. code:: python PLUGINS += ['m.htmlsanity', 'm.math'] diff --git a/doc/plugins/plots-and-graphs.rst b/doc/plugins/plots-and-graphs.rst index 2e6101c3..a1fdeec3 100644 --- a/doc/plugins/plots-and-graphs.rst +++ b/doc/plugins/plots-and-graphs.rst @@ -239,11 +239,6 @@ including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add ``m.dot`` package to your :py:`PLUGINS` in ``pelicanconf.py``. For the Python doc theme, it's enough to just list it in :py:`PLUGINS`. -.. note-danger:: - - Note that this plugin, unlike most of the others, requires at least Python - 3.5 to run properly. - .. code:: python PLUGINS += ['m.dot'] diff --git a/doc/themes/pelican.rst b/doc/themes/pelican.rst index fbedcf2d..929abeed 100644 --- a/doc/themes/pelican.rst +++ b/doc/themes/pelican.rst @@ -70,11 +70,9 @@ Install Pelican either via ``pip`` or using your system package manager. .. note-danger:: In order to use the m.css theme or `plugins <{filename}/plugins.rst>`_, you - need to install Pelican 4 and the Python 3 version of it. Most of the - plugins work with Python 3.4, while some (such as the - `math plugin <{filename}/plugins/math-and-code.rst#math>`_) need 3.5. - Python 2 is not supported and compatibility with Pelican 3.7 has been - dropped. + need to install Pelican 4 and the Python 3 version of it. The theme and + plugins work with Python 3.5 and newer. Python 2 is not supported and + compatibility with Pelican 3.7 has been dropped. .. code:: sh diff --git a/plugins/m/test/test_dot.py b/plugins/m/test/test_dot.py index 51ae70cb..a2697c08 100644 --- a/plugins/m/test/test_dot.py +++ b/plugins/m/test/test_dot.py @@ -24,7 +24,6 @@ import re import subprocess -import sys import unittest from distutils.version import LooseVersion @@ -38,9 +37,8 @@ class Dot(PelicanPluginTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, '', *args, **kwargs) - @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5") and - LooseVersion(dot_version()) >= LooseVersion("2.40.1"), - "The dot plugin requires at least Python 3.5 installed. Dot < 2.40.1 has a completely different output.") + @unittest.skipUnless(LooseVersion(dot_version()) >= LooseVersion("2.40.1"), + "Dot < 2.40.1 has a completely different output.") def test(self): self.run_pelican({ 'PLUGINS': ['m.htmlsanity', 'm.components', 'm.dot'], @@ -49,9 +47,8 @@ class Dot(PelicanPluginTestCase): self.assertEqual(*self.actual_expected_contents('page.html')) - @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5") and - LooseVersion(dot_version()) < LooseVersion("2.40.1"), - "The dot plugin requires at least Python 3.5 installed. Dot < 2.40.1 has a completely different output.") + @unittest.skipUnless(LooseVersion(dot_version()) < LooseVersion("2.40.1"), + "Dot < 2.40.1 has a completely different output.") def test_238(self): self.run_pelican({ 'PLUGINS': ['m.htmlsanity', 'm.components', 'm.dot'], diff --git a/plugins/m/test/test_math.py b/plugins/m/test/test_math.py index 59ea68fe..2638298f 100644 --- a/plugins/m/test/test_math.py +++ b/plugins/m/test/test_math.py @@ -24,22 +24,19 @@ import os import pickle -import sys import shutil import unittest from hashlib import sha1 -from distutils.version import LooseVersion - from . import PelicanPluginTestCase class Math(PelicanPluginTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, '', *args, **kwargs) - @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion("3.5") and shutil.which('latex'), - "The math plugin requires at least Python 3.5 and LaTeX installed") + @unittest.skipUnless(shutil.which('latex'), + "The math plugin requires LaTeX installed") def test(self): self.run_pelican({ 'PLUGINS': ['m.htmlsanity', 'm.components', 'm.math'], -- 2.30.2