Control: reassign -1 dh-python
Control: forcemerge 1002290 -1
Control: found -1 5.20211213
Control: found -1 5.20211217
Control: affects -1 + qutebrowser python-anyio

Hi Florian,

thanks for your analysis of what I found out about the recent
dh-python changes!

I tried to extract the IMHO relevant parts for the dh-python
developers from the mails in this bug report so far:

Lucas Nussbaum wrote:
> I: dh_python3 fs:511: removing qutebrowser-2.4.0-py3.9.egg-info 
> (qutebrowser-2.4.0.egg-info is already available)
> I: dh_python3 pydist:313: Cannot find package that provides dataclasses. 
> Please add package that provides it to Build-Depends or add "dataclasses 
> python3-dataclasses" line to debian/py3dist-overrides or add proper 
> dependency to Depends by hand and ignore this info.
> Traceback (most recent call last):
>   File "/usr/bin/dh_python3", line 280, in <module>
>     main()
>   File "/usr/bin/dh_python3", line 201, in main
>     dependencies.parse(stats, options)
>   File "/usr/share/dh-python/dhpython/depends.py", line 242, in parse
>     deps = parse_pydep(self.impl, fn, bdep=self.bdep, **section_options)
>   File "/usr/share/dh-python/dhpython/pydist.py", line 522, in parse_pydep
>     for part in dependency.split(','))
> AttributeError: 'NoneType' object has no attribute 'split'
> make: *** [debian/rules:6: binary] Error 1

Florian Bruhin wrote:
> That seems like a false-positive: The dataclasses backport is only
> required for Python 3.6, but Debian sets "Depends: python3 (>= 3.7)"
> already. 
[…]
> That smells like a bug in dh-python.

I wrote:
> I tried downgrading dh-python until it no more FTBFS. It doesn't FTBFS
> with dh-python 5.20211114 and the first version it FTBFS is 5.20211213.
[…]
> Full [changelog] entry […] at
> https://packages.qa.debian.org/d/dh-python/news/20211214T010008Z.html
>
> Florian: Any idea which of these might have broken this?

Florian Bruhin wrote:
> It's "Add support for environment markers.". Environment markers are
> basically conditional dependencies, e.g. for a given Python version or
> OS only.
> 
> The crash happens here:
> https://salsa.debian.org/python-team/tools/dh-python/-/blob/5.20211217/dhpython/pydist.py#L522
> because "dependency" is None.
> 
> That's coming from here:
> https://salsa.debian.org/python-team/tools/dh-python/-/blob/5.20211217/dhpython/pydist.py#L516
> i.e. is the return value of "guess_deps".
> 
> Looking at that, we spot our error message about dataclasses:
> https://salsa.debian.org/python-team/tools/dh-python/-/blob/5.20211217/dhpython/pydist.py#L313-317
> 
> ...but also a strange commented out "return pname" which has been around
> for 7 years:
> https://salsa.debian.org/python-team/tools/dh-python/-/commit/de7db9bd0021cee65e477f11cd69cfd93350bd2e
> 
> Due to the commented out return, the function ends and implicitly
> returns None.
> 
> The code which crashes due to that None value is very recent:
> https://salsa.debian.org/python-team/tools/dh-python/-/commit/832f01c9c7da22a1d00887d8ce0e6be9893bdf3e
> 
> So I suppose it would be good if someone could forward this do
> dh-python, I use the Debian bugtracker too seldom to know what the best
> way to do this would be (but if preferable, I can open a new bug).

Done herewith: Reassigned the bug to dh-python and marked it as found
in the according versions. See the first few lines of this mail.

> > And is the suggestion to add "dataclasses python3-dataclasses" line to
> > debian/py3dist-overrides something we should simply do or is this an
> > issue which we should make the dh-python maintainers aware of? I must
> > admit, I still don't understand what this is dh-python argues about.
> > Maybe someone has some more Python insight for a non-pythonista?
> 
> Perhaps both. So what dh-python seems to be doing here is to look at
> the dependencies declared in a "requirements.txt" (a somewhat common
> way to specify dependencies for Python projects) and check whether the
> Debian packaging mirrors those requirements as well. Here is the line in
> question:
> 
> https://github.com/qutebrowser/qutebrowser/blob/v2.4.0/requirements.txt#L5
> 
> So this declares that qutebrowser needs the "dataclasses" backport for
> Python versions older than 3.7 (it still supports Python 3.6, though
> that will change as soon as 3.0.0 is finished:
> https://github.com/qutebrowser/qutebrowser/issues/6905).
> 
> However, the Debian package for qutebrowser declares
> "Depends: python3 (>= 3.7)", so that dependency actually is irrelevant
> for Debian.
> 
> Should dh-python handle that case? Well, maybe, but it sure shouldn't
> crash.

I hope this is enough context for the dh-python developers to
understand what's the issue.

Actually I just found out that someone else reported this against
dh-python already later today, see https://bugs.debian.org/1002290 —
trying to merge the bug reports.

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

Reply via email to