Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.python-redis-lock: init at 3.3.1 #62668

Merged
merged 1 commit into from Jun 9, 2019

Conversation

vanschelven
Copy link
Contributor

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@risicle
Copy link
Contributor

risicle commented Jun 5, 2019

Note that though you've set doCheck = true;, it's not actually picking up any tests.

You may have to set the checkPhase to something like pytest tests/ by the looks of it, of course adding pytest as a checkInput.

One trick you can use to decode how a project wants their tests to be run is following their .travis.yml.

@vanschelven
Copy link
Contributor Author

Note that though you've set doCheck = true;, it's not actually picking up any tests.

Thanks for pointing that out. The latest (squashed) push is running the tests

@worldofpeace worldofpeace changed the title python: python-redis-lock: init at 3.3.1 pythonPackages.python-redis-lock: init at 3.3.1 Jun 7, 2019
@worldofpeace
Copy link
Contributor

@GrahamcOfBorg build python3Packages.python-redis-lock

@worldofpeace worldofpeace merged commit 5f43368 into NixOS:master Jun 9, 2019
@worldofpeace
Copy link
Contributor

Thanks @vanschelven

@vanschelven
Copy link
Contributor Author

That was quick... in fact too quick. I had only clicked the relevant buttons by @worldofpeace in preparation of doing some tests on my local machine, but I hadn't gotten the tests to run for the withDjango = true case yet.

In particular, I figured out the test-phase needs to be further adapted to read DJANGO_SETTINGS_MODULE=test_project.settings pytest tests/

However, that leaves one more broken test (which I haven't managed to debug yet)

/nix/store/qd45rwhc9nvqa5q3kkzhrf0v75j2yz9z-python3.7-django-redis-4.10.0/lib/python3.7/site-packages/django_redis/cache.py:32: in _decorator
    return method(self, *args, **kwargs)
/nix/store/qd45rwhc9nvqa5q3kkzhrf0v75j2yz9z-python3.7-django-redis-4.10.0/lib/python3.7/site-packages/django_redis/cache.py:81: in get
    client=client)
/nix/store/qd45rwhc9nvqa5q3kkzhrf0v75j2yz9z-python3.7-django-redis-4.10.0/lib/python3.7/site-packages/django_redis/client/default.py:205: in get
    raise ConnectionInterrupted(connection=client, parent=e)
E   django_redis.exceptions.ConnectionInterrupted: Redis ConnectionError: Error 32 while writing to socket. Broken pipe.

During handling of the above exception, another exception occurred:
tests/test_django_integration.py:28: in test_django_add_or_set_locked
    assert cache.locked_get_or_set("foobar-aosl", creator_42) == 42
/nix/store/cz2sgkfaxqgmv6xz7wq2yk7qyhw88lpm-python3.7-python-redis-lock-3.3.1/lib/python3.7/site-packages/redis_lock/django_cache.py:34: in locked_get_or_set
    val = self.get(key, version=version)
/nix/store/qd45rwhc9nvqa5q3kkzhrf0v75j2yz9z-python3.7-django-redis-4.10.0/lib/python3.7/site-packages/django_redis/cache.py:39: in _decorator
    raise e.parent
/nix/store/qd45rwhc9nvqa5q3kkzhrf0v75j2yz9z-python3.7-django-redis-4.10.0/lib/python3.7/site-packages/django_redis/client/default.py:203: in get
    value = client.get(key)
/nix/store/q922mzmsh9ldgsbp70kfn78wwcxskw1b-python3.7-redis-3.1.0/lib/python3.7/site-packages/redis/client.py:1264: in get
    return self.execute_command('GET', name)
/nix/store/q922mzmsh9ldgsbp70kfn78wwcxskw1b-python3.7-redis-3.1.0/lib/python3.7/site-packages/redis/client.py:774: in execute_command
    connection.send_command(*args)
/nix/store/q922mzmsh9ldgsbp70kfn78wwcxskw1b-python3.7-redis-3.1.0/lib/python3.7/site-packages/redis/connection.py:619: in send_command
    self.send_packed_command(self.pack_command(*args))
/nix/store/q922mzmsh9ldgsbp70kfn78wwcxskw1b-python3.7-redis-3.1.0/lib/python3.7/site-packages/redis/connection.py:612: in send_packed_command

@worldofpeace
Copy link
Contributor

Perhaps you need to have redis-server &?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants