Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-restview for openSUSE:Factory 
checked in at 2022-04-14 17:25:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-restview (Old)
 and      /work/SRC/openSUSE:Factory/.python-restview.new.1941 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-restview"

Thu Apr 14 17:25:44 2022 rev:6 rq:970090 version:3.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-restview/python-restview.changes  
2021-04-06 17:31:17.791226572 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-restview.new.1941/python-restview.changes    
    2022-04-14 17:26:21.291325759 +0200
@@ -1,0 +2,15 @@
+Thu Apr 14 07:20:58 UTC 2022 - [email protected]
+
+- version update to 3.0.0
+  3.0.0 (2022-01-12)
+  - Drop support for Python 2.7.
+  2.9.3 (2021-11-29)
+  - Fix incompatibility with docutils 0.18.1 that resulted in "Cannot embed
+    stylesheet" errors (`issue 61 
<https://github.com/mgedmin/restview/pull/61>`_,
+    contributed by S??bastien Besson).
+  - Add support for Python 3.8, 3.9, and 3.10.
+  - Drop support for Python 3.5.
+- deleted patches
+  - false.patch (upstreamed)
+
+-------------------------------------------------------------------

Old:
----
  false.patch
  restview-2.9.2.tar.gz

New:
----
  restview-3.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-restview.spec ++++++
--- /var/tmp/diff_new_pack.7P8QcW/_old  2022-04-14 17:26:21.799326354 +0200
+++ /var/tmp/diff_new_pack.7P8QcW/_new  2022-04-14 17:26:21.803326358 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-restview
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-restview
-Version:        2.9.2
+Version:        3.0.0
 Release:        0
 Summary:        ReStructuredText viewer
 License:        GPL-3.0-only
 Group:          Development/Languages/Python
 URL:            https://mg.pov.lt/restview/
 Source:         
https://files.pythonhosted.org/packages/source/r/restview/restview-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM 
https://github.com/mgedmin/restview/commit/a1ded30a87c65f3ce59a18497a7fc5099317c2be
 New mock release returns False from patcher.stop()
-Patch0:         false.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -34,11 +32,10 @@
 Requires:       python-pygments
 Requires:       python-readme_renderer
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module docutils}
-BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module pygments}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module readme_renderer}

++++++ restview-2.9.2.tar.gz -> restview-3.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/.coveragerc 
new/restview-3.0.0/.coveragerc
--- old/restview-2.9.2/.coveragerc      2016-09-10 21:51:57.000000000 +0200
+++ new/restview-3.0.0/.coveragerc      2019-08-16 08:56:37.000000000 +0200
@@ -1,3 +1,6 @@
+[run]
+source = restview
+
 [report]
 exclude_lines =
     pragma: nocover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/.travis.yml 
new/restview-3.0.0/.travis.yml
--- old/restview-2.9.2/.travis.yml      2019-04-23 20:05:21.000000000 +0200
+++ new/restview-3.0.0/.travis.yml      1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-language: python
-dist: xenial
-python:
-    - 2.7
-    - 3.5
-    - 3.6
-    - 3.7
-    - pypy2.7-6.0.0
-    - pypy3.5-6.0.0
-install:
-    - pip install mock coverage coveralls flake8
-    - pip install .
-script:
-    - coverage run --source=src/restview setup.py test -q
-    - flake8 src setup.py
-after_success:
-    - coveralls
-    - coverage report -m --fail-under=100
-notifications:
-    email: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/CHANGES.rst 
new/restview-3.0.0/CHANGES.rst
--- old/restview-2.9.2/CHANGES.rst      2019-04-23 20:07:00.000000000 +0200
+++ new/restview-3.0.0/CHANGES.rst      2022-01-12 22:24:12.000000000 +0100
@@ -1,6 +1,24 @@
 Changelog
 =========
 
