Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #15031
| From | Gregor Riepl <onitake@gmail.com> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: Bug#1038883: dolfin: autopkgtest failure due to bytes as docstring |
| Date | 2023-06-26 08:50 +0200 |
| Message-ID | <GKOcV-Y9K-1@gated-at.bofh.it> (permalink) |
| References | <GJtax-7Mg-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> 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.
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread
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
csiph-web