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

pulseaudio-dlna: downgrade dep zeroconf to 0.19.1 #54880

Closed
wants to merge 1 commit into from
Closed

pulseaudio-dlna: downgrade dep zeroconf to 0.19.1 #54880

wants to merge 1 commit into from

Conversation

dramforever
Copy link
Contributor

@dramforever dramforever commented Jan 29, 2019

Motivation for this change

The Python package zeroconf dropped support for Python 2 starting from
version 0.20.0, so we need to use the previous version, 0.19.1, for
pulseaudio-dlna.

0.19.1.nix was taken from 8655259

See: https://github.com/jstasiak/python-zeroconf#0200

On nixpkgs-unstable the derivation of pulseaudio-dlna fails to evaluate. On nixos-18.09 it builds but non-fatally throws a exception on start. The exception does not seem to affect other functionalities.

Exception in thread zeroconf-Engine:
Traceback (most recent call last):
  File "/nix/store/zr5b2d8hdyf3avsami9nfdmnqr1mvcq5-python-2.7.15/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/nix/store/7yj4sncwz0fi6h528jyjqk1xg76cx8qi-python2.7-zeroconf-0.20.0/lib/python2.7/site-packages/zeroconf.py", line 1133, in run
    reader.handle_read(socket_)
  File "/nix/store/7yj4sncwz0fi6h528jyjqk1xg76cx8qi-python2.7-zeroconf-0.20.0/lib/python2.7/site-packages/zeroconf.py", line 1175, in handle_read
    msg = DNSIncoming(data)
  File "/nix/store/7yj4sncwz0fi6h528jyjqk1xg76cx8qi-python2.7-zeroconf-0.20.0/lib/python2.7/site-packages/zeroconf.py", line 644, in __init__
    self.read_questions()
  File "/nix/store/7yj4sncwz0fi6h528jyjqk1xg76cx8qi-python2.7-zeroconf-0.20.0/lib/python2.7/site-packages/zeroconf.py", line 667, in read_questions
    name = self.read_name()
  File "/nix/store/7yj4sncwz0fi6h528jyjqk1xg76cx8qi-python2.7-zeroconf-0.20.0/lib/python2.7/site-packages/zeroconf.py", line 756, in read_name
    t = length & 0xC0
TypeError: unsupported operand type(s) for &: 'str' and 'int'
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 nox --run "nox-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.

The Python package zeroconf dropped support for Python 2 starting from
version 0.20.0, so we need to use the previous version, 0.19.1, for
pulseaudio-dlna.

0.19.1.nix was taken from 8655259

See: https://github.com/jstasiak/python-zeroconf#0200
@@ -30,7 +30,7 @@ pythonPackages.buildPythonApplication rec {

propagatedBuildInputs = with pythonPackages; [
dbus-python docopt requests setproctitle protobuf psutil futures
chardet notify2 netifaces pyroute2 pygobject2 lxml zeroconf ]
chardet notify2 netifaces pyroute2 pygobject2 lxml zeroconf_19 ]
Copy link
Member

Choose a reason for hiding this comment

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

Never put multiple versions of the same package in python-packages.nix. Please use packageOverrides inside the pulseaudio-dlna expression instead.
Also add a comment on why this is needed, maybe referencing masmu/pulseaudio-dlna#342.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I'll do as you said.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, we could also use separate expression for Python 2 and 3, like

zeroconf = if isPy3k then callPackage ... else callPackage ...;

@jtojnar
Copy link
Contributor

jtojnar commented Feb 3, 2019

Upsteream actually started working on Python 3 support: masmu/pulseaudio-dlna#374 Maybe we could use that if it is stable enough.

@dramforever
Copy link
Contributor Author

As per some helpful advice on IRC that I forgot who gave, we should probably wait for upstream to support Python 3 and update pulseaudio-dlna then.

Closing it since I'm abandoning.

@dramforever dramforever closed this Feb 7, 2019
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

5 participants