+3.0.0 (2022-01-12)
+------------------
+
+- Drop support for Python 2.7.
+
+
+2.9.3 (2021-11-29)
+------------------
+
+- Fix incompatibility with docutils 0.18.1 that resulted in "Cannot embed
+  stylesheet" errors (`issue 61 
<https://github.com/mgedmin/restview/pull/61>`_,
+  contributed by S??bastien Besson).
+
+- Add support for Python 3.8, 3.9, and 3.10.
+
+- Drop support for Python 3.5.
+
+
 2.9.2 (2019-04-23)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/Makefile new/restview-3.0.0/Makefile
--- old/restview-2.9.2/Makefile 2018-08-24 16:14:45.000000000 +0200
+++ new/restview-3.0.0/Makefile 2022-01-12 22:23:41.000000000 +0100
@@ -1,43 +1,33 @@
-PYTHON = python
-
-FILE_WITH_VERSION = src/restview/restviewhttp.py
-FILE_WITH_CHANGELOG = CHANGES.rst
-
-
-.PHONY: default
-default: all
+PYTHON = python3
 
 
 .PHONY: all
-all: bin/restview bin/py.test
+all: bin/restview bin/pytest    ##: build a local virtualenv (default target)
 
 
 .PHONY: test
-test: bin/py.test bin/restview
-       bin/py.test
-
-.PHONY: check
-check:
-       tox
+test:                           ##: run tests
+       tox -p auto
 
 .PHONY: coverage
-coverage:
+coverage:                       ##: measure test coverage
        tox -e coverage
 
 .PHONY: diff-cover
-diff-cover: coverage
+diff-cover: coverage            ##: show untested code in this branch
        diff-cover coverage.xml
 
-
-clean:
+.PHONY: clean
+clean:                          ##: remove build artifacts
        rm -rf bin .venv
 
 
+FILE_WITH_VERSION = src/restview/restviewhttp.py
 include release.mk
 
 
-bin/py.test: | bin/pip
-       bin/pip install pytest mock
+bin/pytest: | bin/pip
+       bin/pip install pytest
        ln -sfr .venv/$@ $@
 
 bin/restview: setup.py | bin/pip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/PKG-INFO new/restview-3.0.0/PKG-INFO
--- old/restview-2.9.2/PKG-INFO 2019-04-23 20:08:58.000000000 +0200
+++ new/restview-3.0.0/PKG-INFO 2022-01-12 22:24:55.817400700 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: restview
-Version: 2.9.2
+Version: 3.0.0
 Summary: ReStructuredText viewer
 Home-page: https://mg.pov.lt/restview/
 Author: Marius Gedminas
@@ -88,8 +88,8 @@
           pip install restview
         
         
-        .. |buildstatus| image:: 
https://api.travis-ci.org/mgedmin/restview.svg?branch=master
-        .. _buildstatus: https://travis-ci.org/mgedmin/restview
+        .. |buildstatus| image:: 
https://github.com/mgedmin/restview/workflows/build/badge.svg?branch=master
+        .. _buildstatus: https://github.com/mgedmin/restview/actions
         
         .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/restview?branch=master&svg=true
         .. _appveyor: https://ci.appveyor.com/project/mgedmin/restview
@@ -101,6 +101,24 @@
         Changelog
         =========
         
+        3.0.0 (2022-01-12)
+        ------------------
+        
+        - Drop support for Python 2.7.
+        
+        
+        2.9.3 (2021-11-29)
+        ------------------
+        
+        - Fix incompatibility with docutils 0.18.1 that resulted in "Cannot 
embed
+          stylesheet" errors (`issue 61 
<https://github.com/mgedmin/restview/pull/61>`_,
+          contributed by S??bastien Besson).
+        
+        - Add support for Python 3.8, 3.9, and 3.10.
+        
+        - Drop support for Python 3.5.
+        
+        
         2.9.2 (2019-04-23)
         ------------------
         
@@ -491,10 +509,11 @@
 Classifier: Intended Audience :: End Users/Desktop
 Classifier: License :: OSI Approved :: GNU General Public License (GPL)
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Operating System :: OS Independent
@@ -503,4 +522,6 @@
 Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
 Classifier: Topic :: Software Development :: Documentation
 Classifier: Topic :: Text Processing :: Markup
