openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2020
- 1 participants
- 2816 discussions
Hello community,
here is the log from the commit of package python-twine for openSUSE:Factory checked in at 2020-08-01 12:30:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-twine (Old)
and /work/SRC/openSUSE:Factory/.python-twine.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-twine"
Sat Aug 1 12:30:24 2020 rev:10 rq:822414 version:3.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-twine/python-twine.changes 2020-04-19 21:48:42.903989912 +0200
+++ /work/SRC/openSUSE:Factory/.python-twine.new.3592/python-twine.changes 2020-08-01 12:30:28.758417561 +0200
@@ -1,0 +2,13 @@
+Thu Jul 23 12:22:51 UTC 2020 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- update to 3.2.0
+ * :feature:`666` Improve display of HTTP errors during upload
+ * :feature:`649` Use red text when printing errors on the command line
+ * :feature:`652` Print packages and signatures to be uploaded when using
+ ``--verbose`` option
+ * :bug:`655 major` Update URL to ``.pypirc`` specfication
+ * :feature:`602` Require repository URL scheme to be ``http`` or ``https``
+ * :bug:`612 major` Don't raise an exception when Python version can't be
+ parsed from filename
+
+-------------------------------------------------------------------
Old:
----
twine-3.1.1.tar.gz
New:
----
twine-3.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-twine.spec ++++++
--- /var/tmp/diff_new_pack.JljxHd/_old 2020-08-01 12:30:31.502420130 +0200
+++ /var/tmp/diff_new_pack.JljxHd/_new 2020-08-01 12:30:31.506420134 +0200
@@ -19,12 +19,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-twine
-Version: 3.1.1
+Version: 3.2.0
Release: 0
Summary: Collection of utilities for interacting with PyPI
License: Apache-2.0
URL: https://github.com/pypa/twine
Source: https://files.pythonhosted.org/packages/source/t/twine/twine-%{version}.tar…
+BuildRequires: %{python_module colorama >= 0.4.3}
BuildRequires: %{python_module importlib-metadata}
BuildRequires: %{python_module jaraco.envs}
BuildRequires: %{python_module keyring >= 15.1}
@@ -36,17 +37,20 @@
BuildRequires: %{python_module readme_renderer >= 21.0}
BuildRequires: %{python_module requests >= 2.20}
BuildRequires: %{python_module requests-toolbelt >= 0.8.0}
+BuildRequires: %{python_module rfc3986 >= 1.4.0}
BuildRequires: %{python_module setuptools >= 0.7.0}
BuildRequires: %{python_module setuptools_scm >= 1.15}
BuildRequires: %{python_module tqdm >= 4.14}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: python-colorama >= 0.4.3
Requires: python-importlib-metadata
Requires: python-keyring >= 15.1
Requires: python-pkginfo >= 1.4.2
Requires: python-readme_renderer >= 21.0
Requires: python-requests >= 2.20
Requires: python-requests-toolbelt >= 0.8.0
+Requires: python-rfc3986 >= 1.4.0
Requires: python-setuptools >= 0.7.0
Requires: python-tqdm >= 4.14
Requires(post): update-alternatives
@@ -63,6 +67,7 @@
%setup -q -n twine-%{version}
sed -i '1s/^#!.*//' twine/__main__.py
+sed -i 's/--cov.*$//' pytest.ini
%build
%python_build
++++++ twine-3.1.1.tar.gz -> twine-3.2.0.tar.gz ++++++
++++ 7289 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-pandas for openSUSE:Factory checked in at 2020-08-01 12:30:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pandas (Old)
and /work/SRC/openSUSE:Factory/.python-pandas.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pandas"
Sat Aug 1 12:30:19 2020 rev:28 rq:822314 version:1.0.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pandas/python-pandas.changes 2020-07-02 23:54:33.872520067 +0200
+++ /work/SRC/openSUSE:Factory/.python-pandas.new.3592/python-pandas.changes 2020-08-01 12:30:25.986414966 +0200
@@ -1,0 +2,13 @@
+Wed Jul 22 10:04:49 UTC 2020 - Benjamin Greiner <code(a)bnavigator.de>
+
+- support newest numpy by removing old test
+ gh#pandas-dev/pandas#34991 pandas-pr34991-npconstructor.patch
+- move testing to multibuild flavor
+- run slow tests only on x86_64
+- replace gcc10-skip-one-test.patch with pytest -k deselection
+- tidy SKIP_TESTS declarations
+- add pandas-pytest.ini as pytest.ini in order to support the
+ custom marks and filter some warnings
+- remove random hash seed
+
+-------------------------------------------------------------------
Old:
----
gcc10-skip-one-test.patch
New:
----
_multibuild
pandas-pr34991-npconstructor.patch
pandas-pytest.ini
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pandas.spec ++++++
--- /var/tmp/diff_new_pack.bHHSFR/_old 2020-08-01 12:30:26.906415827 +0200
+++ /var/tmp/diff_new_pack.bHHSFR/_new 2020-08-01 12:30:26.906415827 +0200
@@ -18,7 +18,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
-Name: python-pandas
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
+Name: python-pandas%{psuffix}
Version: 1.0.5
Release: 0
Summary: Python data structures for data analysis, time series, and statistics
@@ -26,7 +34,9 @@
Group: Development/Libraries/Python
URL: https://pandas.pydata.org/
Source0: https://files.pythonhosted.org/packages/source/p/pandas/pandas-%{version}.t…
-Patch0: gcc10-skip-one-test.patch
+Source99: pandas-pytest.ini
+# PATCH-FIX-UPSTREAM gh#pandas-dev/pandas#34991
+Patch0: pandas-pr34991-npconstructor.patch
BuildRequires: %{python_module Cython >= 0.28.2}
# test requirements
BuildRequires: %{python_module Jinja2}
@@ -73,13 +83,14 @@
Recommends: xsel
Obsoletes: python-pandas-doc < %{version}
Provides: python-pandas-doc = %{version}
-# SECTION test requirements
+%if %{with test}
BuildRequires: %{python_module SQLAlchemy >= 1.1.4}
BuildRequires: %{python_module XlsxWriter >= 0.9.8}
BuildRequires: %{python_module beautifulsoup4 >= 4.6.0}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module lxml >= 3.8.0}
BuildRequires: %{python_module openpyxl >= 2.4.8}
+BuildRequires: %{python_module pandas = %{version}}
BuildRequires: %{python_module pytest >= 4.0.2}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-xdist}
@@ -88,7 +99,7 @@
BuildRequires: %{python_module xlrd >= 1.1.0}
BuildRequires: %{python_module xlwt >= 1.2.0}
BuildRequires: xvfb-run
-# /SECTION
+%endif
%python_subpackages
%description
@@ -98,47 +109,73 @@
block for doing data analysis in Python.
%prep
+%if !%{with test}
%setup -q -n pandas-%{version}
sed -i -e 's/\r//g' pandas/tests/reshape/merge/test_merge.py
%patch0 -p1
sed -i -e '/^#!\//, 1d' pandas/core/computation/eval.py
sed -i -e '/^#!\//, 1d' pandas/tests/io/generate_legacy_storage_files.py
sed -i -e '/^#!\//, 1d' pandas/tests/plotting/common.py
+%endif
%build
+%if !%{with test}
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
+%endif
%install
+%if !%{with test}
%python_install
-%python_expand sed -i -e 's|"python", "-c",|"%{__$python}", "-c",|' %{buildroot}%{$python_sitearch}/pandas/tests/io/test_compression.py
-%python_expand %fdupes %{buildroot}%{$python_sitearch}
+%{python_expand sed -i -e 's|"python", "-c",|"%{__$python}", "-c",|' %{buildroot}%{$python_sitearch}/pandas/tests/io/test_compression.py
+%fdupes %{buildroot}%{$python_sitearch}
+# can be removed for pandas >= 1.1 https://github.com/pandas-dev/pandas/pull/35146
+install %SOURCE99 %{buildroot}%{$python_sitearch}/pandas/pytest.ini
+}
+%endif
%check
-# skip test that tries to compile stuff in buildroot test_oo_optimizable
-# test_encode_non_c_locale - skip test as it overflows on 32bit
-# test_maybe_promote_int_with_int https://github.com/pandas-dev/pandas/issues/31856
-export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
+%if %{with test}
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export PYTHONDONTWRITEBYTECODE=1
-export SKIP_TESTS="test_oo_optimizable or test_encode_non_c_locale or test_maybe_promote_int_with_int"
-# Skip test_raw_roundtrip on i586, gh#pandas-dev/pandas#29712
+# Workaround for pytest-xdist flaky collection order
+# https://github.com/pytest-dev/pytest/issues/920
+# https://github.com/pytest-dev/pytest/issues/1075
+export PYTHONHASHSEED=1
+# tries to compile stuff in buildroot test_oo_optimizable
+SKIP_TESTS+=" or test_oo_optimizable"
%ifarch %{ix86}
-SKIP_TESTS="$SKIP_TESTS or test_raw_roundtrip"
+# https://github.com/pandas-dev/pandas/issues/29712
+SKIP_TESTS+=" or test_raw_roundtrip"
+# overflows on i586
+SKIP_TESTS+=" or test_encode_non_c_locale"
+# fails on i586 (was gcc10-skip-one-test.patch)
+SKIP_TESTS+=" or test_merge_on_ints_floats_warning"
+%endif
+# https://github.com/pandas-dev/pandas/issues/31856
+[ $(getconf LONG_BIT) = "32" ] && SKIP_TESTS+=" or test_maybe_promote_int_with_int"
+%ifnarch x86_64
+# run the slow tests only on x86_64
+%define test_fast --skip-slow --skip-db
%endif
-mv pandas pandas_temp
-%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
-$python -c 'import pandas; print(pandas.show_versions())'
-xvfb-run py.test-%{$python_version} -n auto -v %{buildroot}%{$python_sitearch}/pandas/tests -k "not ($SKIP_TESTS)"
+%{python_expand $python -c 'import pandas; print(pandas.__path__); print(pandas.show_versions())'
+# need to specify test path directly instead of --pyargs pandas in order
+# to find pytest.ini and all conftest.py files
+xvfb-run pytest-%{$python_bin_suffix} -v -n auto %{?test_fast} \
+ -p no:cacheprovider \
+ -k "not (${SKIP_TESTS:4})" \
+ %{$python_sitearch}/pandas
}
-mv pandas_temp pandas
+%endif
+%if !%{with test}
%files %{python_files}
%license LICENSE
%doc doc/README.rst RELEASE.md
%{python_sitearch}/pandas/
%{python_sitearch}/pandas-%{version}-py*.egg-info
+%endif
%changelog
++++++ _multibuild ++++++
<multibuild>
<package>test</package>
</multibuild>
++++++ pandas-pr34991-npconstructor.patch ++++++
Index: pandas-1.0.5/pandas/core/internals/construction.py
===================================================================
--- pandas-1.0.5.orig/pandas/core/internals/construction.py
+++ pandas-1.0.5/pandas/core/internals/construction.py
@@ -292,7 +292,7 @@ def prep_ndarray(values, copy=True) -> n
if values.ndim == 1:
values = values.reshape((values.shape[0], 1))
elif values.ndim != 2:
- raise ValueError("Must pass 2-d input")
+ raise ValueError(f"Must pass 2-d input. shape={values.shape}")
return values
Index: pandas-1.0.5/pandas/tests/frame/test_constructors.py
===================================================================
--- pandas-1.0.5.orig/pandas/tests/frame/test_constructors.py
+++ pandas-1.0.5/pandas/tests/frame/test_constructors.py
@@ -9,7 +9,7 @@ import numpy.ma.mrecords as mrecords
import pytest
from pandas.compat import is_platform_little_endian
-from pandas.compat.numpy import _is_numpy_dev
+from pandas.compat.numpy import _np_version_under1p19
from pandas.core.dtypes.common import is_integer_dtype
@@ -145,14 +145,20 @@ class TestDataFrameConstructors:
assert df.loc[1, 0] is None
assert df.loc[0, 1] == "2"
- @pytest.mark.xfail(_is_numpy_dev, reason="Interprets list of frame as 3D")
- def test_constructor_list_frames(self):
- # see gh-3243
- result = DataFrame([DataFrame()])
- assert result.shape == (1, 0)
-
- result = DataFrame([DataFrame(dict(A=np.arange(5)))])
- assert isinstance(result.iloc[0, 0], DataFrame)
+ @pytest.mark.skipif(_np_version_under1p19, reason="NumPy change.")
+ def test_constructor_list_of_2d_raises(self):
+ # https://github.com/pandas-dev/pandas/issues/32289
+ a = pd.DataFrame()
+ b = np.empty((0, 0))
+ with pytest.raises(ValueError, match=r"shape=\(1, 0, 0\)"):
+ pd.DataFrame([a])
+
+ with pytest.raises(ValueError, match=r"shape=\(1, 0, 0\)"):
+ pd.DataFrame([b])
+
+ a = pd.DataFrame({"A": [1, 2]})
+ with pytest.raises(ValueError, match=r"shape=\(2, 2, 1\)"):
+ pd.DataFrame([a, a])
def test_constructor_mixed_dtypes(self):
def _make_mixed_dtypes_df(typ, ad=None):
@@ -498,22 +504,6 @@ class TestDataFrameConstructors:
with pytest.raises(ValueError, match=msg):
DataFrame({"a": False, "b": True})
- @pytest.mark.xfail(_is_numpy_dev, reason="Interprets embedded frame as 3D")
- def test_constructor_with_embedded_frames(self):
-
- # embedded data frames
- df1 = DataFrame({"a": [1, 2, 3], "b": [3, 4, 5]})
- df2 = DataFrame([df1, df1 + 10])
-
- df2.dtypes
- str(df2)
-
- result = df2.loc[0, 0]
- tm.assert_frame_equal(result, df1)
-
- result = df2.loc[1, 0]
- tm.assert_frame_equal(result, df1 + 10)
-
def test_constructor_subclass_dict(self, float_frame, dict_subclass):
# Test for passing dict subclass to constructor
data = {
++++++ pandas-pytest.ini ++++++
[pytest]
minversion = 4.0.2
markers =
single: mark a test as single cpu only
slow: mark a test as slow
network: mark a test as network
db: tests requiring a database (mysql or postgres)
high_memory: mark a test as a high-memory only
clipboard: mark a pd.read_clipboard test
filterwarnings =
error:Sparse:FutureWarning
error:The SparseArray:FutureWarning
junit_family = xunit2
1
0
Hello community,
here is the log from the commit of package python-vistir for openSUSE:Factory checked in at 2020-08-01 12:30:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-vistir (Old)
and /work/SRC/openSUSE:Factory/.python-vistir.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-vistir"
Sat Aug 1 12:30:11 2020 rev:10 rq:822249 version:0.5.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-vistir/python-vistir.changes 2020-02-15 22:23:05.451234156 +0100
+++ /work/SRC/openSUSE:Factory/.python-vistir.new.3592/python-vistir.changes 2020-08-01 12:30:22.178411401 +0200
@@ -1,0 +2,6 @@
+Wed Jul 22 12:40:25 UTC 2020 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- update to 0.5.2
+ * small fixes
+
+-------------------------------------------------------------------
Old:
----
vistir-0.5.0.tar.gz
New:
----
vistir-0.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-vistir.spec ++++++
--- /var/tmp/diff_new_pack.4GiNMw/_old 2020-08-01 12:30:23.822412940 +0200
+++ /var/tmp/diff_new_pack.4GiNMw/_new 2020-08-01 12:30:23.826412944 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-vistir
-Version: 0.5.0
+Version: 0.5.2
Release: 0
Summary: Utilities for filesystems, paths, projects, subprocesses, and more
License: ISC
++++++ vistir-0.5.0.tar.gz -> vistir-0.5.2.tar.gz ++++++
++++ 18933 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-reportlab for openSUSE:Factory checked in at 2020-08-01 12:29:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-reportlab (Old)
and /work/SRC/openSUSE:Factory/.python-reportlab.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-reportlab"
Sat Aug 1 12:29:57 2020 rev:26 rq:822235 version:3.5.46
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-reportlab/python-reportlab.changes 2020-07-17 20:46:43.784660048 +0200
+++ /work/SRC/openSUSE:Factory/.python-reportlab.new.3592/python-reportlab.changes 2020-08-01 12:30:16.490406075 +0200
@@ -1,0 +2,11 @@
+Wed Jul 22 10:14:37 UTC 2020 - Michael Ströder <michael(a)stroeder.com>
+
+- Update to 3.5.46
+ * micro changes to normalDate
+ * fix warnings about is not (detected in python 3.8b4)
+ * implement PR #59 bug fix
+ * add recursive ttf searching
+ * sync with rlextra
+ * fix Barchart axis crossing issue
+
+-------------------------------------------------------------------
Old:
----
reportlab-3.5.44.tar.gz
New:
----
reportlab-3.5.46.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-reportlab.spec ++++++
--- /var/tmp/diff_new_pack.Q6vk9M/_old 2020-08-01 12:30:19.238408648 +0200
+++ /var/tmp/diff_new_pack.Q6vk9M/_new 2020-08-01 12:30:19.238408648 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-reportlab
-Version: 3.5.44
+Version: 3.5.46
Release: 0
Summary: The Reportlab Toolkit
License: BSD-3-Clause
++++++ reportlab-3.5.44.tar.gz -> reportlab-3.5.46.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/CHANGES.md new/reportlab-3.5.46/CHANGES.md
--- old/reportlab-3.5.44/CHANGES.md 2020-06-03 11:03:01.000000000 +0200
+++ new/reportlab-3.5.46/CHANGES.md 2020-07-22 09:53:33.000000000 +0200
@@ -11,8 +11,22 @@
The contributors lists are in no order and apologies to those accidentally not
mentioned. If we missed you, please let us know!
+RELEASE 3.5.46 22/07/2020
+---------------------------
+ * fix style-data mismatch in LinePlot found by Anshika Sahay
+
+RELEASE 3.5.45 10/07/2020
+---------------------------
+ * fix some documentation bugs reported by Lele Gaifax
+ * fix error in BarChart axes joining reported by Faisal.Fareed
+
+RELEASE 3.5.44 26/06/2020
+---------------------------
+ * ensure qr bar colour is passed (contrib by Lele Gaifax)
+ * fix img layout bug (reported by Lele Gaifax)
+
RELEASE 3.5.43 03/06/2020
---------------------------
+---------------------------
* small change to improve strokeDashArray handling to allow [phase, [values]] and allow stroke-dashoffset
* Hatching class which inherits from shapes.Path
* add support for soft hyphens u'\xad'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/PKG-INFO new/reportlab-3.5.46/PKG-INFO
--- old/reportlab-3.5.44/PKG-INFO 2020-06-26 19:08:22.000000000 +0200
+++ new/reportlab-3.5.46/PKG-INFO 2020-07-22 09:54:00.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: reportlab
-Version: 3.5.44
+Version: 3.5.46
Summary: The Reportlab Toolkit
Home-page: http://www.reportlab.com/
Author: Andy Robinson, Robin Becker, the ReportLab team and the community
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/docs/userguide/ch5_paragraphs.py new/reportlab-3.5.46/docs/userguide/ch5_paragraphs.py
--- old/reportlab-3.5.44/docs/userguide/ch5_paragraphs.py 2019-10-01 17:38:11.000000000 +0200
+++ new/reportlab-3.5.46/docs/userguide/ch5_paragraphs.py 2020-07-20 09:39:52.000000000 +0200
@@ -185,7 +185,7 @@
colour can be set with $backColor$. The paragraph's border properties may be changed using
$borderWidth$, $borderPadding$, $borderColor$ and $borderRadius$.""")
-disc("""The $textTransform$ attribute can be <b><i>None</i></b>, <i>'upper'</i> or <i>'lower'</i> to get the obvious result.""")
+disc("""The $textTransform$ attribute can be <b><i>None</i></b>, <i>'uppercase'</i> or <i>'lowercase'</i> to get the obvious result and <i>'capitalize'</i> to get initial letter capitalization.""")
disc("""Attribute $endDots$ can be <b><i>None</i></b>, a string, or an object with attributes text and optional fontName, fontSize, textColor, backColor
and dy(y offset) to specify trailing matter on the last line of left/right justified paragraphs.""")
disc("""The $splitLongWords$ attribute can be set to a false value to avoid splitting very long words.""")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/reportlab/__init__.py new/reportlab-3.5.46/src/reportlab/__init__.py
--- old/reportlab-3.5.44/src/reportlab/__init__.py 2020-06-26 19:07:54.000000000 +0200
+++ new/reportlab-3.5.46/src/reportlab/__init__.py 2020-07-22 09:53:33.000000000 +0200
@@ -1,9 +1,9 @@
#Copyright ReportLab Europe Ltd. 2000-2018
#see license.txt for license details
__doc__="""The Reportlab PDF generation library."""
-Version = "3.5.44"
+Version = "3.5.46"
__version__=Version
-__date__='20200626'
+__date__='20200722'
import sys, os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/reportlab/graphics/charts/barcharts.py new/reportlab-3.5.46/src/reportlab/graphics/charts/barcharts.py
--- old/reportlab-3.5.44/src/reportlab/graphics/charts/barcharts.py 2020-02-28 13:52:10.000000000 +0100
+++ new/reportlab-3.5.46/src/reportlab/graphics/charts/barcharts.py 2020-07-20 09:39:52.000000000 +0200
@@ -230,15 +230,9 @@
self._getConfigureData()
vA.configure(self._configureData)
- # if zero is in chart, put the other axis there, otherwise use low
+ # if zero is in chart, put the other axis there, otherwise use org
crossesAt = vA.scale(0)
- if not vA.forceZero:
- eps = min(1,1.001*abs(length))
- end = org+length
- org, end = min(org,end)-eps, max(org,end)+eps
- if crossesAt>eps or crossesAt<end:
- crossesAt = org
- return crossesAt
+ return crossesAt if vA.forceZero or (crossesAt>=org and crossesAt<=org+length) else org
def _drawFinish(self):
'''finalize the drawing of a barchart'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/reportlab/graphics/charts/lineplots.py new/reportlab-3.5.46/src/reportlab/graphics/charts/lineplots.py
--- old/reportlab-3.5.44/src/reportlab/graphics/charts/lineplots.py 2019-10-15 12:46:59.000000000 +0200
+++ new/reportlab-3.5.46/src/reportlab/graphics/charts/lineplots.py 2020-07-22 09:53:33.000000000 +0200
@@ -207,8 +207,7 @@
if 0<=other<n:
if other==rowNo:
raise ValueError('data row %r may not be paired with itself' % rowNo)
- t = (rowNo,other)
- pairs.add((min(t),max(t)))
+ pairs.add((rowNo,other))
else:
raise ValueError('data row %r is paired with invalid data row %r' % (rowNo, other))
line = [].append
@@ -297,7 +296,10 @@
inFillG = getattr(self,'_inFillG',g)
lG = getattr(self,'_lineG',g)
# Iterate over data rows.
- for rowNo, row in enumerate(reversed(P) if self.reversePlotOrder else P):
+ R = range(len(P))
+ if self.reversePlotOrder: R = reversed(R)
+ for rowNo in R:
+ row = P[rowNo]
styleRowNo = rowNo % styleCount
rowStyle = lines[styleRowNo]
strokeColor = getattr(rowStyle,'strokeColor',None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/reportlab/platypus/paragraph.py new/reportlab-3.5.46/src/reportlab/platypus/paragraph.py
--- old/reportlab-3.5.44/src/reportlab/platypus/paragraph.py 2020-06-26 19:07:54.000000000 +0200
+++ new/reportlab-3.5.46/src/reportlab/platypus/paragraph.py 2020-07-20 09:39:52.000000000 +0200
@@ -19,6 +19,7 @@
from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
from reportlab.lib.geomutils import normalizeTRBL
from reportlab.lib.textsplit import wordSplit, ALL_CANNOT_START
+from reportlab.lib.styles import ParagraphStyle
from copy import deepcopy
from reportlab.lib.abag import ABag
from reportlab.rl_config import platypus_link_underline, decimalSymbol, _FUZZ,\
@@ -1759,7 +1760,9 @@
It will also be able to handle any MathML specified Greek characters.
"""
- def __init__(self, text, style, bulletText = None, frags=None, caseSensitive=1, encoding='utf8'):
+ def __init__(self, text, style=None, bulletText = None, frags=None, caseSensitive=1, encoding='utf8'):
+ if style is None:
+ style = ParagraphStyle(name='paragraphImplicitDefaultStyle')
self.caseSensitive = caseSensitive
self.encoding = encoding
self._setup(text, style, bulletText or getattr(style,'bulletText',None), frags, cleanBlockQuotedText)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/reportlab/platypus/paraparser.py new/reportlab-3.5.46/src/reportlab/platypus/paraparser.py
--- old/reportlab-3.5.44/src/reportlab/platypus/paraparser.py 2019-10-19 10:14:30.000000000 +0200
+++ new/reportlab-3.5.46/src/reportlab/platypus/paraparser.py 2020-07-20 09:39:52.000000000 +0200
@@ -205,7 +205,7 @@
s = s.lower().strip()
if not s: return None
if s not in ('uppercase','lowercase','capitalize','none'):
- raise ValueError('cannot convert wordWrap=%r' % s)
+ raise ValueError('cannot convert textTransform=%r' % s)
return s
_paraAttrMap = {'font': ('fontName', None),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/reportlab.egg-info/PKG-INFO new/reportlab-3.5.46/src/reportlab.egg-info/PKG-INFO
--- old/reportlab-3.5.44/src/reportlab.egg-info/PKG-INFO 2020-06-26 19:08:22.000000000 +0200
+++ new/reportlab-3.5.46/src/reportlab.egg-info/PKG-INFO 2020-07-22 09:53:59.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: reportlab
-Version: 3.5.44
+Version: 3.5.46
Summary: The Reportlab Toolkit
Home-page: http://www.reportlab.com/
Author: Andy Robinson, Robin Becker, the ReportLab team and the community
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/src/rl_addons/renderPM/_renderPM.c new/reportlab-3.5.46/src/rl_addons/renderPM/_renderPM.c
--- old/reportlab-3.5.44/src/rl_addons/renderPM/_renderPM.c 2019-10-01 17:38:11.000000000 +0200
+++ new/reportlab-3.5.46/src/rl_addons/renderPM/_renderPM.c 2020-07-20 09:39:52.000000000 +0200
@@ -21,7 +21,7 @@
#endif
-#define VERSION "3.02"
+#define VERSION "3.03"
#define MODULENAME "_renderPM"
#ifdef isPy3
# define PyInt_FromLong PyLong_FromLong
@@ -72,6 +72,7 @@
# define PyObject_DEL(op) PyMem_DEL((op))
#endif
+#define VECSP 0.25
typedef struct {
int format;
@@ -616,7 +617,7 @@
if(!PyArg_ParseTuple(args,"|i:clipPathSet",&fillMode)) return NULL;
gstate_pathEnd(self);
dump_path(self);
- vpath = art_bez_path_to_vec(self->path, 0.25);
+ vpath = art_bez_path_to_vec(self->path, VECSP);
dump_vpath("after -->vec",vpath);
trVpath = art_vpath_affine_transform (vpath, self->ctm);
_vpath_area(trVpath);
@@ -639,7 +640,7 @@
double a;
if(endIt) gstate_pathEnd(self);
dump_path(self);
- vpath = art_bez_path_to_vec(self->path, 0.25);
+ vpath = art_bez_path_to_vec(self->path, VECSP);
if(0 && vpReverse) _vpath_reverse(vpath);
trVpath = art_vpath_affine_transform(vpath, self->ctm);
a = _vpath_area(trVpath);
@@ -708,7 +709,7 @@
if(self->strokeColor.valid && self->strokeWidth>0){
gstate_pathEnd(self);
dump_path(self);
- vpath = art_bez_path_to_vec(self->path, 0.25);
+ vpath = art_bez_path_to_vec(self->path, VECSP);
if(self->dash.dash){
ArtVpath* tvpath=vpath;
@@ -1024,7 +1025,7 @@
int i;
gstate_pathEnd(self);
- v = vpath = art_bez_path_to_vec(self->path, 0.25);
+ v = vpath = art_bez_path_to_vec(self->path, VECSP);
while(v->code!=ART_END) v++;
P = PyTuple_New(v-vpath);
i = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reportlab-3.5.44/tests/test_paragraphs.py new/reportlab-3.5.46/tests/test_paragraphs.py
--- old/reportlab-3.5.44/tests/test_paragraphs.py 2020-01-14 10:10:36.000000000 +0100
+++ new/reportlab-3.5.46/tests/test_paragraphs.py 2020-07-20 09:39:52.000000000 +0200
@@ -271,6 +271,15 @@
'''<span color="(lambda fc=(lambda n: [c for c in ().__class__.__bases__[0].__subclasses__() if c.__name__ == n][0]): fc('function')(fc('code')(0,0,0,0,'KABOOM',(), (),(),'','',0,''),{})())()">AAA</span>''',styNormal)
#w, h = p.wrap(5*72,7*72)
#p.drawOn(canv,36,6.5*72)
+
+ def testSomeParaAttrs(self):
+ self.assertTrue(Paragraph('<para texttransform="">aaaaa</para>'))
+ self.assertTrue(Paragraph('<para texttransform="uppercase">aaaaa</para>'))
+ self.assertTrue(Paragraph('<para texttransform="lowercase">AAAAA</para>'))
+ self.assertTrue(Paragraph('<para texttransform="capitalize">aaaaa</para>'))
+ self.assertRaises(ValueError,Paragraph,'<para texttransform="upper">aaaaa</para>')
+ self.assertRaises(ValueError,Paragraph,'<para texttransform="lower">AAAAA</para>')
+ self.assertRaises(ValueError,Paragraph,'<para texttransform="capitalise">aaaaa</para>')
if rtlSupport:
def testBidi(self):
1
0
Hello community,
here is the log from the commit of package python-networkx for openSUSE:Factory checked in at 2020-08-01 12:29:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-networkx (Old)
and /work/SRC/openSUSE:Factory/.python-networkx.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-networkx"
Sat Aug 1 12:29:45 2020 rev:23 rq:822138 version:2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-networkx/python-networkx.changes 2020-07-17 20:45:39.240591270 +0200
+++ /work/SRC/openSUSE:Factory/.python-networkx.new.3592/python-networkx.changes 2020-08-01 12:30:03.966394350 +0200
@@ -1,0 +2,6 @@
+Tue Jul 21 16:10:13 UTC 2020 - Benjamin Greiner <code(a)bnavigator.de>
+
+- gh#networkx/networkx#4012 networkx-pr4012-use-mpl.patch
+ new matplotlib removed keyword argument 'warn' for mpl.use()
+
+-------------------------------------------------------------------
New:
----
networkx-pr4012-use-mpl.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-networkx.spec ++++++
--- /var/tmp/diff_new_pack.YJZr0C/_old 2020-08-01 12:30:05.774396043 +0200
+++ /var/tmp/diff_new_pack.YJZr0C/_new 2020-08-01 12:30:05.778396047 +0200
@@ -29,6 +29,8 @@
Patch0: numpy-38-test.patch
# UPSTREAM PATCH: gh#networkx/networkx#3697
Patch1: matplotlib.patch
+# UPSTREAM PATCH: gh#networkx/networkx#4012
+Patch2: networkx-pr4012-use-mpl.patch
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module decorator >= 3.4.0}
BuildRequires: %{python_module matplotlib >= 3.1}
++++++ networkx-pr4012-use-mpl.patch ++++++
>From 83bf28a8f46a311f2bc277eab66226f6b9117c1d Mon Sep 17 00:00:00 2001
From: Ram Rachum <ram(a)rachum.com>
Date: Sun, 21 Jun 2020 22:24:11 +0300
Subject: [PATCH 1/2] Fix exception causes and messages in 12 modules
---
examples/subclass/plot_antigraph.py | 4 +--
.../algorithms/approximation/kcomponents.py | 4 +--
.../algorithms/assortativity/correlation.py | 18 +++++-----
networkx/algorithms/bipartite/cluster.py | 4 +--
networkx/algorithms/bipartite/edgelist.py | 19 +++++-----
networkx/algorithms/bipartite/matching.py | 4 +--
networkx/algorithms/bipartite/matrix.py | 4 +--
networkx/algorithms/bipartite/spectral.py | 4 +--
.../centrality/current_flow_betweenness.py | 36 +++++++++----------
.../current_flow_betweenness_subset.py | 20 +++++------
networkx/algorithms/centrality/katz.py | 12 +++----
.../algorithms/centrality/second_order.py | 4 +--
12 files changed, 68 insertions(+), 65 deletions(-)
Index: networkx-2.4/examples/subclass/plot_antigraph.py
===================================================================
--- networkx-2.4.orig/examples/subclass/plot_antigraph.py
+++ networkx-2.4/examples/subclass/plot_antigraph.py
@@ -71,8 +71,8 @@ class AntiGraph(nx.Graph):
"""
try:
return iter(set(self.adj) - set(self.adj[n]) - set([n]))
- except KeyError:
- raise NetworkXError("The node %s is not in the graph." % (n,))
+ except KeyError as e:
+ raise NetworkXError("The node %s is not in the graph." % (n,)) from e
def degree(self, nbunch=None, weight=None):
"""Return an iterator for (node, degree) in the dense graph.
Index: networkx-2.4/networkx/algorithms/approximation/kcomponents.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/approximation/kcomponents.py
+++ networkx-2.4/networkx/algorithms/approximation/kcomponents.py
@@ -245,8 +245,8 @@ class _AntiGraph(nx.Graph):
"""
try:
return iter(set(self._adj) - set(self._adj[n]) - set([n]))
- except KeyError:
- raise NetworkXError("The node %s is not in the graph." % (n,))
+ except KeyError as e:
+ raise NetworkXError("The node %s is not in the graph." % (n,)) from e
class AntiAtlasView(Mapping):
"""An adjacency inner dict for AntiGraph"""
Index: networkx-2.4/networkx/algorithms/assortativity/correlation.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/assortativity/correlation.py
+++ networkx-2.4/networkx/algorithms/assortativity/correlation.py
@@ -132,9 +132,9 @@ def degree_pearson_correlation_coefficie
"""
try:
import scipy.stats as stats
- except ImportError:
- raise ImportError(
- "Assortativity requires SciPy: http://scipy.org/ ")
+ except ImportError as e:
+ raise ImportError("Assortativity requires SciPy:"
+ "http://scipy.org/ ") from e
xy = node_degree_xy(G, x=x, y=y, nodes=nodes, weight=weight)
x, y = zip(*xy)
return stats.pearsonr(x, y)[0]
@@ -254,9 +254,9 @@ def attribute_ac(M):
"""
try:
import numpy
- except ImportError:
- raise ImportError(
- "attribute_assortativity requires NumPy: http://scipy.org/ ")
+ except ImportError as e:
+ raise ImportError('attribute_assortativity requires '
+ 'NumPy: http://scipy.org/') from e
if M.sum() != 1.0:
M = M / float(M.sum())
M = numpy.asmatrix(M)
@@ -271,9 +271,9 @@ def numeric_ac(M):
# numeric assortativity coefficient, pearsonr
try:
import numpy
- except ImportError:
- raise ImportError('numeric_assortativity requires ',
- 'NumPy: http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('numeric_assortativity requires '
+ 'NumPy: http://scipy.org/') from e
if M.sum() != 1.0:
M = M / float(M.sum())
nx, ny = M.shape # nx=ny
Index: networkx-2.4/networkx/algorithms/bipartite/cluster.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/bipartite/cluster.py
+++ networkx-2.4/networkx/algorithms/bipartite/cluster.py
@@ -115,9 +115,9 @@ def latapy_clustering(G, nodes=None, mod
try:
cc_func = modes[mode]
- except KeyError:
+ except KeyError as e:
raise nx.NetworkXError(
- "Mode for bipartite clustering must be: dot, min or max")
+ "Mode for bipartite clustering must be: dot, min or max") from e
if nodes is None:
nodes = G
Index: networkx-2.4/networkx/algorithms/bipartite/edgelist.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/bipartite/edgelist.py
+++ networkx-2.4/networkx/algorithms/bipartite/edgelist.py
@@ -139,8 +139,8 @@ def generate_edgelist(G, delimiter=' ',
"""
try:
part0 = [n for n, d in G.nodes.items() if d['bipartite'] == 0]
- except:
- raise AttributeError("Missing node attribute `bipartite`")
+ except BaseException as e:
+ raise AttributeError("Missing node attribute `bipartite`") from e
if data is True or data is False:
for n in part0:
for e in G.edges(n, data=data):
@@ -242,9 +242,9 @@ def parse_edgelist(lines, comments='#',
try:
u = nodetype(u)
v = nodetype(v)
- except:
+ except BaseException as e:
raise TypeError("Failed to convert nodes %s,%s to type %s."
- % (u, v, nodetype))
+ % (u, v, nodetype)) from e
if len(d) == 0 or data is False:
# no data or data type specified
@@ -253,9 +253,9 @@ def parse_edgelist(lines, comments='#',
# no edge types specified
try: # try to evaluate as dictionary
edgedata = dict(literal_eval(' '.join(d)))
- except:
- raise TypeError(
- "Failed to convert edge data (%s) to dictionary." % (d))
+ except BaseException as e:
+ raise TypeError("Failed to convert edge data"
+ " (%s) to dictionary." % (d)) from e
else:
# convert edge data to dictionary with specified keys and type
if len(d) != len(data):
@@ -266,10 +266,10 @@ def parse_edgelist(lines, comments='#',
for (edge_key, edge_type), edge_value in zip(data, d):
try:
edge_value = edge_type(edge_value)
- except:
+ except BaseException as e:
raise TypeError(
"Failed to convert %s data %s to type %s."
- % (edge_key, edge_value, edge_type))
+ % (edge_key, edge_value, edge_type)) from e
edgedata.update({edge_key: edge_value})
G.add_node(u, bipartite=0)
G.add_node(v, bipartite=1)
Index: networkx-2.4/networkx/algorithms/bipartite/matching.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/bipartite/matching.py
+++ networkx-2.4/networkx/algorithms/bipartite/matching.py
@@ -555,9 +555,9 @@ def minimum_weight_full_matching(G, top_
"""
try:
import scipy.optimize
- except ImportError:
+ except ImportError as e:
raise ImportError('minimum_weight_full_matching requires SciPy: ' +
- 'https://scipy.org/')
+ 'https://scipy.org/') from e
left, right = nx.bipartite.sets(G, top_nodes)
# Ensure that the graph is complete. This is currently a requirement in
# the underlying optimization algorithm from SciPy, but the constraint
Index: networkx-2.4/networkx/algorithms/bipartite/matrix.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/bipartite/matrix.py
+++ networkx-2.4/networkx/algorithms/bipartite/matrix.py
@@ -109,8 +109,9 @@ def biadjacency_matrix(G, row_order, col
return M.asformat(format)
# From Scipy 1.1.0, asformat will throw a ValueError instead of an
# AttributeError if the format if not recognized.
- except (AttributeError, ValueError):
- raise nx.NetworkXError("Unknown sparse matrix format: %s" % format)
+ except (AttributeError, ValueError) as e:
+ raise nx.NetworkXError(
+ "Unknown sparse matrix format: %s" % format) from e
def from_biadjacency_matrix(A, create_using=None, edge_attribute='weight'):
Index: networkx-2.4/networkx/algorithms/bipartite/spectral.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/bipartite/spectral.py
+++ networkx-2.4/networkx/algorithms/bipartite/spectral.py
@@ -56,9 +56,9 @@ def spectral_bipartivity(G, nodes=None,
"""
try:
import scipy.linalg
- except ImportError:
+ except ImportError as e:
raise ImportError('spectral_bipartivity() requires SciPy: ',
- 'http://scipy.org/')
+ 'http://scipy.org/') from e
nodelist = list(G) # ordering of nodes in matrix
A = nx.to_numpy_matrix(G, nodelist, weight=weight)
expA = scipy.linalg.expm(A)
Index: networkx-2.4/networkx/algorithms/centrality/current_flow_betweenness.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/centrality/current_flow_betweenness.py
+++ networkx-2.4/networkx/algorithms/centrality/current_flow_betweenness.py
@@ -90,15 +90,15 @@ def approximate_current_flow_betweenness
"""
try:
import numpy as np
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires NumPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires NumPy '
+ 'http://scipy.org/') from e
try:
from scipy import sparse
from scipy.sparse import linalg
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires SciPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires SciPy '
+ 'http://scipy.org/') from e
if not nx.is_connected(G):
raise nx.NetworkXError("Graph not connected.")
solvername = {"full": FullInverseLaplacian,
@@ -214,14 +214,14 @@ def current_flow_betweenness_centrality(
"""
try:
import numpy as np
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires NumPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires NumPy '
+ 'http://scipy.org/') from e
try:
import scipy
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires SciPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires SciPy '
+ 'http://scipy.org/') from e
if not nx.is_connected(G):
raise nx.NetworkXError("Graph not connected.")
n = G.number_of_nodes()
@@ -326,14 +326,14 @@ def edge_current_flow_betweenness_centra
from networkx.utils import reverse_cuthill_mckee_ordering
try:
import numpy as np
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires NumPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires NumPy '
+ 'http://scipy.org/') from e
try:
import scipy
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires SciPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires SciPy '
+ 'http://scipy.org/') from e
if not nx.is_connected(G):
raise nx.NetworkXError("Graph not connected.")
n = G.number_of_nodes()
Index: networkx-2.4/networkx/algorithms/centrality/current_flow_betweenness_subset.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/centrality/current_flow_betweenness_subset.py
+++ networkx-2.4/networkx/algorithms/centrality/current_flow_betweenness_subset.py
@@ -99,14 +99,14 @@ def current_flow_betweenness_centrality_
from networkx.utils import reverse_cuthill_mckee_ordering
try:
import numpy as np
- except ImportError:
+ except ImportError as e:
raise ImportError('current_flow_betweenness_centrality requires NumPy ',
- 'http://scipy.org/')
+ 'http://scipy.org/') from e
try:
import scipy
- except ImportError:
+ except ImportError as e:
raise ImportError('current_flow_betweenness_centrality requires SciPy ',
- 'http://scipy.org/')
+ 'http://scipy.org/') from e
if not nx.is_connected(G):
raise nx.NetworkXError("Graph not connected.")
n = G.number_of_nodes()
@@ -214,14 +214,14 @@ def edge_current_flow_betweenness_centra
"""
try:
import numpy as np
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires NumPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires NumPy '
+ 'http://scipy.org/') from e
try:
import scipy
- except ImportError:
- raise ImportError('current_flow_betweenness_centrality requires SciPy ',
- 'http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('current_flow_betweenness_centrality requires SciPy '
+ 'http://scipy.org/') from e
if not nx.is_connected(G):
raise nx.NetworkXError("Graph not connected.")
n = G.number_of_nodes()
Index: networkx-2.4/networkx/algorithms/centrality/katz.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/centrality/katz.py
+++ networkx-2.4/networkx/algorithms/centrality/katz.py
@@ -160,11 +160,11 @@ def katz_centrality(G, alpha=0.1, beta=1
try:
b = dict.fromkeys(G, float(beta))
- except (TypeError, ValueError, AttributeError):
+ except (TypeError, ValueError, AttributeError) as e:
b = beta
if set(beta) != set(G):
raise nx.NetworkXError('beta dictionary '
- 'must have a value for every node')
+ 'must have a value for every node') from e
# make up to max_iter iterations
for i in range(max_iter):
@@ -308,8 +308,8 @@ def katz_centrality_numpy(G, alpha=0.1,
"""
try:
import numpy as np
- except ImportError:
- raise ImportError('Requires NumPy: http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('Requires NumPy: http://numpy.org/') from e
if len(G) == 0:
return {}
try:
@@ -322,8 +322,8 @@ def katz_centrality_numpy(G, alpha=0.1,
nodelist = list(G)
try:
b = np.ones((len(nodelist), 1)) * float(beta)
- except (TypeError, ValueError, AttributeError):
- raise nx.NetworkXError('beta must be a number')
+ except (TypeError, ValueError, AttributeError) as e:
+ raise nx.NetworkXError('beta must be a number') from e
A = nx.adj_matrix(G, nodelist=nodelist, weight=weight).todense().T
n = A.shape[0]
Index: networkx-2.4/networkx/algorithms/centrality/second_order.py
===================================================================
--- networkx-2.4.orig/networkx/algorithms/centrality/second_order.py
+++ networkx-2.4/networkx/algorithms/centrality/second_order.py
@@ -99,8 +99,8 @@ def second_order_centrality(G):
try:
import numpy as np
- except ImportError:
- raise ImportError('Requires NumPy: http://scipy.org/')
+ except ImportError as e:
+ raise ImportError('Requires NumPy: http://numpy.org/') from e
n = len(G)
Index: networkx-2.4/networkx/drawing/tests/test_pylab.py
===================================================================
--- networkx-2.4.orig/networkx/drawing/tests/test_pylab.py
+++ networkx-2.4/networkx/drawing/tests/test_pylab.py
@@ -4,7 +4,7 @@ import itertools
import pytest
mpl = pytest.importorskip('matplotlib')
-mpl.use('PS', warn=False)
+mpl.use('PS')
plt = pytest.importorskip('matplotlib.pyplot')
plt.rcParams['text.usetex'] = False
1
0
Hello community,
here is the log from the commit of package python-xmlschema for openSUSE:Factory checked in at 2020-08-01 12:29:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xmlschema (Old)
and /work/SRC/openSUSE:Factory/.python-xmlschema.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xmlschema"
Sat Aug 1 12:29:35 2020 rev:8 rq:822102 version:1.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xmlschema/python-xmlschema.changes 2020-06-21 19:06:54.305104127 +0200
+++ /work/SRC/openSUSE:Factory/.python-xmlschema.new.3592/python-xmlschema.changes 2020-08-01 12:29:49.930381209 +0200
@@ -1,0 +2,12 @@
+Tue Jul 21 11:50:05 UTC 2020 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- Update to version 1.2.2
+ * Fix XPath context for schema nodes
+ * Fix XPath parser and context for identities
+ * Fix content type classification (issue #195)
+ * Make sandbox mode more explicit (PR #191)
+ * Allow alphanumeric prefixes for the base converter
+ * Fix XPath issues with default namespace
+ * Fix W3C tests on XSD identities
+
+-------------------------------------------------------------------
Old:
----
xmlschema-1.2.0.tar.gz
New:
----
xmlschema-1.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-xmlschema.spec ++++++
--- /var/tmp/diff_new_pack.J0Kn6K/_old 2020-08-01 12:29:54.434385426 +0200
+++ /var/tmp/diff_new_pack.J0Kn6K/_new 2020-08-01 12:29:54.438385430 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-xmlschema
-Version: 1.2.0
+Version: 1.2.2
Release: 0
Summary: An XML Schema validator and decoder
License: MIT
++++++ xmlschema-1.2.0.tar.gz -> xmlschema-1.2.2.tar.gz ++++++
++++ 4474 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-xonsh for openSUSE:Factory checked in at 2020-08-01 12:29:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xonsh (Old)
and /work/SRC/openSUSE:Factory/.python-xonsh.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xonsh"
Sat Aug 1 12:29:16 2020 rev:6 rq:822101 version:0.9.18
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xonsh/python-xonsh.changes 2020-06-26 21:44:41.813687705 +0200
+++ /work/SRC/openSUSE:Factory/.python-xonsh.new.3592/python-xonsh.changes 2020-08-01 12:29:36.106368267 +0200
@@ -1,0 +2,9 @@
+Tue Jul 21 11:38:00 UTC 2020 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- update to 0.9.18
+ * Support package prompt-toolkit V3 as well as V2 in prompt_toolkit shell.
+ * $SHELL_TYPE "prompt_toolkit" with any suffix creates the "prompt_toolkit"
+ shell, requires package prompt-toolkit >= 2.0
+ * minor changes and fixes
+
+-------------------------------------------------------------------
@@ -16 +25 @@
-- Update to 0.9.1&:
+- Update to 0.9.17:
Old:
----
xonsh-0.9.17.tar.gz
New:
----
xonsh-0.9.18.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-xonsh.spec ++++++
--- /var/tmp/diff_new_pack.D9HgLD/_old 2020-08-01 12:29:39.418371367 +0200
+++ /var/tmp/diff_new_pack.D9HgLD/_new 2020-08-01 12:29:39.422371371 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-xonsh
-Version: 0.9.17
+Version: 0.9.18
Release: 0
Summary: Python-powered, cross-platform, Unix-gazing shell
License: BSD-2-Clause
@@ -27,7 +27,7 @@
Source: https://files.pythonhosted.org/packages/source/x/xonsh/xonsh-%{version}.tar…
BuildRequires: %{python_module distro}
BuildRequires: %{python_module importlib_resources}
-BuildRequires: %{python_module prompt_toolkit}
+BuildRequires: %{python_module prompt_toolkit >= 2.0}
BuildRequires: %{python_module pygments >= 2.2}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setproctitle}
@@ -40,7 +40,7 @@
Requires: python
Requires: python-distro
Requires: python-importlib_resources
-Requires: python-prompt_toolkit
+Requires: python-prompt_toolkit >= 2.0
Requires: python-pygments >= 2.2
Requires: python-setproctitle
Requires(post): update-alternatives
++++++ xonsh-0.9.17.tar.gz -> xonsh-0.9.18.tar.gz ++++++
++++ 4970 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-zope.component for openSUSE:Factory checked in at 2020-08-01 12:29:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zope.component (Old)
and /work/SRC/openSUSE:Factory/.python-zope.component.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zope.component"
Sat Aug 1 12:29:06 2020 rev:9 rq:822053 version:4.6.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zope.component/python-zope.component.changes 2020-04-07 10:21:18.389828140 +0200
+++ /work/SRC/openSUSE:Factory/.python-zope.component.new.3592/python-zope.component.changes 2020-08-01 12:29:20.694353837 +0200
@@ -1,0 +2,6 @@
+Tue Jul 21 09:07:11 UTC 2020 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- update to version 4.6.2
+ * Improve the documentation, both published and in docstrings.
+
+-------------------------------------------------------------------
Old:
----
zope.component-4.6.1.tar.gz
New:
----
zope.component-4.6.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-zope.component.spec ++++++
--- /var/tmp/diff_new_pack.NI3IDi/_old 2020-08-01 12:29:26.322359106 +0200
+++ /var/tmp/diff_new_pack.NI3IDi/_new 2020-08-01 12:29:26.326359110 +0200
@@ -27,7 +27,7 @@
%bcond_with test
%endif
Name: python-zope.component%{psuffix}
-Version: 4.6.1
+Version: 4.6.2
Release: 0
Summary: Zope Component Architecture
++++++ zope.component-4.6.1.tar.gz -> zope.component-4.6.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/CHANGES.rst new/zope.component-4.6.2/CHANGES.rst
--- old/zope.component-4.6.1/CHANGES.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/CHANGES.rst 2020-07-03 17:25:02.000000000 +0200
@@ -2,6 +2,13 @@
Changes
=========
+4.6.2 (2020-07-03)
+==================
+
+- Improve the documentation, both published and in docstrings. See `PR
+ 49 <https://github.com/zopefoundation/zope.component/pull/49>`_.
+
+
4.6.1 (2020-03-23)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/PKG-INFO new/zope.component-4.6.2/PKG-INFO
--- old/zope.component-4.6.1/PKG-INFO 2020-03-23 14:02:45.246509000 +0100
+++ new/zope.component-4.6.2/PKG-INFO 2020-07-03 17:25:03.111320700 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.component
-Version: 4.6.1
+Version: 4.6.2
Summary: Zope Component Architecture
Home-page: https://github.com/zopefoundation/zope.component
Author: Zope Foundation and Contributors
@@ -45,6 +45,13 @@
Changes
=========
+ 4.6.2 (2020-07-03)
+ ==================
+
+ - Improve the documentation, both published and in docstrings. See `PR
+ 49 <https://github.com/zopefoundation/zope.component/pull/49>`_.
+
+
4.6.1 (2020-03-23)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/api/adapter.rst new/zope.component-4.6.2/docs/api/adapter.rst
--- old/zope.component-4.6.1/docs/api/adapter.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/docs/api/adapter.rst 2020-07-03 17:25:02.000000000 +0200
@@ -1,15 +1,24 @@
-Adapter Registration APIs
-=========================
+===========================
+ Adapter Registration APIs
+===========================
+
+This document covers a specific subset of the APIs in :mod:`zope.component`.
+
+.. currentmodule:: zope.component
.. testsetup::
from zope.component.testing import setUp
setUp()
-.. autofunction:: zope.component.provideUtility
+.. autofunction:: zope.component.provideAdapter
+
+.. autofunction:: zope.component.provideHandler
+
+.. autofunction:: zope.component.provideSubscriptionAdapter
Conforming Adapter Lookup
--------------------------
+=========================
.. autofunction:: zope.component.getAdapterInContext
@@ -21,7 +30,7 @@
If so, the object is returned immediately. Otherwise, the adapter factory
is looked up in the site manager, and called.
-Let's start by creating a component that supports the `__conform__()` method:
+Let's start by creating a component that supports the ``__conform__()`` method:
.. doctest::
@@ -39,14 +48,14 @@
to use in these tests.
We now have to create a site manager (other than the default global one)
-with which we can register adapters for `I1`.
+with which we can register adapters for ``I1``.
.. doctest::
>>> from zope.component.globalregistry import BaseGlobalComponents
>>> sitemanager = BaseGlobalComponents()
-Now we create a new `context` that knows how to get to our custom site
+Now we create a new ``context`` that knows how to get to our custom site
manager.
.. doctest::
@@ -111,7 +120,7 @@
43
Named Adapter Lookup
---------------------
+====================
.. autofunction:: zope.component.getAdapter
@@ -141,7 +150,7 @@
>>> queryAdapter(ob, I2, '', '<default>')
'<default>'
-The 'requires' argument to `registerAdapter` must be a sequence, rather than
+The 'requires' argument to ``registerAdapter`` must be a sequence, rather than
a single interface:
.. doctest::
@@ -154,7 +163,7 @@
...
TypeError: the required argument should be a list of interfaces, not a single interface
-After register an adapter from `I1` to `I2` with the global site manager:
+After register an adapter from ``I1`` to ``I2`` with the global site manager:
.. doctest::
@@ -208,10 +217,10 @@
True
Invoking an Interface to Perform Adapter Lookup
------------------------------------------------
+===============================================
:mod:`zope.component` registers an adapter hook with
-:mod:`zope.interface.interface`, allowing a convenient spelling for
+`zope.interface.interface.adapter_hooks`, allowing a convenient spelling for
adapter lookup: just "call" the interface, passing the context:
.. doctest::
@@ -241,10 +250,10 @@
True
Registering Adapters For Arbitrary Objects
-------------------------------------------
+==========================================
Providing an adapter for None says that your adapter can adapt anything
-to `I2`.
+to ``I2``.
.. doctest::
@@ -267,7 +276,7 @@
True
Looking Up Adapters Using Multiple Objects
-------------------------------------------
+==========================================
.. autofunction:: zope.component.getMultiAdapter
@@ -284,7 +293,7 @@
As with regular adapters, if an adapter isn't registered for the given
objects and interface, the :func:`~zope.component.getMultiAdapter` API
-raises `ComponentLookupError`:
+raises `zope.interface.interfaces.ComponentLookupError`:
.. doctest::
@@ -342,7 +351,7 @@
Finding More Than One Adapter
------------------------------
+=============================
.. autofunction:: zope.component.getAdapters
@@ -388,17 +397,17 @@
Subscription Adapters
----------------------
+=====================
.. autofunction:: zope.component.subscribers
Event handlers
---------------
+==============
.. autofunction:: zope.component.handle
Helpers for Declaring / Testing Adapters
-----------------------------------------
+========================================
.. autofunction:: zope.component.adapter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/api/hooks.rst new/zope.component-4.6.2/docs/api/hooks.rst
--- old/zope.component-4.6.1/docs/api/hooks.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/zope.component-4.6.2/docs/api/hooks.rst 2020-07-03 17:25:02.000000000 +0200
@@ -0,0 +1,8 @@
+==========================================================
+ ``zope.component.hooks``: The current component registry
+==========================================================
+
+.. seealso:: :doc:`../hooks` for narrative documentation and examples.
+
+.. automodule:: zope.component.hooks
+ :noindex:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/api/module.rst new/zope.component-4.6.2/docs/api/module.rst
--- old/zope.component-4.6.1/docs/api/module.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/zope.component-4.6.2/docs/api/module.rst 2020-07-03 17:25:02.000000000 +0200
@@ -0,0 +1,12 @@
+============================================
+ ``zope.component``: Module-level functions
+============================================
+
+This document provides a summary of the APIs available directly from
+``zope.component``. For more details, see the remaining documentation.
+
+.. These are generally explored in more detail in
+ specific documentation, so default indexing should go
+ to that instead of here.
+.. automodule:: zope.component
+ :noindex:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/api/utility.rst new/zope.component-4.6.2/docs/api/utility.rst
--- old/zope.component-4.6.1/docs/api/utility.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/docs/api/utility.rst 2020-07-03 17:25:02.000000000 +0200
@@ -1,5 +1,8 @@
-Utility Registration APIs
-=========================
+===========================
+ Utility Registration APIs
+===========================
+
+.. autofunction:: zope.component.provideUtility
.. autofunction:: zope.component.getUtility
@@ -56,7 +59,7 @@
Named Utilities
----------------
+===============
Registering a utility without a name does not mean that it is available
when looking for the utility with a name:
@@ -84,7 +87,7 @@
True
Querying Multiple Utilities
----------------------------
+===========================
.. autofunction:: zope.component.getUtilitiesFor
@@ -159,7 +162,7 @@
Delegated Utility Lookup
-------------------------
+========================
.. autofunction:: zope.component.getNextUtility
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/api.rst new/zope.component-4.6.2/docs/api.rst
--- old/zope.component-4.6.1/docs/api.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/docs/api.rst 2020-07-03 17:25:02.000000000 +0200
@@ -1,10 +1,12 @@
-:mod:`zope.component` API Reference
-===================================
+=====================================
+ ``zope.component`` API Reference
+=====================================
.. toctree::
:maxdepth: 2
+ api/module
api/interfaces
api/sitemanager
api/utility
@@ -13,3 +15,4 @@
api/interface
api/security
api/persistent
+ api/hooks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/changelog.rst new/zope.component-4.6.2/docs/changelog.rst
--- old/zope.component-4.6.1/docs/changelog.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/zope.component-4.6.2/docs/changelog.rst 2020-07-03 17:25:02.000000000 +0200
@@ -0,0 +1 @@
+.. include:: ../CHANGES.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/hooks.rst new/zope.component-4.6.2/docs/hooks.rst
--- old/zope.component-4.6.1/docs/hooks.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/docs/hooks.rst 2020-07-03 17:25:02.000000000 +0200
@@ -74,6 +74,39 @@
>>> getSiteManager() is site2.registry
True
+However, the default `zope.component.getSiteManager` function isn't
+yet aware of this:
+
+.. doctest::
+
+ >>> from zope.component import getSiteManager as global_getSiteManager
+ >>> global_getSiteManager()
+ <BaseGlobalComponents base>
+
+To integrate that with the notion of the current site, we need to call ``setHooks``:
+
+.. autofunction:: setHooks
+
+.. doctest::
+
+ >>> from zope.component.hooks import setHooks
+ >>> setHooks()
+ >>> getSiteManager() is site2.registry
+ True
+ >>> global_getSiteManager() is site2.registry
+ True
+
+This can be reversed using ``resetHooks``:
+
+.. autofunction:: resetHooks
+
+.. doctest::
+
+ >>> from zope.component.hooks import resetHooks
+ >>> resetHooks()
+ >>> global_getSiteManager()
+ <BaseGlobalComponents base>
+
Finally we can unset the site and the global component registry is used again:
.. doctest::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/index.rst new/zope.component-4.6.2/docs/index.rst
--- old/zope.component-4.6.1/docs/index.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/docs/index.rst 2020-07-03 17:25:02.000000000 +0200
@@ -4,6 +4,11 @@
Contents:
.. toctree::
+ :maxdepth: 1
+
+ changelog
+
+.. toctree::
:maxdepth: 2
narr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/docs/testlayer.rst new/zope.component-4.6.2/docs/testlayer.rst
--- old/zope.component-4.6.1/docs/testlayer.rst 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/docs/testlayer.rst 2020-07-03 17:25:02.000000000 +0200
@@ -4,6 +4,8 @@
.. currentmodule:: zope.component.testlayer
+.. module:: zope.component.testlayer
+
``zope.component.testlayer`` defines two things:
* a `LayerBase` that makes it easier and saner to use zope.testing's
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/setup.py new/zope.component-4.6.2/setup.py
--- old/zope.component-4.6.1/setup.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/setup.py 2020-07-03 17:25:02.000000000 +0200
@@ -62,7 +62,7 @@
setup(
name='zope.component',
- version='4.6.1',
+ version='4.6.2',
url='https://github.com/zopefoundation/zope.component',
license='ZPL 2.1',
description='Zope Component Architecture',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope/component/__init__.py new/zope.component-4.6.2/src/zope/component/__init__.py
--- old/zope.component-4.6.1/src/zope/component/__init__.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/src/zope/component/__init__.py 2020-07-03 17:25:02.000000000 +0200
@@ -11,7 +11,16 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Zope 3 Component Architecture
+"""
+Zope 3 Component Architecture
+
+This module provides an implementation of
+:class:`~zope.component.interfaces.IComponentArchitecture`, using the
+current :mod:`site <zope.component.hooks>`.
+
+This module also provides an implementation of
+:class:`~zope.component.interfaces.IComponentRegistrationConvenience`
+using the `global site manager <getGlobalSiteManager>`_.
"""
from zope.interface import Interface
from zope.interface import implementedBy
@@ -58,4 +67,9 @@
from zope.component._declaration import adapts
moduleProvides(IComponentArchitecture, IComponentRegistrationConvenience)
-__all__ = tuple(IComponentArchitecture)
+__all__ = tuple(IComponentArchitecture) + tuple(IComponentRegistrationConvenience) + (
+ 'named',
+ 'adapts',
+ 'adapter',
+ 'adaptedBy',
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope/component/_api.py new/zope.component-4.6.2/src/zope/component/_api.py
--- old/zope.component-4.6.1/src/zope/component/_api.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/src/zope/component/_api.py 2020-07-03 17:25:02.000000000 +0200
@@ -21,12 +21,15 @@
from zope.interface.interfaces import IComponentLookup
from zope.component.interfaces import IFactory
+from zope.component.interfaces import inherits_arch_docs as inherits_docs
+
# getSiteManager() returns a component registry. Although the term
# "site manager" is deprecated in favor of "component registry",
# the old term is kept around to maintain a stable API.
base = None
@hookable
+@inherits_docs
def getSiteManager(context=None):
""" See IComponentArchitecture.
"""
@@ -44,13 +47,14 @@
raise ComponentLookupError(*error.args)
# Adapter API
-
+@inherits_docs
def getAdapterInContext(object, interface, context):
adapter = queryAdapterInContext(object, interface, context)
if adapter is None:
raise ComponentLookupError(object, interface)
return adapter
+@inherits_docs
def queryAdapterInContext(object, interface, context, default=None):
conform = getattr(object, '__conform__', None)
if conform is not None:
@@ -78,12 +82,14 @@
return getSiteManager(context).queryAdapter(object, interface, '', default)
+@inherits_docs
def getAdapter(object, interface=Interface, name=u'', context=None):
adapter = queryAdapter(object, interface, name, None, context)
if adapter is None:
raise ComponentLookupError(object, interface, name)
return adapter
+@inherits_docs
def queryAdapter(object, interface=Interface, name=u'', default=None,
context=None):
if context is None:
@@ -91,12 +97,14 @@
return getSiteManager(context).queryAdapter(object, interface, name,
default)
+@inherits_docs
def getMultiAdapter(objects, interface=Interface, name=u'', context=None):
adapter = queryMultiAdapter(objects, interface, name, context=context)
if adapter is None:
raise ComponentLookupError(objects, interface, name)
return adapter
+@inherits_docs
def queryMultiAdapter(objects, interface=Interface, name=u'', default=None,
context=None):
try:
@@ -107,6 +115,7 @@
return sitemanager.queryMultiAdapter(objects, interface, name, default)
+@inherits_docs
def getAdapters(objects, provided, context=None):
try:
sitemanager = getSiteManager(context)
@@ -115,6 +124,7 @@
return []
return sitemanager.getAdapters(objects, provided)
+@inherits_docs
def subscribers(objects, interface, context=None):
try:
sitemanager = getSiteManager(context)
@@ -123,6 +133,7 @@
return []
return sitemanager.subscribers(objects, interface)
+@inherits_docs
def handle(*objects):
getSiteManager(None).subscribers(objects, None)
@@ -146,26 +157,29 @@
# Utility API
-
+@inherits_docs
def getUtility(interface, name='', context=None):
utility = queryUtility(interface, name, context=context)
if utility is not None:
return utility
raise ComponentLookupError(interface, name)
+@inherits_docs
def queryUtility(interface, name='', default=None, context=None):
return getSiteManager(context).queryUtility(interface, name, default)
+@inherits_docs
def getUtilitiesFor(interface, context=None):
return getSiteManager(context).getUtilitiesFor(interface)
-
+@inherits_docs
def getAllUtilitiesRegisteredFor(interface, context=None):
return getSiteManager(context).getAllUtilitiesRegisteredFor(interface)
_marker = object()
+@inherits_docs
def queryNextUtility(context, interface, name='', default=None):
"""Query for the next available utility.
@@ -184,7 +198,7 @@
return util
return default
-
+@inherits_docs
def getNextUtility(context, interface, name=''):
"""Get the next available utility.
@@ -200,6 +214,7 @@
# Factories
+@inherits_docs
def createObject(__factory_name, *args, **kwargs):
"""Invoke the named factory and return the result.
@@ -208,6 +223,7 @@
context = kwargs.pop('context', None)
return getUtility(IFactory, __factory_name, context)(*args, **kwargs)
+@inherits_docs
def getFactoryInterfaces(name, context=None):
"""Return the interface provided by the named factory's objects
@@ -215,6 +231,7 @@
"""
return getUtility(IFactory, name, context).getInterfaces()
+@inherits_docs
def getFactoriesFor(interface, context=None):
"""Return info on all factories implementing the given interface.
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope/component/_declaration.py new/zope.component-4.6.2/src/zope/component/_declaration.py
--- old/zope.component-4.6.1/src/zope/component/_declaration.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/src/zope/component/_declaration.py 2020-07-03 17:25:02.000000000 +0200
@@ -18,7 +18,13 @@
from zope.component._compat import CLASS_TYPES
class adapter(object):
-
+ """
+ Decorator that declares that the decorated object adapts the given
+ *interfaces*.
+
+ This is commonly used in conjunction with :obj:`zope.interface.implementer`
+ to declare what adapting the *interfaces* will provide.
+ """
def __init__(self, *interfaces):
self.interfaces = interfaces
@@ -44,6 +50,9 @@
locals['__component_adapts__'] = _adapts_descr(interfaces)
def adaptedBy(ob):
+ """
+ Return the *interfaces* that *ob* will adapt, as declared by :obj:`adapter`.
+ """
return getattr(ob, '__component_adapts__', None)
def getName(ob):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope/component/globalregistry.py new/zope.component-4.6.2/src/zope/component/globalregistry.py
--- old/zope.component-4.6.1/src/zope/component/globalregistry.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/src/zope/component/globalregistry.py 2020-07-03 17:25:02.000000000 +0200
@@ -13,11 +13,11 @@
##############################################################################
"""Global components support
"""
-from zope.interface import implementer
from zope.interface.adapter import AdapterRegistry
from zope.interface.registry import Components
-from zope.interface.interfaces import IComponentLookup
+from zope.component.interfaces import inherits_arch_docs
+from zope.component.interfaces import inherits_reg_docs
def GAR(components, registryName):
@@ -59,6 +59,7 @@
del addCleanUp
globalSiteManager = base
+@inherits_arch_docs
def getGlobalSiteManager():
return globalSiteManager
@@ -66,14 +67,18 @@
# We eventually want to deprecate these in favor of using the global
# component registry directly.
+@inherits_reg_docs
def provideUtility(component, provides=None, name=u''):
base.registerUtility(component, provides, name, event=False)
+@inherits_reg_docs
def provideAdapter(factory, adapts=None, provides=None, name=u''):
base.registerAdapter(factory, adapts, provides, name, event=False)
+@inherits_reg_docs
def provideSubscriptionAdapter(factory, adapts=None, provides=None):
base.registerSubscriptionAdapter(factory, adapts, provides, event=False)
+@inherits_reg_docs
def provideHandler(factory, adapts=None):
base.registerHandler(factory, adapts, event=False)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope/component/hooks.py new/zope.component-4.6.2/src/zope/component/hooks.py
--- old/zope.component-4.6.1/src/zope/component/hooks.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/src/zope/component/hooks.py 2020-07-03 17:25:02.000000000 +0200
@@ -30,6 +30,14 @@
from zope.interface.interfaces import ComponentLookupError
from zope.interface.interfaces import IComponentLookup
+__all__ = [
+ 'setSite',
+ 'getSite',
+ 'site',
+ 'getSiteManager',
+ 'setHooks',
+ 'resetHooks',
+]
class read_property(object):
"""Descriptor for property-like computed attributes.
@@ -130,11 +138,32 @@
def setHooks():
+ """
+ Make `zope.component.getSiteManager` and interface adaptation
+ respect the current site.
+
+ Most applications will want to be sure te call this early in their
+ startup sequence. Test code that uses these APIs should also arrange to
+ call this.
+
+ .. seealso:: :mod:`zope.component.testlayer`
+ """
from zope.component import _api
_api.adapter_hook.sethook(adapter_hook)
_api.getSiteManager.sethook(getSiteManager)
def resetHooks():
+ """
+ Reset `zope.component.getSiteManager` and interface adaptation to
+ their original implementations that are unaware of the current
+ site.
+
+ Use caution when calling this; most code will not need to call
+ this. If code using the global API executes following this, it
+ will most likely use the base global component registry instead of
+ a site-specific registry it was expected. This can lead to
+ failures in adaptation and utility lookup.
+ """
# Reset hookable functions to original implementation.
from zope.component import _api
_api.adapter_hook.reset()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope/component/interfaces.py new/zope.component-4.6.2/src/zope/component/interfaces.py
--- old/zope.component-4.6.1/src/zope/component/interfaces.py 2020-03-23 14:02:44.000000000 +0100
+++ new/zope.component-4.6.2/src/zope/component/interfaces.py 2020-07-03 17:25:02.000000000 +0200
@@ -11,7 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
############################################################################
-"""Component and Component Architecture Interfaces
+"""
+Component and Component Architecture Interfaces
+
+The `IComponentArchitecture` and `IComponentRegistrationConvenience` interfaces
+are provided by `zope.component` directly.
"""
from zope.interface import Attribute
from zope.interface import Interface
@@ -380,3 +384,24 @@
created by this factory will implement. If the callable's Implements
instance cannot be created, an empty Implements instance is returned.
"""
+
+
+# Internal helpers
+
+def _inherits_docs(func, iface):
+ doc = iface[func.__name__].__doc__
+ # By adding the ..seealso:: we get a link from our overview page
+ # to the specific narrative place where the function is described, because
+ # our overview page uses :noindex:
+ doc += "\n .. seealso::"
+ doc += "\n Function `~zope.component.%s` for notes, and " % (func.__name__,)
+ doc += "\n `~zope.component.interfaces.%s` for the defining interface." % (iface.__name__,)
+ doc += "\n"
+ func.__doc__ = doc
+ return func
+
+def inherits_arch_docs(func):
+ return _inherits_docs(func, IComponentArchitecture)
+
+def inherits_reg_docs(func):
+ return _inherits_docs(func, IComponentRegistrationConvenience)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope.component.egg-info/PKG-INFO new/zope.component-4.6.2/src/zope.component.egg-info/PKG-INFO
--- old/zope.component-4.6.1/src/zope.component.egg-info/PKG-INFO 2020-03-23 14:02:45.000000000 +0100
+++ new/zope.component-4.6.2/src/zope.component.egg-info/PKG-INFO 2020-07-03 17:25:02.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.component
-Version: 4.6.1
+Version: 4.6.2
Summary: Zope Component Architecture
Home-page: https://github.com/zopefoundation/zope.component
Author: Zope Foundation and Contributors
@@ -45,6 +45,13 @@
Changes
=========
+ 4.6.2 (2020-07-03)
+ ==================
+
+ - Improve the documentation, both published and in docstrings. See `PR
+ 49 <https://github.com/zopefoundation/zope.component/pull/49>`_.
+
+
4.6.1 (2020-03-23)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.component-4.6.1/src/zope.component.egg-info/SOURCES.txt new/zope.component-4.6.2/src/zope.component.egg-info/SOURCES.txt
--- old/zope.component-4.6.1/src/zope.component.egg-info/SOURCES.txt 2020-03-23 14:02:45.000000000 +0100
+++ new/zope.component-4.6.2/src/zope.component.egg-info/SOURCES.txt 2020-07-03 17:25:02.000000000 +0200
@@ -13,6 +13,7 @@
tox.ini
docs/Makefile
docs/api.rst
+docs/changelog.rst
docs/conf.py
docs/configure.rst
docs/event.rst
@@ -29,8 +30,10 @@
docs/_static/.gitignore
docs/api/adapter.rst
docs/api/factory.rst
+docs/api/hooks.rst
docs/api/interface.rst
docs/api/interfaces.rst
+docs/api/module.rst
docs/api/persistent.rst
docs/api/security.rst
docs/api/sitemanager.rst
1
0
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 <mcalabkova(a)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-dev(a)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-dev(a)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
1
0
Hello community,
here is the log from the commit of package python-zope.testrunner for openSUSE:Factory checked in at 2020-08-01 12:28:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zope.testrunner (Old)
and /work/SRC/openSUSE:Factory/.python-zope.testrunner.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zope.testrunner"
Sat Aug 1 12:28:43 2020 rev:13 rq:822035 version:5.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-zope.testrunner/python-zope.testrunner.changes 2019-11-22 10:20:13.817348467 +0100
+++ /work/SRC/openSUSE:Factory/.python-zope.testrunner.new.3592/python-zope.testrunner.changes 2020-08-01 12:28:59.598334087 +0200
@@ -1,0 +2,9 @@
+Tue Jul 21 08:53:11 UTC 2020 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- Update to 5.2
+ * Add support for Python 3.8.
+ * When a layer is run in a subprocess, read its stderr in a thread to avoid
+ a deadlock if its stderr output (containing failing and erroring test IDs)
+ overflows the capacity of a pipe
+
+-------------------------------------------------------------------
Old:
----
zope.testrunner-5.1.tar.gz
New:
----
zope.testrunner-5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-zope.testrunner.spec ++++++
--- /var/tmp/diff_new_pack.ymqfrW/_old 2020-08-01 12:29:02.870337150 +0200
+++ /var/tmp/diff_new_pack.ymqfrW/_new 2020-08-01 12:29:02.874337154 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-zope.testrunner
#
-# 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.testrunner
-Version: 5.1
+Version: 5.2
Release: 0
Summary: Zope testrunner script
License: ZPL-2.1
++++++ zope.testrunner-5.1.tar.gz -> zope.testrunner-5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/.travis.yml new/zope.testrunner-5.2/.travis.yml
--- old/zope.testrunner-5.1/.travis.yml 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/.travis.yml 2020-06-29 10:33:31.000000000 +0200
@@ -3,22 +3,10 @@
- 2.7
- 3.5
- 3.6
+ - 3.7
+ - 3.8
- pypy
- pypy3
-matrix:
- include:
- - python: "3.7"
- dist: xenial
- env: SUBUNIT=true
- - python: "3.7"
- dist: xenial
- env: SUBUNIT=false
- - python: "3.8-dev"
- dist: xenial
- env: SUBUNIT=true
- - python: "3.8-dev"
- dist: xenial
- env: SUBUNIT=false
env:
- SUBUNIT=true
- SUBUNIT=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/CHANGES.rst new/zope.testrunner-5.2/CHANGES.rst
--- old/zope.testrunner-5.1/CHANGES.rst 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/CHANGES.rst 2020-06-29 10:33:31.000000000 +0200
@@ -2,6 +2,17 @@
zope.testrunner Changelog
===========================
+5.2 (2020-06-29)
+================
+
+- Add support for Python 3.8.
+
+- When a layer is run in a subprocess, read its stderr in a thread to avoid
+ a deadlock if its stderr output (containing failing and erroring test IDs)
+ overflows the capacity of a pipe (`#105
+ <https://github.com/zopefoundation/zope.testrunner/issues/105>`_).
+
+
5.1 (2019-10-19)
================
@@ -25,6 +36,7 @@
- Drop support for Python 3.4.
+
4.9.2 (2018-11-24)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/PKG-INFO new/zope.testrunner-5.2/PKG-INFO
--- old/zope.testrunner-5.1/PKG-INFO 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/PKG-INFO 2020-06-29 10:33:32.112758000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.testrunner
-Version: 5.1
+Version: 5.2
Summary: Zope testrunner script.
Home-page: https://github.com/zopefoundation/zope.testrunner
Author: Zope Foundation and Contributors
@@ -186,6 +186,17 @@
zope.testrunner Changelog
===========================
+ 5.2 (2020-06-29)
+ ================
+
+ - Add support for Python 3.8.
+
+ - When a layer is run in a subprocess, read its stderr in a thread to avoid
+ a deadlock if its stderr output (containing failing and erroring test IDs)
+ overflows the capacity of a pipe (`#105
+ <https://github.com/zopefoundation/zope.testrunner/issues/105>`_).
+
+
5.1 (2019-10-19)
================
@@ -209,6 +220,7 @@
- Drop support for Python 3.4.
+
4.9.2 (2018-11-24)
==================
@@ -608,11 +620,12 @@
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
-Provides-Extra: test
-Provides-Extra: subunit
Provides-Extra: docs
+Provides-Extra: subunit
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/appveyor.yml new/zope.testrunner-5.2/appveyor.yml
--- old/zope.testrunner-5.1/appveyor.yml 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/appveyor.yml 2020-06-29 10:33:31.000000000 +0200
@@ -11,6 +11,8 @@
- python: 36-x64
- python: 37
- python: 37-x64
+ - python: 38
+ - python: 38-x64
- { python: 27, SUBUNIT: 1 }
- { python: 27-x64, SUBUNIT: 1 }
- { python: 35, SUBUNIT: 1 }
@@ -19,6 +21,8 @@
- { python: 36-x64, SUBUNIT: 1 }
- { python: 37, SUBUNIT: 1 }
- { python: 37-x64, SUBUNIT: 1 }
+ - { python: 38, SUBUNIT: 1 }
+ - { python: 38-x64, SUBUNIT: 1 }
install:
- "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/setup.py new/zope.testrunner-5.2/setup.py
--- old/zope.testrunner-5.1/setup.py 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/setup.py 2020-06-29 10:33:31.000000000 +0200
@@ -21,7 +21,7 @@
from setuptools import setup
from setuptools.command.test import test
-version = '5.1'
+version = '5.2'
INSTALL_REQUIRES = [
'setuptools',
@@ -152,8 +152,9 @@
"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',
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/src/zope/testrunner/runner.py new/zope.testrunner-5.2/src/zope/testrunner/runner.py
--- old/zope.testrunner-5.1/src/zope/testrunner/runner.py 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope/testrunner/runner.py 2020-06-29 10:33:31.000000000 +0200
@@ -539,6 +539,17 @@
stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd,
close_fds=not sys.platform.startswith('win'))
+ def reader_thread(f, buf):
+ buf.append(f.read())
+
+ # Start reading stderr in a thread. This means we don't hang if the
+ # subprocess writes more to stderr than the pipe capacity.
+ stderr_buf = []
+ stderr_thread = threading.Thread(
+ target=reader_thread, args=(child.stderr, stderr_buf))
+ stderr_thread.daemon = True
+ stderr_thread.start()
+
while True:
try:
while True:
@@ -564,8 +575,9 @@
else:
break
- # Now stderr should be ready to read the whole thing.
- errlines = child.stderr.read().splitlines()
+ # Now we should be able to finish reading stderr.
+ stderr_thread.join()
+ errlines = stderr_buf[0].splitlines()
erriter = iter(errlines)
nfail = nerr = 0
for line in erriter:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
--- old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py 1970-01-01 01:00:00.000000000 +0100
+++ new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py 2020-06-29 10:33:31.000000000 +0200
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# Copyright (c) 2020 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.
+#
+##############################################################################
+"""A large number of sample tests."""
+
+import unittest
+
+
+class Layer1:
+ """A layer that can't be torn down."""
+
+ @classmethod
+ def setUp(self):
+ pass
+
+ @classmethod
+ def tearDown(self):
+ raise NotImplementedError
+
+
+class Layer2:
+
+ @classmethod
+ def setUp(self):
+ pass
+
+ @classmethod
+ def tearDown(self):
+ pass
+
+
+class TestNoTeardown(unittest.TestCase):
+
+ layer = Layer1
+
+ def test_something(self):
+ pass
+
+
+def make_TestMany():
+ attrs = {'layer': Layer2}
+ # Add enough failing test methods to make the concatenation of all their
+ # test IDs (formatted as "test_foo (sampletests_many.TestMany)")
+ # overflow the capacity of a pipe. This is system-dependent, but on
+ # Linux since 2.6.11 it defaults to 65536 bytes, so will overflow by the
+ # time we've written 874 of these test IDs. If the pipe capacity is
+ # much larger than that, then this test might be ineffective.
+ for i in range(1000):
+ attrs['test_some_very_long_test_name_with_padding_%03d' % i] = (
+ lambda self: self.fail())
+ return type('TestMany', (unittest.TestCase,), attrs)
+
+
+TestMany = make_TestMany()
+
+
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(TestNoTeardown))
+ suite.addTest(unittest.makeSuite(TestMany))
+ return suite
+
+
+if __name__ == '__main__':
+ unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-layers-ntd.rst new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-layers-ntd.rst
--- old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-layers-ntd.rst 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-layers-ntd.rst 2020-06-29 10:33:31.000000000 +0200
@@ -268,4 +268,26 @@
>>> sys.stderr = real_stderr
+When a layer is run in a subprocess, the test IDs of any failures and errors it
+generates are passed to the parent process via the child's stderr. The parent
+reads these IDs in parallel with reading other output from the child, so this
+works even if there are enough failures to overflow the capacity of the stderr
+pipe.
+ >>> argv = [testrunner_script, '--tests-pattern', '^sampletests_many$']
+ >>> testrunner.run_internal(defaults, argv)
+ Running sampletests_many.Layer1 tests:
+ Set up sampletests_many.Layer1 in N.NNN seconds.
+ Ran 1 tests with 0 failures, 0 errors and 0 skipped in N.NNN seconds.
+ Running sampletests_many.Layer2 tests:
+ Tear down sampletests_many.Layer1 ... not supported
+ Running in a subprocess.
+ Set up sampletests_many.Layer2 in N.NNN seconds.
+ <BLANKLINE>
+ <BLANKLINE>
+ Failure in test test_some_very_long_test_name_with_padding_000 (sampletests_many.TestMany)
+ ...
+ Ran 1000 tests with 1000 failures, 0 errors and 0 skipped in N.NNN seconds.
+ Tear down sampletests_many.Layer2 in N.NNN seconds.
+ Total: 1001 tests, 1000 failures, 0 errors and 0 skipped in N.NNN seconds.
+ True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/src/zope.testrunner.egg-info/PKG-INFO new/zope.testrunner-5.2/src/zope.testrunner.egg-info/PKG-INFO
--- old/zope.testrunner-5.1/src/zope.testrunner.egg-info/PKG-INFO 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope.testrunner.egg-info/PKG-INFO 2020-06-29 10:33:31.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.testrunner
-Version: 5.1
+Version: 5.2
Summary: Zope testrunner script.
Home-page: https://github.com/zopefoundation/zope.testrunner
Author: Zope Foundation and Contributors
@@ -186,6 +186,17 @@
zope.testrunner Changelog
===========================
+ 5.2 (2020-06-29)
+ ================
+
+ - Add support for Python 3.8.
+
+ - When a layer is run in a subprocess, read its stderr in a thread to avoid
+ a deadlock if its stderr output (containing failing and erroring test IDs)
+ overflows the capacity of a pipe (`#105
+ <https://github.com/zopefoundation/zope.testrunner/issues/105>`_).
+
+
5.1 (2019-10-19)
================
@@ -209,6 +220,7 @@
- Drop support for Python 3.4.
+
4.9.2 (2018-11-24)
==================
@@ -608,11 +620,12 @@
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
-Provides-Extra: test
-Provides-Extra: subunit
Provides-Extra: docs
+Provides-Extra: subunit
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zope.testrunner-5.1/src/zope.testrunner.egg-info/SOURCES.txt new/zope.testrunner-5.2/src/zope.testrunner.egg-info/SOURCES.txt
--- old/zope.testrunner-5.1/src/zope.testrunner.egg-info/SOURCES.txt 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope.testrunner.egg-info/SOURCES.txt 2020-06-29 10:33:31.000000000 +0200
@@ -141,6 +141,7 @@
src/zope/testrunner/tests/testrunner-ex/samplelayers.py
src/zope/testrunner/tests/testrunner-ex/sampletests.rst
src/zope/testrunner/tests/testrunner-ex/sampletests_buffering.py
+src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
src/zope/testrunner/tests/testrunner-ex/sampletestsf.py
src/zope/testrunner/tests/testrunner-ex/sampletestsl.rst
src/zope/testrunner/tests/testrunner-ex/unicode.py
1
0