Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-zope.exceptions for
openSUSE:Factory checked in at 2023-12-17 21:28:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zope.exceptions (Old)
and /work/SRC/openSUSE:Factory/.python-zope.exceptions.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zope.exceptions"
Sun Dec 17 21:28:54 2023 rev:15 rq:1133587 version:5.0.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-zope.exceptions/python-zope.exceptions.changes
2023-06-12 15:24:33.222378366 +0200
+++
/work/SRC/openSUSE:Factory/.python-zope.exceptions.new.25432/python-zope.exceptions.changes
2023-12-17 21:29:01.458392356 +0100
@@ -1,0 +2,9 @@
+Sat Dec 16 09:02:46 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 5.0.1:
+ * Fix issue introduced in the last release which is breaking
+ * ``HTMLExceptionFormatter`` when using non-str
+ ``__traceback_info__``.
+ * Drop support for Python 2.7, 3.5, 3.6.
+
+-------------------------------------------------------------------
Old:
----
zope.exceptions-4.6.tar.gz
New:
----
zope.exceptions-5.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-zope.exceptions.spec ++++++
--- /var/tmp/diff_new_pack.OgYA8R/_old 2023-12-17 21:29:02.118416323 +0100
+++ /var/tmp/diff_new_pack.OgYA8R/_new 2023-12-17 21:29:02.118416323 +0100
@@ -26,7 +26,7 @@
%bcond_with test
%endif
Name: python-zope.exceptions%{psuffix}
-Version: 4.6
+Version: 5.0.1
Release: 0
Summary: Zope Exceptions
License: ZPL-2.1
++++++ zope.exceptions-4.6.tar.gz -> zope.exceptions-5.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zope.exceptions-4.6/CHANGES.rst
new/zope.exceptions-5.0.1/CHANGES.rst
--- old/zope.exceptions-4.6/CHANGES.rst 2022-11-10 08:28:46.000000000 +0100
+++ new/zope.exceptions-5.0.1/CHANGES.rst 2023-07-11 09:40:38.000000000
+0200
@@ -2,6 +2,19 @@
zope.exceptions Changelog
===========================
+5.0.1 (2023-07-11)
+==================
+
+- Fix issue introduced in the last release which is breaking
+ ``HTMLExceptionFormatter`` when using non-str ``__traceback_info__``.
+
+
+5.0 (2023-06-29)
+================
+
+- Drop support for Python 2.7, 3.5, 3.6.
+
+
4.6 (2022-11-10)
================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zope.exceptions-4.6/PKG-INFO
new/zope.exceptions-5.0.1/PKG-INFO
--- old/zope.exceptions-4.6/PKG-INFO 2022-11-10 08:28:48.155491600 +0100
+++ new/zope.exceptions-5.0.1/PKG-INFO 2023-07-11 09:40:38.827126700 +0200
@@ -1,25 +1,20 @@
Metadata-Version: 2.1
Name: zope.exceptions
-Version: 4.6
+Version: 5.0.1
Summary: Zope Exceptions
Home-page: https://github.com/zopefoundation/zope.exceptions
Author: Zope Foundation and Contributors
-Author-email: [email protected]
+Author-email: [email protected]
License: ZPL 2.1
Project-URL: Issue Tracker,
https://github.com/zopefoundation/zope.exceptions/issues
Project-URL: Sources, https://github.com/zopefoundation/zope.exceptions
Keywords: zope exceptions
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-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
@@ -31,7 +26,7 @@
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope :: 3
-Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
+Requires-Python: >=3.7
Provides-Extra: docs
Provides-Extra: test
License-File: LICENSE.txt
@@ -68,6 +63,19 @@
zope.exceptions Changelog
===========================
+5.0.1 (2023-07-11)
+==================
+
+- Fix issue introduced in the last release which is breaking
+ ``HTMLExceptionFormatter`` when using non-str ``__traceback_info__``.
+
+
+5.0 (2023-06-29)
+================
+
+- Drop support for Python 2.7, 3.5, 3.6.
+
+
4.6 (2022-11-10)
================
@@ -310,5 +318,3 @@
- Corresponds to the version of the zope.exceptions package shipped as part of
the Zope X3.0.0 release.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zope.exceptions-4.6/setup.cfg
new/zope.exceptions-5.0.1/setup.cfg
--- old/zope.exceptions-4.6/setup.cfg 2022-11-10 08:28:48.156146300 +0100
+++ new/zope.exceptions-5.0.1/setup.cfg 2023-07-11 09:40:38.827421000 +0200
@@ -1,5 +1,5 @@
[bdist_wheel]
-universal = 1
+universal = 0
[flake8]
doctests = 1
@@ -15,7 +15,7 @@
force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
-known_third_party = six, docutils, pkg_resources
+known_third_party = docutils, pkg_resources, pytz
known_zope =
known_first_party =
default_section = ZOPE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zope.exceptions-4.6/setup.py
new/zope.exceptions-5.0.1/setup.py
--- old/zope.exceptions-4.6/setup.py 2022-11-10 08:28:46.000000000 +0100
+++ new/zope.exceptions-5.0.1/setup.py 2023-07-11 09:40:38.000000000 +0200
@@ -12,7 +12,7 @@
#
##############################################################################
# This package is developed by the Zope Toolkit project, documented here:
-# http://docs.zope.org/zopetoolkit
+# https://zopetoolkit.readthedocs.io/
# When developing and releasing this package, please follow the documented
# Zope Toolkit policies as described by this documentation.
##############################################################################
@@ -30,9 +30,9 @@
setup(
name='zope.exceptions',
- version='4.6',
+ version='5.0.1',
author='Zope Foundation and Contributors',
- author_email='[email protected]',
+ author_email='[email protected]',
description='Zope Exceptions',
long_description=(read('README.rst') + '\n\n' +
read('CHANGES.rst')),
@@ -43,11 +43,7 @@
'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.5',
- 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
@@ -70,7 +66,7 @@
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope'],
- python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
+ python_requires='>=3.7',
install_requires=[
'setuptools',
'zope.interface',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zope.exceptions-4.6/src/zope/exceptions/exceptionformatter.py
new/zope.exceptions-5.0.1/src/zope/exceptions/exceptionformatter.py
--- old/zope.exceptions-4.6/src/zope/exceptions/exceptionformatter.py
2022-11-10 08:28:46.000000000 +0100
+++ new/zope.exceptions-5.0.1/src/zope/exceptions/exceptionformatter.py
2023-07-11 09:40:38.000000000 +0200
@@ -14,22 +14,16 @@
"""An exception formatter that shows traceback supplements and traceback info,
optionally in HTML.
"""
-import sys
-
-
-try:
- from html import escape
-except ImportError: # pragma: PY2
- from cgi import escape
-
import linecache
+import sys
import traceback
+from html import escape
DEBUG_EXCEPTION_FORMATTER = 1
-class TextExceptionFormatter(object):
+class TextExceptionFormatter:
line_sep = '\n'
@@ -50,12 +44,7 @@
return limit
def formatSupplementLine(self, line):
- result = ' - %s' % line
- if not isinstance(result, str): # pragma: PY2
- # Must be an Python 2, and must be a unicode `line`
- # and we upconverted the result to a unicode
- result = result.encode('utf-8')
- return result
+ return f' - {line}'
def formatSourceURL(self, url):
return [self.formatSupplementLine(url)]
@@ -74,7 +63,7 @@
col = getattr(supplement, 'column', -1)
if line:
if col is not None and col >= 0:
- result.append(fmtLine('Line %s, Column %s' % (
+ result.append(fmtLine('Line {}, Column {}'.format(
line, col)))
else:
result.append(fmtLine('Line %s' % line))
@@ -106,7 +95,7 @@
return self.escape(info)
def formatTracebackInfo(self, tbi):
- return self.formatSupplementLine('__traceback_info__: %s' % (tbi, ))
+ return self.formatSupplementLine('__traceback_info__: {}'.format(tbi))
def formatLine(self, tb=None, f=None):
if tb and not f:
@@ -178,7 +167,7 @@
try:
result = ''.join(traceback.format_exception_only(etype, value))
except Exception: # pragma: no cover
- # This code branch is only covered on Python 3.11.
+ # This code branch is only covered on Python 3.11+.
result = str(value)
return result
@@ -259,16 +248,7 @@
line_sep = '<br />\r\n'
def escape(self, s):
- if not isinstance(s, str):
- try: # pragma: PY2
- s = str(s)
- except UnicodeError: # pragma: PY2
- if hasattr(s, 'encode'):
- # We probably got a unicode string on Python 2.
- s = s.encode('utf-8')
- else: # pragma: no cover
- raise
- return escape(s, quote=False)
+ return escape(str(s), quote=False)
def getPrefix(self):
return '<p>Traceback (most recent call last):</p>\r\n<ul>'
@@ -285,7 +265,7 @@
def formatTracebackInfo(self, tbi):
s = self.escape(tbi)
s = s.replace('\n', self.line_sep)
- return '__traceback_info__: %s' % (s, )
+ return '__traceback_info__: {}'.format(s)
def formatLine(self, tb=None, f=None):
line = TextExceptionFormatter.formatLine(self, tb, f)
@@ -304,8 +284,7 @@
information to the traceback and accepts two options, 'as_html'
and 'with_filenames'.
- The result is a list of native strings; on Python 2 they are UTF-8
- encoded if need be.
+ The result is a list of strings.
"""
if as_html:
fmt = HTMLExceptionFormatter(limit, with_filenames)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zope.exceptions-4.6/src/zope/exceptions/log.py
new/zope.exceptions-5.0.1/src/zope/exceptions/log.py
--- old/zope.exceptions-4.6/src/zope/exceptions/log.py 2022-11-10
08:28:46.000000000 +0100
+++ new/zope.exceptions-5.0.1/src/zope/exceptions/log.py 2023-07-11
09:40:38.000000000 +0200
@@ -20,9 +20,6 @@
from zope.exceptions.exceptionformatter import print_exception
-Buffer = io.StringIO if bytes is not str else io.BytesIO # PY2
-
-
class Formatter(logging.Formatter):
def formatException(self, ei):
@@ -30,9 +27,8 @@
Uses zope.exceptions.exceptionformatter to generate the traceback.
"""
- sio = Buffer()
+ sio = io.StringIO()
print_exception(ei[0], ei[1], ei[2], file=sio, with_filenames=True)
s = sio.getvalue()
- if s.endswith("\n"):
- s = s[:-1]
+ s = s[:-1] if s.endswith("\n") else s
return s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zope.exceptions-4.6/src/zope/exceptions/tests/test_exceptionformatter.py
new/zope.exceptions-5.0.1/src/zope/exceptions/tests/test_exceptionformatter.py
---
old/zope.exceptions-4.6/src/zope/exceptions/tests/test_exceptionformatter.py
2022-11-10 08:28:46.000000000 +0100
+++
new/zope.exceptions-5.0.1/src/zope/exceptions/tests/test_exceptionformatter.py
2023-07-11 09:40:38.000000000 +0200
@@ -15,13 +15,7 @@
"""
import sys
import unittest
-
-
-try:
- from urllib.error import HTTPError
-except ImportError:
- # BBB for Python 2.7
- from urllib2 import HTTPError
+from urllib.error import HTTPError
IS_PY39_OR_GREATER = sys.version_info >= (3, 9)
@@ -164,13 +158,11 @@
' - __traceback_info__: XYZZY')
def test_formatTracebackInfo_unicode(self):
- __traceback_info__ = u"Have a Snowman: \u2603"
+ __traceback_info__ = "Have a Snowman: \u2603"
fmt = self._makeOne()
result = fmt.formatTracebackInfo(__traceback_info__)
- expected = ' - __traceback_info__: Have a Snowman: '
- # utf-8 encoded on Python 2, unicode on Python 3
- expected += '\xe2\x98\x83' if bytes is str else u'\u2603'
+ expected = ' - __traceback_info__: Have a Snowman: \u2603'
self.assertIsInstance(result, str)
self.assertEqual(result, expected)
@@ -522,6 +514,10 @@
fmt = self._makeOne()
self.assertEqual(fmt.escape('XXX'), 'XXX')
+ def test_escape_non_str(self):
+ fmt = self._makeOne()
+ self.assertEqual(fmt.escape(123), '123')
+
def test_escape_w_markup(self):
fmt = self._makeOne()
self.assertEqual(fmt.escape('<span>XXX & YYY<span>'),
@@ -688,7 +684,7 @@
self.assertTrue(s.find('level%d' % n) >= 0, s)
def test_quote_last_line(self):
- class C(object):
+ class C:
pass
try:
raise TypeError(C())
@@ -709,7 +705,7 @@
lines[2])
def test_traceback_info_non_ascii(self):
- __traceback_info__ = u"Have a Snowman: \u2603"
+ __traceback_info__ = "Have a Snowman: \u2603"
try:
raise TypeError()
except TypeError:
@@ -850,7 +846,7 @@
def test_traceback_info_html(self):
try:
- __traceback_info__ = u"Adam & Eve"
+ __traceback_info__ = "Adam & Eve"
raise ExceptionForTesting
except ExceptionForTesting:
s = self._callFUT(True)
@@ -859,7 +855,7 @@
def test_traceback_supplement_text(self):
try:
__traceback_supplement__ = (TestingTracebackSupplement,
- u"You're one in a million")
+ "You're one in a million")
raise ExceptionForTesting
except ExceptionForTesting:
s = self._callFUT(False)
@@ -905,7 +901,7 @@
pass
-class TestingTracebackSupplement(object):
+class TestingTracebackSupplement:
source_url = '/somepath'
line = 634
column = 57
@@ -915,7 +911,7 @@
self.expression = expression
-class DummySupplement(object):
+class DummySupplement:
def __init__(self, info=''):
self._info = info
@@ -923,7 +919,7 @@
return self._info
-class DummyTB(object):
+class DummyTB:
# https://docs.python.org/3/reference/datamodel.html#traceback-objects
tb_frame = None
tb_lineno = 14
@@ -931,7 +927,7 @@
tb_lasti = 1
-class DummyFrame(object):
+class DummyFrame:
f_lineno = 137
f_back = None
@@ -941,7 +937,7 @@
self.f_code = DummyCode()
-class DummyCode(object):
+class DummyCode:
co_filename = 'dummy/filename.py'
co_name = 'dummy_function'
@@ -957,7 +953,7 @@
return [(27, 2, 3, 4)] # pragma: no cover
-class _Monkey(object):
+class _Monkey:
# context-manager for replacing module names in the scope of a test.
def __init__(self, module, **kw):
self.module = module
@@ -975,7 +971,3 @@
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.6/src/zope/exceptions/tests/test_log.py
new/zope.exceptions-5.0.1/src/zope/exceptions/tests/test_log.py
--- old/zope.exceptions-4.6/src/zope/exceptions/tests/test_log.py
2022-11-10 08:28:46.000000000 +0100
+++ new/zope.exceptions-5.0.1/src/zope/exceptions/tests/test_log.py
2023-07-11 09:40:38.000000000 +0200
@@ -41,7 +41,7 @@
def test_unicode_traceback_info(self):
import traceback
- __traceback_info__ = u"Have a Snowman: \u2603"
+ __traceback_info__ = "Have a Snowman: \u2603"
tb = DummyTB()
tb.tb_frame.f_locals['__traceback_info__'] = __traceback_info__
exc = ValueError('testing')
@@ -53,9 +53,7 @@
self.assertEqual(lines[0], 'Traceback (most recent call last):')
self.assertEqual(lines[1], ' File "dummy/filename.py", line 14, '
'in dummy_function')
- expected = ' - __traceback_info__: Have a Snowman: '
- # utf-8 encoded on Python 2, unicode on Python 3
- expected += '\xe2\x98\x83' if bytes is str else u'\u2603'
+ expected = ' - __traceback_info__: Have a Snowman: \u2603'
self.assertEqual(lines[2], expected)
@@ -63,7 +61,7 @@
self.assertEqual(lines[3], emsg[:-1]) # strip trailing \n from emsg
-class DummyTB(object):
+class DummyTB:
tb_lineno = 14
tb_next = None
@@ -71,7 +69,7 @@
self.tb_frame = DummyFrame()
-class DummyFrame(object):
+class DummyFrame:
f_lineno = 137
f_back = None
@@ -81,6 +79,6 @@
self.f_code = DummyCode()
-class DummyCode(object):
+class DummyCode:
co_filename = 'dummy/filename.py'
co_name = 'dummy_function'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zope.exceptions-4.6/src/zope.exceptions.egg-info/PKG-INFO
new/zope.exceptions-5.0.1/src/zope.exceptions.egg-info/PKG-INFO
--- old/zope.exceptions-4.6/src/zope.exceptions.egg-info/PKG-INFO
2022-11-10 08:28:47.000000000 +0100
+++ new/zope.exceptions-5.0.1/src/zope.exceptions.egg-info/PKG-INFO
2023-07-11 09:40:38.000000000 +0200
@@ -1,25 +1,20 @@
Metadata-Version: 2.1
Name: zope.exceptions
-Version: 4.6
+Version: 5.0.1
Summary: Zope Exceptions
Home-page: https://github.com/zopefoundation/zope.exceptions
Author: Zope Foundation and Contributors
-Author-email: [email protected]
+Author-email: [email protected]
License: ZPL 2.1
Project-URL: Issue Tracker,
https://github.com/zopefoundation/zope.exceptions/issues
Project-URL: Sources, https://github.com/zopefoundation/zope.exceptions
Keywords: zope exceptions
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-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
@@ -31,7 +26,7 @@
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope :: 3
-Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
+Requires-Python: >=3.7
Provides-Extra: docs
Provides-Extra: test
License-File: LICENSE.txt
@@ -68,6 +63,19 @@
zope.exceptions Changelog
===========================
+5.0.1 (2023-07-11)
+==================
+
+- Fix issue introduced in the last release which is breaking
+ ``HTMLExceptionFormatter`` when using non-str ``__traceback_info__``.
+
+
+5.0 (2023-06-29)
+================
+
+- Drop support for Python 2.7, 3.5, 3.6.
+
+
4.6 (2022-11-10)
================
@@ -310,5 +318,3 @@
- Corresponds to the version of the zope.exceptions package shipped as part of
the Zope X3.0.0 release.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zope.exceptions-4.6/tox.ini
new/zope.exceptions-5.0.1/tox.ini
--- old/zope.exceptions-4.6/tox.ini 2022-11-10 08:28:46.000000000 +0100
+++ new/zope.exceptions-5.0.1/tox.ini 2023-07-11 09:40:38.000000000 +0200
@@ -4,15 +4,11 @@
minversion = 3.18
envlist =
lint
- py27
- py35
- py36
py37
py38
py39
py310
py311
- pypy
pypy3
docs
coverage
@@ -22,7 +18,7 @@
deps =
commands =
zope-testrunner --test-path=src {posargs:-vc}
- !py27-!pypy: sphinx-build -b doctest -d {envdir}/.cache/doctrees docs
{envdir}/.cache/doctest
+ sphinx-build -b doctest -d {envdir}/.cache/doctrees docs
{envdir}/.cache/doctest
extras =
test
docs
@@ -44,6 +40,7 @@
[testenv:isort-apply]
basepython = python3
+skip_install = true
commands_pre =
deps =
isort
@@ -64,17 +61,15 @@
mkdir
deps =
coverage
- coverage-python-version
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs
{envdir}/.cache/doctest
- coverage html
- coverage report -m --fail-under=99.5
+ coverage html --ignore-errors
+ coverage report --ignore-errors --show-missing --fail-under=100
[coverage:run]
branch = True
-plugins = coverage_python_version
source = zope.exceptions
[coverage:report]