diff mbox series

[bug#39777,V3,02/11] gnu: python-cachy: Update to 0.3.0.

Message ID 20200309081827.13489-2-tanguy@bioneland.org
State Accepted
Headers show
Series [bug#39777,V3,01/11] gnu: python-pexpect: Update to 4.8.0. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Tanguy LE CARROUR March 9, 2020, 8:18 a.m. UTC
* gnu/packages/python-xyz.scm (python-cachy): Update to 0.3.0.
[arguments]: Disable failing tests.
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

Comments

Leo Famulari March 11, 2020, 7:14 p.m. UTC | #1
On Mon, Mar 09, 2020 at 09:18:18AM +0100, Tanguy Le Carrour wrote:
> * gnu/packages/python-xyz.scm (python-cachy): Update to 0.3.0.
> [arguments]: Disable failing tests.

> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'check 'disable-failing-tests
> +           (lambda _
> +             (substitute* "tests/stores/test_memcached_store.py"
> +               (("def test_forever") "def _test_forever")
> +               (("def test_increment") "def _test_increment")
> +               (("def test_decrement") "def _test_decrement")
> +               (("def test_put_numeric_value") "def _test_put_numeric_value")
> +               (("def test_put_value_into_memcache") "def _test_put_value_into_memcache")
> +               (("def test_value_is_returned") "def _test_value_is_returned")
> +               (("def test_value_is_returned_for_numerics") "def _test_value_is_returned_for_numerics"))
> +             #t)))))

Do you have any idea what's going on with these tests?

We should at least add a comment here, explaining why skipping the tests
is not hiding something that will be a problem while using cachy.
Tanguy LE CARROUR March 12, 2020, 8:58 a.m. UTC | #2
Le 03/11, Leo Famulari a écrit :
> On Mon, Mar 09, 2020 at 09:18:18AM +0100, Tanguy Le Carrour wrote:
> > * gnu/packages/python-xyz.scm (python-cachy): Update to 0.3.0.
> > [arguments]: Disable failing tests.
> 
> > +    (arguments
> > +     '(#:phases
> > +       (modify-phases %standard-phases
> > +         (add-before 'check 'disable-failing-tests
> > +           (lambda _
> > +             (substitute* "tests/stores/test_memcached_store.py"
> > +               (("def test_forever") "def _test_forever")
> > +               (("def test_increment") "def _test_increment")
> > +               (("def test_decrement") "def _test_decrement")
> > +               (("def test_put_numeric_value") "def _test_put_numeric_value")
> > +               (("def test_put_value_into_memcache") "def _test_put_value_into_memcache")
> > +               (("def test_value_is_returned") "def _test_value_is_returned")
> > +               (("def test_value_is_returned_for_numerics") "def _test_value_is_returned_for_numerics"))
> > +             #t)))))
> 
> Do you have any idea what's going on with these tests?
> 
> We should at least add a comment here, explaining why skipping the tests
> is not hiding something that will be a problem while using cachy.

Those ones are out of my comfort zone! :-(

Seems that all the `RedisStoreTestCase` are failing with messages like:

```
ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33754)>
  if self._get_socket():
ResourceWarning: Enable tracemalloc to get the object allocation traceback
```

Might be related to the Redis server that is supposed to be running
during the tests?!

Again, any idea welcome!
Leo Famulari March 14, 2020, 5:30 p.m. UTC | #3
On Thu, Mar 12, 2020 at 09:58:22AM +0100, Tanguy Le Carrour wrote:
> Seems that all the `RedisStoreTestCase` are failing with messages like:
> 
> ```
> ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33754)>
>   if self._get_socket():
> ResourceWarning: Enable tracemalloc to get the object allocation traceback
> ```
> 
> Might be related to the Redis server that is supposed to be running
> during the tests?!

Okay, networking is not possible in the build environment, so for the
tests that depend on connecting to a server, you can add a comment like
"These tests require networking.".

Is that all of them?
Leo Famulari March 14, 2020, 5:39 p.m. UTC | #4
On Thu, Mar 12, 2020 at 09:58:22AM +0100, Tanguy Le Carrour wrote:
> Seems that all the `RedisStoreTestCase` are failing with messages like:
> 
> ```
> ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33754)>
>   if self._get_socket():
> ResourceWarning: Enable tracemalloc to get the object allocation traceback
> ```

I just got word that networking to localhost *is* possible in the build
environment. So it's not as simple as that in this case. Can you check
if the Redis server is running?
Tanguy LE CARROUR March 14, 2020, 6:37 p.m. UTC | #5
Le 03/14, Leo Famulari a écrit :
> On Thu, Mar 12, 2020 at 09:58:22AM +0100, Tanguy Le Carrour wrote:
> > Seems that all the `RedisStoreTestCase` are failing with messages like:
> > 
> > ```
> > ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33754)>
> >   if self._get_socket():
> > ResourceWarning: Enable tracemalloc to get the object allocation traceback
> > ```
> > 
> > Might be related to the Redis server that is supposed to be running
> > during the tests?!
> 
> Okay, networking is not possible in the build environment, so for the
> tests that depend on connecting to a server, you can add a comment like
> "These tests require networking.".

Good to know, thanks!


> Is that all of them?

I guess so! I'll double check, update the patch and submit it!

Thanks!
Tanguy LE CARROUR March 14, 2020, 6:38 p.m. UTC | #6
Le 03/14, Leo Famulari a écrit :
> On Thu, Mar 12, 2020 at 09:58:22AM +0100, Tanguy Le Carrour wrote:
> > Seems that all the `RedisStoreTestCase` are failing with messages like:
> > 
> > ```
> > ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33754)>
> >   if self._get_socket():
> > ResourceWarning: Enable tracemalloc to get the object allocation traceback
> > ```
> 
> I just got word that networking to localhost *is* possible in the build
> environment. So it's not as simple as that in this case. Can you check
> if the Redis server is running?

*ARF* should have read all of it! :-(

I'll investigate! Thanks for the advice.
Tanguy LE CARROUR March 19, 2020, 5:27 p.m. UTC | #7
Hi Leo,

Le 03/14, Leo Famulari a écrit :
> On Thu, Mar 12, 2020 at 09:58:22AM +0100, Tanguy Le Carrour wrote:
> > Seems that all the `RedisStoreTestCase` are failing with messages like:
> > 
> > ```
> > ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33754)>
> >   if self._get_socket():
> > ResourceWarning: Enable tracemalloc to get the object allocation traceback
> > ```
> 
> I just got word that networking to localhost *is* possible in the build
> environment. So it's not as simple as that in this case. Can you check
> if the Redis server is running?

I checked and this bug has been reported upstream last year and is not
yet fixed.
There's a workaround, but it requires to package `pifpaf` and 5 more
dependencies. I'll eventually do that… later next week!?

In the meantime, I'm pushing v4 of the patch set if you're OK with
disabling the failing tests and adding a comment pointing to the bug report.
If you're not, which is perfectly fine, I've reorganized the stack so that
you could commit the 8 patches up to `python-cachy`.

Regards
Leo Famulari March 20, 2020, 7:16 p.m. UTC | #8
On Thu, Mar 19, 2020 at 06:27:05PM +0100, Tanguy Le Carrour wrote:
> In the meantime, I'm pushing v4 of the patch set if you're OK with
> disabling the failing tests and adding a comment pointing to the bug report.
> If you're not, which is perfectly fine, I've reorganized the stack so that
> you could commit the 8 patches up to `python-cachy`.

That sounds fine, thanks!
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5aa42e4871..82892802ff 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10816,15 +10816,29 @@  strings require only one extra byte in addition to the strings themselves.")
 (define-public python-cachy
   (package
     (name "python-cachy")
-    (version "0.2.0")
+    (version "0.3.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cachy" version))
        (sha256
         (base32
-         "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
+         "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/stores/test_memcached_store.py"
+               (("def test_forever") "def _test_forever")
+               (("def test_increment") "def _test_increment")
+               (("def test_decrement") "def _test_decrement")
+               (("def test_put_numeric_value") "def _test_put_numeric_value")
+               (("def test_put_value_into_memcache") "def _test_put_value_into_memcache")
+               (("def test_value_is_returned") "def _test_value_is_returned")
+               (("def test_value_is_returned_for_numerics") "def _test_value_is_returned_for_numerics"))
+             #t)))))
     (native-inputs
      `(("python-fakeredis" ,python-fakeredis)
        ("python-flexmock" ,python-flexmock)