Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6:Update
python3-readme_renderer
remove-six.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove-six.patch of Package python3-readme_renderer
From 690e5248960280232315f804e1f0c6bf7a1d3348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> Date: Tue, 23 Feb 2021 08:58:46 +0100 Subject: [PATCH] Remove the use of six since only Python 3 is supported --- readme_renderer/integration/distutils.py | 2 -- readme_renderer/markdown.py | 9 ++------- setup.py | 2 +- tests/test_rst.py | 3 +-- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/readme_renderer/integration/distutils.py b/readme_renderer/integration/distutils.py index 98d0f08..eb04460 100644 --- a/readme_renderer/integration/distutils.py +++ b/readme_renderer/integration/distutils.py @@ -20,7 +20,6 @@ import distutils.log from distutils.command.check import check as _check from distutils.core import Command -import six from ..rst import render @@ -35,7 +34,6 @@ r'(?P<message>.*)', re.DOTALL | re.MULTILINE) -@six.python_2_unicode_compatible class _WarningStream(object): def __init__(self): self.output = io.StringIO() diff --git a/readme_renderer/markdown.py b/readme_renderer/markdown.py index ca2f03f..ae32539 100644 --- a/readme_renderer/markdown.py +++ b/readme_renderer/markdown.py @@ -16,17 +16,12 @@ import re import warnings +from html.parser import unescape + import pygments import pygments.lexers import pygments.formatters -try: - from six.moves.html_parser import unescape -except ImportError: # Python 2 - from six.moves import html_parser - - unescape = html_parser.HTMLParser().unescape - from .clean import clean _EXTRA_WARNING = ( diff --git a/setup.py b/setup.py index ff1feaf..c8e35c1 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], - install_requires=["bleach>=2.1.0", "docutils>=0.13.1", "Pygments>=2.5.1", "six"], + install_requires=["bleach>=2.1.0", "docutils>=0.13.1", "Pygments>=2.5.1"], entry_points={ "distutils.commands": ["check = readme_renderer.integration.distutils:Check"], }, diff --git a/tests/test_rst.py b/tests/test_rst.py index 3de3dbf..64e552c 100755 --- a/tests/test_rst.py +++ b/tests/test_rst.py @@ -3,7 +3,6 @@ import os.path import pytest -import six from readme_renderer.rst import render @@ -46,7 +45,7 @@ def test_rst_002(): def test_rst_raw(): - warnings = six.StringIO() + warnings = io.StringIO() assert render(""" .. raw:: html <script>I am evil</script>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor