Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #15029 > unrolled thread

Bug#1038883: dolfin: autopkgtest failure due to bytes as docstring

Started byTimo Röhling <roehling@debian.org>
First post2023-06-22 16:10 +0200
Last post2023-06-26 08:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Bug#1038883: dolfin: autopkgtest failure due to bytes as docstring Timo Röhling <roehling@debian.org> - 2023-06-22 16:10 +0200
    Re: Bug#1038883: dolfin: autopkgtest failure due to bytes as  docstring Gregor Riepl <onitake@gmail.com> - 2023-06-26 08:50 +0200

#15029 — Bug#1038883: dolfin: autopkgtest failure due to bytes as docstring

FromTimo Röhling <roehling@debian.org>
Date2023-06-22 16:10 +0200
SubjectBug#1038883: dolfin: autopkgtest failure due to bytes as docstring
Message-ID<GJtax-7Mg-5@gated-at.bofh.it>
Source: dolfin
Version: 2019.2.0~git20230116.bd54183-2
Severity: serious
Tags: patch
X-Debbugs-Cc: debian-python@lists.debian.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear maintainer,

your package fails the autopkgtest with the new pytest 7.3 because
python/test/unit/function/test_function_space.py uses a bytes object
(b""" literal) as module docstring, and pytest crashes while looking for
the "PYTEST_DONT_REWRITE" marker.

As far as I understand, using a bytes() object as docstring violates
PEP-257, which is why I am filing this as a dolfin bug and not a pytest
regression. I have Cc'd the debian-python mailing list for a second
opinion, but I believe this bug should be resolved by getting rid of the
erroneous "b" prefix.


Cheers
Timo


-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEEJvtDgpxjkjCIVtam+C8H+466LVkFAmSUVIMACgkQ+C8H+466
LVlDnwwAvkNiICYQNkEcEL6b8cCBs5omarn94D+xGVDAILX/LZvOJxzpL2fklo4Y
4cdyjdiq3Kye5j/tQ5C4CE76jEBt3Y/JCXKJnet8PpM2mrD1mBJR9m5yxznrgxer
9jZPGx9I8F2/E/O211cSMC+5WgX5OePD9mIlVDINmXRRU6NGgm1KIMaFhG5rS0qW
6OG0cjX6UrzlEbiD+xZbt56dlfZz3o1FvRqSaGmRwNVsDeRuNdrYiN15FVnqOw88
0sy+wgE/x74hCCNgqkDeHQiZfO+fw9sIn0g0NU4pa2HqZHO7yRjJrctohvPkfHTd
U1R7yfZZOeSJVVC2+RyRBjOYudG9p4C3qraGnfRlZ9s64ok5rwVruZ6mK9eWClMU
VJcIpLVrSIWyuYdGsu2Cj/mmdfypDDsPk7Yp+U21g+EThv2CI9vlgwnKwhTNBtwa
fT4oKTn+odfYLUzv3+tSd1FdYyGZB71m4X4i7ckzShf8uL4zMiYB7WhFhm+9QCfs
9+rI0cvw
=gZ+8
-----END PGP SIGNATURE-----

[toc] | [next] | [standalone]


#15031 — Re: Bug#1038883: dolfin: autopkgtest failure due to bytes as docstring

FromGregor Riepl <onitake@gmail.com>
Date2023-06-26 08:50 +0200
SubjectRe: Bug#1038883: dolfin: autopkgtest failure due to bytes as docstring
Message-ID<GKOcV-Y9K-1@gated-at.bofh.it>
In reply to#15029
> your package fails the autopkgtest with the new pytest 7.3 because
> python/test/unit/function/test_function_space.py uses a bytes object
> (b""" literal) as module docstring, and pytest crashes while looking for
> the "PYTEST_DONT_REWRITE" marker.

This does sound like a serious bug in pytest, though. If it can't 
process the docstring, it should ignore it, not crash.

But I don't quite get why it would choke on a byte string, if it's just 
looking for a token?

> As far as I understand, using a bytes() object as docstring violates
> PEP-257, which is why I am filing this as a dolfin bug and not a pytest
> regression. I have Cc'd the debian-python mailing list for a second
> opinion, but I believe this bug should be resolved by getting rid of the
> erroneous "b" prefix.

PEP-257 says:

 > If you violate these conventions, the worst you’ll get is some dirty
 > looks. But some software (such as the Docutils docstring processing
 > system PEP 256, PEP 258) will be aware of the conventions, so
 > following them will get you the best results.

FWIW, I think this should be fixed in both pytest and the affected 
package. Unless there is a specific reason for the byte string, it 
should be replaced with a regular string.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web