[arch-commits] Commit in python-pytest/repos/community-any (3 files)

Felix Yan fyan at archlinux.org
Fri Dec 11 03:32:53 UTC 2015


    Date: Friday, December 11, 2015 @ 04:32:52
  Author: fyan
Revision: 152799

archrelease: copy trunk to community-any

Added:
  python-pytest/repos/community-any/PKGBUILD
    (from rev 152798, python-pytest/trunk/PKGBUILD)
  python-pytest/repos/community-any/fix-deprecated_call.patch
    (from rev 152798, python-pytest/trunk/fix-deprecated_call.patch)
Deleted:
  python-pytest/repos/community-any/PKGBUILD

---------------------------+
 PKGBUILD                  |  133 ++++++++++++++++++++++----------------------
 fix-deprecated_call.patch |   71 +++++++++++++++++++++++
 2 files changed, 140 insertions(+), 64 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-12-11 03:32:33 UTC (rev 152798)
+++ PKGBUILD	2015-12-11 03:32:52 UTC (rev 152799)
@@ -1,64 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Felix Kaiser <felix.kaiser at fxkr.net>
-
-pkgbase=python-pytest
-pkgname=('python-pytest' 'python2-pytest')
-pkgver=2.8.4
-pkgrel=1
-pkgdesc="Simple powerful testing with Python"
-arch=('any')
-license=('MIT')
-url="http://pytest.org/"
-makedepends=('python-setuptools' 'python2-setuptools' 'python-py' 'python2-py' 'git'
-             'python-pluggy' 'python2-pluggy')
-checkdepends=('lsof' 'python-nose' 'python2-nose'
-              'python-mock' 'python2-mock' 'python-yaml' 'python2-yaml' 'python2-enum34'
-              'python-pexpect' 'python2-pexpect' 'python-pytest-xdist' 'python2-pytest-xdist'
-              'python-zope-interface' 'python2-zope-interface' 'python-twisted' 'python2-twisted')
-source=("git+https://github.com/pytest-dev/pytest.git#tag=$pkgver")
-sha512sums=('SKIP')
-
-prepare() {
-  # Remove bundled pluggy - disabled for now as it will break tests
-  # rm -r pytest/_pytest/vendored_packages
-  # sed -i "s/'_pytest.vendored_packages'//" pytest/setup.py
-
-  cp -a pytest{,-py2}
-}
-
-build() {
-  cd "$srcdir/pytest"
-  python setup.py build
-
-  cd "$srcdir/pytest-py2"
-  python2 setup.py build
-}
-
-check() {
-  cd "$srcdir/pytest"
-  python setup.py test
-
-  cd "$srcdir/pytest-py2"
-  python2 setup.py test || warning "Tests failed"
-  # https://github.com/pytest-dev/pytest/issues/927
-}
-
-package_python-pytest() {
-  depends=('python-py' 'python-setuptools') # 'python-pluggy'
-
-  cd pytest
-  python setup.py install --root="${pkgdir}" --optimize=1
-  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
-
-package_python2-pytest() {
-  depends=('python2-py' 'python2-setuptools') # 'python2-pluggy'
-
-  cd pytest-py2
-  python2 setup.py install --root="${pkgdir}" --optimize=1
-  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
-  mv "${pkgdir}/usr/bin/py.test" "${pkgdir}/usr/bin/py.test2"
-}
-

Copied: python-pytest/repos/community-any/PKGBUILD (from rev 152798, python-pytest/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-12-11 03:32:52 UTC (rev 152799)
@@ -0,0 +1,69 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Felix Kaiser <felix.kaiser at fxkr.net>
+
+pkgbase=python-pytest
+pkgname=('python-pytest' 'python2-pytest')
+pkgver=2.8.4
+pkgrel=2
+pkgdesc="Simple powerful testing with Python"
+arch=('any')
+license=('MIT')
+url="http://pytest.org/"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-py' 'python2-py' 'git'
+             'python-pluggy' 'python2-pluggy')
+checkdepends=('lsof' 'python-nose' 'python2-nose'
+              'python-mock' 'python2-mock' 'python-yaml' 'python2-yaml' 'python2-enum34'
+              'python-pexpect' 'python2-pexpect' 'python-pytest-xdist' 'python2-pytest-xdist'
+              'python-zope-interface' 'python2-zope-interface' 'python-twisted' 'python2-twisted')
+source=("git+https://github.com/pytest-dev/pytest.git#tag=$pkgver"
+        fix-deprecated_call.patch)
+sha512sums=('SKIP'
+            '37754ab7eabf7e389ef30b4253152d2ba2fca4bbcfe11a14bf1f13da0a17e92f88808e76bbc7b66d2cddbc00fb1ecde814dc19277a36a92b7d540d84ae0391f2')
+
+prepare() {
+  # Remove bundled pluggy - disabled for now as it will break tests
+  # rm -r pytest/_pytest/vendored_packages
+  # sed -i "s/'_pytest.vendored_packages'//" pytest/setup.py
+
+  # https://github.com/pytest-dev/pytest/issues/1238
+  (cd pytest; patch -p1 -i ../fix-deprecated_call.patch)
+
+  cp -a pytest{,-py2}
+}
+
+build() {
+  cd "$srcdir/pytest"
+  python setup.py build
+
+  cd "$srcdir/pytest-py2"
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir/pytest"
+  python setup.py test
+
+  cd "$srcdir/pytest-py2"
+  python2 setup.py test || warning "Tests failed"
+  # https://github.com/pytest-dev/pytest/issues/927
+}
+
+package_python-pytest() {
+  depends=('python-py' 'python-setuptools') # 'python-pluggy'
+
+  cd pytest
+  python setup.py install --root="${pkgdir}" --optimize=1
+  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python2-pytest() {
+  depends=('python2-py' 'python2-setuptools') # 'python2-pluggy'
+
+  cd pytest-py2
+  python2 setup.py install --root="${pkgdir}" --optimize=1
+  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+  mv "${pkgdir}/usr/bin/py.test" "${pkgdir}/usr/bin/py.test2"
+}
+

Copied: python-pytest/repos/community-any/fix-deprecated_call.patch (from rev 152798, python-pytest/trunk/fix-deprecated_call.patch)
===================================================================
--- fix-deprecated_call.patch	                        (rev 0)
+++ fix-deprecated_call.patch	2015-12-11 03:32:52 UTC (rev 152799)
@@ -0,0 +1,71 @@
+From 1c464629919e539c005fe514e172b6fee5acca52 Mon Sep 17 00:00:00 2001
+From: Bruno Oliveira <nicoddemus at gmail.com>
+Date: Tue, 8 Dec 2015 22:40:05 -0200
+Subject: [PATCH] Fix deprecated_call regression introduced in 2.8.4
+
+Fix #1238
+---
+ CHANGELOG               | 4 ++++
+ _pytest/recwarn.py      | 2 +-
+ testing/test_recwarn.py | 9 +++++----
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 49d5a87..d1ac12a 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -4,6 +4,10 @@
+ - fix #1074: precompute junitxml chunks instead of storing the whole tree in objects
+   Thanks Bruno Oliveira for the report and Ronny Pfannschmidt for the PR
+ 
++- fix #1238: fix ``pytest.deprecated_call()`` receiving multiple arguments
++  (Regression introduced in 2.8.4). Thanks Alex Gaynor for the report and
++  Bruno Oliveira for the PR.
++
+ 
+ 2.8.4
+ -----
+diff --git a/_pytest/recwarn.py b/_pytest/recwarn.py
+index c4f9dc3..797327b 100644
+--- a/_pytest/recwarn.py
++++ b/_pytest/recwarn.py
+@@ -42,7 +42,7 @@ def warn_explicit(message, category, *args, **kwargs):
+         categories.append(category)
+         old_warn_explicit(message, category, *args, **kwargs)
+ 
+-    def warn(message, category=None, **kwargs):
++    def warn(message, category=None, *args, **kwargs):
+         if isinstance(message, Warning):
+             categories.append(message.__class__)
+         else:
+diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py
+index c426ea8..56357f8 100644
+--- a/testing/test_recwarn.py
++++ b/testing/test_recwarn.py
+@@ -67,9 +67,10 @@ def test_invalid_enter_exit(self):
+ class TestDeprecatedCall(object):
+     """test pytest.deprecated_call()"""
+ 
+-    def dep(self, i):
++    def dep(self, i, j=None):
+         if i == 0:
+-            py.std.warnings.warn("is deprecated", DeprecationWarning)
++            py.std.warnings.warn("is deprecated", DeprecationWarning,
++                                 stacklevel=1)
+         return 42
+ 
+     def dep_explicit(self, i):
+@@ -79,11 +80,11 @@ def dep_explicit(self, i):
+ 
+     def test_deprecated_call_raises(self):
+         with pytest.raises(AssertionError) as excinfo:
+-            pytest.deprecated_call(self.dep, 3)
++            pytest.deprecated_call(self.dep, 3, 5)
+         assert str(excinfo).find("did not produce") != -1
+ 
+     def test_deprecated_call(self):
+-        pytest.deprecated_call(self.dep, 0)
++        pytest.deprecated_call(self.dep, 0, 5)
+ 
+     def test_deprecated_call_ret(self):
+         ret = pytest.deprecated_call(self.dep, 0)



More information about the arch-commits mailing list