openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 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
April 2021
- 1 participants
- 3011 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-cheroot for openSUSE:Factory checked in at 2021-04-01 14:15:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cheroot (Old)
and /work/SRC/openSUSE:Factory/.python-cheroot.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cheroot"
Thu Apr 1 14:15:54 2021 rev:15 rq:882365 version:8.5.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cheroot/python-cheroot.changes 2020-06-05 19:58:54.595667993 +0200
+++ /work/SRC/openSUSE:Factory/.python-cheroot.new.2401/python-cheroot.changes 2021-04-01 14:16:02.735872179 +0200
@@ -1,0 +2,79 @@
+Mon Mar 29 17:49:02 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update BuildRequirements for testing:
+ * only remove coverage options from pytest.ini
+ * don't skip tests which had failed 2 years ago
+ (gh#cherrypy/cheroot#200) -- except for two subtests still
+ failing on some platforms presumably because of OBS specific
+ network setups
+ * skip the one test requiring python-jaraco.context in Factory
+ staging so that we do not need that package in Ring1.
+
+-------------------------------------------------------------------
+Fri Mar 19 05:46:04 UTC 2021 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Update to 8.5.2:
+ * :issue:`358` via :pr:`359`: Fixed a regression from
+ :pr:`199` that made the worker threads exit on invalid
+ connection attempts and could make the whole server
+ unresponsive once there was no workers left.
+ *- by :user:`cameronbrunner`.
+ * :cp-issue:`1873` via :pr:`340`: Resurrected an
+ unintentionally removed feature of interrupting a server
+ main thread by externally assigning an exception to the
+ :py:meth:`HTTPServer.interrupt <cheroot.server.\
+ HTTPServer.interrupt>` property *- by :user:`liamstask`.
+ * :pr:`350`: Fixed the incarnation of an earlier regression
+ of not resetting the serving state
+ on :py:data:``SIGINT`` originally fixed by :pr:`322` and
+ :pr:`331` but reintroduced by the changes in :pr:`311`
+ *- by :user:`liamstask`.
+ * :issue:`305` via :pr:`311`: In
+ :py:class:`~cheroot.connections.ConnectionManager`,
+ process connections as they become active rather than
+ waiting for a ``tick`` event, addressing performance
+ degradation introduced in v8.1.0 *- by :user:`liamstask`.
+ * :issue:`341` via :pr:`342`: Suppress legitimate OS errors
+ expected on shutdown *- by :user:`webknjaz`.
+ * :issue:`317` via :pr:`337`: Fixed a regression in
+ 8.4.5 where the connections dictionary would change
+ size during iteration, leading to a :py:exc:`RuntimeError`
+ raised in the logs *- by :user:`liamstask`.
+ * :issue:`328` via :pr:`322` and :pr:`331`: Fixed a
+ regression introduced in the earlier refactoring in v8.4.4
+ via :pr:`309` that caused the :py:meth:`~cheroot.server.\
+ HTTPServer.serve` method to skip setting
+ ``serving=False`` on :py:data:``SIGINT`` and
+ :py:data:``SIGTERM`` *- by :user:`marc1n` and
+ :user:`cristicbz`.
+ * :issue:`312` via :pr:`313`: Fixed a regression introduced
+ in the earlier refactoring in v8.4.4 via :pr:`309` that
+ caused the connection manager to modify the selector map
+ while looping over it *- by :user:`liamstask`.
+ * :issue:`312` via :pr:`316`: Added a regression test for
+ the error handling in :py:meth:`~cheroot.connections.\
+ ConnectionManager.get_conn` to ensure more stability
+ *- by :user:`cyraxjoe`.
+ * :issue:`304` via :pr:`309`: Refactored :py:class:`~\
+ cheroot.connections.ConnectionManager` to use :py:meth:`~\
+ selectors.BaseSelector.get_map` and reorganized the
+ readable connection tracking *- by :user:`liamstask`.
+ * :issue:`304` via :pr:`309`: Fixed the server shutdown
+ sequence to avoid race condition resulting in accepting
+ new connections while it is being terminated
+ *- by :user:`liamstask`.
+ * :pr:`282`: Fixed a race condition happening when an HTTP
+ client attempts to reuse a persistent HTTP connection after
+ it's been discarded on the server in :py:class:`~cheroot.\
+ server.HTTPRequest` but no TCP FIN packet has been received
+ yet over the wire *- by :user:`meaksh`.
+ * Fixed a significant performance regression introduced in
+ v8.1.0 (:issue:`305` via :pr:`308`) * by :user:`mar10`.
+ * Fixed TLS socket related unclosed resource warnings
+ (:pr:`291` and :pr:`298`).
+ * Made terminating keep-alive connections more graceful
+ (:issue:`263` via :pr:`277`).
+- Dropped patches 0001-Avoid-race-condition-on-persistent-HTTP-connections.patch
+ and python383.patch, they are included upstream.
+
+-------------------------------------------------------------------
Old:
----
0001-Avoid-race-condition-on-persistent-HTTP-connections.patch
cheroot-8.3.0.tar.gz
python383.patch
New:
----
cheroot-8.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cheroot.spec ++++++
--- /var/tmp/diff_new_pack.qPn5E2/_old 2021-04-01 14:16:04.087874526 +0200
+++ /var/tmp/diff_new_pack.qPn5E2/_new 2021-04-01 14:16:04.091874532 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-cheroot
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,50 +19,57 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define pypi_name cheroot
%bcond_without python2
+%bcond_with ringdisabled
Name: python-%{pypi_name}
-Version: 8.3.0
+Version: 8.5.2
Release: 0
Summary: Pure-python HTTP server
License: BSD-3-Clause
URL: https://github.com/cherrypy/cheroot
Source: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-…
-# PATCH-FIX_UPSTREAM //github.com/cherrypy/cheroot/pull/282
-Patch1: 0001-Avoid-race-condition-on-persistent-HTTP-connections.patch
-# PATCH-FIX-UPSTREAM pr#280
-Patch2: python383.patch
BuildRequires: %{python_module jaraco.functools}
-BuildRequires: %{python_module jaraco.text >= 3.1}
BuildRequires: %{python_module more-itertools >= 2.6}
-BuildRequires: %{python_module pyOpenSSL}
-BuildRequires: %{python_module pytest >= 4.6}
-BuildRequires: %{python_module pytest-mock >= 1.11.0}
-BuildRequires: %{python_module requests-unixsocket}
-BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools >= 34.4}
BuildRequires: %{python_module setuptools_scm >= 1.15.0}
BuildRequires: %{python_module setuptools_scm_git_archive >= 1.0}
BuildRequires: %{python_module six >= 1.11.0}
-BuildRequires: %{python_module trustme}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+%if %{with python2}
+BuildRequires: python-backports.functools_lru_cache
+BuildRequires: python-selectors2
+%endif
+# SECTION test requirements
+%if ! %{with ringdisabled}
+# This is not in Ring1 for Staging. See check section
+BuildRequires: %{python_module jaraco.context}
+%endif
+BuildRequires: %{python_module jaraco.text >= 3.1}
+BuildRequires: %{python_module portend}
+BuildRequires: %{python_module pyOpenSSL}
+BuildRequires: %{python_module pytest >= 4.6}
+BuildRequires: %{python_module pytest-forked}
+BuildRequires: %{python_module pytest-mock >= 1.11.0}
+BuildRequires: %{python_module pytest-xdist}
+BuildRequires: %{python_module requests-toolbelt}
+BuildRequires: %{python_module requests-unixsocket}
+BuildRequires: %{python_module requests}
+BuildRequires: %{python_module trustme}
+BuildRequires: %{python_module urllib3 >= 1.25}
+# /SECTION
Requires: python-jaraco.functools
Requires: python-more-itertools >= 2.6
Requires: python-six >= 1.11.0
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
# the package and distribution name is lowercase-cheroot,
# but PyPI claims the name is capital-Cheroot
# *smacks head against desk*
Provides: python-Cheroot = %{version}
BuildArch: noarch
-%if %{with python2}
-BuildRequires: python-backports.functools_lru_cache
-%endif
-%ifpython2
-Requires: python-backports.functools_lru_cache
-%endif
%ifpython2
Requires: python-backports.functools_lru_cache
+Requires: python-selectors2
%endif
%python_subpackages
@@ -71,8 +78,8 @@
%prep
%autosetup -n cheroot-%{version} -p1
-# do not require cov/xdist/etc
-rm pytest.ini
+# do not check coverage
+sed -i '/--cov/ d' pytest.ini
%build
%python_build
@@ -83,8 +90,13 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# Exclusions because of gh#cherrypy/cheroot#200
-%pytest -k 'not test_tls_client_auth'
+%if %{with ringdisabled}
+# skip this test file (1 test only) in Factory staging, because we
+# do not want to add python-jaraco.context to Ring1
+pytest_opts="--ignore cheroot/test/test_wsgi.py"
+%endif
+# test_tls_client_auth[...-False-localhost-builtin] fails ocassionally on server-side OBS
+%pytest $pytest_opts -k "not (test_tls_client_auth and False-localhost-builtin)"
%post
%python_install_alternative cheroot
@@ -96,6 +108,7 @@
%license LICENSE.md
%doc README.rst CHANGES.rst
%python_alternative %{_bindir}/cheroot
-%{python_sitelib}/*
+%{python_sitelib}/cheroot
+%{python_sitelib}/cheroot-%{version}*-info
%changelog
++++++ cheroot-8.3.0.tar.gz -> cheroot-8.5.2.tar.gz ++++++
++++ 4979 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-h2 for openSUSE:Factory checked in at 2021-04-01 14:15:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-h2 (Old)
and /work/SRC/openSUSE:Factory/.python-h2.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-h2"
Thu Apr 1 14:15:54 2021 rev:13 rq:882369 version:4.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-h2/python-h2.changes 2020-11-25 19:28:10.358401193 +0100
+++ /work/SRC/openSUSE:Factory/.python-h2.new.2401/python-h2.changes 2021-04-01 14:16:04.271874845 +0200
@@ -1,0 +2,7 @@
+Mon Mar 29 19:50:36 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Add h2-pr1248-disable-hypothesis-healthcheck.patch to disable
+ hypthesis health check failures. Thanks to the Fedora maintainer.
+ gh#python-hyper/h2#1248
+
+-------------------------------------------------------------------
New:
----
h2-pr1248-disable-hypothesis-healthcheck.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-h2.spec ++++++
--- /var/tmp/diff_new_pack.IiKxWz/_old 2021-04-01 14:16:04.935875997 +0200
+++ /var/tmp/diff_new_pack.IiKxWz/_new 2021-04-01 14:16:04.935875997 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-h2
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,9 +25,10 @@
License: MIT
URL: https://github.com/python-hyper/hyper-h2
Source0: https://files.pythonhosted.org/packages/source/h/h2/h2-%{version}.tar.gz
+Patch0: https://github.com/python-hyper/h2/pull/1248.patch#/h2-pr1248-disable-hypot…
BuildRequires: %{python_module hpack >= 2.3}
BuildRequires: %{python_module hyperframe >= 6.0}
-BuildRequires: %{python_module hypothesis}
+BuildRequires: %{python_module hypothesis >= 5.49}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -43,7 +44,7 @@
your programming paradigm.
%prep
-%setup -q -n h2-%{version}
+%autosetup -p1 -n h2-%{version}
%build
%python_build
++++++ h2-pr1248-disable-hypothesis-healthcheck.patch ++++++
From 0646279dab694a89562846c810202ce2c0b49be3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz>
Date: Mon, 8 Mar 2021 19:16:26 +0100
Subject: [PATCH] Workaround the issues with hypothesis 6.6
Hypothesis 6.6 will produce:
E hypothesis.errors.FailedHealthCheck: test/test_flow_control_window.py::TestAutomaticFlowControl::test_mixing_update_forms uses the 'frame_factory' fixture, which is reset between function calls but not between test cases generated by `@given(...)`. You can change it to a module- or session-scoped fixture if it is safe to reuse; if not we recommend using a context manager inside your test function. See https://docs.pytest.org/en/latest/fixture.html#sharing-test-data for details on fixture scope.
E See https://hypothesis.readthedocs.io/en/latest/healthchecks.html for more information about this. If you want to disable just this health check, add HealthCheck.function_scoped_fixture to the suppress_health_check settings for this test.
Since the tests already workaround the problem,
acknowledging https://github.com/HypothesisWorks/hypothesis-python/issues/377,
we can safely disable the check.
Hypothesis 5.49 introduced the function_scoped_fixture health check value,
hence it is now the lowest required version of hypothesis.
---
test/test_basic_logic.py | 3 ++-
test/test_flow_control_window.py | 7 ++++++-
tox.ini | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/test/test_basic_logic.py b/test/test_basic_logic.py
index fb54fe50..8c8f3b7d 100644
--- a/test/test_basic_logic.py
+++ b/test/test_basic_logic.py
@@ -21,7 +21,7 @@
from . import helpers
-from hypothesis import given
+from hypothesis import given, settings, HealthCheck
from hypothesis.strategies import integers
@@ -790,6 +790,7 @@ def test_headers_are_lowercase(self, frame_factory):
assert c.data_to_send() == expected_frame.serialize()
@given(frame_size=integers(min_value=2**14, max_value=(2**24 - 1)))
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
def test_changing_max_frame_size(self, frame_factory, frame_size):
"""
When the user changes the max frame size and the change is ACKed, the
diff --git a/test/test_flow_control_window.py b/test/test_flow_control_window.py
index 24b345aa..7a445af1 100644
--- a/test/test_flow_control_window.py
+++ b/test/test_flow_control_window.py
@@ -7,7 +7,7 @@
"""
import pytest
-from hypothesis import given
+from hypothesis import given, settings, HealthCheck
from hypothesis.strategies import integers
import h2.config
@@ -715,6 +715,7 @@ def _setup_connection_and_send_headers(self, frame_factory):
return c
@given(stream_id=integers(max_value=0))
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
def test_must_acknowledge_for_stream(self, frame_factory, stream_id):
"""
Flow control acknowledgements must be done on a stream ID that is
@@ -740,6 +741,7 @@ def test_must_acknowledge_for_stream(self, frame_factory, stream_id):
)
@given(size=integers(max_value=-1))
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
def test_cannot_acknowledge_less_than_zero(self, frame_factory, size):
"""
The user must acknowledge at least 0 bytes.
@@ -837,6 +839,7 @@ def test_acknowledging_streams_we_never_saw(self, frame_factory):
c.acknowledge_received_data(2048, stream_id=101)
@given(integers(min_value=1025, max_value=DEFAULT_FLOW_WINDOW))
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
def test_acknowledging_1024_bytes_when_empty_increments(self,
frame_factory,
increment):
@@ -873,6 +876,7 @@ def test_acknowledging_1024_bytes_when_empty_increments(self,
# This test needs to use a lower cap, because otherwise the algo will
# increment the stream window anyway.
@given(integers(min_value=1025, max_value=(DEFAULT_FLOW_WINDOW // 4) - 1))
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
def test_connection_only_empty(self, frame_factory, increment):
"""
If the connection flow control window is empty, but the stream flow
@@ -916,6 +920,7 @@ def test_connection_only_empty(self, frame_factory, increment):
assert c.data_to_send() == expected_data
@given(integers(min_value=1025, max_value=DEFAULT_FLOW_WINDOW))
+ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
def test_mixing_update_forms(self, frame_factory, increment):
"""
If the user mixes ackowledging data with manually incrementing windows,
diff --git a/tox.ini b/tox.ini
index 69291df6..1f5e538b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@ deps =
pytest==6.0.2
pytest-cov==2.10.1
pytest-xdist==2.1.0
- hypothesis>=5.5,<6
+ hypothesis>=5.49,<7
commands =
pytest --cov-report=xml --cov-report=term --cov=h2 {posargs}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-PyVirtualDisplay for openSUSE:Factory checked in at 2021-04-01 14:15:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyVirtualDisplay (Old)
and /work/SRC/openSUSE:Factory/.python-PyVirtualDisplay.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyVirtualDisplay"
Thu Apr 1 14:15:53 2021 rev:16 rq:881811 version:2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyVirtualDisplay/python-PyVirtualDisplay.changes 2020-08-25 12:40:03.513429071 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyVirtualDisplay.new.2401/python-PyVirtualDisplay.changes 2021-04-01 14:16:00.947869075 +0200
@@ -1,0 +2,6 @@
+Sat Mar 27 13:35:24 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to v2.1
+ * no release notes
+
+-------------------------------------------------------------------
Old:
----
PyVirtualDisplay-1.3.2.tar.gz
New:
----
PyVirtualDisplay-2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyVirtualDisplay.spec ++++++
--- /var/tmp/diff_new_pack.zCl4eR/_old 2021-04-01 14:16:02.567871888 +0200
+++ /var/tmp/diff_new_pack.zCl4eR/_new 2021-04-01 14:16:02.571871894 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-PyVirtualDisplay
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-PyVirtualDisplay
-Version: 1.3.2
+Version: 2.1
Release: 0
Summary: Python wrapper for Xvfb, Xephyr and Xvnc
License: BSD-2-Clause
@@ -36,8 +36,7 @@
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module attrs}
BuildRequires: %{python_module entrypoint2}
-BuildRequires: %{python_module path.py}
-BuildRequires: %{python_module pyscreenshot}
+BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module vncdotool >= 0.13.0}
@@ -53,7 +52,6 @@
%prep
%setup -q -n PyVirtualDisplay-%{version}
-sed -i 's/from backports import tempfile/import tempfile/' tests/test_xvnc.py
%build
%python_build
@@ -69,6 +67,7 @@
%files %{python_files}
%license LICENSE.txt
%doc README.md
-%{python_sitelib}/*
+%{python_sitelib}/pyvirtualdisplay
+%{python_sitelib}/PyVirtualDisplay-%{version}-*info
%changelog
++++++ PyVirtualDisplay-1.3.2.tar.gz -> PyVirtualDisplay-2.1.tar.gz ++++++
++++ 1818 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-hypothesis for openSUSE:Factory checked in at 2021-04-01 14:15:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hypothesis (Old)
and /work/SRC/openSUSE:Factory/.python-hypothesis.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hypothesis"
Thu Apr 1 14:15:53 2021 rev:52 rq:881273 version:6.8.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hypothesis/python-hypothesis.changes 2020-11-23 10:44:19.370232833 +0100
+++ /work/SRC/openSUSE:Factory/.python-hypothesis.new.2401/python-hypothesis.changes 2021-04-01 14:15:59.923867298 +0200
@@ -1,0 +2,24 @@
+Sat Mar 20 22:28:47 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to 6.8.1
+ * Full changelog since 5.41.2:
+ https://hypothesis.readthedocs.io/en/latest/changes.html
+- Changes in major version 6:
+ * Many functions now use PEP 3102 keyword-only arguments where
+ passing positional arguments was deprecated since 5.5.
+ * hypothesis.extra.django.from_model() no longer accepts model
+ as a keyword argument, where it could conflict with fields
+ named ���model���.
+ * randoms() now defaults to use_true_random=False.
+ * complex_numbers() no longer accepts min_magnitude=None; either
+ use min_magnitude=0 or just omit the argument.
+ * hypothesis.provisional.ip4_addr_strings and ip6_addr_strings
+ are removed in favor of ip_addresses(v=...).map(str).
+ * register_type_strategy() no longer accepts generic types with
+ type arguments, which were always pretty badly broken.
+ * Using function-scoped pytest fixtures is now a health-check
+ error, instead of a warning.
+- Don't test numpy and pandas for python36 (NEP29)
+ * add distro specific importorskip-numpy-pandas.patch
+
+-------------------------------------------------------------------
Old:
----
hypothesis-python-5.41.2.obscpio
New:
----
hypothesis-python-6.8.1.obscpio
importorskip-numpy-pandas.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-hypothesis.spec ++++++
--- /var/tmp/diff_new_pack.NKusVM/_old 2021-04-01 14:16:00.563868408 +0200
+++ /var/tmp/diff_new_pack.NKusVM/_new 2021-04-01 14:16:00.567868416 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package python-hypothesis
+# spec file for package python-hypothesis-test
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -33,14 +33,17 @@
%bcond_with test
%endif
Name: python-hypothesis%{psuffix}
-Version: 5.41.2
+Version: 6.8.1
Release: 0
Summary: A library for property based testing
License: MPL-2.0
URL: https://github.com/HypothesisWorks/hypothesis
# Source is the `hypothesis-python` subdir of the Github repository.
# Edit the `_service` file and run `osc service runall` for updates.
+# See also https://hypothesis.readthedocs.io/en/latest/packaging.html
Source: hypothesis-python-%{version}
+# PATCH-FIX-OPENSUSE dont import numpy and pandas and skip tests if these optional packages are not available.
+Patch0: importorskip-numpy-pandas.patch
%if 0%{?suse_version} >= 1500
BuildRequires: %{pythons >= 3.5.2}
%else
@@ -52,12 +55,13 @@
Requires: python-attrs >= 19.2.0
Requires: python-sortedcontainers >= 2.1.0
Requires(post): update-alternatives
-Requires(preun): update-alternatives
+Requires(preun):update-alternatives
Recommends: python-Django >= 2.2
Recommends: python-dpcontracts >= 0.4
Recommends: python-lark-parser >= 0.6.5
+Recommends: python-libcst >= 0.3.16
Recommends: python-numpy >= 1.9.0
-Recommends: python-pandas >= 0.19
+Recommends: python-pandas >= 0.25
Recommends: python-pytest >= 4.3
Recommends: python-python-dateutil >= 1.4
Recommends: python-pytz >= 2014.1
@@ -68,19 +72,21 @@
BuildRequires: %{python_module Django >= 2.2}
BuildRequires: %{python_module attrs >= 19.2.0}
BuildRequires: %{python_module black}
-BuildRequires: %{python_module dpcontracts >= 0.6.0}
+BuildRequires: %{python_module dpcontracts >= 0.4}
BuildRequires: %{python_module fakeredis}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module hypothesis = %{version}}
+BuildRequires: %{python_module importlib_resources >= 3.3.0 if %python-base < 3.7}
BuildRequires: %{python_module lark-parser >= 0.6.5}
-BuildRequires: %{python_module numpy >= 1.9.0}
-BuildRequires: %{python_module pandas >= 0.19}
+BuildRequires: %{python_module libcst >= 0.3.16}
BuildRequires: %{python_module pexpect}
-BuildRequires: %{python_module pytest >= 4.3}
+BuildRequires: %{python_module pytest >= 4.6}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module python-dateutil >= 1.4}
BuildRequires: %{python_module sortedcontainers >= 2.1.0}
BuildRequires: %{python_module typing_extensions}
+BuildRequires: %{python_module numpy >= 1.9.0 if (%python-base without python36-base)}
+BuildRequires: %{python_module pandas >= 0.25 if (%python-base without python36-base)}
%endif
# /SECTION
%python_subpackages
@@ -100,6 +106,7 @@
%setup -q -n %{_sourcedir}/hypothesis-python-%{version} -T -D
# gh#HypothesisWorks/hypothesis#2447: make sure arr==0.0 is an array on 32-bit
sed -i 's/assert (arr == 0.0)/assert np.asarray(arr == 0.0)/' tests/numpy/test_gen_data.py
+%patch0 -p2
%build
%if !%{with test}
@@ -124,9 +131,32 @@
%if %{with test}
# theses tests try to write into global python_sitelib
# https://github.com/HypothesisWorks/hypothesis/issues/2546
-skiptests="test_updating_the_file_include_new_shrinkers"
-skiptests+=" or test_can_learn_to_normalize_the_unnormalized"
-%pytest tests -n auto -p pytester --runpytest=subprocess -k "not ($skiptests)"
+donttest="test_updating_the_file_include_new_shrinkers"
+donttest+=" or test_can_learn_to_normalize_the_unnormalized"
+# extraneous encoding
+python36_donttest+=" or (test_cli_python_equivalence and json)"
+# typing_extension problem on python36 and Leap 15's python3
+python36_donttest+=" or test_mutually_recursive_types_with_typevar"
+python3_donttest+=" or test_mutually_recursive_types_with_typevar"
+# requires backports.zoneinfo for python < 3.9
+python36_ignoretests=" --ignore tests/datetime/test_zoneinfo_timezones.py"
+python38_ignoretests=" --ignore tests/datetime/test_zoneinfo_timezones.py"
+python3_ignoretests=" --ignore tests/datetime/test_zoneinfo_timezones.py"
+# not available for python36
+python36_ignoretests+=" --ignore tests/numpy --ignore tests/pandas"
+# adapted from pytest.ini in github repo toplevel dir (above hypothesis-python)
+echo '[pytest]
+addopts=
+ --strict-markers
+ --tb=native
+ -p pytester --runpytest=subprocess
+ -v
+ -n auto
+ -ra
+filterwarnings =
+ ignore::hypothesis.errors.NonInteractiveExampleWarning
+' > pytest.ini
+%pytest -c pytest.ini -k "not ($donttest ${$python_donttest})" ${$python_ignoretests} tests
%endif
%if !%{with test}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.NKusVM/_old 2021-04-01 14:16:00.603868478 +0200
+++ /var/tmp/diff_new_pack.NKusVM/_new 2021-04-01 14:16:00.603868478 +0200
@@ -3,9 +3,9 @@
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/HypothesisWorks/hypothesis.git</param>
<param name="scm">git</param>
- <param name="revision">hypothesis-python-5.41.2</param>
+ <param name="revision">hypothesis-python-6.8.1</param>
<param name="versionformat">@PARENT_TAG@</param>
- <param name="versionrewrite-pattern">hypothesispython(.*)</param>
+ <param name="versionrewrite-pattern">hypothesis-python-(.*)</param>
<param name="subdir">hypothesis-python</param>
<param name="filename">hypothesis-python</param>
</service>
++++++ hypothesis-python-5.41.2.obscpio -> hypothesis-python-6.8.1.obscpio ++++++
++++ 17985 lines of diff (skipped)
++++++ hypothesis-python.obsinfo ++++++
--- /var/tmp/diff_new_pack.NKusVM/_old 2021-04-01 14:16:00.823868860 +0200
+++ /var/tmp/diff_new_pack.NKusVM/_new 2021-04-01 14:16:00.823868860 +0200
@@ -1,5 +1,5 @@
name: hypothesis-python
-version: 5.41.2
-mtime: 1604845701
-commit: 6a668da91a3b2b8b42c76496589392feea58645a
+version: 6.8.1
+mtime: 1615687564
+commit: 6fa16a4b47012e6be277926d6cbfeec549609955
++++++ importorskip-numpy-pandas.patch ++++++
diff --git a/hypothesis-python/tests/conjecture/test_utils.py b/hypothesis-python/tests/conjecture/test_utils.py
index fbb837d69..e31868140 100644
--- a/hypothesis-python/tests/conjecture/test_utils.py
+++ b/hypothesis-python/tests/conjecture/test_utils.py
@@ -16,7 +16,6 @@
from collections import Counter
from fractions import Fraction
-import numpy as np
import pytest
from hypothesis import (
@@ -218,11 +217,13 @@ def test_combine_labels_is_distinct():
def test_invalid_numpy_sample():
+ np = pytest.importorskip("numpy")
with pytest.raises(InvalidArgument):
cu.check_sample(np.array([[1, 1], [1, 1]]), "array")
def test_valid_numpy_sample():
+ np = pytest.importorskip("numpy")
cu.check_sample(np.array([1, 2, 3]), "array")
diff --git a/hypothesis-python/tests/ghostwriter/test_expected_output.py b/hypothesis-python/tests/ghostwriter/test_expected_output.py
index 6cc9294e3..1e77c539a 100644
--- a/hypothesis-python/tests/ghostwriter/test_expected_output.py
+++ b/hypothesis-python/tests/ghostwriter/test_expected_output.py
@@ -27,13 +27,13 @@ import re
import sys
from typing import Sequence
-import numpy
import pytest
import hypothesis
from hypothesis.extra import ghostwriter
from hypothesis.utils.conventions import not_set
+numpy = pytest.importorskip("numpy")
@pytest.fixture
def update_recorded_outputs(request):
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-eventlet for openSUSE:Factory checked in at 2021-04-01 14:15:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-eventlet (Old)
and /work/SRC/openSUSE:Factory/.python-eventlet.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-eventlet"
Thu Apr 1 14:15:52 2021 rev:37 rq:881214 version:0.30.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-eventlet/python-eventlet.changes 2020-12-12 20:32:16.005845931 +0100
+++ /work/SRC/openSUSE:Factory/.python-eventlet.new.2401/python-eventlet.changes 2021-04-01 14:15:58.947865603 +0200
@@ -1,0 +2,15 @@
+Sun Mar 21 21:19:52 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to 0.30.2
+ * greendns: patch ssl to fix RecursionError on
+ SSLContext.options.__set__ #677
+- Release 0.30.1
+ * patcher: built-in open() did not accept kwargs #683
+- Release 0.30.0
+ * pyopenssl tsafe module was deprecated and removed in v20.0.0
+ * deprecate pyevent hub
+ * Deprecate CPython 2.7 and 3.4 support
+ * py39: Add _at_fork_reinit method to Semaphores
+- Drop pr_672-remove-OpenSSL-tsafe.patch merged upstream
+
+-------------------------------------------------------------------
Old:
----
eventlet-0.29.1.tar.gz
pr_672-remove-OpenSSL-tsafe.patch
New:
----
eventlet-0.30.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-eventlet.spec ++++++
--- /var/tmp/diff_new_pack.60Psm0/_old 2021-04-01 14:15:59.591866721 +0200
+++ /var/tmp/diff_new_pack.60Psm0/_new 2021-04-01 14:15:59.591866721 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-eventlet
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-eventlet
-Version: 0.29.1
+Version: 0.30.2
Release: 0
Summary: Concurrent networking library for Python
License: MIT
@@ -28,32 +28,30 @@
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl(a)suse.com
# Removes dependency on nose
Patch0: remove_nose.patch
-# PATCH-FIX-UPSTREAM newdnspython.patch gh#eventlet/eventlet#638 mcepl(a)suse.com
-# patch is from gh#rthalley/dnspython#519
+# PATCH-FIX-UPSTREAM newdnspython.patch mcepl(a)suse.com -- patch is from gh#rthalley/dnspython#519, discussion in gh#eventlet/eventlet#638
Patch1: newdnspython.patch
# PATCH-FEATURE-UPSTREAM pr_639.patch gh#eventlet/eventlet#639 jayvdb(a)gmail.com
Patch2: pr_639.patch
# Really remove the dependency on nose
Patch3: remove_nose_part_2.patch
-# PATCH-FIX-UPSTREAM -- gh#eventlet/eventlet#672 remove OpenSSL.tsafe
-Patch4: pr_672-remove-OpenSSL-tsafe.patch
-BuildRequires: %{python_module dnspython >= 1.15.0}
-BuildRequires: %{python_module greenlet >= 0.3}
-BuildRequires: %{python_module pyOpenSSL}
-BuildRequires: %{python_module pytest}
-BuildRequires: %{python_module pyzmq}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module six >= 1.10.0}
-BuildRequires: %{python_module testsuite}
%if 0%{?suse_version} < 1550
BuildRequires: python2-monotonic >= 1.4
%endif
BuildRequires: fdupes
BuildRequires: netcfg
BuildRequires: python-rpm-macros
+# SECTION TEST requirements
# eventlet parses /etc/protocols which is not available in normal build envs
-# Tests
BuildRequires: sysconfig-netconfig
+BuildRequires: %{python_module dnspython >= 1.15.0}
+BuildRequires: %{python_module greenlet >= 0.3}
+BuildRequires: %{python_module pyOpenSSL}
+BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module pyzmq}
+BuildRequires: %{python_module six >= 1.10.0}
+BuildRequires: %{python_module testsuite}
+# /SECTION
Requires: netcfg
Requires: python-dnspython >= 1.15.0
Requires: python-greenlet >= 0.3
@@ -78,9 +76,8 @@
%setup -q -n eventlet-%{version}
%autopatch -p1
-sed -i "s|^#!.*||" eventlet/support/greendns.py # Fix non-executable script
-# https://github.com/eventlet/eventlet/issues/638
-sed -i "/assert num_readers/ i \ return" tests/__init__.py
+# Fix non-executable script
+sed -i '1{/^#!/ d}' eventlet/support/greendns.py
%build
%python_build
++++++ eventlet-0.29.1.tar.gz -> eventlet-0.30.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/NEWS new/eventlet-0.30.2/NEWS
--- old/eventlet-0.29.1/NEWS 2020-10-22 09:16:46.000000000 +0200
+++ new/eventlet-0.30.2/NEWS 2021-03-03 12:41:35.000000000 +0100
@@ -1,3 +1,18 @@
+0.30.2
+======
+* greendns: patch ssl to fix RecursionError on SSLContext.options.__set__ https://github.com/eventlet/eventlet/issues/677
+
+0.30.1
+======
+* patcher: built-in open() did not accept kwargs https://github.com/eventlet/eventlet/issues/683
+
+0.30.0
+======
+* pyopenssl tsafe module was deprecated and removed in v20.0.0
+* deprecate pyevent hub
+* Deprecate CPython 2.7 and 3.4 support
+* py39: Add _at_fork_reinit method to Semaphores
+
0.29.1
======
patcher: [py27] recursion error in pytest/python2.7 installing register_at_fork https://github.com/eventlet/eventlet/issues/660
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/PKG-INFO new/eventlet-0.30.2/PKG-INFO
--- old/eventlet-0.29.1/PKG-INFO 2020-10-22 09:17:28.000000000 +0200
+++ new/eventlet-0.30.2/PKG-INFO 2021-03-03 12:42:28.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: eventlet
-Version: 0.29.1
+Version: 0.30.2
Summary: Highly concurrent networking library
Home-page: http://eventlet.net
Author: Linden Lab
@@ -24,11 +24,11 @@
Here's something you can try right on the command line::
- % python
+ % python3
>>> import eventlet
- >>> from eventlet.green import urllib2
- >>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
- >>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
+ >>> from eventlet.green.urllib.request import urlopen
+ >>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
+ >>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
>>> gt2.wait()
>>> gt.wait()
@@ -70,10 +70,17 @@
Apologies for any inconvenience.
+ Supported Python versions
+ =========================
+
+ Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is deprecated and will be removed in the future**, only CPython 3.5+ support will remain.
Flair
=====
+ .. image:: https://img.shields.io/pypi/v/eventlet
+ :target: https://pypi.org/project/eventlet/
+
.. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
:target: https://travis-ci.org/eventlet/eventlet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/README.rst new/eventlet-0.30.2/README.rst
--- old/eventlet-0.29.1/README.rst 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/README.rst 2021-02-02 10:04:54.000000000 +0100
@@ -16,11 +16,11 @@
Here's something you can try right on the command line::
- % python
+ % python3
>>> import eventlet
- >>> from eventlet.green import urllib2
- >>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
- >>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
+ >>> from eventlet.green.urllib.request import urlopen
+ >>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
+ >>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
>>> gt2.wait()
>>> gt.wait()
@@ -62,10 +62,17 @@
Apologies for any inconvenience.
+Supported Python versions
+=========================
+
+Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is deprecated and will be removed in the future**, only CPython 3.5+ support will remain.
Flair
=====
+.. image:: https://img.shields.io/pypi/v/eventlet
+ :target: https://pypi.org/project/eventlet/
+
.. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
:target: https://travis-ci.org/eventlet/eventlet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/doc/design_patterns.rst new/eventlet-0.30.2/doc/design_patterns.rst
--- old/eventlet-0.29.1/doc/design_patterns.rst 2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/doc/design_patterns.rst 2021-02-02 10:04:54.000000000 +0100
@@ -11,14 +11,14 @@
The canonical client-side example is a web crawler. This use case is given a list of urls and wants to retrieve their bodies for later processing. Here is a very simple example::
import eventlet
- from eventlet.green import urllib2
+ from eventlet.green.urllib.request import urlopen
urls = ["http://www.google.com/intl/en_ALL/images/logo.gif",
"https://www.python.org/static/img/python-logo.png",
"http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif"]
def fetch(url):
- return urllib2.urlopen(url).read()
+ return urlopen(url).read()
pool = eventlet.GreenPool()
for body in pool.imap(fetch, urls):
@@ -26,7 +26,7 @@
There is a slightly more complex version of this in the :ref:`web crawler example <web_crawler_example>`. Here's a tour of the interesting lines in this crawler.
-``from eventlet.green import urllib2`` is how you import a cooperatively-yielding version of urllib2. It is the same in all respects to the standard version, except that it uses green sockets for its communication. This is an example of the :ref:`import-green` pattern.
+``from eventlet.green... import urlopen`` is how you import a cooperatively-yielding version of urllib. It is the same in all respects to the standard version, except that it uses green sockets for its communication. This is an example of the :ref:`import-green` pattern.
``pool = eventlet.GreenPool()`` constructs a :class:`GreenPool <eventlet.greenpool.GreenPool>` of a thousand green threads. Using a pool is good practice because it provides an upper limit on the amount of work that this crawler will be doing simultaneously, which comes in handy when the input data changes dramatically.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/doc/index.rst new/eventlet-0.30.2/doc/index.rst
--- old/eventlet-0.29.1/doc/index.rst 2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/doc/index.rst 2021-02-02 10:04:54.000000000 +0100
@@ -12,15 +12,21 @@
]
import eventlet
- from eventlet.green import urllib2
+ from eventlet.green.urllib.request import urlopen
def fetch(url):
- return urllib2.urlopen(url).read()
+ return urlopen(url).read()
pool = eventlet.GreenPool()
for body in pool.imap(fetch, urls):
print("got body", len(body))
+Supported Python versions
+=========================
+
+Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is deprecated and will be removed in the future**, only CPython 3.5+ support will remain.
+
+
Contents
=========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/doc/ssl.rst new/eventlet-0.30.2/doc/ssl.rst
--- old/eventlet-0.29.1/doc/ssl.rst 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/doc/ssl.rst 2021-02-02 10:04:54.000000000 +0100
@@ -5,9 +5,9 @@
In either case, the ``green`` modules handle SSL sockets transparently, just like their standard counterparts. As an example, :mod:`eventlet.green.urllib2` can be used to fetch https urls in as non-blocking a fashion as you please::
- from eventlet.green import urllib2
+ from eventlet.green.urllib.request import urlopen
from eventlet import spawn
- bodies = [spawn(urllib2.urlopen, url)
+ bodies = [spawn(urlopen, url)
for url in ("https://secondlife.com","https://google.com")]
for b in bodies:
print(b.wait().read())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/__init__.py new/eventlet-0.30.2/eventlet/__init__.py
--- old/eventlet-0.29.1/eventlet/__init__.py 2020-10-22 09:14:16.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/__init__.py 2021-03-03 12:39:52.000000000 +0100
@@ -1,7 +1,14 @@
import os
+import sys
+import warnings
+if sys.version_info < (3, 5):
+ warnings.warn(
+ "Support for your Python version is deprecated and will be removed in the future",
+ DeprecationWarning,
+ )
-version_info = (0, 29, 1)
+version_info = (0, 30, 2)
__version__ = '.'.join(map(str, version_info))
# This is to make Debian packaging easier, it ignores import
# errors of greenlet so that the packager can still at least
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/green/OpenSSL/__init__.py new/eventlet-0.30.2/eventlet/green/OpenSSL/__init__.py
--- old/eventlet-0.29.1/eventlet/green/OpenSSL/__init__.py 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/green/OpenSSL/__init__.py 2021-02-02 10:04:54.000000000 +0100
@@ -1,4 +1,9 @@
from . import crypto
from . import SSL
-from . import tsafe
+try:
+ # pyopenssl tsafe module was deprecated and removed in v20.0.0
+ # https://github.com/pyca/pyopenssl/pull/913
+ from . import tsafe
+except ImportError:
+ pass
from .version import __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/green/builtin.py new/eventlet-0.30.2/eventlet/green/builtin.py
--- old/eventlet-0.29.1/eventlet/green/builtin.py 2020-10-22 08:30:23.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/green/builtin.py 2021-02-02 10:04:54.000000000 +0100
@@ -38,9 +38,9 @@
__opening = False
-def open(*args):
+def open(*args, **kwargs):
global __opening
- result = __original_open(*args)
+ result = __original_open(*args, **kwargs)
if not __opening:
# This is incredibly ugly. 'open' is used under the hood by
# the import process. So, ensure we don't wind up in an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/greenio/base.py new/eventlet-0.30.2/eventlet/greenio/base.py
--- old/eventlet-0.29.1/eventlet/greenio/base.py 2020-10-22 04:46:21.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/greenio/base.py 2021-02-02 10:04:54.000000000 +0100
@@ -454,7 +454,7 @@
greenpipe_doc = """
GreenPipe is a cooperative replacement for file class.
It will cooperate on pipes. It will block on regular file.
- Differneces from file class:
+ Differences from file class:
- mode is r/w property. Should re r/o
- encoding property not implemented
- write/writelines will not raise TypeError exception when non-string data is written
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/hubs/pyevent.py new/eventlet-0.30.2/eventlet/hubs/pyevent.py
--- old/eventlet-0.29.1/eventlet/hubs/pyevent.py 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/hubs/pyevent.py 2021-02-02 10:04:54.000000000 +0100
@@ -1,6 +1,7 @@
import sys
import traceback
import types
+import warnings
from eventlet.support import greenlets as greenlet
import six
@@ -58,6 +59,11 @@
lambda signalnum, frame: self.greenlet.parent.throw(KeyboardInterrupt))
self.events_to_add = []
+ warnings.warn(
+ "ACTION REQUIRED eventlet pyevent hub is deprecated and will be removed soon",
+ DeprecationWarning,
+ )
+
def dispatch(self):
loop = event.loop
while True:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/semaphore.py new/eventlet-0.30.2/eventlet/semaphore.py
--- old/eventlet-0.29.1/eventlet/semaphore.py 2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/semaphore.py 2021-02-02 10:04:54.000000000 +0100
@@ -39,6 +39,7 @@
if value < 0:
msg = 'Semaphore() expect value >= 0, actual: {0}'.format(repr(value))
raise ValueError(msg)
+ self._original_value = value
self.counter = value
self._waiters = collections.deque()
@@ -51,6 +52,10 @@
params = (self.__class__.__name__, self.counter, len(self._waiters))
return '<%s c=%s _w[%s]>' % params
+ def _at_fork_reinit(self):
+ self.counter = self._original_value
+ self._waiters.clear()
+
def locked(self):
"""Returns true if a call to acquire would block.
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet/support/greendns.py new/eventlet-0.30.2/eventlet/support/greendns.py
--- old/eventlet-0.29.1/eventlet/support/greendns.py 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/eventlet/support/greendns.py 2021-03-03 12:39:36.000000000 +0100
@@ -42,6 +42,7 @@
from eventlet.green import os
from eventlet.green import time
from eventlet.green import select
+from eventlet.green import ssl
import six
@@ -55,6 +56,7 @@
'time': time,
'os': os,
'socket': _socket_nodns,
+ 'ssl': ssl,
}
return patcher.import_patched(module_name, **modules)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet.egg-info/PKG-INFO new/eventlet-0.30.2/eventlet.egg-info/PKG-INFO
--- old/eventlet-0.29.1/eventlet.egg-info/PKG-INFO 2020-10-22 09:17:28.000000000 +0200
+++ new/eventlet-0.30.2/eventlet.egg-info/PKG-INFO 2021-03-03 12:42:27.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: eventlet
-Version: 0.29.1
+Version: 0.30.2
Summary: Highly concurrent networking library
Home-page: http://eventlet.net
Author: Linden Lab
@@ -24,11 +24,11 @@
Here's something you can try right on the command line::
- % python
+ % python3
>>> import eventlet
- >>> from eventlet.green import urllib2
- >>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
- >>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
+ >>> from eventlet.green.urllib.request import urlopen
+ >>> gt = eventlet.spawn(urlopen, 'http://eventlet.net')
+ >>> gt2 = eventlet.spawn(urlopen, 'http://secondlife.com')
>>> gt2.wait()
>>> gt.wait()
@@ -70,10 +70,17 @@
Apologies for any inconvenience.
+ Supported Python versions
+ =========================
+
+ Currently CPython 2.7 and 3.4+ are supported, but **2.7 and 3.4 support is deprecated and will be removed in the future**, only CPython 3.5+ support will remain.
Flair
=====
+ .. image:: https://img.shields.io/pypi/v/eventlet
+ :target: https://pypi.org/project/eventlet/
+
.. image:: https://travis-ci.org/eventlet/eventlet.svg?branch=master
:target: https://travis-ci.org/eventlet/eventlet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/eventlet.egg-info/SOURCES.txt new/eventlet-0.30.2/eventlet.egg-info/SOURCES.txt
--- old/eventlet-0.29.1/eventlet.egg-info/SOURCES.txt 2020-10-22 09:17:28.000000000 +0200
+++ new/eventlet-0.30.2/eventlet.egg-info/SOURCES.txt 2021-03-03 12:42:27.000000000 +0100
@@ -225,6 +225,7 @@
tests/isolated/patcher_fork_after_monkey_patch.py
tests/isolated/patcher_import_patched_defaults.py
tests/isolated/patcher_importlib_lock.py
+tests/isolated/patcher_open_kwargs.py
tests/isolated/patcher_socketserver_selectors.py
tests/isolated/patcher_threading_condition.py
tests/isolated/patcher_threading_current.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/examples/feedscraper-testclient.py new/eventlet-0.30.2/examples/feedscraper-testclient.py
--- old/eventlet-0.29.1/examples/feedscraper-testclient.py 2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/examples/feedscraper-testclient.py 2021-02-02 10:04:54.000000000 +0100
@@ -1,4 +1,4 @@
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
big_list_of_feeds = """
http://blog.eventlet.net/feed/
@@ -21,5 +21,5 @@
"""
url = 'http://localhost:9010/'
-result = urllib2.urlopen(url, big_list_of_feeds)
+result = urlopen(url, big_list_of_feeds)
print(result.read())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/examples/producer_consumer.py new/eventlet-0.30.2/examples/producer_consumer.py
--- old/eventlet-0.29.1/examples/producer_consumer.py 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/examples/producer_consumer.py 2021-02-02 10:04:54.000000000 +0100
@@ -9,7 +9,7 @@
number of "workers", so you don't have to write that tedious management code
yourself.
"""
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
import eventlet
import re
@@ -22,7 +22,7 @@
print("fetching", url)
data = ''
with eventlet.Timeout(5, False):
- data = urllib2.urlopen(url).read()
+ data = urllib2.urlopen(url).read().decode()
for url_match in url_regex.finditer(data):
new_url = url_match.group(0)
outq.put(new_url)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/examples/recursive_crawler.py new/eventlet-0.30.2/examples/recursive_crawler.py
--- old/eventlet-0.29.1/examples/recursive_crawler.py 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/examples/recursive_crawler.py 2021-02-02 10:04:54.000000000 +0100
@@ -9,7 +9,7 @@
acts as sort of a job coordinator (and concurrency controller of
course).
"""
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
import eventlet
import re
@@ -23,7 +23,7 @@
print("fetching", url)
data = ''
with eventlet.Timeout(5, False):
- data = urllib2.urlopen(url).read()
+ data = urlopen(url).read().decode()
for url_match in url_regex.finditer(data):
new_url = url_match.group(0)
# only send requests to eventlet.net so as not to destroy the internet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/examples/webcrawler.py new/eventlet-0.30.2/examples/webcrawler.py
--- old/eventlet-0.29.1/examples/webcrawler.py 2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/examples/webcrawler.py 2021-02-02 10:04:54.000000000 +0100
@@ -8,7 +8,7 @@
requests are truly made in parallel.
"""
import eventlet
-from eventlet.green import urllib2
+from eventlet.green.urllib.request import urlopen
urls = [
@@ -20,7 +20,7 @@
def fetch(url):
print("opening", url)
- body = urllib2.urlopen(url).read()
+ body = urlopen(url).read()
print("done with", url)
return url, body
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/tests/isolated/patcher_open_kwargs.py new/eventlet-0.30.2/tests/isolated/patcher_open_kwargs.py
--- old/eventlet-0.29.1/tests/isolated/patcher_open_kwargs.py 1970-01-01 01:00:00.000000000 +0100
+++ new/eventlet-0.30.2/tests/isolated/patcher_open_kwargs.py 2021-02-02 10:04:54.000000000 +0100
@@ -0,0 +1,10 @@
+__test__ = False
+
+if __name__ == "__main__":
+ import eventlet
+ eventlet.monkey_patch(builtins=True, os=True)
+
+ with open(__file__, mode="rt", buffering=16):
+ pass
+
+ print("pass")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/tests/openssl_test.py new/eventlet-0.30.2/tests/openssl_test.py
--- old/eventlet-0.29.1/tests/openssl_test.py 2020-10-22 04:45:36.000000000 +0200
+++ new/eventlet-0.30.2/tests/openssl_test.py 2021-02-02 10:04:54.000000000 +0100
@@ -12,5 +12,4 @@
import eventlet.green.OpenSSL.SSL
import eventlet.green.OpenSSL.crypto
- import eventlet.green.OpenSSL.tsafe
import eventlet.green.OpenSSL.version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/tests/patcher_test.py new/eventlet-0.30.2/tests/patcher_test.py
--- old/eventlet-0.29.1/tests/patcher_test.py 2020-10-22 08:30:23.000000000 +0200
+++ new/eventlet-0.30.2/tests/patcher_test.py 2021-02-02 10:04:54.000000000 +0100
@@ -523,3 +523,7 @@
def test_builtin():
tests.run_isolated('patcher_builtin.py')
+
+
+def test_open_kwargs():
+ tests.run_isolated("patcher_open_kwargs.py")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventlet-0.29.1/tests/semaphore_test.py new/eventlet-0.30.2/tests/semaphore_test.py
--- old/eventlet-0.29.1/tests/semaphore_test.py 2020-10-20 02:39:59.000000000 +0200
+++ new/eventlet-0.30.2/tests/semaphore_test.py 2021-02-02 10:04:54.000000000 +0100
@@ -42,6 +42,27 @@
sem = eventlet.Semaphore()
self.assertRaises(ValueError, sem.acquire, blocking=False, timeout=1)
+ def test_reinit(self):
+ # py39+ expects locks to have a _at_fork_reinit() method; since we
+ # patch in Semaphores in eventlet.green.thread, they need it, too
+ sem = eventlet.Semaphore()
+ sem.acquire()
+ sem._at_fork_reinit()
+ self.assertEqual(sem.acquire(blocking=False), True)
+ self.assertEqual(sem.acquire(blocking=False), False)
+
+ sem = eventlet.Semaphore(0)
+ sem.release()
+ sem._at_fork_reinit()
+ self.assertEqual(sem.acquire(blocking=False), False)
+
+ sem = eventlet.Semaphore(2)
+ sem.acquire()
+ sem._at_fork_reinit()
+ self.assertEqual(sem.acquire(blocking=False), True)
+ self.assertEqual(sem.acquire(blocking=False), True)
+ self.assertEqual(sem.acquire(blocking=False), False)
+
def test_semaphore_contention():
g_mutex = eventlet.Semaphore()
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ddt for openSUSE:Factory checked in at 2021-04-01 14:15:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ddt (Old)
and /work/SRC/openSUSE:Factory/.python-ddt.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ddt"
Thu Apr 1 14:15:51 2021 rev:13 rq:880822 version:1.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ddt/python-ddt.changes 2021-02-01 13:28:30.878132131 +0100
+++ /work/SRC/openSUSE:Factory/.python-ddt.new.2401/python-ddt.changes 2021-04-01 14:15:54.947858661 +0200
@@ -1,0 +2,8 @@
+Tue Mar 23 21:06:40 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 1.4.2:
+ * Fix test failure with PyYAML 5.4.1
+- rm 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch:
+ merged upstream
+
+-------------------------------------------------------------------
Old:
----
0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
ddt-1.4.1.tar.gz
New:
----
ddt-1.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ddt.spec ++++++
--- /var/tmp/diff_new_pack.XLOtgo/_old 2021-04-01 14:15:56.575861487 +0200
+++ /var/tmp/diff_new_pack.XLOtgo/_new 2021-04-01 14:15:56.575861487 +0200
@@ -19,14 +19,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-ddt
-Version: 1.4.1
+Version: 1.4.2
Release: 0
Summary: Data-Driven/Decorated Tests
License: MIT
URL: https://github.com/txels/ddt
Source: https://files.pythonhosted.org/packages/source/d/ddt/ddt-%{version}.tar.gz
-# https://github.com/datadriventests/ddt/pull/96
-Patch1: 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
++++++ ddt-1.4.1.tar.gz -> ddt-1.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ddt-1.4.1/PKG-INFO new/ddt-1.4.2/PKG-INFO
--- old/ddt-1.4.1/PKG-INFO 2020-05-15 04:43:34.506477800 +0200
+++ new/ddt-1.4.2/PKG-INFO 2021-03-12 21:36:29.390868000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ddt
-Version: 1.4.1
+Version: 1.4.2
Summary: Data-Driven/Decorated Tests
Home-page: https://github.com/datadriventests/ddt
Author: Carles Barrob��s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ddt-1.4.1/ddt.egg-info/PKG-INFO new/ddt-1.4.2/ddt.egg-info/PKG-INFO
--- old/ddt-1.4.1/ddt.egg-info/PKG-INFO 2020-05-15 04:43:34.000000000 +0200
+++ new/ddt-1.4.2/ddt.egg-info/PKG-INFO 2021-03-12 21:36:29.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ddt
-Version: 1.4.1
+Version: 1.4.2
Summary: Data-Driven/Decorated Tests
Home-page: https://github.com/datadriventests/ddt
Author: Carles Barrob��s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ddt-1.4.1/ddt.py new/ddt-1.4.2/ddt.py
--- old/ddt-1.4.1/ddt.py 2020-05-15 04:43:25.000000000 +0200
+++ new/ddt-1.4.2/ddt.py 2021-03-12 21:36:19.000000000 +0100
@@ -20,7 +20,7 @@
else:
_have_yaml = True
-__version__ = '1.4.1'
+__version__ = '1.4.2'
# These attributes will not conflict with any real python attribute
# They are added to the decorated test method and processed later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ddt-1.4.1/test/test_example.py new/ddt-1.4.2/test/test_example.py
--- old/ddt-1.4.1/test/test_example.py 2020-05-15 04:43:25.000000000 +0200
+++ new/ddt-1.4.2/test/test_example.py 2021-03-12 21:36:19.000000000 +0100
@@ -151,7 +151,7 @@
@ddt
class YamlOnlyTestCase(unittest.TestCase):
- @file_data('data/test_custom_yaml_loader.yaml', yaml.FullLoader)
+ @file_data('data/test_custom_yaml_loader.yaml', yaml.UnsafeLoader)
def test_custom_yaml_loader(self, instance, expected):
"""Test with yaml tags to create specific classes to compare"""
self.assertEqual(expected, instance)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ddt-1.4.1/test/test_functional.py new/ddt-1.4.2/test/test_functional.py
--- old/ddt-1.4.1/test/test_functional.py 2020-05-15 04:43:25.000000000 +0200
+++ new/ddt-1.4.2/test/test_functional.py 2021-03-12 21:36:19.000000000 +0100
@@ -334,11 +334,21 @@
setattr(Mytest, 'second_test', data_hello2)
ddt_mytest = ddt(Mytest)
- assert getattr(getattr(ddt_mytest, 'first_test_1_case1'), '__doc__') == d1.__doc__
- assert getattr(getattr(ddt_mytest, 'first_test_2_case2'), '__doc__') == func_w_doc.__doc__
- assert getattr(getattr(ddt_mytest, 'first_test_3'), '__doc__') == func_w_doc.__doc__
- assert getattr(getattr(ddt_mytest, 'second_test_1_case1'), '__doc__') == d1.__doc__
- assert getattr(getattr(ddt_mytest, 'second_test_2_case2'), '__doc__') is None
+ assert getattr(
+ getattr(ddt_mytest, 'first_test_1_case1'), '__doc__'
+ ) == d1.__doc__
+ assert getattr(
+ getattr(ddt_mytest, 'first_test_2_case2'), '__doc__'
+ ) == func_w_doc.__doc__
+ assert getattr(
+ getattr(ddt_mytest, 'first_test_3'), '__doc__'
+ ) == func_w_doc.__doc__
+ assert getattr(
+ getattr(ddt_mytest, 'second_test_1_case1'), '__doc__'
+ ) == d1.__doc__
+ assert getattr(
+ getattr(ddt_mytest, 'second_test_2_case2'), '__doc__'
+ ) is None
assert getattr(getattr(ddt_mytest, 'second_test_3'), '__doc__') is None
@@ -395,7 +405,10 @@
obj = DummyInvalidIdentifier()
method = getattr(obj, tests[0])
- assert method.__name__ == 'test_data_with_invalid_identifier_1_32v2_g__Gmw845h_W_b53wi_'
+ assert (
+ method.__name__ ==
+ 'test_data_with_invalid_identifier_1_32v2_g__Gmw845h_W_b53wi_'
+ )
assert method() == '32v2 g #Gmw845h$W b53wi.'
@@ -427,7 +440,7 @@
loader allowing python tags is passed.
"""
- from yaml import FullLoader
+ from yaml import UnsafeLoader
from yaml.constructor import ConstructorError
def str_to_type(class_name):
@@ -444,13 +457,13 @@
raise AssertionError()
@ddt
- class YamlFullLoaderTest(object):
- @file_data('data/test_functional_custom_tags.yaml', FullLoader)
+ class YamlUnsafeLoaderTest(object):
+ @file_data('data/test_functional_custom_tags.yaml', UnsafeLoader)
def test_cls_is_instance(self, instance, expected):
assert isinstance(instance, str_to_type(expected))
- tests = list(filter(_is_test, YamlFullLoaderTest.__dict__))
- obj = YamlFullLoaderTest()
+ tests = list(filter(_is_test, YamlUnsafeLoaderTest.__dict__))
+ obj = YamlUnsafeLoaderTest()
if not tests:
raise AssertionError('No tests have been found.')
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-defusedxml for openSUSE:Factory checked in at 2021-04-01 14:15:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-defusedxml (Old)
and /work/SRC/openSUSE:Factory/.python-defusedxml.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-defusedxml"
Thu Apr 1 14:15:51 2021 rev:7 rq:880820 version:0.7.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-defusedxml/python-defusedxml.changes 2021-03-12 13:31:08.662142766 +0100
+++ /work/SRC/openSUSE:Factory/.python-defusedxml.new.2401/python-defusedxml.changes 2021-04-01 14:15:53.447856059 +0200
@@ -1,0 +2,8 @@
+Tue Mar 23 20:19:43 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 0.7.1:
+ - Fix regression ``defusedxml.ElementTree.ParseError`` (#63)
+ The ``ParseError`` exception is now the same class object as
+ ``xml.etree.ElementTree.ParseError`` again.
+
+-------------------------------------------------------------------
Old:
----
defusedxml-0.7.0.tar.gz
New:
----
defusedxml-0.7.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-defusedxml.spec ++++++
--- /var/tmp/diff_new_pack.kvcrtx/_old 2021-04-01 14:15:54.711858251 +0200
+++ /var/tmp/diff_new_pack.kvcrtx/_new 2021-04-01 14:15:54.711858251 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without tests
Name: python-defusedxml
-Version: 0.7.0
+Version: 0.7.1
Release: 0
Summary: XML bomb protection for Python stdlib modules
License: Python-2.0
++++++ defusedxml-0.7.0.tar.gz -> defusedxml-0.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/.github/workflows/main.yml new/defusedxml-0.7.1/.github/workflows/main.yml
--- old/defusedxml-0.7.0/.github/workflows/main.yml 2021-01-15 10:06:21.000000000 +0100
+++ new/defusedxml-0.7.1/.github/workflows/main.yml 2021-03-08 11:56:59.000000000 +0100
@@ -1,14 +1,20 @@
on:
push:
- branches: ["master"]
+ branches:
+ - master
+ - main
+ - v*.x
pull_request:
- branches: ["master"]
+ branches:
+ - master
+ - main
+ - v*.x
workflow_dispatch:
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
- runs-on: "ubuntu-latest"
+ runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/CHANGES.txt new/defusedxml-0.7.1/CHANGES.txt
--- old/defusedxml-0.7.0/CHANGES.txt 2021-03-04 10:40:13.000000000 +0100
+++ new/defusedxml-0.7.1/CHANGES.txt 2021-03-08 11:57:23.000000000 +0100
@@ -1,6 +1,16 @@
Changelog
=========
+defusedxml 0.7.1
+---------------------
+
+*Release date: 08-Mar-2021*
+
+- Fix regression ``defusedxml.ElementTree.ParseError`` (#63)
+ The ``ParseError`` exception is now the same class object as
+ ``xml.etree.ElementTree.ParseError`` again.
+
+
defusedxml 0.7.0
----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/PKG-INFO new/defusedxml-0.7.1/PKG-INFO
--- old/defusedxml-0.7.0/PKG-INFO 2021-03-04 10:44:36.114280000 +0100
+++ new/defusedxml-0.7.1/PKG-INFO 2021-03-08 11:59:07.593425000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: defusedxml
-Version: 0.7.0
+Version: 0.7.1
Summary: XML bomb protection for Python stdlib modules
Home-page: https://github.com/tiran/defusedxml
Author: Christian Heimes
@@ -821,6 +821,16 @@
Changelog
=========
+ defusedxml 0.7.1
+ ---------------------
+
+ *Release date: 08-Mar-2021*
+
+ - Fix regression ``defusedxml.ElementTree.ParseError`` (#63)
+ The ``ParseError`` exception is now the same class object as
+ ``xml.etree.ElementTree.ParseError`` again.
+
+
defusedxml 0.7.0
----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/README.html new/defusedxml-0.7.1/README.html
--- old/defusedxml-0.7.0/README.html 2021-03-04 10:40:56.000000000 +0100
+++ new/defusedxml-0.7.1/README.html 2021-03-08 11:57:28.000000000 +0100
@@ -560,18 +560,19 @@
<li><a class="reference internal" href="#acknowledgements" id="id45">Acknowledgements</a></li>
<li><a class="reference internal" href="#references" id="id46">References</a></li>
<li><a class="reference internal" href="#changelog" id="id47">Changelog</a><ul>
-<li><a class="reference internal" href="#defusedxml-0-7-0" id="id48">defusedxml 0.7.0</a></li>
-<li><a class="reference internal" href="#defusedxml-0-7-0rc2" id="id49">defusedxml 0.7.0rc2</a></li>
-<li><a class="reference internal" href="#defusedxml-0-7-0rc1" id="id50">defusedxml 0.7.0rc1</a></li>
-<li><a class="reference internal" href="#defusedxml-0-6-0" id="id51">defusedxml 0.6.0</a></li>
-<li><a class="reference internal" href="#defusedxml-0-6-0rc1" id="id52">defusedxml 0.6.0rc1</a></li>
-<li><a class="reference internal" href="#defusedxml-0-5-0" id="id53">defusedxml 0.5.0</a></li>
-<li><a class="reference internal" href="#defusedxml-0-5-0-rc1" id="id54">defusedxml 0.5.0.rc1</a></li>
-<li><a class="reference internal" href="#defusedxml-0-4-1" id="id55">defusedxml 0.4.1</a></li>
-<li><a class="reference internal" href="#defusedxml-0-4" id="id56">defusedxml 0.4</a></li>
-<li><a class="reference internal" href="#defusedxml-0-3" id="id57">defusedxml 0.3</a></li>
-<li><a class="reference internal" href="#defusedxml-0-2" id="id58">defusedxml 0.2</a></li>
-<li><a class="reference internal" href="#defusedxml-0-1" id="id59">defusedxml 0.1</a></li>
+<li><a class="reference internal" href="#defusedxml-0-7-1" id="id48">defusedxml 0.7.1</a></li>
+<li><a class="reference internal" href="#defusedxml-0-7-0" id="id49">defusedxml 0.7.0</a></li>
+<li><a class="reference internal" href="#defusedxml-0-7-0rc2" id="id50">defusedxml 0.7.0rc2</a></li>
+<li><a class="reference internal" href="#defusedxml-0-7-0rc1" id="id51">defusedxml 0.7.0rc1</a></li>
+<li><a class="reference internal" href="#defusedxml-0-6-0" id="id52">defusedxml 0.6.0</a></li>
+<li><a class="reference internal" href="#defusedxml-0-6-0rc1" id="id53">defusedxml 0.6.0rc1</a></li>
+<li><a class="reference internal" href="#defusedxml-0-5-0" id="id54">defusedxml 0.5.0</a></li>
+<li><a class="reference internal" href="#defusedxml-0-5-0-rc1" id="id55">defusedxml 0.5.0.rc1</a></li>
+<li><a class="reference internal" href="#defusedxml-0-4-1" id="id56">defusedxml 0.4.1</a></li>
+<li><a class="reference internal" href="#defusedxml-0-4" id="id57">defusedxml 0.4</a></li>
+<li><a class="reference internal" href="#defusedxml-0-3" id="id58">defusedxml 0.3</a></li>
+<li><a class="reference internal" href="#defusedxml-0-2" id="id59">defusedxml 0.2</a></li>
+<li><a class="reference internal" href="#defusedxml-0-1" id="id60">defusedxml 0.1</a></li>
</ul>
</li>
</ul>
@@ -1311,15 +1312,24 @@
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#id47">Changelog</a></h1>
+<div class="section" id="defusedxml-0-7-1">
+<h2><a class="toc-backref" href="#id48">defusedxml 0.7.1</a></h2>
+<p><em>Release date: 08-Mar-2021</em></p>
+<ul class="simple">
+<li>Fix regression <tt class="docutils literal">defusedxml.ElementTree.ParseError</tt> (#63)
+The <tt class="docutils literal">ParseError</tt> exception is now the same class object as
+<tt class="docutils literal">xml.etree.ElementTree.ParseError</tt> again.</li>
+</ul>
+</div>
<div class="section" id="defusedxml-0-7-0">
-<h2><a class="toc-backref" href="#id48">defusedxml 0.7.0</a></h2>
+<h2><a class="toc-backref" href="#id49">defusedxml 0.7.0</a></h2>
<p><em>Release date: 4-Mar-2021</em></p>
<ul class="simple">
<li>No changes</li>
</ul>
</div>
<div class="section" id="defusedxml-0-7-0rc2">
-<h2><a class="toc-backref" href="#id49">defusedxml 0.7.0rc2</a></h2>
+<h2><a class="toc-backref" href="#id50">defusedxml 0.7.0rc2</a></h2>
<p><em>Release date: 12-Jan-2021</em></p>
<ul class="simple">
<li>Re-add and deprecate <tt class="docutils literal">defusedxml.cElementTree</tt></li>
@@ -1328,7 +1338,7 @@
</ul>
</div>
<div class="section" id="defusedxml-0-7-0rc1">
-<h2><a class="toc-backref" href="#id50">defusedxml 0.7.0rc1</a></h2>
+<h2><a class="toc-backref" href="#id51">defusedxml 0.7.0rc1</a></h2>
<p><em>Release date: 04-May-2020</em></p>
<ul class="simple">
<li>Add support for Python 3.9</li>
@@ -1337,7 +1347,7 @@
</ul>
</div>
<div class="section" id="defusedxml-0-6-0">
-<h2><a class="toc-backref" href="#id51">defusedxml 0.6.0</a></h2>
+<h2><a class="toc-backref" href="#id52">defusedxml 0.6.0</a></h2>
<p><em>Release date: 17-Apr-2019</em></p>
<ul class="simple">
<li>Increase test coverage.</li>
@@ -1345,7 +1355,7 @@
</ul>
</div>
<div class="section" id="defusedxml-0-6-0rc1">
-<h2><a class="toc-backref" href="#id52">defusedxml 0.6.0rc1</a></h2>
+<h2><a class="toc-backref" href="#id53">defusedxml 0.6.0rc1</a></h2>
<p><em>Release date: 14-Apr-2019</em></p>
<ul class="simple">
<li>Test on Python 3.7 stable and 3.8-dev</li>
@@ -1363,14 +1373,14 @@
</ul>
</div>
<div class="section" id="defusedxml-0-5-0">
-<h2><a class="toc-backref" href="#id53">defusedxml 0.5.0</a></h2>
+<h2><a class="toc-backref" href="#id54">defusedxml 0.5.0</a></h2>
<p><em>Release date: 07-Feb-2017</em></p>
<ul class="simple">
<li>No changes</li>
</ul>
</div>
<div class="section" id="defusedxml-0-5-0-rc1">
-<h2><a class="toc-backref" href="#id54">defusedxml 0.5.0.rc1</a></h2>
+<h2><a class="toc-backref" href="#id55">defusedxml 0.5.0.rc1</a></h2>
<p><em>Release date: 28-Jan-2017</em></p>
<ul class="simple">
<li>Add compatibility with Python 3.6</li>
@@ -1379,7 +1389,7 @@
</ul>
</div>
<div class="section" id="defusedxml-0-4-1">
-<h2><a class="toc-backref" href="#id55">defusedxml 0.4.1</a></h2>
+<h2><a class="toc-backref" href="#id56">defusedxml 0.4.1</a></h2>
<p><em>Release date: 28-Mar-2013</em></p>
<ul class="simple">
<li>Add more demo exploits, e.g. python_external.py and Xalan XSLT demos.</li>
@@ -1387,7 +1397,7 @@
</ul>
</div>
<div class="section" id="defusedxml-0-4">
-<h2><a class="toc-backref" href="#id56">defusedxml 0.4</a></h2>
+<h2><a class="toc-backref" href="#id57">defusedxml 0.4</a></h2>
<p><em>Release date: 25-Feb-2013</em></p>
<ul class="simple">
<li>As per <a class="reference external" href="http://seclists.org/oss-sec/2013/q1/340">http://seclists.org/oss-sec/2013/q1/340</a> please REJECT
@@ -1400,14 +1410,14 @@
</ul>
</div>
<div class="section" id="defusedxml-0-3">
-<h2><a class="toc-backref" href="#id57">defusedxml 0.3</a></h2>
+<h2><a class="toc-backref" href="#id58">defusedxml 0.3</a></h2>
<p><em>Release date: 19-Feb-2013</em></p>
<ul class="simple">
<li>Improve documentation</li>
</ul>
</div>
<div class="section" id="defusedxml-0-2">
-<h2><a class="toc-backref" href="#id58">defusedxml 0.2</a></h2>
+<h2><a class="toc-backref" href="#id59">defusedxml 0.2</a></h2>
<p><em>Release date: 15-Feb-2013</em></p>
<ul class="simple">
<li>Rename ExternalEntitiesForbidden to ExternalReferenceForbidden</li>
@@ -1422,7 +1432,7 @@
</ul>
</div>
<div class="section" id="defusedxml-0-1">
-<h2><a class="toc-backref" href="#id59">defusedxml 0.1</a></h2>
+<h2><a class="toc-backref" href="#id60">defusedxml 0.1</a></h2>
<p><em>Release date: 08-Feb-2013</em></p>
<ul class="simple">
<li>Initial and internal release for PSRT review</li>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/README.md new/defusedxml-0.7.1/README.md
--- old/defusedxml-0.7.0/README.md 2021-03-04 10:40:56.000000000 +0100
+++ new/defusedxml-0.7.1/README.md 2021-03-08 11:57:27.000000000 +0100
@@ -716,6 +716,14 @@
Injection](https://www.owasp.org/index.php/Testing_for_XML_Injection_\(OWAS…
# Changelog
+## defusedxml 0.7.1
+
+*Release date: 08-Mar-2021*
+
+ - Fix regression `defusedxml.ElementTree.ParseError` (\#63) The
+ `ParseError` exception is now the same class object as
+ `xml.etree.ElementTree.ParseError` again.
+
## defusedxml 0.7.0
*Release date: 4-Mar-2021*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/defusedxml/ElementTree.py new/defusedxml-0.7.1/defusedxml/ElementTree.py
--- old/defusedxml-0.7.0/defusedxml/ElementTree.py 2021-01-15 10:06:21.000000000 +0100
+++ new/defusedxml-0.7.1/defusedxml/ElementTree.py 2021-03-08 11:56:59.000000000 +0100
@@ -9,6 +9,7 @@
import sys
import warnings
+from xml.etree.ElementTree import ParseError
from xml.etree.ElementTree import TreeBuilder as _TreeBuilder
from xml.etree.ElementTree import parse as _parse
from xml.etree.ElementTree import tostring
@@ -20,7 +21,6 @@
else:
from xml.etree.ElementTree import XMLParser as _XMLParser
from xml.etree.ElementTree import iterparse as _iterparse
- from xml.etree.ElementTree import ParseError
from .common import (
@@ -63,13 +63,15 @@
_XMLParser = pure_pymod.XMLParser
_iterparse = pure_pymod.iterparse
- ParseError = pure_pymod.ParseError
+ # patch pure module to use ParseError from C extension
+ pure_pymod.ParseError = ParseError
- return _XMLParser, _iterparse, ParseError
+ return _XMLParser, _iterparse
if PY3:
- _XMLParser, _iterparse, ParseError = _get_py3_cls()
+ _XMLParser, _iterparse = _get_py3_cls()
+
_sentinel = object()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/defusedxml/__init__.py new/defusedxml-0.7.1/defusedxml/__init__.py
--- old/defusedxml-0.7.0/defusedxml/__init__.py 2021-03-04 10:40:27.000000000 +0100
+++ new/defusedxml-0.7.1/defusedxml/__init__.py 2021-03-08 11:56:59.000000000 +0100
@@ -56,7 +56,7 @@
return defused
-__version__ = "0.7.0"
+__version__ = "0.7.1"
__all__ = [
"DefusedXmlException",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/defusedxml/cElementTree.py new/defusedxml-0.7.1/defusedxml/cElementTree.py
--- old/defusedxml-0.7.0/defusedxml/cElementTree.py 2021-01-15 10:06:21.000000000 +0100
+++ new/defusedxml-0.7.1/defusedxml/cElementTree.py 2021-03-08 11:56:59.000000000 +0100
@@ -18,7 +18,19 @@
# iterparse from ElementTree!
from xml.etree.ElementTree import iterparse as _iterparse
-from .ElementTree import DefusedXMLParser
+# This module is an alias for ElementTree just like xml.etree.cElementTree
+from .ElementTree import (
+ XML,
+ XMLParse,
+ XMLParser,
+ XMLTreeBuilder,
+ fromstring,
+ iterparse,
+ parse,
+ tostring,
+ DefusedXMLParser,
+ ParseError,
+)
__origin__ = "xml.etree.cElementTree"
@@ -38,6 +50,7 @@
XML = fromstring
__all__ = [
+ "ParseError",
"XML",
"XMLParse",
"XMLParser",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/defusedxml.egg-info/PKG-INFO new/defusedxml-0.7.1/defusedxml.egg-info/PKG-INFO
--- old/defusedxml-0.7.0/defusedxml.egg-info/PKG-INFO 2021-03-04 10:44:35.000000000 +0100
+++ new/defusedxml-0.7.1/defusedxml.egg-info/PKG-INFO 2021-03-08 11:59:07.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: defusedxml
-Version: 0.7.0
+Version: 0.7.1
Summary: XML bomb protection for Python stdlib modules
Home-page: https://github.com/tiran/defusedxml
Author: Christian Heimes
@@ -821,6 +821,16 @@
Changelog
=========
+ defusedxml 0.7.1
+ ---------------------
+
+ *Release date: 08-Mar-2021*
+
+ - Fix regression ``defusedxml.ElementTree.ParseError`` (#63)
+ The ``ParseError`` exception is now the same class object as
+ ``xml.etree.ElementTree.ParseError`` again.
+
+
defusedxml 0.7.0
----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/defusedxml-0.7.0/tests.py new/defusedxml-0.7.1/tests.py
--- old/defusedxml-0.7.0/tests.py 2021-01-15 10:06:21.000000000 +0100
+++ new/defusedxml-0.7.1/tests.py 2021-03-08 11:56:59.000000000 +0100
@@ -214,6 +214,15 @@
self.assertIs(orig_elementtree, second_elementtree)
+ def test_orig_parseerror(self):
+ # https://github.com/tiran/defusedxml/issues/63
+ self.assertIs(self.module.ParseError, orig_elementtree.ParseError)
+ try:
+ self.parseString("invalid")
+ except Exception as e:
+ self.assertIsInstance(e, orig_elementtree.ParseError)
+ self.assertIsInstance(e, self.module.ParseError)
+
class TestDefusedcElementTree(TestDefusedElementTree):
module = cElementTree
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pylint for openSUSE:Factory checked in at 2021-04-01 14:15:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pylint (Old)
and /work/SRC/openSUSE:Factory/.python-pylint.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pylint"
Thu Apr 1 14:15:50 2021 rev:22 rq:880752 version:2.7.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pylint/python-pylint.changes 2021-02-16 22:34:53.869530598 +0100
+++ /work/SRC/openSUSE:Factory/.python-pylint.new.2401/python-pylint.changes 2021-04-01 14:15:52.603854595 +0200
@@ -1,0 +2,105 @@
+Mon Mar 22 13:00:31 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to 2.7.2
+ * Fix False Positive on ``Enum.__members__.items()``,
+ ``Enum.__members__.values``, and ``Enum.__members__.keys``
+ * Properly strip dangerous sys.path entries (not just the first
+ one)
+ * Workflow and packaging improvements
+- Release 2.7.1
+ * Expose ``UnittestLinter`` in pylint.testutils
+ * Don't check directories starting with '.' when using
+ register_plugins
+- Release 2.7.0
+ * Introduce DeprecationMixin for reusable deprecation checks.
+ * Fix false positive for ``builtin-not-iterating`` when ``map``
+ receives iterable
+ * Python 3.6+ is now required.
+ * Fix false positive for ``builtin-not-iterating`` when ``zip``
+ receives iterable
+ * Add ``nan-comparison`` check for NaN comparisons
+ * Bug fix for empty-comment message line number.
+ * Only emit ``bad-reversed-sequence`` on dictionaries if below
+ py3.8
+ * Handle class decorators applied to function.
+ * Add check for empty comments
+ * Fix minor documentation issue in contribute.rst
+ * Enums are now required to be named in UPPER_CASE by
+ ``invalid-name``.
+ * Add missing checks for deprecated functions.
+ * Postponed evaluation of annotations are now recognized by
+ default if python version is above 3.10
+ * Fix column metadata for anomalous backslash lints
+ * Drop support for Python 3.5
+ * Add support for pep585 with postponed evaluation
+ * Check alternative union syntax - PEP 604
+ * Fix multiple false positives with assignment expressions
+ * Fix TypedDict inherit-non-class false-positive Python 3.9+
+ * Fix issue with nested PEP 585 syntax
+ * Fix issue with nested PEP 604 syntax
+ * Fix a crash in ``undefined-variable`` caused by chained
+ attributes in metaclass
+ * Fix false positive for ``not-async-context-manager`` when
+ ``contextlib.asynccontextmanager`` is used
+ * Fix linter multiprocessing pool shutdown (triggered warnings
+ when runned in parallels with other pytest plugins)
+ * Fix a false-positive emission of ``no-self-use`` and
+ ``unused-argument`` for methods of generic structural types
+ (`Protocol[T]`)
+ * Fix bug that lead to duplicate messages when using
+ ``--jobs 2`` or more.
+ * Adds option ``check-protected-access-in-special-methods`` in
+ the ClassChecker to activate/deactivate
+ ``protected-access`` message emission for single underscore
+ prefixed attribute in special methods.
+ * Fix vulnerable regular expressions in ``pyreverse``
+ * ``inconsistent-return-statements`` message is now emitted if
+ one of ``try/except`` statement is not returning explicitly
+ while the other do.
+ * Fix ``useless-super-delegation`` false positive when default
+ keyword argument is a dictionnary.
+ * Fix a crash when a specified config file does not exist
+ * Add support to ``ignored-argument-names`` in
+ DocstringParameterChecker and adds ``useless-param-doc`` and
+ ``useless-type-doc`` messages.
+ * Enforce docparams consistently when docstring is not present
+ * Fix ``duplicate-code`` false positive when lines only contain
+ whitespace and non-alphanumeric characters (e.g. parentheses,
+ bracket, comman, etc.)
+ * Improve lint message for ``singleton-comparison`` with bools
+ * Fix spell-checker crash on indented docstring lines that look
+ like # comments
+ * Fix AttributeError in checkers/refactoring.py
+ * Improve sphinx directives spelling filter
+ * Fix a bug with postponed evaluation when using aliases for
+ annotations.
+ * Fix minor documentation issues
+ * Improve the performance of the line length check.
+ * Removed incorrect deprecation of ``inspect.getfullargspec``
+ * Fix ``signature-differs`` false positive for functions with
+ variadics
+ * Fix a crash in ``consider-using-enumerate`` when encountering
+ ``range()`` without arguments
+ * ``len-as-conditions`` is now triggered only for classes that
+ are inheriting directly from list, dict, or set and not
+ implementing the ``__bool__`` function, or from generators
+ like range or list/dict/set comprehension. This should reduce
+ the false positives for other classes, like pandas's DataFrame
+ or numpy's Array.
+ * Fixes duplicate-errors not working with -j2+
+ * ``generated-members`` now matches the qualified name of members
+ * Add check for bool function to ``len-as-condition``
+ * Add ``simplifiable-condition`` check for extraneous constants
+ in conditionals using and/or.
+ * Add ``condition-evals-to-constant`` check for conditionals
+ using and/or that evaluate to a constant.
+ * Changed setup.py to work with distlib
+ * New check: ``consider-using-generator``
+ This check warns when a comprehension is used inside an
+ ``any`` or ``all`` function, since it is unnecessary and
+ should be replaced by a generator instead. Using a generator
+ would be less code and way faster.
+ * Add Github Actions to replace Travis and AppVeyor in the
+ future
+
+-------------------------------------------------------------------
Old:
----
pylint-2.6.2.tar.gz
New:
----
pylint-2.7.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pylint.spec ++++++
--- /var/tmp/diff_new_pack.oGkwLF/_old 2021-04-01 14:15:53.067855401 +0200
+++ /var/tmp/diff_new_pack.oGkwLF/_new 2021-04-01 14:15:53.067855401 +0200
@@ -20,7 +20,7 @@
%bcond_without tests
%define skip_python2 1
Name: python-pylint
-Version: 2.6.2
+Version: 2.7.2
Release: 0
Summary: Syntax and style checker for Python code
License: GPL-2.0-or-later
@@ -30,14 +30,12 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-astroid >= 2.4.0
-Requires: python-editdistance
+Requires: python-astroid >= 2.5.1
Requires: python-isort >= 4.2.5
Requires: python-mccabe >= 0.6
Requires: python-toml >= 0.7.1
%if %{with tests}
-BuildRequires: %{python_module astroid >= 2.4.0}
-BuildRequires: %{python_module editdistance}
+BuildRequires: %{python_module astroid >= 2.5.1}
BuildRequires: %{python_module isort >= 4.2.5}
BuildRequires: %{python_module mccabe >= 0.6}
BuildRequires: %{python_module pytest-benchmark}
@@ -47,7 +45,7 @@
BuildRequires: %{python_module toml >= 0.7.1}
%endif
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
@@ -69,9 +67,7 @@
%prep
%setup -q -n pylint-%{version}
-
-# fix test: ignore unexpected message gh#PyCQA/pylint#3635
-sed -i 's/import matplotlib.pyplot as plt/& # pylint: disable=no-name-in-module/' tests/functional/u/undefined_variable.py
+sed -i '1{/^#!/ d}' pylint/__main__.py
%build
export LC_ALL="en_US.UTF-8"
@@ -83,30 +79,25 @@
for p in pylint epylint pyreverse symilar ; do
%python_clone -a %{buildroot}%{_bindir}/$p
done
-
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%post
-%python_install_alternative pylint epylint pyreverse symilar
-
-%postun
-%python_uninstall_alternative pylint
-
%if %{with tests}
%check
export LC_ALL="en_US.UTF-8"
-# this tests needs the local source dir for imports,
-# gh#openSUSE/python-rpm-macros#48
+# need the local dir for imports from tests ...
export PYTHONPATH=$(pwd)
-%pytest -k test_version
-# others must not import from local source dir
-# gh#PyCQA/pylint#3636
-export PYTHONPATH=""
-# test_functional[unused_typing_imports] fails in the python36 flavor for TW
-python36_skiptest=" or (test_functional and unused_typing_imports)"
-%pytest -k "not (test_version ${$python_skiptest})" --benchmark-disable
+# ... but make sure that we import from installed package
+mv pylint pylint.tmp
+%pytest --benchmark-disable
+mv pylint.tmp pylint
%endif
+%post
+%python_install_alternative pylint epylint pyreverse symilar
+
+%postun
+%python_uninstall_alternative pylint
+
%files %{python_files}
%license COPYING
%doc ChangeLog README.rst
++++++ pylint-2.6.2.tar.gz -> pylint-2.7.2.tar.gz ++++++
++++ 23032 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-hypothesmith for openSUSE:Factory checked in at 2021-04-01 14:15:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hypothesmith (Old)
and /work/SRC/openSUSE:Factory/.python-hypothesmith.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hypothesmith"
Thu Apr 1 14:15:50 2021 rev:4 rq:880624 version:0.1.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hypothesmith/python-hypothesmith.changes 2020-11-17 21:21:16.205084514 +0100
+++ /work/SRC/openSUSE:Factory/.python-hypothesmith.new.2401/python-hypothesmith.changes 2021-04-01 14:15:51.739853099 +0200
@@ -1,0 +2,12 @@
+Sun Mar 21 20:41:41 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to v0.1.8
+ * Now compatible with Hypothesis 5.46 and later
+ * Increased diversity of examples generated by from_node()
+- Release v0.1.7
+ * Adds a workaround for BPO-42218
+ * Bumped Hypothesis requirement to version 5.41 or later
+ (better internal error messages)
+ * Added MANIFEST.in so the sdist includes license, tests, etc.
+
+-------------------------------------------------------------------
Old:
----
hypothesmith-0.1.6.tar.gz
hypothesmith-gh-0.1.6.tar.gz
New:
----
hypothesmith-0.1.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-hypothesmith.spec ++++++
--- /var/tmp/diff_new_pack.kHkgrj/_old 2021-04-01 14:15:52.167853841 +0200
+++ /var/tmp/diff_new_pack.kHkgrj/_new 2021-04-01 14:15:52.171853847 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package python-hypothesmith
+# spec file for package python-hypothesmith-test
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,9 +18,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
-# no release tags in repository, but we need LICENSE and tests not
-# packaged in PyPI source https://github.com/Zac-HD/hypothesmith/issues/5
-%define commithash 40947c2e590f06ea5f3b88c6e75d8a98e9443c63
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
@@ -30,24 +27,23 @@
%bcond_with test
%endif
Name: python-hypothesmith%{psuffix}
-Version: 0.1.6
+Version: 0.1.8
Release: 0
Summary: Hypothesis strategies for generating Python programs, something like CSmith
License: MPL-2.0
URL: https://github.com/Zac-HD/hypothesmith
Source: https://files.pythonhosted.org/packages/source/h/hypothesmith/hypothesmith-…
-Source1: https://github.com/Zac-HD/hypothesmith/archive/%{commithash}.tar.gz#/hypoth…
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-base >= 3.6
-Requires: python-hypothesis >= 5.23.7
+Requires: python-hypothesis >= 5.46
Requires: python-lark-parser >= 0.7.2
Requires: python-libcst >= 0.3.8
%if %{with test}
BuildRequires: %{python_module black}
-BuildRequires: %{python_module hypothesis >= 5.23.7}
+BuildRequires: %{python_module hypothesis >= 5.46}
BuildRequires: %{python_module lark-parser >= 0.7.2}
BuildRequires: %{python_module libcst >= 0.3.8}
BuildRequires: %{python_module parso}
@@ -61,8 +57,9 @@
Hypothesis strategies for generating Python programs, something like CSmith.
%prep
-%setup -q -n hypothesmith-%{version} -b 1
-cp -r ../hypothesmith-%{commithash}/{LICENSE,CHANGELOG.md,tests} .
+%setup -q -n hypothesmith-%{version}
+# remove pytest coverage opts
+rm tox.ini
%build
%if !%{with test}
++++++ hypothesmith-0.1.6.tar.gz -> hypothesmith-0.1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/CHANGELOG.md new/hypothesmith-0.1.8/CHANGELOG.md
--- old/hypothesmith-0.1.6/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/CHANGELOG.md 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,68 @@
+# Changelog
+
+### 0.1.8 - 2021-01-10
+- Now compatible with Hypothesis 5.46 and later
+- Increased diversity of examples generated by `from_node()`
+
+### 0.1.7 - 2020-11-15
+- Adds a workaround for [BPO-42218](https://bugs.python.org/issue42218)
+- Bumped Hypothesis requirement to version 5.41 or later (better internal error messages)
+- Added `MANIFEST.in` so the sdist includes license, tests, etc.
+
+### 0.1.6 - 2020-11-01
+- Improved error messages from internal compiler errors *again*
+ ([BPO-42218](https://bugs.python.org/issue42218) will be fixed in Python 3.9.1)
+- Bumped Hypothesis requirement to version 5.39 or later
+
+### 0.1.5 - 2020-10-12
+- Emit additional debug info when Python fails to compile a string
+
+### 0.1.4 - 2020-08-16
+- Improve handling of identifiers
+- Fix internal error in `from_grammar("single_input")`
+
+### 0.1.3 - 2020-07-30
+- Update to latest versions of LibCST and Hypothesis, for Python 3.9 support
+
+### 0.1.2 - 2020-05-17
+- Emit *more* debug info to diagnose a `compile()` issue in CPython nightly
+
+### 0.1.1 - 2020-05-17
+- Emit some debug info to help diagnose a possible upstream bug in CPython nightly
+
+### 0.1.0 - 2020-04-24
+- Added `auto_target=True` argument to the `from_node()` strategy.
+- Improved `from_node()` generation of comments and trailing whitespace.
+
+### 0.0.8 - 2020-04-23
+- Added a `from_node()` strategy which uses [`LibCST`](https://pypi.org/project/libcst/)
+ to generate source code. This is a proof-of-concept rather than a robust tool,
+ but IMO it's a pretty cool concept.
+
+### 0.0.7 - 2020-04-19
+- The `from_grammar()` strategy now takes an `auto_target=True` argument, to
+drive generated examples towards (relatively) larger and more complex programs.
+
+### 0.0.6 - 2020-04-08
+- support for non-ASCII identifiers
+
+### 0.0.5 - 2019-11-27
+- Updated project metadata and started testing on Python 3.8
+
+### 0.0.4 - 2019-09-10
+- Depends on more recent Hypothesis version, with upstreamed grammar generation.
+- Improved filtering rejects fewer valid examples, finding another bug in Black.
+
+### 0.0.3 - 2019-08-08
+Checks validity at statement level, which makes filtering much more efficient.
+Improved testing, input validation, and code comments.
+
+### 0.0.2 - 2019-08-07
+Improved filtering and fixing of source code generated from the grammar.
+This version found a novel bug: `"pass #\\r#\\n"` is accepted by the
+built-in `compile()` and `exec()` functions, but not by `black` or `lib2to3`.
+
+### 0.0.1 - 2019-08-06
+Initial release. This is a minimal proof of concept, generating from the
+grammar and rejecting it if we get errors from `black` or `tokenize`.
+Cool, but while promising not very useful at this stage.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/LICENSE new/hypothesmith-0.1.8/LICENSE
--- old/hypothesmith-0.1.6/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/LICENSE 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/MANIFEST.in new/hypothesmith-0.1.8/MANIFEST.in
--- old/hypothesmith-0.1.6/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/MANIFEST.in 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,5 @@
+include *.md
+include LICENSE
+include tox.ini
+recursive-include deps *.in *.md *.txt
+recursive-include tests *.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/PKG-INFO new/hypothesmith-0.1.8/PKG-INFO
--- old/hypothesmith-0.1.6/PKG-INFO 2020-11-01 14:21:03.061625000 +0100
+++ new/hypothesmith-0.1.8/PKG-INFO 2021-01-10 13:36:42.288650000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesmith
-Version: 0.1.6
+Version: 0.1.8
Summary: Hypothesis strategies for generating Python programs, something like CSmith
Home-page: https://github.com/Zac-HD/hypothesmith
Author: Zac Hatfield-Dodds
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/deps/README.md new/hypothesmith-0.1.8/deps/README.md
--- old/hypothesmith-0.1.6/deps/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/deps/README.md 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,17 @@
+# Pinning dependencies
+
+Hypothesmith pins *all* our dependencies for testing, and disables installation
+of any unlisted dependencies to make sure the set of pins is complete.
+
+How does this work?
+
+1. `setup.py` lists all our top-level dependencies for the library,
+ and *also* lists the development and test-time dependencies.
+2. `pip-compile` calculates all the transitive dependencies we need,
+ with exact version pins. We use `tox -e deps` to make this more
+ convenient, and don't bother pinning `pip-tools` as it's always
+ run manually (never in CI).
+3. `tox` then installs from the files full of pinned versions here!
+
+That's it - a simple implementation but it stabilises the whole dependency
+chain and really improves visibility :-)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/deps/check.in new/hypothesmith-0.1.8/deps/check.in
--- old/hypothesmith-0.1.6/deps/check.in 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/deps/check.in 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,8 @@
+# Top-level dependencies for `tox -e check`
+flake8
+flake8-bandit
+flake8-bugbear
+flake8-comprehensions
+flake8-docstrings
+mypy
+shed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/deps/check.txt new/hypothesmith-0.1.8/deps/check.txt
--- old/hypothesmith-0.1.6/deps/check.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/deps/check.txt 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,120 @@
+#
+# This file is autogenerated by pip-compile
+# To update, run:
+#
+# pip-compile --output-file=deps/check.txt deps/check.in
+#
+appdirs==1.4.4
+ # via black
+attrs==20.3.0
+ # via flake8-bugbear
+autoflake==1.4
+ # via shed
+bandit==1.7.0
+ # via flake8-bandit
+black==20.8b1
+ # via shed
+click==7.1.2
+ # via
+ # black
+ # pybetter
+ # pyemojify
+colorama==0.4.4
+ # via bandit
+flake8-bandit==2.1.2
+ # via -r deps/check.in
+flake8-bugbear==20.11.1
+ # via -r deps/check.in
+flake8-comprehensions==3.3.1
+ # via -r deps/check.in
+flake8-docstrings==1.5.0
+ # via -r deps/check.in
+flake8-polyfill==1.0.2
+ # via flake8-bandit
+flake8==3.8.4
+ # via
+ # -r deps/check.in
+ # flake8-bandit
+ # flake8-bugbear
+ # flake8-comprehensions
+ # flake8-docstrings
+ # flake8-polyfill
+gitdb==4.0.5
+ # via gitpython
+gitpython==3.1.12
+ # via bandit
+importlib-metadata==3.3.0
+ # via
+ # flake8
+ # flake8-comprehensions
+ # stevedore
+isort==5.7.0
+ # via shed
+libcst==0.3.16
+ # via pybetter
+mccabe==0.6.1
+ # via flake8
+mypy-extensions==0.4.3
+ # via
+ # black
+ # mypy
+ # typing-inspect
+mypy==0.790
+ # via -r deps/check.in
+pathspec==0.8.1
+ # via black
+pbr==5.5.1
+ # via stevedore
+pybetter==0.3.5
+ # via shed
+pycodestyle==2.6.0
+ # via
+ # flake8
+ # flake8-bandit
+pydocstyle==5.1.1
+ # via flake8-docstrings
+pyemojify==0.2.0
+ # via pybetter
+pyflakes==2.2.0
+ # via
+ # autoflake
+ # flake8
+pygments==2.7.3
+ # via pybetter
+pyupgrade==2.7.4
+ # via shed
+pyyaml==5.3.1
+ # via
+ # bandit
+ # libcst
+regex==2020.11.13
+ # via black
+shed==0.2.5
+ # via -r deps/check.in
+six==1.15.0
+ # via bandit
+smmap==3.0.4
+ # via gitdb
+snowballstemmer==2.0.0
+ # via pydocstyle
+stevedore==3.3.0
+ # via bandit
+tokenize-rt==4.0.0
+ # via pyupgrade
+toml==0.10.2
+ # via black
+typed-ast==1.4.2
+ # via
+ # black
+ # mypy
+typing-extensions==3.7.4.3
+ # via
+ # black
+ # importlib-metadata
+ # libcst
+ # mypy
+ # typing-inspect
+typing-inspect==0.6.0
+ # via libcst
+zipp==3.4.0
+ # via importlib-metadata
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/deps/test.in new/hypothesmith-0.1.8/deps/test.in
--- old/hypothesmith-0.1.6/deps/test.in 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/deps/test.in 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,6 @@
+# Top-level dependencies for `tox -e test`
+black
+parso
+pytest
+pytest-cov
+pytest-xdist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/deps/test.txt new/hypothesmith-0.1.8/deps/test.txt
--- old/hypothesmith-0.1.6/deps/test.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/deps/test.txt 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,90 @@
+#
+# This file is autogenerated by pip-compile
+# To update, run:
+#
+# pip-compile --output-file=deps/test.txt deps/test.in setup.py
+#
+apipkg==1.5
+ # via execnet
+appdirs==1.4.4
+ # via black
+atomicwrites==1.4.0
+ # via pytest
+attrs==20.3.0
+ # via
+ # hypothesis
+ # pytest
+black==20.8b1
+ # via -r deps/test.in
+click==7.1.2
+ # via black
+colorama==0.4.4
+ # via pytest
+coverage==5.3.1
+ # via pytest-cov
+execnet==1.7.1
+ # via pytest-xdist
+hypothesis==6.0.0
+ # via hypothesmith (setup.py)
+importlib-metadata==3.3.0
+ # via
+ # pluggy
+ # pytest
+iniconfig==1.1.1
+ # via pytest
+lark-parser==0.11.1
+ # via hypothesmith (setup.py)
+libcst==0.3.16
+ # via hypothesmith (setup.py)
+mypy-extensions==0.4.3
+ # via
+ # black
+ # typing-inspect
+packaging==20.8
+ # via pytest
+parso==0.8.1
+ # via -r deps/test.in
+pathspec==0.8.1
+ # via black
+pluggy==0.13.1
+ # via pytest
+py==1.10.0
+ # via
+ # pytest
+ # pytest-forked
+pyparsing==2.4.7
+ # via packaging
+pytest-cov==2.10.1
+ # via -r deps/test.in
+pytest-forked==1.3.0
+ # via pytest-xdist
+pytest-xdist==2.2.0
+ # via -r deps/test.in
+pytest==6.2.1
+ # via
+ # -r deps/test.in
+ # pytest-cov
+ # pytest-forked
+ # pytest-xdist
+pyyaml==5.3.1
+ # via libcst
+regex==2020.11.13
+ # via black
+sortedcontainers==2.3.0
+ # via hypothesis
+toml==0.10.2
+ # via
+ # black
+ # pytest
+typed-ast==1.4.2
+ # via black
+typing-extensions==3.7.4.3
+ # via
+ # black
+ # importlib-metadata
+ # libcst
+ # typing-inspect
+typing-inspect==0.6.0
+ # via libcst
+zipp==3.4.0
+ # via importlib-metadata
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/setup.py new/hypothesmith-0.1.8/setup.py
--- old/hypothesmith-0.1.6/setup.py 2020-11-01 14:20:53.000000000 +0100
+++ new/hypothesmith-0.1.8/setup.py 2021-01-10 13:36:24.000000000 +0100
@@ -32,7 +32,7 @@
license="MPL 2.0",
description="Hypothesis strategies for generating Python programs, something like CSmith",
zip_safe=False,
- install_requires=["hypothesis>=5.39.0", "lark-parser>=0.7.2", "libcst>=0.3.8"],
+ install_requires=["hypothesis>=5.41.0", "lark-parser>=0.7.2", "libcst>=0.3.8"],
python_requires=">=3.6",
classifiers=[
"Development Status :: 4 - Beta",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/src/hypothesmith/__init__.py new/hypothesmith-0.1.8/src/hypothesmith/__init__.py
--- old/hypothesmith-0.1.6/src/hypothesmith/__init__.py 2020-11-01 14:20:53.000000000 +0100
+++ new/hypothesmith-0.1.8/src/hypothesmith/__init__.py 2021-01-10 13:36:24.000000000 +0100
@@ -3,5 +3,5 @@
from hypothesmith.cst import from_node
from hypothesmith.syntactic import from_grammar
-__version__ = "0.1.6"
+__version__ = "0.1.8"
__all__ = ["from_grammar", "from_node"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/src/hypothesmith/cst.py new/hypothesmith-0.1.8/src/hypothesmith/cst.py
--- old/hypothesmith-0.1.6/src/hypothesmith/cst.py 2020-11-01 14:20:53.000000000 +0100
+++ new/hypothesmith-0.1.8/src/hypothesmith/cst.py 2021-01-10 13:36:24.000000000 +0100
@@ -7,7 +7,7 @@
import ast
import dis
-from inspect import getfullargspec
+from inspect import getfullargspec, isabstract
from tokenize import (
Floatnumber as FLOATNUMBER_RE,
Imagnumber as IMAGNUMBER_RE,
@@ -16,7 +16,10 @@
from typing import Type
import libcst
-from hypothesis import infer, strategies as st, target
+from hypothesis import assume, infer, strategies as st, target
+from hypothesis.strategies._internal.types import _global_type_lookup
+from libcst._nodes.expression import ExpressionPosition
+from libcst._nodes.statement import _INDENT_WHITESPACE_RE
from hypothesmith.syntactic import identifiers
@@ -65,8 +68,13 @@
# inference to provide most of our arguments for us.
# However, in some cases we want to either restrict arguments (e.g. libcst.Name),
# or supply something nastier than the default argument (e.g. libcst.SimpleWhitespace)
+nonempty_whitespace = st.builds(
+ libcst.SimpleWhitespace, st.from_regex(" +", fullmatch=True)
+)
REGISTERED = (
+ [libcst.Asynchronous, nonempty_whitespace],
[libcst.AsName, st.from_type(libcst.Name)],
+ [libcst.AnnAssign, infer, infer, infer],
[libcst.Assign, nonempty_seq(libcst.AssignTarget)],
[libcst.Comparison, infer, nonempty_seq(libcst.ComparisonTarget)],
[libcst.Decorator, st.from_type(libcst.Name) | st.from_type(libcst.Attribute)],
@@ -78,8 +86,23 @@
st.from_type(libcst.Name) | st.from_type(libcst.Attribute),
nonempty_seq(libcst.ImportAlias),
],
+ [
+ libcst.IndentedBlock,
+ infer,
+ infer,
+ st.from_regex(_INDENT_WHITESPACE_RE, fullmatch=True),
+ ],
+ [libcst.IsNot, infer, nonempty_whitespace, infer],
[libcst.NamedExpr, st.from_type(libcst.Name)],
- [libcst.Nonlocal, nonempty_seq(libcst.NameItem)],
+ [
+ libcst.Nonlocal,
+ nonempty_seq(libcst.NameItem).map(
+ lambda names: names[:-1]
+ + [names[-1].with_changes(comma=libcst.MaybeSentinel.DEFAULT)]
+ ),
+ ],
+ [libcst.NotEqual, st.just("!=")],
+ [libcst.NotIn, infer, nonempty_whitespace, infer],
[libcst.Set, nonempty_seq(libcst.Element, libcst.StarredElement)],
[libcst.Subscript, infer, nonempty_seq(libcst.SubscriptElement)],
[libcst.TrailingWhitespace, infer, infer],
@@ -87,6 +110,14 @@
)
+(a)st.composite
+def builds_filtering(draw, t, **kwargs): # type: ignore
+ try:
+ return draw(st.builds(t, **kwargs))
+ except libcst.CSTValidationError:
+ assume(False)
+
+
# This is where the magic happens: teach `st.from_type` to generate each node type
for node_type, *strats in REGISTERED:
# TODO: once everything else is working, come back here and use `infer` for
@@ -95,7 +126,7 @@
# Mostly this will consist of ensuring that parens remain balanced.
args = [name for name in getfullargspec(node_type).args if name != "self"]
kwargs = dict(zip(args, strats))
- st.register_type_strategy(node_type, st.builds(node_type, **kwargs))
+ st.register_type_strategy(node_type, builds_filtering(node_type, **kwargs))
# We have special handling for `Try` nodes, because there are two options.
# If a Try node has no `except` clause, it *must* have a `finally` clause and
@@ -108,7 +139,7 @@
libcst.Try,
body=infer,
handlers=st.lists(
- st.from_type(libcst.ExceptHandler),
+ st.deferred(lambda: st.from_type(libcst.ExceptHandler)),
min_size=1,
unique_by=lambda caught: caught.type,
),
@@ -117,6 +148,81 @@
),
)
+# Assert can either have a comma and message, or neither
+st.register_type_strategy(
+ libcst.Assert,
+ st.builds(
+ libcst.Assert,
+ test=infer,
+ whitespace_after_assert=nonempty_whitespace,
+ semicolon=infer,
+ )
+ | st.builds(
+ libcst.Assert,
+ test=infer,
+ whitespace_after_assert=nonempty_whitespace,
+ comma=st.from_type(libcst.Comma),
+ msg=st.from_type(libcst.BaseExpression),
+ semicolon=infer,
+ ),
+)
+
+# either posargs, kwargs, or **args, but only one at a time
+st.register_type_strategy(
+ libcst.Arg,
+ st.builds(
+ libcst.Arg,
+ value=infer,
+ comma=infer,
+ star=infer,
+ whitespace_after_star=infer,
+ whitespace_after_arg=infer,
+ )
+ | st.builds(
+ libcst.Arg,
+ value=infer,
+ keyword=st.from_type(libcst.Name),
+ equal=st.from_type(libcst.AssignEqual),
+ comma=infer,
+ star=st.just(""),
+ whitespace_after_arg=infer,
+ ),
+)
+
+
+(a)st.composite
+def boolean_op_with_whitespace(draw): # type: ignore
+ # for BooleanOperation, some expressions require whitespace before
+ # and/or after e.g. a or b whereas (1)or(2) is OK.
+ left = draw(st.from_type(libcst.BaseExpression))
+ right = draw(st.from_type(libcst.BaseExpression))
+ op = draw(st.from_type(libcst.BaseBooleanOp))
+ if op.whitespace_before.empty and not left._safe_to_use_with_word_operator(
+ ExpressionPosition.LEFT
+ ): # pragma: no cover
+ op = op.with_changes(whitespace_before=libcst.SimpleWhitespace(" "))
+ if op.whitespace_after.empty and not right._safe_to_use_with_word_operator(
+ ExpressionPosition.RIGHT
+ ): # pragma: no cover
+ op = op.with_changes(whitespace_after=libcst.SimpleWhitespace(" "))
+ return libcst.BooleanOperation(left, op, right)
+
+
+st.register_type_strategy(libcst.BooleanOperation, boolean_op_with_whitespace())
+
+
+# TODO: this works pretty well, but it's also a pretty poor trick for performance.
+# Instead of filtering, we should continue expanding the specific node
+# strategies as used above in order to generate valid things by construction.
+for t in vars(libcst).values():
+ if (
+ isinstance(t, type)
+ and not isabstract(t)
+ and issubclass(t, libcst.CSTNode)
+ and t not in _global_type_lookup
+ ):
+ st.register_type_strategy(t, builds_filtering(t))
+
def record_targets(code: str) -> str:
# target larger inputs - the Hypothesis engine will do a multi-objective
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/src/hypothesmith/syntactic.py new/hypothesmith-0.1.8/src/hypothesmith/syntactic.py
--- old/hypothesmith-0.1.6/src/hypothesmith/syntactic.py 2020-11-01 14:20:53.000000000 +0100
+++ new/hypothesmith-0.1.8/src/hypothesmith/syntactic.py 2021-01-10 13:36:24.000000000 +0100
@@ -117,8 +117,14 @@
# CPython parser and AST-post-processor, so we just filter out errors.
assume(False)
except Exception as err: # pragma: no cover
- # Extra output to help track down a possible upstream issue
- # https://github.com/Zac-HD/stdlib-property-tests/issues/14
+ # Attempting to compile almost-valid strings has triggered a wide range
+ # of bizzare errors in CPython, especially with the new PEG parser,
+ # and so we maintain this extra clause to ensure that we get a decent
+ # error message out of it.
+ if isinstance(err, SystemError) and sys.version_info[:3] == (3, 9, 0):
+ # We've triggered https://bugs.python.org/issue42218 - it's been
+ # fixed upstream, so we'll treat it as if it were a SyntaxError.
+ assume(False)
source_code = ascii("".join(draw_state.result[count:]))
raise type(err)(
f"compile({source_code}, '<string>', "
@@ -129,6 +135,8 @@
def gen_ignore(self, data, draw_state): # type: ignore
# Set a consistent 1/4 chance of generating any ignored tokens (comments,
# whitespace, line-continuations) as part of this draw.
+ # See https://github.com/HypothesisWorks/hypothesis/issues/2643 for plans
+ # to do more sophisticated swarm testing for grammars, upstream.
if data.draw(
st.shared(
st.sampled_from([False, True, False, False]),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/src/hypothesmith.egg-info/PKG-INFO new/hypothesmith-0.1.8/src/hypothesmith.egg-info/PKG-INFO
--- old/hypothesmith-0.1.6/src/hypothesmith.egg-info/PKG-INFO 2020-11-01 14:21:02.000000000 +0100
+++ new/hypothesmith-0.1.8/src/hypothesmith.egg-info/PKG-INFO 2021-01-10 13:36:41.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesmith
-Version: 0.1.6
+Version: 0.1.8
Summary: Hypothesis strategies for generating Python programs, something like CSmith
Home-page: https://github.com/Zac-HD/hypothesmith
Author: Zac Hatfield-Dodds
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/src/hypothesmith.egg-info/SOURCES.txt new/hypothesmith-0.1.8/src/hypothesmith.egg-info/SOURCES.txt
--- old/hypothesmith-0.1.6/src/hypothesmith.egg-info/SOURCES.txt 2020-11-01 14:21:02.000000000 +0100
+++ new/hypothesmith-0.1.8/src/hypothesmith.egg-info/SOURCES.txt 2021-01-10 13:36:42.000000000 +0100
@@ -1,5 +1,14 @@
+CHANGELOG.md
+LICENSE
+MANIFEST.in
README.md
setup.py
+tox.ini
+deps/README.md
+deps/check.in
+deps/check.txt
+deps/test.in
+deps/test.txt
src/hypothesmith/__init__.py
src/hypothesmith/cst.py
src/hypothesmith/py.typed
@@ -10,4 +19,8 @@
src/hypothesmith.egg-info/dependency_links.txt
src/hypothesmith.egg-info/not-zip-safe
src/hypothesmith.egg-info/requires.txt
-src/hypothesmith.egg-info/top_level.txt
\ No newline at end of file
+src/hypothesmith.egg-info/top_level.txt
+tests/conftest.py
+tests/test_cst.py
+tests/test_syntactic.py
+tests/test_version.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/src/hypothesmith.egg-info/requires.txt new/hypothesmith-0.1.8/src/hypothesmith.egg-info/requires.txt
--- old/hypothesmith-0.1.6/src/hypothesmith.egg-info/requires.txt 2020-11-01 14:21:02.000000000 +0100
+++ new/hypothesmith-0.1.8/src/hypothesmith.egg-info/requires.txt 2021-01-10 13:36:41.000000000 +0100
@@ -1,3 +1,3 @@
-hypothesis>=5.39.0
+hypothesis>=5.41.0
lark-parser>=0.7.2
libcst>=0.3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/tests/conftest.py new/hypothesmith-0.1.8/tests/conftest.py
--- old/hypothesmith-0.1.6/tests/conftest.py 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/tests/conftest.py 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,8 @@
+from hypothesis import HealthCheck, settings
+
+settings.register_profile(
+ "slow",
+ deadline=None,
+ suppress_health_check=[HealthCheck.too_slow, HealthCheck.filter_too_much],
+)
+settings.load_profile("slow")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/tests/test_cst.py new/hypothesmith-0.1.8/tests/test_cst.py
--- old/hypothesmith-0.1.6/tests/test_cst.py 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/tests/test_cst.py 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,89 @@
+"""Tests for the hypothesmith.cst module."""
+import ast
+from inspect import isabstract
+from operator import attrgetter
+
+import black
+import libcst
+import parso
+import pytest
+from hypothesis import example, given, note, strategies as st
+
+import hypothesmith
+from hypothesmith.cst import compilable
+
+NODE_TYPES = frozenset(
+ v
+ for v in vars(libcst).values()
+ if isinstance(v, type) and issubclass(v, libcst.CSTNode) and not isabstract(v)
+)
+
+
+(a)pytest.mark.parametrize("node", sorted(NODE_TYPES, key=attrgetter("__name__")))
+(a)given(data=st.data())
+def test_source_code_from_libcst_node_type(node, data):
+ try:
+ val = data.draw(st.from_type(node))
+ except NameError:
+ pytest.skip("NameError, probably a forward reference")
+ except TypeError as e:
+ if str(e).startswith("super"):
+ pytest.skip("something weird here, back later")
+ if str(e).startswith("Can't instantiate"):
+ pytest.skip("abstract classes somehow leaking into builds()")
+ raise
+ note(val)
+ if not isinstance(val, libcst.Module):
+ val = libcst.Module([val])
+ try:
+ code = val.code
+ except libcst._nodes.base.CSTCodegenError:
+ pytest.skip("codegen not supported yet, e.g. Annotation")
+ note(code)
+
+
+(a)pytest.mark.skipif(not hasattr(ast, "unparse"), reason="Can't test before available")
+(a)given(source_code=hypothesmith.from_node())
+def test_ast_unparse_from_nodes(source_code):
+ first = ast.parse(source_code)
+ unparsed = ast.unparse(first)
+ second = ast.parse(unparsed)
+ assert ast.dump(first) == ast.dump(second)
+
+
+(a)pytest.mark.xfail
+@example("A\u2592", black.FileMode())
+@given(
+ source_code=hypothesmith.from_node(),
+ mode=st.builds(
+ black.FileMode,
+ line_length=st.just(88) | st.integers(0, 200),
+ string_normalization=st.booleans(),
+ is_pyi=st.booleans(),
+ ),
+)
+def test_black_autoformatter_from_nodes(source_code, mode):
+ try:
+ result = black.format_file_contents(source_code, fast=False, mode=mode)
+ except black.NothingChanged:
+ pass
+ else:
+ with pytest.raises(black.NothingChanged):
+ black.format_file_contents(result, fast=False, mode=mode)
+
+
+(a)given(source_code=hypothesmith.from_node())
+def test_from_node_always_compilable(source_code):
+ compile(source_code, "<string>", "exec")
+
+
+@example("\x00")
+(a)given(st.text())
+def test_compilable_never_raises(s):
+ compilable(s)
+
+
+(a)given(source_code=hypothesmith.from_node())
+def test_parso_from_node(source_code):
+ result = parso.parse(source_code).get_code()
+ assert source_code == result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/tests/test_syntactic.py new/hypothesmith-0.1.8/tests/test_syntactic.py
--- old/hypothesmith-0.1.6/tests/test_syntactic.py 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/tests/test_syntactic.py 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,108 @@
+"""Tests for the hypothesmith.syntactic module."""
+import ast
+import io
+import tokenize
+
+import black
+import blib2to3
+import parso
+import pytest
+from hypothesis import example, given, reject, strategies as st
+
+import hypothesmith
+
+
+def fixup(s):
+ """Avoid known issues with tokenize() by editing the string."""
+ return "".join(x for x in s if x.isprintable()).strip().strip("\\").strip() + "\n"
+
+
+(a)pytest.mark.xfail
+@example("#")
+@example("\n\\\n")
+@example("#\n\x0cpass#\n")
+@given(source_code=hypothesmith.from_grammar().map(fixup).filter(str.strip))
+def test_tokenize_round_trip_bytes(source_code):
+ try:
+ source = source_code.encode("utf-8-sig")
+ except UnicodeEncodeError:
+ reject()
+ tokens = list(tokenize.tokenize(io.BytesIO(source).readline))
+ outbytes = tokenize.untokenize(tokens) # may have changed whitespace from source
+ output = list(tokenize.tokenize(io.BytesIO(outbytes).readline))
+ assert [(t.type, t.string) for t in tokens] == [(t.type, t.string) for t in output]
+ # It would be nice if the round-tripped string stabilised. It doesn't.
+ # assert outbytes == tokenize.untokenize(output)
+
+
+(a)pytest.mark.xfail
+@example("#")
+@example("\n\\\n")
+@example("#\n\x0cpass#\n")
+@given(source_code=hypothesmith.from_grammar().map(fixup).filter(str.strip))
+def test_tokenize_round_trip_string(source_code):
+ tokens = list(tokenize.generate_tokens(io.StringIO(source_code).readline))
+ outstring = tokenize.untokenize(tokens) # may have changed whitespace from source
+ output = tokenize.generate_tokens(io.StringIO(outstring).readline)
+ assert [(t.type, t.string) for t in tokens] == [(t.type, t.string) for t in output]
+ # It would be nice if the round-tripped string stabilised. It doesn't.
+ # assert outstring == tokenize.untokenize(output)
+
+
+(a)pytest.mark.skipif(not hasattr(ast, "unparse"), reason="Can't test before available")
+(a)given(source_code=hypothesmith.from_grammar())
+def test_ast_unparse_from_grammar(source_code):
+ first = ast.parse(source_code)
+ unparsed = ast.unparse(first)
+ second = ast.parse(unparsed)
+ assert ast.dump(first) == ast.dump(second)
+
+
+@example("\\", black.FileMode())
+@example("A#\r#", black.FileMode())
+@given(
+ source_code=hypothesmith.from_grammar(),
+ mode=st.builds(
+ black.FileMode,
+ line_length=st.just(88) | st.integers(0, 200),
+ string_normalization=st.booleans(),
+ is_pyi=st.booleans(),
+ ),
+)
+def test_black_autoformatter_from_grammar(source_code, mode):
+ try:
+ result = black.format_file_contents(source_code, fast=False, mode=mode)
+ except black.NothingChanged:
+ pass
+ except blib2to3.pgen2.tokenize.TokenError:
+ # Fails to tokenise e.g. "\\", though compile("\\", "<string>", "exec") works.
+ # See https://github.com/psf/black/issues/1012
+ reject()
+ except black.InvalidInput:
+ # e.g. "A#\r#", see https://github.com/psf/black/issues/970
+ reject()
+ else:
+ with pytest.raises(black.NothingChanged):
+ black.format_file_contents(result, fast=False, mode=mode)
+
+
+(a)given(source_code=hypothesmith.from_grammar("eval_input"))
+def test_eval_input_generation(source_code):
+ compile(source_code, filename="<string>", mode="eval")
+
+
+(a)given(source_code=hypothesmith.from_grammar(auto_target=False))
+def test_generation_without_targeting(source_code):
+ compile(source_code, filename="<string>", mode="exec")
+
+
+(a)given(hypothesmith.syntactic.identifiers())
+def test_names_are_all_identifiers(name):
+ assert name.isidentifier()
+ name.encode() # should be UTF-8 encodable
+
+
+(a)given(source_code=hypothesmith.from_grammar())
+def test_parso_from_node(source_code):
+ result = parso.parse(source_code).get_code()
+ assert source_code == result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/tests/test_version.py new/hypothesmith-0.1.8/tests/test_version.py
--- old/hypothesmith-0.1.6/tests/test_version.py 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/tests/test_version.py 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,54 @@
+"""Tests for the hypothesmith package metadata."""
+import re
+from datetime import date
+from functools import lru_cache
+from pathlib import Path
+from typing import NamedTuple
+
+import hypothesmith
+
+
+class Version(NamedTuple):
+ major: int
+ minor: int
+ patch: int
+
+ @classmethod
+ def from_string(cls, string):
+ return cls(*map(int, string.split(".")))
+
+
+@lru_cache()
+def get_releases():
+ pattern = re.compile(r"^### (\d+\.\d+\.\d+) - (\d\d\d\d-\d\d-\d\d)$")
+ with open(Path(__file__).parent.parent / "CHANGELOG.md") as f:
+ return tuple(
+ (Version.from_string(match.group(1)), match.group(2))
+ for match in map(pattern.match, f)
+ if match is not None
+ )
+
+
+def test_last_release_against_changelog():
+ last_version, last_date = get_releases()[0]
+ assert last_version == Version.from_string(hypothesmith.__version__)
+ assert last_date <= date.today().isoformat()
+
+
+def test_changelog_is_ordered():
+ versions, dates = zip(*get_releases())
+ assert versions == tuple(sorted(versions, reverse=True))
+ assert dates == tuple(sorted(dates, reverse=True))
+
+
+def test_version_increments_are_correct():
+ # We either increment the patch version by one, increment the minor version
+ # and reset the patch, or increment major and reset both minor and patch.
+ versions, _ = zip(*get_releases())
+ for prev, current in zip(versions[1:], versions):
+ assert prev < current # remember that `versions` is newest-first
+ assert current in (
+ prev._replace(patch=prev.patch + 1),
+ prev._replace(minor=prev.minor + 1, patch=0),
+ prev._replace(major=prev.major + 1, minor=0, patch=0),
+ ), f"{current} does not follow {prev}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hypothesmith-0.1.6/tox.ini new/hypothesmith-0.1.8/tox.ini
--- old/hypothesmith-0.1.6/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/hypothesmith-0.1.8/tox.ini 2021-01-10 13:36:24.000000000 +0100
@@ -0,0 +1,75 @@
+# The test environment and commands
+[tox]
+envlist = check, test
+skipsdist = True
+
+[testenv:check]
+description = Runs all formatting tools then static analysis (quick)
+deps =
+ --no-deps
+ --requirement deps/check.txt
+ com2ann ; python_version >= '3.8'
+commands =
+ shed
+ flake8
+ mypy --config-file=tox.ini . src/
+
+[testenv:test]
+description = Runs pytest with posargs - `tox -e test -- -v` == `pytest -v`
+deps =
+ --no-deps
+ --requirement deps/test.txt
+ # We need this line here because pip-compile doesn't propogate env markers
+ dataclasses>=0.7 ; python_version < '3.7'
+commands =
+ pip install --no-deps --editable .
+ pytest {posargs:-n auto}
+
+# Run `tox -e deps` to update pinned dependencies
+[testenv:deps]
+description = Updates pinned dependencies in the `deps/*.txt` files
+deps =
+ pip-tools
+commands =
+ pip-compile --quiet --rebuild --upgrade --output-file=deps/check.txt deps/check.in
+ pip-compile --quiet --rebuild --upgrade --output-file=deps/test.txt deps/test.in setup.py
+
+
+# Settings for other tools
+[pytest]
+addopts =
+ -Werror
+ --tb=short
+ --cov=hypothesmith
+ --cov-branch
+ --cov-report=term-missing:skip-covered
+ --cov-fail-under=100
+
+[flake8]
+ignore = D1,E501,W503,S101,S310
+exclude = .*,__pycache__
+
+[isort]
+known_first_party = hypothesmith
+default_section = THIRDPARTY
+multi_line_output = 3
+include_trailing_comma = True
+force_grid_wrap = 0
+combine_as_imports = True
+line_length = 88
+
+[mypy]
+python_version = 3.6
+platform = linux
+disallow_untyped_calls = True
+disallow_untyped_defs = True
+disallow_untyped_decorators = True
+follow_imports = silent
+ignore_missing_imports = True
+warn_no_return = True
+warn_return_any = True
+warn_unused_ignores = True
+warn_unused_configs = True
+warn_redundant_casts = True
+[mypy-test_hypothesmith]
+ignore_errors = True
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-astroid for openSUSE:Factory checked in at 2021-04-01 14:15:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-astroid (Old)
and /work/SRC/openSUSE:Factory/.python-astroid.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astroid"
Thu Apr 1 14:15:49 2021 rev:27 rq:880615 version:2.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes 2020-12-12 20:31:09.161776188 +0100
+++ /work/SRC/openSUSE:Factory/.python-astroid.new.2401/python-astroid.changes 2021-04-01 14:15:50.175850383 +0200
@@ -1,0 +2,72 @@
+Sun Mar 21 23:20:02 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Update to 2.5.1
+ * The context.path is reverted to a set because otherwise it
+ leads to false positives for non `numpy` functions.
+ * Don't transform dataclass ClassVars
+ * Improve typing.TypedDict inference
+ * Fix the `Duplicates found in MROs` false positive.
+- Release 2.5.0
+ * Adds `attr_fset` in the `PropertyModel` class.
+ * Remove support for Python 3.5.
+ * Remove the runtime dependency on six. The six brain
+ remains in astroid.
+ * Enrich the brain_collection module so that __class_getitem__
+ method is added to `deque` for
+ python version above 3.9.
+ * The context.path is now a dict and the context.push method
+ returns True if the node has been visited a certain amount of
+ times.
+ * Adds a brain for type object so that it is possible to write
+ `type[int]` in annotation.
+ * Add __class_getitem__ method to subprocess.Popen brain under
+ Python 3.9 so that it is seen as subscriptable by pylint.
+ * Adds `degrees`, `radians`, which are `numpy ufunc` functions,
+ in the `numpy` brain. Adds `random` function in the `numpy.
+ random` brain.
+ * Fix deprecated importlib methods
+ * Fix a crash in inference caused by `Uninferable` container
+ elements
+ * Add `python 3.9` support.
+ * The flat attribute of numpy.ndarray is now inferred as an
+ numpy.ndarray itself. It should be a numpy.flatiter instance,
+ but this class is not yet available in the numpy brain.
+ * Fix a bug for dunder methods inference of function objects
+ * Fixes a bug in the signature of the ndarray.__or__ method,
+ in the brain_numpy_ndarray.py module.
+ * Fixes a to-list cast bug in starred_assigned_stmts method,
+ in the protocols.py` module.
+ * Added a brain for hypothesis.strategies.composite
+ * The transpose of a numpy.ndarray is also a numpy.ndarray
+ * Added a brain for sqlalchemy.orm.session
+ * Separate string and bytes classes patching
+ * Prevent recursion error for self referential length calls
+ * Added missing methods to the brain for mechanize, to fix
+ pylint false positives
+ * Added more supported parameters to subprocess.check_output
+ * Fix recursion errors with pandas
+ * Added exception inference for `UnicodeDecodeError`
+ * `FunctionDef.is_generator` properly handles `yield` nodes in
+ `If` tests
+ * Fixed exception-chaining error messages.
+ * Fix failure to infer base class type with multiple inheritance
+ and qualified names
+ * Fix interpretation of six.with_metaclass class definitions.
+ * Reduce memory usage of astroid's module cache.
+ * Remove dependency on `imp`.
+ * Do not crash when encountering starred assignments in enums.
+ * Fix a crash in functools.partial inference when the arguments
+ cannot be determined
+ * Fix a crash caused by a lookup of a monkey-patched method
+ * is_generator correctly considers `Yield` nodes in `AugAssign`
+ nodes
+ This fixes a false positive with the
+ `assignment-from-no-return` pylint check.
+ * Corrected the parent of function type comment nodes.
+ These nodes used to be parented to their original ast.
+ FunctionDef parent but are now correctly parented to their
+ astroid.FunctionDef parent.
+- Drop part_rm_dep_imp.patch fixed upstream
+- Drop unpin-deps.patch unpinned upstream
+
+-------------------------------------------------------------------
Old:
----
astroid-2.4.2.tar.gz
part_rm_dep_imp.patch
unpin-deps.patch
New:
----
astroid-2.5.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-astroid.spec ++++++
--- /var/tmp/diff_new_pack.E5go6r/_old 2021-04-01 14:15:51.455852606 +0200
+++ /var/tmp/diff_new_pack.E5go6r/_new 2021-04-01 14:15:51.463852620 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-astroid
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,30 +19,25 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-astroid
-Version: 2.4.2
+Version: 2.5.1
Release: 0
Summary: Representation of Python source as an AST for pylint
License: LGPL-2.1-or-later
URL: https://github.com/pycqa/astroid
Source: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}…
-Patch0: unpin-deps.patch
-# PATCH-FIX-UPSTREAM part_rm_dep_imp.patch gh#PyCQA/astroid#686 mcepl(a)suse.com
-Patch1: part_rm_dep_imp.patch
BuildRequires: %{python_module lazy-object-proxy >= 1.4}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module six >= 1.12}
+BuildRequires: %{python_module typed-ast >= 1.4 if %python-base < 3.8}
BuildRequires: %{python_module wrapt >= 1.11}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-lazy-object-proxy >= 1.4
-Requires: python-six >= 1.12
Requires: python-wrapt >= 1.11
BuildArch: noarch
-%if 0%{?suse_version} <= 1500
-BuildRequires: %{python_module typed-ast}
-Requires: python-typed-ast
+%if 0%{?python_version_nodots} < 38
+Requires: python-typed-ast >= 1.4
%endif
%python_subpackages
@@ -77,6 +72,6 @@
%license COPYING COPYING.LESSER
%doc ChangeLog README.rst
%{python_sitelib}/astroid/
-%{python_sitelib}/astroid-*.egg-info
+%{python_sitelib}/astroid-%{version}*-info
%changelog
++++++ astroid-2.4.2.tar.gz -> astroid-2.5.1.tar.gz ++++++
++++ 7622 lines of diff (skipped)
1
0