From f804c05afb8633b9953faef788025377515c2553 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 5 Dec 2023 15:28:09 +0000 Subject: [PATCH] depend on markupsafe (#31) Also: Python 2.7 is no longer available on GitHub Actions --- .github/workflows/test.yml | 5 ++++- dev-requirements.txt | 1 + flask_misaka.py | 4 ++-- requirements.txt | 2 +- setup.py | 6 +++--- tests.py | 3 ++- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85619ef..b4d5d1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["2.x", "3.x"] + python-version: ["3.x"] name: "pytest: Python ${{ matrix.python-version }}" steps: @@ -21,6 +21,9 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install setuptools + run: pip install setuptools + - name: Install dependencies run: >- pip install diff --git a/dev-requirements.txt b/dev-requirements.txt index e8fe220..70efc79 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,2 +1,3 @@ +Flask>=0.7 coverage mock; python_version < '3.3' diff --git a/flask_misaka.py b/flask_misaka.py index 82718a2..53b8cb6 100644 --- a/flask_misaka.py +++ b/flask_misaka.py @@ -1,9 +1,9 @@ from __future__ import absolute_import, unicode_literals -__version__ = '1.0.0' +__version__ = '1.0.1' import misaka -from flask import Markup +from markupsafe import Markup from copy import copy # import constants for compatibility diff --git a/requirements.txt b/requirements.txt index ca71e4e..65d1750 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -Flask>=0.7 +markupsafe misaka>=2.0,<3.0 diff --git a/setup.py b/setup.py index a416411..f6a06d3 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,9 @@ import re from setuptools import setup, find_packages -tests_require = [] +tests_require = ['Flask'] if sys.version_info[0] < 3: - tests_require = ['mock'] + tests_require.append('mock') version = '' with open('flask_misaka.py', 'r') as fd: @@ -26,7 +26,7 @@ packages=find_packages(), py_modules=['flask_misaka'], install_requires=[ - 'Flask>=0.7', + 'markupsafe', 'misaka>=2.0,<3.0', ], test_suite='tests', diff --git a/tests.py b/tests.py index fc24411..47bb559 100644 --- a/tests.py +++ b/tests.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals -from flask import Flask, render_template_string, Markup +from flask import Flask, render_template_string +from markupsafe import Markup from unittest import TestCase from textwrap import dedent try: