Public bug reported:

Could you add some clarifying output in the postinst around pypy3compile
failures to give context to an end user?  The errors as they stand don't
indicate that this is pyp3 specific and can be concerning (they also
give the impression that QA isn't catching basic python bugs which isn't
the case).

pypy3 support was added to dh-python3 towards the end of 2018 as "WIP"
such that postinst will call `pypy3compile $PACKAGE || true` to ignore
errors if pypy3 is installed.  I was talking with a user that saw this
fail when installing an update for python3-software-properties and the
error message was cause for concern and confusion, for that package it
looked like this:

Setting up python3-software-properties (0.99.19) ...
Failed to byte-compile 
/usr/lib/python3/dist-packages/softwareproperties/extendedsourceslist.py:   
File 
"/usr/lib/python3/dist-packages/softwareproperties/extendedsourceslist.py", 
line 436
    def __init__(self, sourceslist=None, /, files=None):
                                         ^
SyntaxError: invalid syntax (expected ')')

That's all fine, the author has introduced the positional-only parameter
(PEP570) new to python 3.8 and that's supported in cpython shipped by
default in the distro, but it isn't supported by pypy3.  I think it's
reasonable for the maintainer of a package to decide that they want to
use new features and that they might not have testing with pypy3
installed as a requirement.

The fact that the failure is pypy3compile and not python3compile isn't
communicated for the failure nor that it's optional.  The user might
think that the package is broken for the default interpreter.

Would you consider adding a message before each compilation step to call
out which interpreter is byte-compiling the module as well as pypy3
being optional/best-effort and may fail?  Preferably you might also
indicate the impact (i.e. the package is usable with the system python3
interpreter but pypy3) to set expectations with the end user.   Thank
you Piotr!

** Affects: dh-python (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1962018

Title:
  pypy3compile errors during postinst confuses user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dh-python/+bug/1962018/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to