unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Add new pytest for special cases
@ 2016-10-30 22:48 Leo Famulari
  2016-10-30 22:48 ` [PATCH 1/2] gnu: Add python-pytest-2.9.2 Leo Famulari
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Leo Famulari @ 2016-10-30 22:48 UTC (permalink / raw)
  To: guix-devel

We package version 2.7.3 of pytest, which was released in September
2015. I guess that Python development moves very quickly, because there
are already some packages whose test suites require a newer version of
pytest.

Notably, the most recent release of Borg, 1.0.8, requires something
called 'tmpdir_factory', which was introduced in pytest 2.8 [0]. You can
see this by building Borg on core-updates, where Python 3.5 makes the
test suite run (it never ran on master with Python 3.4).

I'd really prefer to run the Borg tests, so I want to add a newer
release of pytest and use it with Borg.

I've been testing pytest upgrades locally, and there is some breakage,
so I think we should not try to upgrade it for all packages in this
core-updates cycle. Instead, I want to build on Hartmut's
wip-python-build-system to upgrade the core Python packages after this
core-updates cycle.

WDYT?

[0]
https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst#280

Leo Famulari (2):
  gnu: Add python-pytest-2.9.2.
  gnu: borg: Run the tests with python-pytest-2.9.2.

 gnu/packages/backup.scm |  4 +++-
 gnu/packages/python.scm | 25 +++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)

-- 
2.10.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] gnu: Add python-pytest-2.9.2.
  2016-10-30 22:48 [PATCH 0/2] Add new pytest for special cases Leo Famulari
@ 2016-10-30 22:48 ` Leo Famulari
  2016-11-03 13:36   ` Ludovic Courtès
  2016-10-30 22:48 ` [PATCH 2/2] gnu: borg: Run the tests with python-pytest-2.9.2 Leo Famulari
  2016-10-31  9:19 ` [PATCH 0/2] Add new pytest for special cases Ricardo Wurmus
  2 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-10-30 22:48 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-pytest-2.9.2): New variable.
---
 gnu/packages/python.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9c7320f..ff3df3b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1665,6 +1665,31 @@ and many external plugins.")
 (define-public python2-pytest
   (package-with-python2 python-pytest))
 
+;; This package is used by Borg until we can upgrade all our Python packages to
+;; use a more recent pytest.
+(define-public python-pytest-2.9.2
+  (package
+    (inherit python-pytest)
+    (name "python-pytest")
+    (version "2.9.2")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pytest" version))
+              (sha256
+               (base32
+                "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-invalid-test
+           (lambda _
+             (substitute* "testing/test_argcomplete.py"
+               (("def test_remove_dir_prefix" line)
+                (string-append "@pytest.mark.skip"
+                               "(reason=\"Assumes that /usr exists.\")\n    "
+                               line)))
+             #t)))))))
+
 (define-public python-pytest-cov
   (package
     (name "python-pytest-cov")
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] gnu: borg: Run the tests with python-pytest-2.9.2.
  2016-10-30 22:48 [PATCH 0/2] Add new pytest for special cases Leo Famulari
  2016-10-30 22:48 ` [PATCH 1/2] gnu: Add python-pytest-2.9.2 Leo Famulari
