15
0

Accepting request 730321 from devel:languages:python

- Update to 2019.8.11:
  * Fix #201: handle ‎/‏ marks mid-text within stressed tags or right after stressed tags.
  * Feature #213: images_as_html config option to always generate an img html tag. preserves "height", "width" and "alt" if possible.
  * Remove support for end-of-life Pythons. Now requires Python 2.7 or 3.4+.
  * Remove support for retrieving HTML over the network.
  * Add __main__.py module to allow running the CLI using python -m html2text ....
  * Fix #238: correct spacing when a HTML entity follows a non-stressed tags which follow a stressed tag.
  * Remove unused or deprecated: * html2text.compat.escape() * html2text.config.RE_UNESCAPE * html2text.HTML2Text.replaceEntities() * html2text.HTML2Text.unescape() * html2text.unescape()
  * Fix #208: handle LEFT-TO-RIGHT MARK after a stressed tag.
- Remove patch remove_unittest2.patch

OBS-URL: https://build.opensuse.org/request/show/730321
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-html2text?expand=0&rev=20
This commit is contained in:
Ludwig Nussel
2019-09-13 13:00:23 +00:00
committed by Git OBS Bridge
5 changed files with 21 additions and 77 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:627514fb30e7566b37be6900df26c2c78a030cc9e6211bda604d8181233bcdd4
size 52211

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f516b9c10284174e2a974d86f91cab02b3cf983a17752075da751af0e895ef5e
size 48721

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Sep 12 08:45:34 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2019.8.11:
* Fix #201: handle &lrm;/&rlm; marks mid-text within stressed tags or right after stressed tags.
* Feature #213: images_as_html config option to always generate an img html tag. preserves "height", "width" and "alt" if possible.
* Remove support for end-of-life Pythons. Now requires Python 2.7 or 3.4+.
* Remove support for retrieving HTML over the network.
* Add __main__.py module to allow running the CLI using python -m html2text ....
* Fix #238: correct spacing when a HTML entity follows a non-stressed tags which follow a stressed tag.
* Remove unused or deprecated: * html2text.compat.escape() * html2text.config.RE_UNESCAPE * html2text.HTML2Text.replaceEntities() * html2text.HTML2Text.unescape() * html2text.unescape()
* Fix #208: handle LEFT-TO-RIGHT MARK after a stressed tag.
- Remove patch remove_unittest2.patch
-------------------------------------------------------------------
Tue Dec 4 12:48:56 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-html2text
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,17 @@
#
#
%define upname html2text
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without tests
Name: python-%{upname}
Version: 2018.1.9
Version: 2019.8.11
Release: 0
Summary: Python script for turning HTML into Markdown text
License: GPL-3.0-only
Group: Development/Languages/Python
URL: https://github.com/Alir3z4/html2text/
Source: https://files.pythonhosted.org/packages/source/h/%{upname}/%{upname}-%{version}.tar.gz
Patch0: remove_unittest2.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -44,7 +41,6 @@ Markdown (a text-to-HTML format).
%prep
%setup -q -n %{upname}-%{version}
%patch0 -p1
# remove useless shebang
sed -i '/^#!/d' %{upname}/__init__.py
@@ -66,10 +62,8 @@ sed -i '/^#!/d' %{upname}/__init__.py
%postun
%python_uninstall_alternative html2text
%if %{with tests}
%check
%python_exec setup.py test
%endif
%pytest
%files %{python_files}
%license COPYING

View File

@@ -1,64 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -18,14 +18,7 @@ try:
except ImportError:
read_md = read_md_open
-requires_list = []
-try:
- import unittest2 as unittest
-except ImportError:
- import unittest
-else:
- if sys.version_info <= (2, 6):
- requires_list.append("unittest2")
+import unittest
class RunTests(Command):
@@ -68,9 +61,6 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.4',
- 'Programming Language :: Python :: 2.5',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
@@ -85,7 +75,6 @@ setup(
html2text=html2text.cli:main
""",
license='GNU GPL 3',
- requires=requires_list,
packages=find_packages(exclude=['test']),
include_package_data=True,
zip_safe=False,
--- a/test/test_html2text.py
+++ b/test/test_html2text.py
@@ -7,10 +7,7 @@ import re
import subprocess
import sys
-if sys.version_info[:2] < (2, 7):
- import unittest2 as unittest
-else:
- import unittest
+import unittest
logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s',
--- a/test/test_memleak.py
+++ b/test/test_memleak.py
@@ -1,10 +1,7 @@
import html2text
import logging
import sys
-if sys.version_info[:2] < (2, 7):
- import unittest2 as unittest
-else:
- import unittest
+import unittest
logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s',