diff mbox series

[bug#51314,v4,05/14] gnu: Add python-zeroconf-0.33.

Message ID 20220529182746.314668-6-monego@posteo.net
State New
Headers show
Series Add Octoprint (web UI for 3d printers). | expand

Checks

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

Commit Message

Vinicius Monego May 29, 2022, 6:27 p.m. UTC
* gnu/packages/python-xyz.scm (python-zeroconf-0.33): New variable.
---
 gnu/packages/python-xyz.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

M May 29, 2022, 10 p.m. UTC | #1
Vinicius Monego schreef op zo 29-05-2022 om 18:27 [+0000]:
> +(define-public python-zeroconf-0.33
> +  (package
> +    (inherit python-zeroconf)
> +    (name "python-zeroconf")
> +    (version "0.33.4")

To avoid propagation conflicts, would python-zeroconf@0.38.1 suffice?

Greetings,
Maxime.
Vinicius Monego May 30, 2022, 8:55 p.m. UTC | #2
Em seg, 2022-05-30 às 00:00 +0200, Maxime Devos escreveu:
> Vinicius Monego schreef op zo 29-05-2022 om 18:27 [+0000]:
> > +(define-public python-zeroconf-0.33
> > +  (package
> > +    (inherit python-zeroconf)
> > +    (name "python-zeroconf")
> > +    (version "0.33.4")
> 
> To avoid propagation conflicts, would python-zeroconf@0.38.1 suffice?
> 
> Greetings,
> Maxime.

As mentioned in the cover letter for v4, octoprint hard-checks the
versions of its dependencies and uses pip to download new versions for
the packages it judges the version is incorrect. In the case of
zeroconf there is a notice in setup.py:

https://github.com/OctoPrint/OctoPrint/blob/53b9b6185781c07e8c4744a6e28462e96448f249/setup.py#L67

> "zeroconf>=0.33,<0.34",  # breaking changes can happen on minor
> version increases

The author recognizes that octoprint is not so friendly to packagers:
https://github.com/OctoPrint/OctoPrint/issues/1922#issuecomment-302407764

> It does depend on specific versions of some packages, for the one or
> other reasons, and this is something I do not want not change - I've
> run into too many problems with outdated python libraries provided by
> the system package manager that produced horribly hard to track down
> bugs.

I guess it would be better if Guix users install octoprint in its own
dedicated profile.
M May 30, 2022, 9:30 p.m. UTC | #3
Vinicius Monego schreef op ma 30-05-2022 om 20:55 [+0000]:
> As mentioned in the cover letter for v4, octoprint hard-checks the
> versions of its dependencies and uses pip to download new versions for
> the packages it judges the version is incorrect. In the case of
> zeroconf there is a notice in setup.py:
> 
> https://github.com/OctoPrint/OctoPrint/blob/53b9b6185781c07e8c4744a6e28462e96448f249/setup.py#L67

To me this seems information to put in a comment next to the input list
(and next to python-zeroconf-0.33). Also, I recommend removing the pip
downloading code to be 100% sure it won't be run.

> The author recognizes that octoprint is not so friendly to packagers:
> https://github.com/OctoPrint/OctoPrint/issues/1922#issuecomment-302407764
> It does depend on specific versions of some packages, for the one  >
or other reasons, and this is something I do not want not change
> > - I've run into too many problems with outdated python libraries
> > provided by the system package manager that produced horribly
> > hard to track down bugs.

There are bugs in the python-zeroconf@0.33 that have been fixed in
python-zeroconf@0.38.1.  The readme in
https://github.com/jstasiak/python-zeroconf mentions a few fixed bugs
that seem rather subtle.

So as-is, we would be distributing an octoprint with a known-buggy
depdendency with known fixes.  Though neither is changing to the new
zeroconf an option (unless changes are made to octoprint) as-is because
the new zeroconf is apparently incompatible.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b7ad14d735..16405634ba 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25598,6 +25598,21 @@  (define-public python-zeroconf
 (Bonjour/Avahi compatible).")
     (license license:lgpl2.1+)))
 
+(define-public python-zeroconf-0.33
+  (package
+    (inherit python-zeroconf)
+    (name "python-zeroconf")
+    (version "0.33.4")
+    (source
+     (origin
+       (method git-fetch)               ; no tests in PyPI release
+       (uri (git-reference
+             (url "https://github.com/jstasiak/python-zeroconf")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "01bv6xrhf5i7gckg3q53i249zxmhkkr65yib6par8z5risihrpwm"))))))
+
 (define-public python2-zeroconf
   (package
     (name "python2-zeroconf")