+Description-Content-Type: text/x-rst
 Provides-Extra: syntax
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/README.rst 
new/restview-3.0.0/README.rst
--- old/restview-2.9.2/README.rst       2018-01-28 10:41:44.000000000 +0100
+++ new/restview-3.0.0/README.rst       2020-12-01 19:39:55.000000000 +0100
@@ -79,8 +79,8 @@
   pip install restview
 
 
-.. |buildstatus| image:: 
https://api.travis-ci.org/mgedmin/restview.svg?branch=master
-.. _buildstatus: https://travis-ci.org/mgedmin/restview
+.. |buildstatus| image:: 
https://github.com/mgedmin/restview/workflows/build/badge.svg?branch=master
+.. _buildstatus: https://github.com/mgedmin/restview/actions
 
 .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/restview?branch=master&svg=true
 .. _appveyor: https://ci.appveyor.com/project/mgedmin/restview
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/appveyor.yml 
new/restview-3.0.0/appveyor.yml
--- old/restview-2.9.2/appveyor.yml     2019-04-23 20:05:22.000000000 +0200
+++ new/restview-3.0.0/appveyor.yml     2022-01-12 22:23:41.000000000 +0100
@@ -4,17 +4,25 @@
   matrix:
     # https://www.appveyor.com/docs/installed-software#python lists available
     # versions
-    - PYTHON: "C:\\Python27"
-    - PYTHON: "C:\\Python35"
     - PYTHON: "C:\\Python36"
     - PYTHON: "C:\\Python37"
+    - PYTHON: "C:\\Python38"
+    - PYTHON: "C:\\Python39"
+    - PYTHON: "C:\\Python310"
 
 init:
   - "echo %PYTHON%"
 
 install:
+  - ps: |
+      if (-not (Test-Path $env:PYTHON)) {
+        curl -o install_python.ps1 
https://raw.githubusercontent.com/matthew-brett/multibuild/11a389d78892cf90addac8f69433d5e22bfa422a/install_python.ps1
+        .\install_python.ps1
+      }
+  - ps: if (-not (Test-Path $env:PYTHON)) { throw "No $env:PYTHON" }
   - "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
   - python --version
+  - pip install -U virtualenv  # upgrade pip in tox's virtualenvs
   - pip install tox
 
 build: off
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/release.mk 
new/restview-3.0.0/release.mk
--- old/restview-2.9.2/release.mk       2019-04-23 20:06:52.000000000 +0200
+++ new/restview-3.0.0/release.mk       2021-04-19 16:36:29.000000000 +0200
@@ -1,4 +1,4 @@
-# release.mk version 1.4 (2019-04-23)
+# release.mk version 2.1 (2021-04-19)
 #
 # Helpful Makefile rules for releasing Python packages.
 # https://github.com/mgedmin/python-project-skel
@@ -11,10 +11,10 @@
 DISTCHECK_DIFF_OPTS ?= $(DISTCHECK_DIFF_DEFAULT_OPTS)
 
 # These should be fine
-PYTHON ?= python
+PYTHON ?= python3
 PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && 
twine check dist/* && twine upload dist/*
 LATEST_RELEASE_MK_URL = 
https://raw.githubusercontent.com/mgedmin/python-project-skel/master/release.mk
-DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -I'^\#'
+DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -x 
.github -I'^\#'
 
 # These should be fine, as long as you use Git
 VCS_GET_LATEST ?= git pull
@@ -27,30 +27,58 @@
 changelog_ver = `$(PYTHON) setup.py --version`
 changelog_date = `LC_ALL=C date +'$(CHANGELOG_DATE_FORMAT)'`
 
+# Tweaking the look of 'make help'; most of these are awk literals and need 
the quotes
+HELP_INDENT = ""
+HELP_PREFIX = "make "
+HELP_WIDTH = 24
+HELP_SEPARATOR = " \# "
+HELP_SECTION_SEP = "\n"
+
+.PHONY: help
+help:
+       @grep -Eh -e '^[a-zA-Z0-9_ -]+:.*?##: .*$$' -e '^##:' $(MAKEFILE_LIST) \
+           | awk 'BEGIN {FS = "(^|:[^#]*)##: "; section=""}; \
+                 /^##:/ {printf "%s%s\n%s", section, $$2, $(HELP_SECTION_SEP); 
section=$(HELP_SECTION_SEP)} \
+                 /^[^#]/ {printf "%s\033[36m%-$(HELP_WIDTH)s\033[0m%s%s\n", \
+                          $(HELP_INDENT), $(HELP_PREFIX) $$1, 
$(HELP_SEPARATOR), $$2}'
 
 .PHONY: dist
 dist:
        $(PYTHON) setup.py -q sdist bdist_wheel
 
+# Provide a default 'make check' to be the same as 'make test', since that's
+# what 80% of my projects use, but make it possible to override.  Now
+# overriding Make rules is painful, so instead of a regular rule definition
+# you'll have to override the check_recipe macro.
+.PHONY: check
+check:
+       $(check_recipe)
+
+ifndef check_recipe
+define check_recipe =
+       @$(MAKE) test
+endef
+endif
+
 .PHONY: distcheck
 distcheck: distcheck-vcs distcheck-sdist
 
 .PHONY: distcheck-vcs
 distcheck-vcs:
+ifndef FORCE
        # Bit of a chicken-and-egg here, but if the tree is unclean, make
        # distcheck-sdist will fail.
-ifndef FORCE
        @test -z "`$(VCS_STATUS) 2>&1`" || { echo; echo "Your working tree is 
not clean:" 1>&2; $(VCS_STATUS) 1>&2; exit 1; }
 endif
 
-# NB: do not use $(MAKE) because then make -n distcheck will actually run
-# it instead of just printing what it does
+# NB: do not use $(MAKE) in rules with multiple shell commands joined by &&
+# because then make -n distcheck will actually run those instead of just
+# printing what it does
 
 # TBH this could (and probably should) be replaced by check-manifest
 
 .PHONY: distcheck-sdist
-distcheck-sdist:
-       make dist
+distcheck-sdist: dist
        pkg_and_version=`$(PYTHON) setup.py --name`-`$(PYTHON) setup.py 
--version` && \
          rm -rf tmp && \
          mkdir tmp && \
@@ -97,30 +125,41 @@
            grep -q "^$$ver_and_date$$" $(FILE_WITH_CHANGELOG) || { \
                echo "$(FILE_WITH_CHANGELOG) has no entry for $$ver_and_date"; 
exit 1; }
 
-# NB: do not use $(MAKE) because then make -n releasechecklist will
-# actually run the distcheck instead of just printing what it does
+
+# NB: the Makefile that includes release.mk may want to add additional
+# dependencies to the releasechecklist target, but I want 'make distcheck' to
+# happen last, so that's why I put it into the recipe and not at the end of the
+# list of dependencies.
 
 .PHONY: releasechecklist
 releasechecklist: check-latest-rules check-latest-version check-version-number 
check-long-description check-changelog
-       make distcheck
+       $(MAKE) distcheck
 
 .PHONY: release
-release: releasechecklist do-release
+release: releasechecklist do-release    ##: prepare a new PyPI release
 
 .PHONY: do-release
 do-release:
        $(release_recipe)
 
-define release_recipe =
+define default_release_recipe_publish_and_tag =
        # I'm chicken so I won't actually do these things yet
        @echo "Please run"
        @echo
        @echo "  $(PYPI_PUBLISH)"
        @echo "  $(VCS_TAG)"
        @echo
+endef
+define default_release_recipe_increment_and_push =
        @echo "Please increment the version number in $(FILE_WITH_VERSION)"
        @echo "and add a new empty entry at the top of the changelog in 
$(FILE_WITH_CHANGELOG), then"
        @echo
        @echo '  $(VCS_COMMIT_AND_PUSH)'
        @echo
 endef
+ifndef release_recipe
+define release_recipe =
+$(default_release_recipe_publish_and_tag)
+$(default_release_recipe_increment_and_push)
+endef
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/setup.cfg new/restview-3.0.0/setup.cfg
--- old/restview-2.9.2/setup.cfg        2019-04-23 20:08:58.000000000 +0200
+++ new/restview-3.0.0/setup.cfg        2022-01-12 22:24:55.817400700 +0100
@@ -18,6 +18,14 @@
 doctests = yes
 ignore = E121,E123,E126,E133,E226,E241,E242,E704,E261,W503,E501
 
+[isort]
+multi_line_output = 3
+include_trailing_comma = true
+lines_after_imports = 2
+reverse_relative = true
+default_section = THIRDPARTY
+known_first_party = restview
+
 [egg_info]
 tag_build = 
 tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/setup.py new/restview-3.0.0/setup.py
--- old/restview-2.9.2/setup.py 2019-04-23 20:05:18.000000000 +0200
+++ new/restview-3.0.0/setup.py 2022-01-12 22:23:41.000000000 +0100
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 import os
+
 from setuptools import setup
 
 
@@ -30,6 +31,7 @@
     },
     description='ReStructuredText viewer',
     long_description=read('README.rst') + '\n\n' + read('CHANGES.rst'),
+    long_description_content_type='text/x-rst',
     license='GPL',
     classifiers=[
         'Development Status :: 5 - Production/Stable',
@@ -38,10 +40,11 @@
         'Intended Audience :: End Users/Desktop',
         'License :: OSI Approved :: GNU General Public License (GPL)',
         'Programming Language :: Python',
-        'Programming Language :: Python :: 2.7',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
+        'Programming Language :: Python :: 3.9',
+        'Programming Language :: Python :: 3.10',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
         'Operating System :: OS Independent',
@@ -58,9 +61,8 @@
     package_data={'restview': ['*.css', '*.ico']},
     include_package_data=True,
     install_requires=['docutils', 'readme_renderer', 'pygments'],
-    extras_require={'syntax': []},
+    extras_require={'syntax': [], 'test': []},
     test_suite='restview.tests.test_suite',
-    tests_require=['mock'],
     zip_safe=False,
     entry_points="""
     [console_scripts]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/src/restview/__main__.py 
new/restview-3.0.0/src/restview/__main__.py
--- old/restview-2.9.2/src/restview/__main__.py 2018-05-03 09:49:37.000000000 
+0200
+++ new/restview-3.0.0/src/restview/__main__.py 2020-12-07 08:02:01.000000000 
+0100
@@ -3,5 +3,6 @@
 """
 from restview.restviewhttp import main
 
+
 if __name__ == '__main__':
     main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/src/restview/restviewhttp.py 
new/restview-3.0.0/src/restview/restviewhttp.py
--- old/restview-2.9.2/src/restview/restviewhttp.py     2019-04-23 
20:07:00.000000000 +0200
+++ new/restview-3.0.0/src/restview/restviewhttp.py     2022-01-12 
22:24:12.000000000 +0100
@@ -1,58 +1,29 @@
 """
 HTTP-based ReStructuredText viewer.
 """
-from __future__ import print_function
-
 import argparse
 import fnmatch
+import http.server
 import os
 import re
 import socket
+import socketserver
 import subprocess
 import sys
 import threading
 import time
 import webbrowser
-
-try:
-    import BaseHTTPServer
-except ImportError:
-    import http.server as BaseHTTPServer
-
-try:
-    import SocketServer
-except ImportError:
-    import socketserver as SocketServer
-
-try:
-    from html import escape
-except ImportError:
-    from cgi import escape
-
-try:
-    from urllib import unquote
-except ImportError:
-    from urllib.parse import unquote
-
-try:
-    from urlparse import parse_qs
-except ImportError:
-    from urllib.parse import parse_qs
+from html import escape
+from urllib.parse import parse_qs, unquote
 
 import docutils.core
 import docutils.writers.html4css1
-import readme_renderer.rst as readme_rst
 import pygments
-from pygments import lexers, formatters
-
-
-try:
-    unicode
-except NameError:
-    unicode = str
+import readme_renderer.rst as readme_rst
+from pygments import formatters, lexers
 
 
-__version__ = '2.9.2'
+__version__ = '3.0.0'
 
 
 # If restview is ever packaged for Debian, this'll likely be changed to
@@ -60,7 +31,7 @@
 DATA_PATH = os.path.dirname(os.path.realpath(__file__))
 
 
-class MyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+class MyRequestHandler(http.server.BaseHTTPRequestHandler):
     """HTTP request handler that renders ReStructuredText on the fly."""
 
     server_version = "restviewhttp/" + __version__
@@ -218,7 +189,7 @@
     def handle_rest_data(self, data, mtime=None, filename=None):
         html = self.server.renderer.rest_to_html(data, mtime=mtime,
                                                  filename=filename)
-        if isinstance(html, unicode):
+        if isinstance(html, str):
             html = html.encode('UTF-8')
         self.send_response(200)
         self.send_header("Content-Type", "text/html; charset=UTF-8")
@@ -235,7 +206,7 @@
             error='Process returned error code %s.' % retcode,
             source=stderr or '(no output)',
             mtime=mtime)
-        if isinstance(html, unicode):
+        if isinstance(html, str):
             html = html.encode('UTF-8')
         self.send_response(200)
         self.send_header("Content-Type", "text/html; charset=UTF-8")
@@ -264,7 +235,7 @@
     def handle_dir(self, dirname):
         files = [(fn.replace(os.path.sep, '/'), fn) for fn in 
self.collect_files(dirname)]
         html = self.render_dir_listing("RST files in %s" % 
os.path.abspath(dirname), files)
-        if isinstance(html, unicode):
+        if isinstance(html, str):
             html = html.encode('UTF-8', 'replace')
         self.send_response(200)
         self.send_header("Content-Type", "text/html; charset=UTF-8")
@@ -283,7 +254,7 @@
                 files.append(('%s/%s' % (idx, os.path.basename(fn)),
                               fn))
         html = self.render_dir_listing("RST files", files)
-        if isinstance(html, unicode):
+        if isinstance(html, str):
             html = html.encode('UTF-8', 'replace')
         self.send_response(200)
         self.send_header("Content-Type", "text/html; charset=UTF-8")
@@ -399,7 +370,7 @@
 """
 
 
-class ThreadingHTTPServer(SocketServer.ThreadingMixIn, 
BaseHTTPServer.HTTPServer):
+class ThreadingHTTPServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
     daemon_threads = True
 
 
@@ -455,12 +426,17 @@
             writer.translator_class = SyntaxHighlightingHTMLTranslator
         if self.stylesheets:
             stylesheet_dirs = writer.default_stylesheet_dirs + [DATA_PATH]
-            # docutils can't embed http:// or https:// URLs
-            embed_stylesheet = '//' not in self.stylesheets
-            settings_overrides = {'stylesheet': self.stylesheets,
-                                  'stylesheet_path': None,
-                                  'stylesheet_dirs': stylesheet_dirs,
-                                  'embed_stylesheet': embed_stylesheet}
+            if '//' not in self.stylesheets:
+                settings_overrides = {'stylesheet': None,
+                                      'stylesheet_path': self.stylesheets,
+                                      'stylesheet_dirs': stylesheet_dirs,
+                                      'embed_stylesheet': True}
+            else:
+                # docutils can't embed http:// or https:// URLs
+                settings_overrides = {'stylesheet': self.stylesheets,
+                                      'stylesheet_path': None,
+                                      'stylesheet_dirs': stylesheet_dirs,
+                                      'embed_stylesheet': False}
         else:
             settings_overrides = {}
         settings_overrides['syntax_highlight'] = 'short'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/src/restview/tests.py 
new/restview-3.0.0/src/restview/tests.py
--- old/restview-2.9.2/src/restview/tests.py    2018-08-24 16:10:29.000000000 
+0200
+++ new/restview-3.0.0/src/restview/tests.py    2022-01-12 22:23:41.000000000 
+0100
@@ -4,22 +4,18 @@
 import socket
 import unittest
 import webbrowser
+from io import StringIO
+from unittest.mock import Mock, patch
 
-try:
-    from cStringIO import StringIO
-except ImportError:
-    from io import StringIO
-
-from mock import Mock, patch
 import docutils.utils
 
-from restview.restviewhttp import (MyRequestHandler, RestViewer,
-                                   get_host_name, launch_browser, main)
-
-try:
-    unicode
-except NameError:
-    unicode = str
+from restview.restviewhttp import (
+    MyRequestHandler,
+    RestViewer,
+    get_host_name,
+    launch_browser,
+    main,
+)
 
 
 class PopenStub(object):
@@ -47,9 +43,9 @@
         self.server.renderer.watch = None
         self.server.renderer.allowed_hosts = ['localhost']
         self.server.renderer.rest_to_html = lambda data, mtime=None, 
filename=None: \
-            unicode('HTML for %s with AJAX poller for %s' % (data, mtime))
+            'HTML for %s with AJAX poller for %s' % (data, mtime)
         self.server.renderer.render_exception = lambda title, error, source, 
mtime=None: \
-            unicode('HTML for error %s: %s: %s' % (title, error, source))
+            'HTML for error %s: %s: %s' % (title, error, source)
 
     def send_response(self, status):
         self.status = status
@@ -456,9 +452,9 @@
         handler = MyRequestHandlerForTests()
         handler.collect_files = lambda dir: ['a.txt', 'b/c.txt']
         handler.render_dir_listing = lambda title, files: \
-            unicode("<title>%s</title>\n%s" % (
+            "<title>%s</title>\n%s" % (
                 title,
-                '\n'.join('%s - %s' % (path, fn) for path, fn in files)))
+                '\n'.join('%s - %s' % (path, fn) for path, fn in files))
         body = handler.handle_dir('/path/to/dir')
         self.assertEqual(handler.status, 200)
         self.assertEqual(handler.headers['Content-Type'],
@@ -475,9 +471,9 @@
         handler = MyRequestHandlerForTests()
         handler.collect_files = lambda dir: ['a.txt', os.path.join('b', 
'c.txt')]
         handler.render_dir_listing = lambda title, files: \
-            unicode("<title>%s</title>\n%s" % (
+            "<title>%s</title>\n%s" % (
                 title,
-                '\n'.join('%s - %s' % (path, fn) for path, fn in files)))
+                '\n'.join('%s - %s' % (path, fn) for path, fn in files))
         with patch('os.path.isdir', lambda fn: fn == 'subdir'):
             body = handler.handle_list([os.path.normpath('/path/to/file.txt'),
                                         'subdir'])
@@ -662,7 +658,7 @@
         </body>
         </html>
 
-        >>> stderr_patcher.stop()
+        >>> _ = stderr_patcher.stop()
 
     """
 
@@ -711,7 +707,7 @@
         </body>
         </html>
 
-        >>> stderr_patcher.stop()
+        >>> _ = stderr_patcher.stop()
 
     """
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/src/restview.egg-info/PKG-INFO 
new/restview-3.0.0/src/restview.egg-info/PKG-INFO
--- old/restview-2.9.2/src/restview.egg-info/PKG-INFO   2019-04-23 
20:08:58.000000000 +0200
+++ new/restview-3.0.0/src/restview.egg-info/PKG-INFO   2022-01-12 
22:24:55.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: restview
-Version: 2.9.2
+Version: 3.0.0
 Summary: ReStructuredText viewer
 Home-page: https://mg.pov.lt/restview/
 Author: Marius Gedminas
@@ -88,8 +88,8 @@
           pip install restview
         
         
-        .. |buildstatus| image:: 
https://api.travis-ci.org/mgedmin/restview.svg?branch=master
-        .. _buildstatus: https://travis-ci.org/mgedmin/restview
+        .. |buildstatus| image:: 
https://github.com/mgedmin/restview/workflows/build/badge.svg?branch=master
+        .. _buildstatus: https://github.com/mgedmin/restview/actions
         
         .. |appveyor| image:: 
https://ci.appveyor.com/api/projects/status/github/mgedmin/restview?branch=master&svg=true
         .. _appveyor: https://ci.appveyor.com/project/mgedmin/restview
@@ -101,6 +101,24 @@
         Changelog
         =========
         
+        3.0.0 (2022-01-12)
+        ------------------
+        
+        - Drop support for Python 2.7.
+        
+        
+        2.9.3 (2021-11-29)
+        ------------------
+        
+        - Fix incompatibility with docutils 0.18.1 that resulted in "Cannot 
embed
+          stylesheet" errors (`issue 61 
<https://github.com/mgedmin/restview/pull/61>`_,
+          contributed by S??bastien Besson).
+        
+        - Add support for Python 3.8, 3.9, and 3.10.
+        
+        - Drop support for Python 3.5.
+        
+        
         2.9.2 (2019-04-23)
         ------------------
         
@@ -491,10 +509,11 @@
 Classifier: Intended Audience :: End Users/Desktop
 Classifier: License :: OSI Approved :: GNU General Public License (GPL)
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Operating System :: OS Independent
@@ -503,4 +522,6 @@
 Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
 Classifier: Topic :: Software Development :: Documentation
 Classifier: Topic :: Text Processing :: Markup
+Description-Content-Type: text/x-rst
 Provides-Extra: syntax
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/src/restview.egg-info/SOURCES.txt 
new/restview-3.0.0/src/restview.egg-info/SOURCES.txt
--- old/restview-2.9.2/src/restview.egg-info/SOURCES.txt        2019-04-23 
20:08:58.000000000 +0200
+++ new/restview-3.0.0/src/restview.egg-info/SOURCES.txt        2022-01-12 
22:24:55.000000000 +0100
@@ -1,6 +1,5 @@
 .coveragerc
 .gitignore
-.travis.yml
 CHANGES.rst
 LICENSE
 MANIFEST.in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/src/restview.egg-info/requires.txt 
new/restview-3.0.0/src/restview.egg-info/requires.txt
--- old/restview-2.9.2/src/restview.egg-info/requires.txt       2019-04-23 
20:08:58.000000000 +0200
+++ new/restview-3.0.0/src/restview.egg-info/requires.txt       2022-01-12 
22:24:55.000000000 +0100
@@ -3,3 +3,5 @@
 readme_renderer
 
 [syntax]
+
+[test]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/restview-2.9.2/tox.ini new/restview-3.0.0/tox.ini
--- old/restview-2.9.2/tox.ini  2019-04-23 20:05:19.000000000 +0200
+++ new/restview-3.0.0/tox.ini  2022-01-12 22:23:41.000000000 +0100
@@ -1,25 +1,43 @@
 [tox]
 envlist =
-    py27,py35,py36,py37,pypy
+    py36,py37,py38,py39,py310,pypy3
 
 [testenv]
+extras = test
 deps =
-    mock
     pytest
 commands =
-    py.test {posargs}
+    pytest {posargs}
 
 [testenv:py]
 commands =
     python --version
-    py.test {posargs}
+    pytest {posargs}
 
 [testenv:coverage]
-basepython = python2.7
-usedevelop = true
 deps =
     {[testenv]deps}
     coverage
 commands =
-    coverage run --source=src/restview -m py.test
+    coverage run -m pytest
     coverage report -m --fail-under=100
+
+[testenv:flake8]
+deps = flake8
+skip_install = true
+commands = flake8 setup.py src
+
+[testenv:isort]
+deps = isort
+skip_install = true
+commands = isort {posargs: -c --diff setup.py src}
+
+[testenv:check-manifest]
+deps = check-manifest
+skip_install = true
+commands = check-manifest {posargs}
+
+[testenv:check-python-versions]
+deps = check-python-versions
+skip_install = true
+commands = check-python-versions {posargs}

Reply via email to