deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

libpython3.11-testsuite is broken as of 3.11.6 update. #265

Closed mottsen closed 1 year ago

mottsen commented 1 year ago

description

Installing python3.11-full is broken as of 3.11.6 updates. The issue is with the libpython3.11-testsuite package. The error is:

Setting up libpython3.11-testsuite (3.11.6-1+jammy1) ...
  File "/usr/lib/python3.11/test/test_future_stmt/badsyntax_future10.py", line 3
    from __future__ import print_function
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: from __future__ imports must occur at the beginning of the file
dpkg: error processing package libpython3.11-testsuite (--configure):
 installed libpython3.11-testsuite package post-installation script subprocess r
eturned error exit status 1

Originally discovered on my Pop_OS 22.04 installation, but installed a clean VM of 22.04 and was able to reproduce the issue.

os information

lsb_release -a

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy

uname -a

uname -a
Linux ubuntu-test 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct  6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
asottile commented 1 year ago

until I have time to fix this you can work around this by skipping the postinstall or avoiding the installation of the testsuite (you probably don't need it anyway)

HildyEast commented 1 year ago

this is fixed in 3.11.6-3 (and 3.11.6-2), so hopefully a simple repackage off the latest will fix it

asottile commented 1 year ago

those aren't my package so you're probably reporting in the wrong spot entirely

HildyEast commented 1 year ago

the upstream Debian libpython3.11-testsuite broke as of 3.11.6-1 (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053471), but was fixed in 3.11.6-2 per that bug report .. since the latest available in deadsnakes is 3.11.6-1 an update of that package (or any that includes it, like python3.11-full) fails .. would it be possible to just update deadsnakes with the latest 3.11.6-3 that has the fix?

asottile commented 1 year ago

no, that's not how this works at all

HildyEast commented 1 year ago

yeah, I definitely don't know the process for Python versions in deadsnakes to get updated .. does it get built independently for deadsnakes?

a simple apt-mark hold libpython3.11-testsuite fixes updates for me for now, so I don't have any blocker

some versions of isort like to move from __future__... lines to the wrong spot, so it may just be a line that needs moved back to the top of the file .. I'm happy to help out if you want to point me at something

asottile commented 1 year ago

the file that's error is intentionally a syntax error -- it's part of the cpython testsuite to validate the error messages

the problem is just that the postinstall is pyc compiling it when it shouldn't be

HildyEast commented 1 year ago

I guess the validation was successful :-D

thanks for looking at this!

asottile commented 1 year ago

I've just uploaded 3.11.6-1+jammy2 (and 3.13 packages as well which also had this issue) which will be available in an hour or two -- thanks for the report!