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.hbmqtt: init at 0.9.1 #34322

Merged
merged 2 commits into from Jan 29, 2018
Merged

pythonPackages.hbmqtt: init at 0.9.1 #34322

merged 2 commits into from Jan 29, 2018

Conversation

dotlambda
Copy link
Member

Hbmqtt is Python 3 only, while transitions works with Python 2 as well.
The disabled tests require network access in the case of hbmqtt and optional dependencies in the case of transitions.
Running the hbmqtt tests yields some ignored excptions, which seems to be perfectly normal: https://travis-ci.org/beerfactory/hbmqtt/jobs/307132698

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@andir andir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just had some minor things you might want to look into.

};

postPatch = ''
substituteInPlace setup.py --replace "dill<0.2.7" dill
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind pinging upstream about this?
This seems to have been introduced with pytransitions/transitions@19ec2ab and since then forgotten?
Are we not seeing the same issues for some reason?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'm not seeing any errors. I've opened an upstream issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer a problem according to pytransitions/transitions#286 (comment).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks! 👍

{ stdenv, buildPythonPackage, fetchPypi
, transitions, websockets, passlib, docopt, pyyaml, nose }:

buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you have a disabled = !isPy3k since as you mentioned this only works on python3+?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but websockets is py3 only as well, so it's automatic. I'll add it anyway.

@dotlambda
Copy link
Member Author

@GrahamcOfBorg build python3Packages.transitions python3Packages.hbmqtt

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

  File "/nix/store/53dyjh7xjhnbibqllr7j27lk2h98n7j7-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/53dyjh7xjhnbibqllr7j27lk2h98n7j7-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <generator object BrokerProtocolHandler.get_next_pending_unsubscription at 0x7ffff0637e60>
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-hbmqtt-0.9.1.drv-0/hbmqtt-0.9.1/hbmqtt/mqtt/protocol/broker_handler.py", line 96, in get_next_pending_unsubscription
  File "/nix/store/53dyjh7xjhnbibqllr7j27lk2h98n7j7-python3-3.6.4/lib/python3.6/asyncio/queues.py", line 169, in get
  File "/nix/store/53dyjh7xjhnbibqllr7j27lk2h98n7j7-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/53dyjh7xjhnbibqllr7j27lk2h98n7j7-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed

Full log: https://logs.nix.gsc.io/?key=nixos/nixpkgs.34322

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: aarch64-linux

  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <generator object BrokerProtocolHandler.get_next_pending_unsubscription at 0xffffb4832410>
Traceback (most recent call last):
  File "/build/hbmqtt-0.9.1/hbmqtt/mqtt/protocol/broker_handler.py", line 96, in get_next_pending_unsubscription
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/queues.py", line 169, in get
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed

Full log: https://logs.nix.gsc.io/?key=nixos/nixpkgs.34322

@andir
Copy link
Member

andir commented Jan 29, 2018

@GrahamcOfBorg build python3Packages.transitions python3Packages.hbmqtt python2Packages.transitions

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success on x86_64-linux (full log)

Partial log (click to expand)

checking for references to /tmp/nix-build-python2.7-transitions-0.6.4.drv-0 in /nix/store/9lpzz2m8bp6irlkwg4r4j0753wsrngwm-python2.7-transitions-0.6.4...
running install tests
.....................................S.............SSSSSSSSSSSSSSSSSSSSSSSSSSSS..................................................S..............................................S...........SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.......SSSSSSSSSSSSSS.....................................................S...................................................S...............................................S............................................S......................................................S.............
----------------------------------------------------------------------
Ran 534 tests in 17.121s

OK (SKIP=108)
/nix/store/9h23y2sfgcb02f8h8qgbcsh1jy9782rl-python3.6-transitions-0.6.4
/nix/store/vqr3rfwz9lvvik94n57w5c9np2y3g98j-python3.6-hbmqtt-0.9.1
/nix/store/9lpzz2m8bp6irlkwg4r4j0753wsrngwm-python2.7-transitions-0.6.4

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success on x86_64-darwin (full log)

Partial log (click to expand)

  File "/nix/store/wc4m3g4grivhy26sdck44jxwkvz1j17n-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/wc4m3g4grivhy26sdck44jxwkvz1j17n-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <generator object BrokerProtocolHandler.get_next_pending_unsubscription at 0x10ff3c888>
Traceback (most recent call last):
  File "/private/tmp/nix-build-python3.6-hbmqtt-0.9.1.drv-0/hbmqtt-0.9.1/hbmqtt/mqtt/protocol/broker_handler.py", line 96, in get_next_pending_unsubscription
  File "/nix/store/wc4m3g4grivhy26sdck44jxwkvz1j17n-python3-3.6.4/lib/python3.6/asyncio/queues.py", line 169, in get
  File "/nix/store/wc4m3g4grivhy26sdck44jxwkvz1j17n-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/wc4m3g4grivhy26sdck44jxwkvz1j17n-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success on aarch64-linux (full log)

Partial log (click to expand)

  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <generator object BrokerProtocolHandler.get_next_pending_unsubscription at 0xffffb483a410>
Traceback (most recent call last):
  File "/build/hbmqtt-0.9.1/hbmqtt/mqtt/protocol/broker_handler.py", line 96, in get_next_pending_unsubscription
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/queues.py", line 169, in get
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 574, in call_soon
  File "/nix/store/mn2c28fa7mp8ck3p74n80nls6g2w7flw-python3-3.6.4/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
RuntimeError: Event loop is closed

@andir andir merged commit bc59ebd into NixOS:master Jan 29, 2018
@dotlambda dotlambda deleted the hbmqtt branch February 8, 2018 11:00
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