Hello community, here is the log from the commit of package python-zope.exceptions for openSUSE:Factory checked in at 2020-08-01 12:28:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-zope.exceptions (Old) and /work/SRC/openSUSE:Factory/.python-zope.exceptions.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zope.exceptions" Sat Aug 1 12:28:59 2020 rev:11 rq:822052 version:4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-zope.exceptions/python-zope.exceptions.changes 2019-04-09 20:16:49.225612845 +0200 +++ /work/SRC/openSUSE:Factory/.python-zope.exceptions.new.3592/python-zope.exceptions.changes 2020-08-01 12:29:09.378343243 +0200 @@ -1,0 +2,7 @@ +Tue Jul 21 09:01:45 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com> + +- update to version 4.4 + * Add support for Python 3.8 and preliminary support for 3.9b4. + * Drop support for Python 3.4 and 3.5. + +------------------------------------------------------------------- Old: ---- zope.exceptions-4.3.tar.gz New: ---- zope.exceptions-4.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-zope.exceptions.spec ++++++ --- /var/tmp/diff_new_pack.MG5G5C/_old 2020-08-01 12:29:12.982346617 +0200 +++ /var/tmp/diff_new_pack.MG5G5C/_new 2020-08-01 12:29:12.986346621 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-zope.exceptions # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ %bcond_with test %endif Name: python-zope.exceptions%{psuffix} -Version: 4.3 +Version: 4.4 Release: 0 Summary: Zope Exceptions License: ZPL-2.1 ++++++ zope.exceptions-4.3.tar.gz -> zope.exceptions-4.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/.gitignore new/zope.exceptions-4.4/.gitignore --- old/zope.exceptions-4.3/.gitignore 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -*.pyc -__pycache__ -.installed.cfg -bin -develop-eggs -eggs -parts -*.egg-info -docs/_build -.tox -.coverage -htmlcov -nosetests.xml -coverage.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/.travis.yml new/zope.exceptions-4.4/.travis.yml --- old/zope.exceptions-4.3/.travis.yml 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -language: python -sudo: false -python: - - 2.7 - - 3.4 - - 3.5 - - 3.6 - - pypy -matrix: - include: - - python: "3.7" - dist: xenial - sudo: true -install: - - pip install -U pip setuptools - - pip install -U coverage coveralls - - pip install -U -e .[test,docs] -script: - - coverage run -m zope.testrunner --test-path=src - - coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest -notifications: - email: false -cache: pip -before_cache: - - rm -f $HOME/.cache/pip/log/debug.log -after_success: - - coveralls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/CHANGES.rst new/zope.exceptions-4.4/CHANGES.rst --- old/zope.exceptions-4.3/CHANGES.rst 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/CHANGES.rst 2020-07-16 08:49:22.000000000 +0200 @@ -2,6 +2,14 @@ zope.exceptions Changelog =========================== +4.4 (2020-07-16) +================ + +- Add support for Python 3.8 and preliminary support for 3.9b4. + +- Drop support for Python 3.4 and 3.5. + + 4.3 (2018-10-04) ================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/MANIFEST.in new/zope.exceptions-4.4/MANIFEST.in --- old/zope.exceptions-4.3/MANIFEST.in 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/MANIFEST.in 2020-07-16 08:49:22.000000000 +0200 @@ -2,13 +2,11 @@ include *.txt include .coveragerc -recursive-include docs * -recursive-include src * - -global-exclude *.pyc - -# added by check_manifest.py -include *.py -include .travis.yml include buildout.cfg include tox.ini + +recursive-include docs *.bat +recursive-include docs *.py +recursive-include docs *.rst +recursive-include docs Makefile +recursive-include docs/_static * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/PKG-INFO new/zope.exceptions-4.4/PKG-INFO --- old/zope.exceptions-4.3/PKG-INFO 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/PKG-INFO 2020-07-16 08:49:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: zope.exceptions -Version: 4.3 +Version: 4.4 Summary: Zope Exceptions Home-page: https://github.com/zopefoundation/zope.exceptions Author: Zope Foundation and Contributors @@ -38,6 +38,14 @@ zope.exceptions Changelog =========================== + 4.4 (2020-07-16) + ================ + + - Add support for Python 3.8 and preliminary support for 3.9b4. + + - Drop support for Python 3.4 and 3.5. + + 4.3 (2018-10-04) ================ @@ -263,15 +271,14 @@ Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.4 -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 :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP -Classifier: Framework :: Zope3 -Provides-Extra: test +Classifier: Framework :: Zope :: 3 Provides-Extra: docs +Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/bootstrap.py new/zope.exceptions-4.4/bootstrap.py --- old/zope.exceptions-4.3/bootstrap.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/bootstrap.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,210 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Zope Foundation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Bootstrap a buildout-based project - -Simply run this script in a directory containing a buildout.cfg. -The script accepts buildout command-line options, so you can -use the -c option to specify an alternate configuration file. -""" - -import os -import shutil -import sys -import tempfile - -from optparse import OptionParser - -__version__ = '2015-07-01' -# See zc.buildout's changelog if this version is up to date. - -tmpeggs = tempfile.mkdtemp(prefix='bootstrap-') - -usage = '''\ -[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] - -Bootstraps a buildout-based project. - -Simply run this script in a directory containing a buildout.cfg, using the -Python that you want bin/buildout to use. - -Note that by using --find-links to point to local resources, you can keep -this script from going over the network. -''' - -parser = OptionParser(usage=usage) -parser.add_option("--version", - action="store_true", default=False, - help=("Return bootstrap.py version.")) -parser.add_option("-t", "--accept-buildout-test-releases", - dest='accept_buildout_test_releases', - action="store_true", default=False, - help=("Normally, if you do not specify a --version, the " - "bootstrap script and buildout gets the newest " - "*final* versions of zc.buildout and its recipes and " - "extensions for you. If you use this flag, " - "bootstrap and buildout will get the newest releases " - "even if they are alphas or betas.")) -parser.add_option("-c", "--config-file", - help=("Specify the path to the buildout configuration " - "file to be used.")) -parser.add_option("-f", "--find-links", - help=("Specify a URL to search for buildout releases")) -parser.add_option("--allow-site-packages", - action="store_true", default=False, - help=("Let bootstrap.py use existing site packages")) -parser.add_option("--buildout-version", - help="Use a specific zc.buildout version") -parser.add_option("--setuptools-version", - help="Use a specific setuptools version") -parser.add_option("--setuptools-to-dir", - help=("Allow for re-use of existing directory of " - "setuptools versions")) - -options, args = parser.parse_args() -if options.version: - print("bootstrap.py version %s" % __version__) - sys.exit(0) - - -###################################################################### -# load/install setuptools - -try: - from urllib.request import urlopen -except ImportError: - from urllib2 import urlopen - -ez = {} -if os.path.exists('ez_setup.py'): - exec(open('ez_setup.py').read(), ez) -else: - exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) - -if not options.allow_site_packages: - # ez_setup imports site, which adds site packages - # this will remove them from the path to ensure that incompatible versions - # of setuptools are not in the path - import site - # inside a virtualenv, there is no 'getsitepackages'. - # We can't remove these reliably - if hasattr(site, 'getsitepackages'): - for sitepackage_path in site.getsitepackages(): - # Strip all site-packages directories from sys.path that - # are not sys.prefix; this is because on Windows - # sys.prefix is a site-package directory. - if sitepackage_path != sys.prefix: - sys.path[:] = [x for x in sys.path - if sitepackage_path not in x] - -setup_args = dict(to_dir=tmpeggs, download_delay=0) - -if options.setuptools_version is not None: - setup_args['version'] = options.setuptools_version -if options.setuptools_to_dir is not None: - setup_args['to_dir'] = options.setuptools_to_dir - -ez['use_setuptools'](**setup_args) -import setuptools -import pkg_resources - -# This does not (always?) update the default working set. We will -# do it. -for path in sys.path: - if path not in pkg_resources.working_set.entries: - pkg_resources.working_set.add_entry(path) - -###################################################################### -# Install buildout - -ws = pkg_resources.working_set - -setuptools_path = ws.find( - pkg_resources.Requirement.parse('setuptools')).location - -# Fix sys.path here as easy_install.pth added before PYTHONPATH -cmd = [sys.executable, '-c', - 'import sys; sys.path[0:0] = [%r]; ' % setuptools_path + - 'from setuptools.command.easy_install import main; main()', - '-mZqNxd', tmpeggs] - -find_links = os.environ.get( - 'bootstrap-testing-find-links', - options.find_links or - ('http://downloads.buildout.org/' - if options.accept_buildout_test_releases else None) - ) -if find_links: - cmd.extend(['-f', find_links]) - -requirement = 'zc.buildout' -version = options.buildout_version -if version is None and not options.accept_buildout_test_releases: - # Figure out the most recent final version of zc.buildout. - import setuptools.package_index - _final_parts = '*final-', '*final' - - def _final_version(parsed_version): - try: - return not parsed_version.is_prerelease - except AttributeError: - # Older setuptools - for part in parsed_version: - if (part[:1] == '*') and (part not in _final_parts): - return False - return True - - index = setuptools.package_index.PackageIndex( - search_path=[setuptools_path]) - if find_links: - index.add_find_links((find_links,)) - req = pkg_resources.Requirement.parse(requirement) - if index.obtain(req) is not None: - best = [] - bestv = None - for dist in index[req.project_name]: - distv = dist.parsed_version - if _final_version(distv): - if bestv is None or distv > bestv: - best = [dist] - bestv = distv - elif distv == bestv: - best.append(dist) - if best: - best.sort() - version = best[-1].version -if version: - requirement = '=='.join((requirement, version)) -cmd.append(requirement) - -import subprocess -if subprocess.call(cmd) != 0: - raise Exception( - "Failed to execute command:\n%s" % repr(cmd)[1:-1]) - -###################################################################### -# Import and run buildout - -ws.add_entry(tmpeggs) -ws.require(requirement) -import zc.buildout.buildout - -if not [a for a in args if '=' not in a]: - args.append('bootstrap') - -# if -c was provided, we push it back into args for buildout' main function -if options.config_file is not None: - args[0:0] = ['-c', options.config_file] - -zc.buildout.buildout.main(args) -shutil.rmtree(tmpeggs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/setup.cfg new/zope.exceptions-4.4/setup.cfg --- old/zope.exceptions-4.3/setup.cfg 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/setup.cfg 2020-07-16 08:49:23.000000000 +0200 @@ -1,17 +1,12 @@ -[nosetests] -nocapture = 1 -cover-package = zope.exceptions -cover-erase = 1 -with-doctest = 0 -where = src - -[aliases] -dev = develop easy_install zope.exceptions[testing] -docs = easy_install zope.exceptions[docs] - [bdist_wheel] universal = 1 +[check-manifest] +ignore = + .travis.yml + docs/_build + docs/_build/* + [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/setup.py new/zope.exceptions-4.4/setup.py --- old/zope.exceptions-4.3/setup.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/setup.py 2020-07-16 08:49:22.000000000 +0200 @@ -25,6 +25,7 @@ def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() + def alltests(): import os import sys @@ -40,55 +41,56 @@ suites = list(zope.testrunner.find.find_suites(options)) return unittest.TestSuite(suites) + tests_require = [ 'zope.testrunner', ] -setup(name='zope.exceptions', - version='4.3', - author='Zope Foundation and Contributors', - author_email='zope-...@zope.org', - description='Zope Exceptions', - long_description=(read('README.rst') + '\n\n' + - read('CHANGES.rst')), - keywords='zope exceptions', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Web Environment', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Zope Public License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Topic :: Internet :: WWW/HTTP', - 'Framework :: Zope3', - ], - url='https://github.com/zopefoundation/zope.exceptions', - license='ZPL 2.1', - packages=find_packages('src'), - package_dir={'': 'src'}, - namespace_packages=['zope'], - install_requires=[ - 'setuptools', - 'zope.interface', - ], - tests_require=[ - 'zope.testrunner', - ], - test_suite='__main__.alltests', - include_package_data=True, - zip_safe=False, - extras_require={ - 'docs': ['Sphinx', 'repoze.sphinx.autointerface'], - 'test': tests_require, - }, +setup( + name='zope.exceptions', + version='4.4', + author='Zope Foundation and Contributors', + author_email='zope-...@zope.org', + description='Zope Exceptions', + long_description=(read('README.rst') + '\n\n' + + read('CHANGES.rst')), + keywords='zope exceptions', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Zope Public License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Topic :: Internet :: WWW/HTTP', + 'Framework :: Zope :: 3', + ], + url='https://github.com/zopefoundation/zope.exceptions', + license='ZPL 2.1', + packages=find_packages('src'), + package_dir={'': 'src'}, + namespace_packages=['zope'], + install_requires=[ + 'setuptools', + 'zope.interface', + ], + tests_require=[ + 'zope.testrunner', + ], + test_suite='__main__.alltests', + include_package_data=True, + zip_safe=False, + extras_require={ + 'docs': ['Sphinx', 'repoze.sphinx.autointerface'], + 'test': tests_require, + }, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope/__init__.py new/zope.exceptions-4.4/src/zope/__init__.py --- old/zope.exceptions-4.3/src/zope/__init__.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope/__init__.py 2020-07-16 08:49:22.000000000 +0200 @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover +__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope/exceptions/__init__.py new/zope.exceptions-4.4/src/zope/exceptions/__init__.py --- old/zope.exceptions-4.3/src/zope/exceptions/__init__.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope/exceptions/__init__.py 2020-07-16 08:49:22.000000000 +0200 @@ -16,6 +16,7 @@ These exceptions are so general purpose that they don't belong in Zope application-specific packages. """ + from zope.exceptions.interfaces import DuplicationError from zope.exceptions.interfaces import IDuplicationError from zope.exceptions.interfaces import UserError @@ -25,17 +26,27 @@ from zope.exceptions.exceptionformatter import print_exception from zope.exceptions.exceptionformatter import extract_stack +__all__ = [ + 'DuplicationError', 'IDuplicationError', 'UserError', 'IUserError', + 'format_exception', 'print_exception', 'extract_stack', +] + + # avoid dependency on zope.security: try: - import zope.security -except ImportError as v: #pragma: no cover + import zope.security # noqa: suppress unused import warning from flake8 +except ImportError as v: # pragma: no cover # "ImportError: No module named security" if 'security' not in str(v): raise -else: #pragma: no cover +else: # pragma: no cover from zope.security.interfaces import IUnauthorized from zope.security.interfaces import Unauthorized from zope.security.interfaces import IForbidden from zope.security.interfaces import IForbiddenAttribute from zope.security.interfaces import Forbidden from zope.security.interfaces import ForbiddenAttribute + __all__ += [ + 'IUnauthorized', 'Unauthorized', 'IForbidden', 'IForbiddenAttribute', + 'Forbidden', 'ForbiddenAttribute', + ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope/exceptions/exceptionformatter.py new/zope.exceptions-4.4/src/zope/exceptions/exceptionformatter.py --- old/zope.exceptions-4.3/src/zope/exceptions/exceptionformatter.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope/exceptions/exceptionformatter.py 2020-07-16 08:49:22.000000000 +0200 @@ -92,7 +92,7 @@ extra = getInfo() if extra: result.append(self.formatSupplementInfo(extra)) - except: #pragma: no cover + except Exception: # pragma: no cover if DEBUG_EXCEPTION_FORMATTER: traceback.print_exc() # else just swallow the exception. @@ -150,7 +150,7 @@ try: supp = factory(*args) result.extend(self.formatSupplement(supp, tb)) - except: #pragma: no cover + except Exception: # pragma: no cover if DEBUG_EXCEPTION_FORMATTER: traceback.print_exc() # else just swallow the exception. @@ -159,7 +159,7 @@ tbi = f_locals.get('__traceback_info__', None) if tbi is not None: result.append(self.formatTracebackInfo(tbi)) - except: #pragma: no cover + except Exception: # pragma: no cover if DEBUG_EXCEPTION_FORMATTER: traceback.print_exc() # else just swallow the exception. @@ -174,8 +174,9 @@ return self.escape(exc_line) def formatException(self, etype, value, tb): - # The next line provides a way to detect recursion. - __exception_formatter__ = 1 + # The next line provides a way to detect recursion. The 'noqa' + # comment disables a flake8 warning about the unused variable. + __exception_formatter__ = 1 # noqa result = [] while tb is not None: if tb.tb_frame.f_locals.get('__exception_formatter__'): @@ -206,8 +207,9 @@ except ZeroDivisionError: f = sys.exc_info()[2].tb_frame.f_back - # The next line provides a way to detect recursion. - __exception_formatter__ = 1 + # The next line provides a way to detect recursion. The 'noqa' + # comment disables a flake8 warning about the unused variable. + __exception_formatter__ = 1 # noqa result = [] while f is not None: if f.f_locals.get('__exception_formatter__'): @@ -250,10 +252,9 @@ s = str(s) except UnicodeError: if hasattr(s, 'encode'): - # We probably got a unicode string on - # Python 2. + # We probably got a unicode string on Python 2. s = s.encode('utf-8') - else: # pragma: no cover + else: # pragma: no cover raise return escape(s, quote=False) @@ -309,7 +310,7 @@ information to the traceback and accepts two options, 'as_html' and 'with_filenames'. """ - if file is None: # pragma: no cover + if file is None: # pragma: no cover file = sys.stderr lines = format_exception(t, v, tb, limit, as_html, with_filenames) for line in lines: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope/exceptions/log.py new/zope.exceptions-4.4/src/zope/exceptions/log.py --- old/zope.exceptions-4.3/src/zope/exceptions/log.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope/exceptions/log.py 2020-07-16 08:49:22.000000000 +0200 @@ -19,7 +19,8 @@ from zope.exceptions.exceptionformatter import print_exception -Buffer = io.StringIO if bytes is not str else io.BytesIO +Buffer = io.StringIO if bytes is not str else io.BytesIO # PY2 + class Formatter(logging.Formatter): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope/exceptions/tests/test_exceptionformatter.py new/zope.exceptions-4.4/src/zope/exceptions/tests/test_exceptionformatter.py --- old/zope.exceptions-4.3/src/zope/exceptions/tests/test_exceptionformatter.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope/exceptions/tests/test_exceptionformatter.py 2020-07-16 08:49:22.000000000 +0200 @@ -17,6 +17,9 @@ import sys +IS_PY39_OR_GREATER = sys.version_info >= (3, 9) + + class TextExceptionFormatterTests(unittest.TestCase): def _getTargetClass(self): @@ -121,13 +124,16 @@ def test_formatSupplement_w_warnings(self): fmt = self._makeOne() supplement = DummySupplement() - supplement.warnings = ['Beware the ides of March!', - 'You\'re gonna get wasted.', - ] - self.assertEqual(fmt.formatSupplement(supplement, tb=None), - [' - Warning: Beware the ides of March!', - ' - Warning: You\'re gonna get wasted.', - ]) + supplement.warnings = [ + 'Beware the ides of March!', + 'You\'re gonna get wasted.', + ] + self.assertEqual( + fmt.formatSupplement(supplement, tb=None), + [ + ' - Warning: Beware the ides of March!', + ' - Warning: You\'re gonna get wasted.', + ]) def test_formatSupplement_w_getInfo_empty(self): fmt = self._makeOne() @@ -407,9 +413,10 @@ expected = [ ' File "dummy/filename.py", line 17, in dummy_function\n', ' File "dummy/filename.py", line 27, in dummy_function\n', - '(Recursive extractStack() stopped, trying traceback.format_stack)\n', + ('(Recursive extractStack() stopped,' + ' trying traceback.format_stack)\n'), ' Module dummy/filename.py, line 43, in dummy_function\n', - ] + ] self.assertEqual(expected, lines) @@ -627,6 +634,7 @@ def test_multiple_levels(self): # Ensure many levels are shown in a traceback. HOW_MANY = 10 + def f(n): """Produces a (n + 1)-level traceback.""" __traceback_info__ = 'level%d' % n @@ -658,7 +666,8 @@ s = self._callFUT(False) lines = s.splitlines()[-3:] self.assertEqual(lines[0], ' syntax error') - self.assertTrue(lines[1].endswith(' ^')) #PyPy has a shorter prefix + # PyPy has a shorter prefix + self.assertTrue(lines[1].endswith(' ^')) self.assertEqual(lines[2], 'SyntaxError: invalid syntax') def test_traceback_info_non_ascii(self): @@ -671,7 +680,6 @@ self.assertIsInstance(s, str) self.assertIn('Have a Snowman', s) - def test_recursion_failure(self): from zope.exceptions.exceptionformatter import TextExceptionFormatter @@ -711,13 +719,20 @@ expected = dedent("""\ <p>Traceback (most recent call last):</p> <ul> - <li> Module zope.exceptions.tests.test_exceptionformatter, line ABC, in test_format_exception_as_html<br /> + <li> Module {module}, line ABC, in {fn}<br /> exec('import')</li> </ul><p> File "<string>", line 1<br /> import<br /> ^<br /> SyntaxError: invalid syntax<br /> - </p>""") + </p>""").format( + module='zope.exceptions.tests.test_exceptionformatter', + fn='test_format_exception_as_html', + ) + if IS_PY39_OR_GREATER: # pragma: no cover + # Python 3.9 moves the pointer after the statement instead to the + # last character of it: + expected = expected.replace('^<br />', ' ^<br />') # HTML formatter uses Windows line endings for some reason. result = result.replace('\r\n', '\n') result = re.sub(r'line \d\d\d,', 'line ABC,', result) @@ -856,6 +871,7 @@ line = 634 column = 57 warnings = ['Repent, for the end is nigh'] + def __init__(self, expression): self.expression = expression @@ -863,6 +879,7 @@ class DummySupplement(object): def __init__(self, info=''): self._info = info + def getInfo(self): return self._info @@ -875,15 +892,18 @@ class DummyFrame(object): f_lineno = 137 f_back = None + def __init__(self): self.f_locals = {} self.f_globals = {} self.f_code = DummyCode() + class DummyCode(object): co_filename = 'dummy/filename.py' co_name = 'dummy_function' + class _Monkey(object): # context-manager for replacing module names in the scope of a test. def __init__(self, module, **kw): @@ -898,13 +918,11 @@ def __exit__(self, exc_type, exc_val, exc_tb): for key, value in self.to_restore.items(): - if value is not self: # pragma: no cover + if value is not self: # pragma: no cover setattr(self.module, key, value) else: delattr(self.module, key) - - def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope/exceptions/tests/test_log.py new/zope.exceptions-4.4/src/zope/exceptions/tests/test_log.py --- old/zope.exceptions-4.3/src/zope/exceptions/tests/test_log.py 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope/exceptions/tests/test_log.py 2020-07-16 08:49:22.000000000 +0200 @@ -36,9 +36,8 @@ self.assertEqual(lines[0], 'Traceback (most recent call last):') self.assertEqual(lines[1], ' File "dummy/filename.py", line 14, ' 'in dummy_function') - self.assertEqual(lines[2], - traceback.format_exception_only( - ValueError, exc)[0][:-1]) #trailing \n + emsg = traceback.format_exception_only(ValueError, exc)[0] + self.assertEqual(lines[2], emsg[:-1]) # strip trailing \n from emsg def test_unicode_traceback_info(self): import traceback @@ -58,11 +57,10 @@ # utf-8 encoded on Python 2, unicode on Python 3 expected += '\xe2\x98\x83' if bytes is str else u'\u2603' - self.assertEqual(lines[2], - expected) - self.assertEqual(lines[3], - traceback.format_exception_only( - ValueError, exc)[0][:-1]) #trailing \n + self.assertEqual(lines[2], expected) + + emsg = traceback.format_exception_only(ValueError, exc)[0] + self.assertEqual(lines[3], emsg[:-1]) # strip trailing \n from emsg class DummyTB(object): @@ -72,14 +70,17 @@ def __init__(self): self.tb_frame = DummyFrame() + class DummyFrame(object): f_lineno = 137 f_back = None + def __init__(self): self.f_locals = {} self.f_globals = {} self.f_code = DummyCode() + class DummyCode(object): co_filename = 'dummy/filename.py' co_name = 'dummy_function' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope.exceptions.egg-info/PKG-INFO new/zope.exceptions-4.4/src/zope.exceptions.egg-info/PKG-INFO --- old/zope.exceptions-4.3/src/zope.exceptions.egg-info/PKG-INFO 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope.exceptions.egg-info/PKG-INFO 2020-07-16 08:49:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: zope.exceptions -Version: 4.3 +Version: 4.4 Summary: Zope Exceptions Home-page: https://github.com/zopefoundation/zope.exceptions Author: Zope Foundation and Contributors @@ -38,6 +38,14 @@ zope.exceptions Changelog =========================== + 4.4 (2020-07-16) + ================ + + - Add support for Python 3.8 and preliminary support for 3.9b4. + + - Drop support for Python 3.4 and 3.5. + + 4.3 (2018-10-04) ================ @@ -263,15 +271,14 @@ Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.4 -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 :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP -Classifier: Framework :: Zope3 -Provides-Extra: test +Classifier: Framework :: Zope :: 3 Provides-Extra: docs +Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/src/zope.exceptions.egg-info/SOURCES.txt new/zope.exceptions-4.4/src/zope.exceptions.egg-info/SOURCES.txt --- old/zope.exceptions-4.3/src/zope.exceptions.egg-info/SOURCES.txt 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/src/zope.exceptions.egg-info/SOURCES.txt 2020-07-16 08:49:23.000000000 +0200 @@ -1,12 +1,9 @@ .coveragerc -.gitignore -.travis.yml CHANGES.rst COPYRIGHT.txt LICENSE.txt MANIFEST.in README.rst -bootstrap.py buildout.cfg rtd.txt setup.cfg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.exceptions-4.3/tox.ini new/zope.exceptions-4.4/tox.ini --- old/zope.exceptions-4.3/tox.ini 2018-10-04 16:03:48.000000000 +0200 +++ new/zope.exceptions-4.4/tox.ini 2020-07-16 08:49:22.000000000 +0200 @@ -1,13 +1,12 @@ [tox] envlist = - py27,py34,py35,py36,py37,pypy,pypy3,coverage,docs + flake8,py27,py36,py37,py38,py39,pypy,pypy3,coverage,docs [testenv] commands = zope-testrunner --test-path=src [] sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest -deps = - .[test,docs] +extras = test,docs [testenv:coverage] usedevelop = true @@ -16,14 +15,20 @@ commands = coverage run -m zope.testrunner --test-path=src [] coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest - coverage report --fail-under=100 + coverage report -m --fail-under=100 deps = - {[testenv]deps} coverage [testenv:docs] basepython = - python2.7 + python3 commands = - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html + sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest + +[testenv:flake8] +skip_install = true +deps = + flake8 +commands = + flake8 src/ setup.py