@ 2016-10-30 22:48 ` Leo Famulari
  2016-11-03 13:36   ` Ludovic Courtès
  2016-10-31  9:19 ` [PATCH 0/2] Add new pytest for special cases Ricardo Wurmus
  2 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-10-30 22:48 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/backup.scm (borg)[native-inputs]: Use python-pytest-2.9.2.
---
 gnu/packages/backup.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 8ec2ee4..203ff4c 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -470,7 +470,9 @@ detection, and lossless compression.")
     (native-inputs
      `(("python-cython" ,python-cython)
        ("python-setuptools-scm" ,python-setuptools-scm)
-       ("python-pytest" ,python-pytest)
+       ;; Borg 1.0.8's test suite uses 'tmpdir_factory', which was introduced in
+       ;; pytest 2.8.
+       ("python-pytest" ,python-pytest-2.9.2)
        ;; For generating the documentation.
        ("python-sphinx" ,python-sphinx)
        ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Add new pytest for special cases
  2016-10-30 22:48 [PATCH 0/2] Add new pytest for special cases Leo Famulari
  2016-10-30 22:48 ` [PATCH 1/2] gnu: Add python-pytest-2.9.2 Leo Famulari
  2016-10-30 22:48 ` [PATCH 2/2] gnu: borg: Run the tests with python-pytest-2.9.2 Leo Famulari
@ 2016-10-31  9:19 ` Ricardo Wurmus
  2016-10-31 17:20   ` Leo Famulari
  2 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-10-31  9:19 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> We package version 2.7.3 of pytest, which was released in September
> 2015. I guess that Python development moves very quickly, because there
> are already some packages whose test suites require a newer version of
> pytest.
>
> Notably, the most recent release of Borg, 1.0.8, requires something
> called 'tmpdir_factory', which was introduced in pytest 2.8 [0]. You can
> see this by building Borg on core-updates, where Python 3.5 makes the
> test suite run (it never ran on master with Python 3.4).
>
> I'd really prefer to run the Borg tests, so I want to add a newer
> release of pytest and use it with Borg.
>
> I've been testing pytest upgrades locally, and there is some breakage,
> so I think we should not try to upgrade it for all packages in this
> core-updates cycle. Instead, I want to build on Hartmut's
> wip-python-build-system to upgrade the core Python packages after this
> core-updates cycle.
>
> WDYT?

This makes sense.  I looked over the patches and they look good to me.

We have a lot of Python packages that really should be updated.  We need
some Python champions to take care of continued updates there.

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Add new pytest for special cases
  2016-10-31  9:19 ` [PATCH 0/2] Add new pytest for special cases Ricardo Wurmus
@ 2016-10-31 17:20   ` Leo Famulari
  2016-11-02 17:35     ` Hartmut Goebel
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-10-31 17:20 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Mon, Oct 31, 2016 at 10:19:07AM +0100, Ricardo Wurmus wrote:
> Leo Famulari <leo@famulari.name> writes:
> > I'd really prefer to run the Borg tests, so I want to add a newer
> > release of pytest and use it with Borg.
> >
> > I've been testing pytest upgrades locally, and there is some breakage,
> > so I think we should not try to upgrade it for all packages in this
> > core-updates cycle. Instead, I want to build on Hartmut's
> > wip-python-build-system to upgrade the core Python packages after this
> > core-updates cycle.
> >
> > WDYT?
> 
> This makes sense.  I looked over the patches and they look good to me.
> 
> We have a lot of Python packages that really should be updated.  We need
> some Python champions to take care of continued updates there.

Please check out Hartmut's wip-python-build-system branch :) I read
through the commits a couple days ago, and the general idea seems
reasonable, although I don't understand everything yet.

If we decide to continue with that approach, I will help upgrade the
core Python packages on top of it.

If not, I'll recreate the old wip-python branch after this core-updates
cycle is merged; I wanted to wait for Python 3.5 before continuing.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] Add new pytest for special cases
  2016-10-31 17:20   ` Leo Famulari
@ 2016-11-02 17:35     ` Hartmut Goebel
  0 siblings, 0 replies; 8+ messages in thread
From: Hartmut Goebel @ 2016-11-02 17:35 UTC (permalink / raw)
  To: guix-devel

Am 31.10.2016 um 18:20 schrieb Leo Famulari:
> Please check out Hartmut's wip-python-build-system branch :) I read
> through the commits a couple days ago, and the general idea seems
> reasonable, although I don't understand everything yet.

Please feel free to ask.


(Which reminds me that I wanted to add some more comments and
explanasions to python-build-system.scm)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: Add python-pytest-2.9.2.
  2016-10-30 22:48 ` [PATCH 1/2] gnu: Add python-pytest-2.9.2 Leo Famulari
@ 2016-11-03 13:36   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-11-03 13:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> skribis:

> * gnu/packages/python.scm (python-pytest-2.9.2): New variable.

LGTM, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: borg: Run the tests with python-pytest-2.9.2.
  2016-10-30 22:48 ` [PATCH 2/2] gnu: borg: Run the tests with python-pytest-2.9.2 Leo Famulari
@ 2016-11-03 13:36   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-11-03 13:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> skribis:

> * gnu/packages/backup.scm (borg)[native-inputs]: Use python-pytest-2.9.2.

OK!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-03 13:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-30 22:48 [PATCH 0/2] Add new pytest for special cases Leo Famulari
2016-10-30 22:48 ` [PATCH 1/2] gnu: Add python-pytest-2.9.2 Leo Famulari
2016-11-03 13:36   ` Ludovic Courtès
2016-10-30 22:48 ` [PATCH 2/2] gnu: borg: Run the tests with python-pytest-2.9.2 Leo Famulari
2016-11-03 13:36   ` Ludovic Courtès
2016-10-31  9:19 ` [PATCH 0/2] Add new pytest for special cases Ricardo Wurmus
2016-10-31 17:20   ` Leo Famulari
2016-11-02 17:35     ` Hartmut Goebel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).