Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-compat-patcher-core for
openSUSE:Factory checked in at 2021-01-22 21:52:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-compat-patcher-core (Old)
and /work/SRC/openSUSE:Factory/.python-compat-patcher-core.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-compat-patcher-core"
Fri Jan 22 21:52:22 2021 rev:2 rq:865658 version:1.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-compat-patcher-core/python-compat-patcher-core.changes
2020-08-24 15:09:30.950581565 +0200
+++
/work/SRC/openSUSE:Factory/.python-compat-patcher-core.new.28504/python-compat-patcher-core.changes
2021-01-22 21:52:46.669887697 +0100
@@ -1,0 +2,12 @@
+Wed Jan 20 07:28:02 UTC 2021 - John Vandenberg <[email protected]>
+
+- Enable test_cookiecutter_recipe
+- Update to v1.2
+ * Fix import-proxifier to remove AssertionError on module
+ `__name__` when interfering with other custom
+ importers (ex. when importing "six.moves.urllib.parse")
+- from v1.1
+ * Support for Pytest 6
+ * Slight logging improvements
+
+-------------------------------------------------------------------
Old:
----
compat-patcher-core-1.0.tar.gz
New:
----
compat-patcher-core-1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-compat-patcher-core.spec ++++++
--- /var/tmp/diff_new_pack.6eHE5D/_old 2021-01-22 21:52:47.273888554 +0100
+++ /var/tmp/diff_new_pack.6eHE5D/_new 2021-01-22 21:52:47.277888559 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-compat-patcher-core
#
-# 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-compat-patcher-core
-Version: 1.0
+Version: 1.2
Release: 0
Summary: Python patcher system
License: MIT
@@ -31,11 +31,14 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six
+Suggests: cookiecutter > 1.6.0
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module docutils}
-BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module pytest-cov}
+BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module six}
+BuildRequires: python3-pytest-cookies
# /SECTION
%python_subpackages
@@ -46,8 +49,6 @@
%setup -q -n compat-patcher-core-%{version}
sed -i 's/python setup/python3 setup/' tests/*.py
dos2unix CHANGELOG
-# Depends on pytest-cookies, and the recipe isnt part of the core package
-rm tests/test_cookiecutter_recipe.py
rm pytest.ini
%build
@@ -58,7 +59,15 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%pytest tests
+# Cookiecutter is only available as python3, which is not 3.6 on Tumbleweed
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+if [ "$python" = "python3.6" -o "$python" = "python2" ]; then
+ ignore="tests/test_cookiecutter_recipe.py"
+else
+ ignore=""
+fi
+$python -m pytest tests ${ignore:+ --ignore "$ignore"}
+}
%files %{python_files}
%doc AUTHORS CHANGELOG README.rst
++++++ compat-patcher-core-1.0.tar.gz -> compat-patcher-core-1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/compat-patcher-core-1.0/CHANGELOG
new/compat-patcher-core-1.2/CHANGELOG
--- old/compat-patcher-core-1.0/CHANGELOG 2019-06-12 23:49:52.000000000
+0200
+++ new/compat-patcher-core-1.2/CHANGELOG 2021-01-19 21:07:01.000000000
+0100
@@ -1,5 +1,19 @@
-
-Version 1.0
-==================
-
-* Generic Compat-Patcher system and improved from existing
django-compat-patcher0.6 package
+
+Version 1.2
+============
+
+* Fix import-proxifier to remove AssertionError on module `__name__` when
interfering with other custom
+ importers (ex. when importing "six.moves.urllib.parse")
+
+
+Version 1.1
+==================
+
+* Support for Pytest 6
+* Slight logging improvements
+
+
+Version 1.0
+==================
+
+* Generic Compat-Patcher system, improved from existing
django-compat-patcher0.6 package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/compat-patcher-core-1.0/PKG-INFO
new/compat-patcher-core-1.2/PKG-INFO
--- old/compat-patcher-core-1.0/PKG-INFO 2019-06-28 22:48:13.000000000
+0200
+++ new/compat-patcher-core-1.2/PKG-INFO 2021-01-19 22:12:10.791734200
+0100
@@ -1,8 +1,8 @@
Metadata-Version: 2.1
Name: compat-patcher-core
-Version: 1.0
+Version: 1.2
Summary: A patcher system to allow easy and lasting API compatibility.
-Home-page: https://github.com/pakal/compat-patcher
+Home-page: https://github.com/pakal/compat-patcher-core
Author: Pascal Chambon & others
Author-email: [email protected]
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/compat-patcher-core-1.0/VERSION
new/compat-patcher-core-1.2/VERSION
--- old/compat-patcher-core-1.0/VERSION 2019-06-28 22:41:34.000000000 +0200
+++ new/compat-patcher-core-1.2/VERSION 2021-01-19 21:05:23.000000000 +0100
@@ -1 +1 @@
-1.0
+1.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/compat-patcher-core-1.0/requirements.txt
new/compat-patcher-core-1.2/requirements.txt
--- old/compat-patcher-core-1.0/requirements.txt 2019-06-22
18:19:08.000000000 +0200
+++ new/compat-patcher-core-1.2/requirements.txt 2021-01-09
18:42:55.000000000 +0100
@@ -1,18 +1,20 @@
# Beware, keep in sync with setup.py dependencies
-pytest
-pytest-cov
-docutils
+six==1.15.0
-sphinx
-sphinx_rtd_theme
+pytest>=4.6.11,<7
+pytest-cov==2.10.1
+docutils==0.16
-pylint
-pylint-quotes
+sphinx>=1.8.5
+sphinx_rtd_theme==0.5.1
-tox
-check-manifest
+pylint>=1.9.5<3
+pylint-quotes>=0.1.8
-cookiecutter
-pytest_cookies
+tox==3.20.1
+check-manifest>=0.40
+
+cookiecutter==1.7.2
+pytest_cookies==0.5.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/compat-patcher-core-1.0/setup.py
new/compat-patcher-core-1.2/setup.py
--- old/compat-patcher-core-1.0/setup.py 2019-06-20 23:13:56.000000000
+0200
+++ new/compat-patcher-core-1.2/setup.py 2021-01-09 18:42:55.000000000
+0100
@@ -43,7 +43,7 @@
version=read_file("VERSION"),
author="Pascal Chambon & others",
author_email="[email protected]",
- url="https://github.com/pakal/compat-patcher",
+ url="https://github.com/pakal/compat-patcher-core",
license="MIT",
platforms=["any"],
description="A patcher system to allow easy and lasting API
compatibility.",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/compat-patcher-core-1.0/src/compat_patcher_core/import_proxifier.py
new/compat-patcher-core-1.2/src/compat_patcher_core/import_proxifier.py
--- old/compat-patcher-core-1.0/src/compat_patcher_core/import_proxifier.py
2019-06-16 12:03:12.000000000 +0200
+++ new/compat-patcher-core-1.2/src/compat_patcher_core/import_proxifier.py
2021-01-19 20:54:09.000000000 +0100
@@ -121,13 +121,14 @@
# We do the real loading of aliased module here
with enrich_import_error(self.alias_name):
module = importlib.import_module(self.real_name, package=None)
- assert module.__name__ == self.real_name, module.__name__
+ # Normally we have module.__name__ == self.real_name here, but
it's not reliable
+ # e.g. six "_importer" delivers six.moves.urllib.parse module with
__name__ six.moves.urllib_parse
self.target_spec_backup = module.__spec__
return module
def exec_module(self, module):
- # __name__ is, on some python versions, overridden by
init_module_attrs(_force_name=True)
- assert module.__name__ in (self.alias_name, self.real_name),
module.__name__
+ # __name__ is, on some python versions, overridden as
self.alias_name by init_module_attrs(_force_name=True)
+ # (in addition to false names set by custom importers, as
described above)
module.__name__ = self.real_name
assert module.__spec__.origin == "alias", module.__spec__ # well
overridden
assert module.__spec__.loader_state["aliased_spec"] is None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/compat-patcher-core-1.0/src/compat_patcher_core/runner.py
new/compat-patcher-core-1.2/src/compat_patcher_core/runner.py
--- old/compat-patcher-core-1.0/src/compat_patcher_core/runner.py
2019-06-18 20:22:39.000000000 +0200
+++ new/compat-patcher-core-1.2/src/compat_patcher_core/runner.py
2021-01-09 18:42:54.000000000 +0100
@@ -59,7 +59,7 @@
if fixer_qualified_name not in self._all_applied_fixers:
self._patching_utilities.emit_log(
- "Compat fixer '{}-{}' is getting applied".format(
+ "Compat fixer {}->{} is getting applied".format(
fixer["fixer_family"], fixer["fixer_id"]
),
level="INFO",
@@ -70,14 +70,14 @@
fixers_just_applied.append(fixer["fixer_id"])
except SkipFixerException as e:
self._patching_utilities.emit_log(
- "Compat fixer '{}-{}' was actually not applied,
reason: {}".format(
+ "Compat fixer {}->{} was actually not applied, reason:
{}".format(
fixer["fixer_family"], fixer["fixer_id"], e
),
level="WARNING",
)
else:
self._patching_utilities.emit_log(
- "Compat fixer '{}' was already
applied".format(fixer["fixer_id"]),
+ "Compat fixer {}->{} was already
applied".format(["fixer_family"], fixer["fixer_id"]),
level="WARNING",
)
return fixers_just_applied
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/compat-patcher-core-1.0/src/compat_patcher_core/scaffolding.py
new/compat-patcher-core-1.2/src/compat_patcher_core/scaffolding.py
--- old/compat-patcher-core-1.0/src/compat_patcher_core/scaffolding.py
2019-06-20 22:36:55.000000000 +0200
+++ new/compat-patcher-core-1.2/src/compat_patcher_core/scaffolding.py
2021-01-09 18:42:54.000000000 +0100
@@ -72,11 +72,17 @@
"MISSING_" + expected_test_name,
missing_fixer_test,
)
- items.append(
- Function(
- name="MISSING_" + expected_test_name,
- parent=mock_item.parent,
- config=config,
- session=mock_item.session,
- )
+
+ parent = mock_item.parent
+ params = dict(
+ name="MISSING_" + expected_test_name,
+ #config=config,
+ #session=mock_item.session,
)
+ # See
https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent
+ if hasattr(Function, "from_parent"):
+ function = Function.from_parent(parent, **params)
+ else:
+ function = Function(parent=parent, **params)
+
+ items.append(function)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/compat-patcher-core-1.0/src/compat_patcher_core/utilities.py
new/compat-patcher-core-1.2/src/compat_patcher_core/utilities.py
--- old/compat-patcher-core-1.0/src/compat_patcher_core/utilities.py
2019-06-18 20:33:45.000000000 +0200
+++ new/compat-patcher-core-1.2/src/compat_patcher_core/utilities.py
2021-01-09 18:42:54.000000000 +0100
@@ -167,7 +167,7 @@
setattr(target_object, target_attrname, attribute)
def inject_callable(self, target_object, target_callable_name,
patch_callable):
- """Inject a callable into an object of any type (module, class,
instance...).
+ """Inject a simple callable (not a class) into an object of any type
(module, class, instance...).
:param target_object: The object to patch
:param target_callable_name: The name given to the new callable in the
object to patch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/compat-patcher-core-1.0/src/compat_patcher_core.egg-info/PKG-INFO
new/compat-patcher-core-1.2/src/compat_patcher_core.egg-info/PKG-INFO
--- old/compat-patcher-core-1.0/src/compat_patcher_core.egg-info/PKG-INFO
2019-06-28 22:48:12.000000000 +0200
+++ new/compat-patcher-core-1.2/src/compat_patcher_core.egg-info/PKG-INFO
2021-01-19 22:12:10.000000000 +0100
@@ -1,8 +1,8 @@
Metadata-Version: 2.1
Name: compat-patcher-core
-Version: 1.0
+Version: 1.2
Summary: A patcher system to allow easy and lasting API compatibility.
-Home-page: https://github.com/pakal/compat-patcher
+Home-page: https://github.com/pakal/compat-patcher-core
Author: Pascal Chambon & others
Author-email: [email protected]
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/compat-patcher-core-1.0/tests/test_import_proxifier.py
new/compat-patcher-core-1.2/tests/test_import_proxifier.py
--- old/compat-patcher-core-1.0/tests/test_import_proxifier.py 2019-06-18
20:22:39.000000000 +0200
+++ new/compat-patcher-core-1.2/tests/test_import_proxifier.py 2021-01-19
22:03:59.000000000 +0100
@@ -1,4 +1,4 @@
-import sys
+import sys, six
from compat_patcher_core.import_proxifier import (
install_import_proxifier,
@@ -87,3 +87,11 @@
assert "No module named" in str(e), str(e)
else:
raise RuntimeError("import error not raised for noparent.newmodule")
+
+ # We test_compatibility_with_other_custom_importers():
+ # Old versions of lib crashed with AssertionError due to wrong module name
"six.moves.urllib_parse" set by six._importer
+ register_module_alias("my_six_urllib_parse_alias",
real_name="six.moves.urllib.parse")
+ import my_six_urllib_parse_alias
+ # Re-overridden by our own importer on python3 only
+ assert my_six_urllib_parse_alias.__name__ == "six.moves.urllib.parse" if
six.PY3 else "six.moves.urllib_parse"
+ assert my_six_urllib_parse_alias.urlencode(dict(name="h\xc3llo")) ==
"name=h%C3%83llo" if six.PY3 else "name=h%C3llo"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/compat-patcher-core-1.0/tox.ini
new/compat-patcher-core-1.2/tox.ini
--- old/compat-patcher-core-1.0/tox.ini 2019-06-22 19:03:09.000000000 +0200
+++ new/compat-patcher-core-1.2/tox.ini 2021-01-19 21:48:23.000000000 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist = {py27,py35,py36,py37,py38-dev}
+envlist = {py27,py35,py36,py37,py38,py39}
skip_missing_interpreters=True
toxworkdir={env:TOX_WORK_DIR:.tox}