Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update python from 3.8 to 3.10 in v16.0 #553

Closed
wants to merge 11 commits into from
Closed

Update python from 3.8 to 3.10 in v16.0 #553

wants to merge 11 commits into from

Conversation

gabonog
Copy link

@gabonog gabonog commented Jul 13, 2023

Upgrade python to 3.10 for Doodba v16.0. Not sure how I can test it.

@gabonog
Copy link
Author

gabonog commented Jul 13, 2023

This approach is related with the fastapi integration in v16.0 that requires py3.10. Previous versions will not be supported rest-framework#359

@pedrobaeza
Copy link
Member

Let's see the result of the CI.

@ap-wtioit
Copy link
Contributor

ap-wtioit commented Jul 17, 2023

It looks like the python:3.X-slim-bullseye images are not installing the corresponding version of python3-dev but the one actually present in debian bullseye:
docker run --rm -it python:3.10-slim-bullseye bash -c 'apt update && apt-cache madison python3-dev

Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [252 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.8 kB]
Fetched 8658 kB in 1s (7199 kB/s)                           
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
python3-dev |    3.9.2-3 | http://deb.debian.org/debian bullseye/main amd64 Packages

docker run --rm -it python:3.8-slim-bullseye bash -c 'apt update && apt-cache madison python3-dev'

Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [252 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.8 kB]
Fetched 8658 kB in 1s (7199 kB/s)                           
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
python3-dev |    3.9.2-3 | http://deb.debian.org/debian bullseye/main amd64 Packages

Somehow python3-dev (3.9.2-3) seems to work for python3.8 and docutils==0.14 and not for python3.10 and docutils==0.14

However even when installing python3-dev in plain python3.10-slim-bullseye image it does not break the docutils==0.14 pip install:
docker run --rm -it python:3.10-slim-bullseye bash -c 'apt update && apt install python3-dev -y && pip install docutils==0.14'

Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [252 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.8 kB]
Fetched 8658 kB in 1s (9129 kB/s)                           
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fontconfig-config fonts-dejavu-core javascript-common libbrotli1 libbsd0 libc-dev-bin libc-devtools libc6-dev libcrypt-dev libdeflate0 libexpat1-dev libfontconfig1 libfreetype6
  libgd3 libjbig0 libjpeg62-turbo libjs-jquery libjs-sphinxdoc libjs-underscore libmd0 libmpdec3 libnsl-dev libpng16-16 libpython3-dev libpython3-stdlib libpython3.9 libpython3.9-dev
  libpython3.9-minimal libpython3.9-stdlib libtiff5 libtirpc-dev libwebp6 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev manpages manpages-dev media-types
  python3 python3-distutils python3-lib2to3 python3-minimal python3.9 python3.9-dev python3.9-minimal sensible-utils ucf zlib1g-dev
Suggested packages:
  apache2 | lighttpd | httpd glibc-doc libgd-tools man-browser python3-doc python3-tk python3-venv python3.9-venv python3.9-doc binutils binfmt-support
The following NEW packages will be installed:
  fontconfig-config fonts-dejavu-core javascript-common libbrotli1 libbsd0 libc-dev-bin libc-devtools libc6-dev libcrypt-dev libdeflate0 libexpat1-dev libfontconfig1 libfreetype6
  libgd3 libjbig0 libjpeg62-turbo libjs-jquery libjs-sphinxdoc libjs-underscore libmd0 libmpdec3 libnsl-dev libpng16-16 libpython3-dev libpython3-stdlib libpython3.9 libpython3.9-dev
  libpython3.9-minimal libpython3.9-stdlib libtiff5 libtirpc-dev libwebp6 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 linux-libc-dev manpages manpages-dev media-types
  python3 python3-dev python3-distutils python3-lib2to3 python3-minimal python3.9 python3.9-dev python3.9-minimal sensible-utils ucf zlib1g-dev
0 upgraded, 53 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.2 MB of archives.
After this operation, 92.4 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 libpython3.9-minimal amd64 3.9.2-1 [801 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 python3.9-minimal amd64 3.9.2-1 [1955 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 python3-minimal amd64 3.9.2-3 [38.2 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 media-types all 4.0.0 [30.3 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 libmpdec3 amd64 2.5.1-1 [87.7 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 libpython3.9-stdlib amd64 3.9.2-1 [1684 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 python3.9 amd64 3.9.2-1 [466 kB]
Get:8 http://deb.debian.org/debian bullseye/main amd64 libpython3-stdlib amd64 3.9.2-3 [21.4 kB]
Get:9 http://deb.debian.org/debian bullseye/main amd64 python3 amd64 3.9.2-3 [37.9 kB]
Get:10 http://deb.debian.org/debian bullseye/main amd64 sensible-utils all 0.0.14 [14.8 kB]
Get:11 http://deb.debian.org/debian bullseye/main amd64 manpages all 5.10-1 [1412 kB]
Get:12 http://deb.debian.org/debian bullseye/main amd64 ucf all 3.0043 [74.0 kB]
Get:13 http://deb.debian.org/debian bullseye/main amd64 fonts-dejavu-core all 2.37-2 [1069 kB]
Get:14 http://deb.debian.org/debian bullseye/main amd64 fontconfig-config all 2.13.1-4.2 [281 kB]
Get:15 http://deb.debian.org/debian bullseye/main amd64 javascript-common all 11+nmu1 [6260 B]
Get:16 http://deb.debian.org/debian bullseye/main amd64 libbrotli1 amd64 1.0.9-2+b2 [279 kB]
Get:17 http://deb.debian.org/debian bullseye/main amd64 libmd0 amd64 1.0.3-3 [28.0 kB]
Get:18 http://deb.debian.org/debian bullseye/main amd64 libbsd0 amd64 0.11.3-1 [108 kB]
Get:19 http://deb.debian.org/debian bullseye/main amd64 libc-dev-bin amd64 2.31-13+deb11u6 [276 kB]
Get:20 http://deb.debian.org/debian bullseye/main amd64 libpng16-16 amd64 1.6.37-3 [294 kB]
Get:21 http://deb.debian.org/debian bullseye/main amd64 libfreetype6 amd64 2.10.4+dfsg-1+deb11u1 [418 kB]
Get:22 http://deb.debian.org/debian bullseye/main amd64 libfontconfig1 amd64 2.13.1-4.2 [347 kB]
Get:23 http://deb.debian.org/debian bullseye/main amd64 libjpeg62-turbo amd64 1:2.0.6-4 [151 kB]
Get:24 http://deb.debian.org/debian bullseye/main amd64 libdeflate0 amd64 1.7-1 [53.1 kB]
Get:25 http://deb.debian.org/debian bullseye/main amd64 libjbig0 amd64 2.1-3.1+b2 [31.0 kB]
Get:26 http://deb.debian.org/debian-security bullseye-security/main amd64 libwebp6 amd64 0.6.1-2.1+deb11u1 [258 kB]
Get:27 http://deb.debian.org/debian bullseye/main amd64 libtiff5 amd64 4.2.0-1+deb11u4 [290 kB]
Get:28 http://deb.debian.org/debian bullseye/main amd64 libxau6 amd64 1:1.0.9-1 [19.7 kB]
Get:29 http://deb.debian.org/debian bullseye/main amd64 libxdmcp6 amd64 1:1.1.2-3 [26.3 kB]
Get:30 http://deb.debian.org/debian bullseye/main amd64 libxcb1 amd64 1.14-3 [140 kB]
Get:31 http://deb.debian.org/debian-security bullseye-security/main amd64 libx11-data all 2:1.7.2-1+deb11u1 [311 kB]
Get:32 http://deb.debian.org/debian-security bullseye-security/main amd64 libx11-6 amd64 2:1.7.2-1+deb11u1 [772 kB]
Get:33 http://deb.debian.org/debian bullseye/main amd64 libxpm4 amd64 1:3.5.12-1.1~deb11u1 [49.6 kB]
Get:34 http://deb.debian.org/debian bullseye/main amd64 libgd3 amd64 2.3.0-2 [137 kB]
Get:35 http://deb.debian.org/debian bullseye/main amd64 libc-devtools amd64 2.31-13+deb11u6 [246 kB]
Get:36 http://deb.debian.org/debian-security bullseye-security/main amd64 linux-libc-dev amd64 5.10.179-2 [1618 kB]
Get:37 http://deb.debian.org/debian bullseye/main amd64 libcrypt-dev amd64 1:4.4.18-4 [104 kB]
Get:38 http://deb.debian.org/debian bullseye/main amd64 libtirpc-dev amd64 1.3.1-1+deb11u1 [191 kB]
Get:39 http://deb.debian.org/debian bullseye/main amd64 libnsl-dev amd64 1.3.0-2 [66.4 kB]
Get:40 http://deb.debian.org/debian bullseye/main amd64 libc6-dev amd64 2.31-13+deb11u6 [2360 kB]
Get:41 http://deb.debian.org/debian bullseye/main amd64 libexpat1-dev amd64 2.2.10-2+deb11u5 [141 kB]
Get:42 http://deb.debian.org/debian bullseye/main amd64 libjs-jquery all 3.5.1+dfsg+~3.5.5-7 [315 kB]
Get:43 http://deb.debian.org/debian bullseye/main amd64 libjs-underscore all 1.9.1~dfsg-3 [100 kB]
Get:44 http://deb.debian.org/debian bullseye/main amd64 libjs-sphinxdoc all 3.4.3-2 [127 kB]
Get:45 http://deb.debian.org/debian bullseye/main amd64 libpython3.9 amd64 3.9.2-1 [1691 kB]
Get:46 http://deb.debian.org/debian bullseye/main amd64 libpython3.9-dev amd64 3.9.2-1 [4028 kB]
Get:47 http://deb.debian.org/debian bullseye/main amd64 libpython3-dev amd64 3.9.2-3 [21.7 kB]
Get:48 http://deb.debian.org/debian bullseye/main amd64 manpages-dev all 5.10-1 [2309 kB]
Get:49 http://deb.debian.org/debian bullseye/main amd64 zlib1g-dev amd64 1:1.2.11.dfsg-2+deb11u2 [191 kB]
Get:50 http://deb.debian.org/debian bullseye/main amd64 python3.9-dev amd64 3.9.2-1 [515 kB]
Get:51 http://deb.debian.org/debian bullseye/main amd64 python3-lib2to3 all 3.9.2-1 [77.8 kB]
Get:52 http://deb.debian.org/debian bullseye/main amd64 python3-distutils all 3.9.2-1 [143 kB]
Get:53 http://deb.debian.org/debian bullseye/main amd64 python3-dev amd64 3.9.2-3 [24.8 kB]
Fetched 26.2 MB in 1s (38.7 MB/s)         
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython3.9-minimal:amd64.
(Reading database ... 7034 files and directories currently installed.)
Preparing to unpack .../libpython3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.2-1) ...
Selecting previously unselected package python3.9-minimal.
Preparing to unpack .../python3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking python3.9-minimal (3.9.2-1) ...
Setting up libpython3.9-minimal:amd64 (3.9.2-1) ...
Setting up python3.9-minimal (3.9.2-1) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 7319 files and directories currently installed.)
Preparing to unpack .../0-python3-minimal_3.9.2-3_amd64.deb ...
Unpacking python3-minimal (3.9.2-3) ...
Selecting previously unselected package media-types.
Preparing to unpack .../1-media-types_4.0.0_all.deb ...
Unpacking media-types (4.0.0) ...
Selecting previously unselected package libmpdec3:amd64.
Preparing to unpack .../2-libmpdec3_2.5.1-1_amd64.deb ...
Unpacking libmpdec3:amd64 (2.5.1-1) ...
Selecting previously unselected package libpython3.9-stdlib:amd64.
Preparing to unpack .../3-libpython3.9-stdlib_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.2-1) ...
Selecting previously unselected package python3.9.
Preparing to unpack .../4-python3.9_3.9.2-1_amd64.deb ...
Unpacking python3.9 (3.9.2-1) ...
Selecting previously unselected package libpython3-stdlib:amd64.
Preparing to unpack .../5-libpython3-stdlib_3.9.2-3_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.9.2-3) ...
Setting up python3-minimal (3.9.2-3) ...
Selecting previously unselected package python3.
(Reading database ... 7716 files and directories currently installed.)
Preparing to unpack .../00-python3_3.9.2-3_amd64.deb ...
Unpacking python3 (3.9.2-3) ...
Selecting previously unselected package sensible-utils.
Preparing to unpack .../01-sensible-utils_0.0.14_all.deb ...
Unpacking sensible-utils (0.0.14) ...
Selecting previously unselected package manpages.
Preparing to unpack .../02-manpages_5.10-1_all.deb ...
Unpacking manpages (5.10-1) ...
Selecting previously unselected package ucf.
Preparing to unpack .../03-ucf_3.0043_all.deb ...
Moving old data out of the way
Unpacking ucf (3.0043) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../04-fonts-dejavu-core_2.37-2_all.deb ...
Unpacking fonts-dejavu-core (2.37-2) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../05-fontconfig-config_2.13.1-4.2_all.deb ...
Unpacking fontconfig-config (2.13.1-4.2) ...
Selecting previously unselected package javascript-common.
Preparing to unpack .../06-javascript-common_11+nmu1_all.deb ...
Unpacking javascript-common (11+nmu1) ...
Selecting previously unselected package libbrotli1:amd64.
Preparing to unpack .../07-libbrotli1_1.0.9-2+b2_amd64.deb ...
Unpacking libbrotli1:amd64 (1.0.9-2+b2) ...
Selecting previously unselected package libmd0:amd64.
Preparing to unpack .../08-libmd0_1.0.3-3_amd64.deb ...
Unpacking libmd0:amd64 (1.0.3-3) ...
Selecting previously unselected package libbsd0:amd64.
Preparing to unpack .../09-libbsd0_0.11.3-1_amd64.deb ...
Unpacking libbsd0:amd64 (0.11.3-1) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../10-libc-dev-bin_2.31-13+deb11u6_amd64.deb ...
Unpacking libc-dev-bin (2.31-13+deb11u6) ...
Selecting previously unselected package libpng16-16:amd64.
Preparing to unpack .../11-libpng16-16_1.6.37-3_amd64.deb ...
Unpacking libpng16-16:amd64 (1.6.37-3) ...
Selecting previously unselected package libfreetype6:amd64.
Preparing to unpack .../12-libfreetype6_2.10.4+dfsg-1+deb11u1_amd64.deb ...
Unpacking libfreetype6:amd64 (2.10.4+dfsg-1+deb11u1) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../13-libfontconfig1_2.13.1-4.2_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.13.1-4.2) ...
Selecting previously unselected package libjpeg62-turbo:amd64.
Preparing to unpack .../14-libjpeg62-turbo_1%3a2.0.6-4_amd64.deb ...
Unpacking libjpeg62-turbo:amd64 (1:2.0.6-4) ...
Selecting previously unselected package libdeflate0:amd64.
Preparing to unpack .../15-libdeflate0_1.7-1_amd64.deb ...
Unpacking libdeflate0:amd64 (1.7-1) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../16-libjbig0_2.1-3.1+b2_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-3.1+b2) ...
Selecting previously unselected package libwebp6:amd64.
Preparing to unpack .../17-libwebp6_0.6.1-2.1+deb11u1_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.1-2.1+deb11u1) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../18-libtiff5_4.2.0-1+deb11u4_amd64.deb ...
Unpacking libtiff5:amd64 (4.2.0-1+deb11u4) ...
Selecting previously unselected package libxau6:amd64.
Preparing to unpack .../19-libxau6_1%3a1.0.9-1_amd64.deb ...
Unpacking libxau6:amd64 (1:1.0.9-1) ...
Selecting previously unselected package libxdmcp6:amd64.
Preparing to unpack .../20-libxdmcp6_1%3a1.1.2-3_amd64.deb ...
Unpacking libxdmcp6:amd64 (1:1.1.2-3) ...
Selecting previously unselected package libxcb1:amd64.
Preparing to unpack .../21-libxcb1_1.14-3_amd64.deb ...
Unpacking libxcb1:amd64 (1.14-3) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../22-libx11-data_2%3a1.7.2-1+deb11u1_all.deb ...
Unpacking libx11-data (2:1.7.2-1+deb11u1) ...
Selecting previously unselected package libx11-6:amd64.
Preparing to unpack .../23-libx11-6_2%3a1.7.2-1+deb11u1_amd64.deb ...
Unpacking libx11-6:amd64 (2:1.7.2-1+deb11u1) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../24-libxpm4_1%3a3.5.12-1.1~deb11u1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1.1~deb11u1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../25-libgd3_2.3.0-2_amd64.deb ...
Unpacking libgd3:amd64 (2.3.0-2) ...
Selecting previously unselected package libc-devtools.
Preparing to unpack .../26-libc-devtools_2.31-13+deb11u6_amd64.deb ...
Unpacking libc-devtools (2.31-13+deb11u6) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../27-linux-libc-dev_5.10.179-2_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.10.179-2) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../28-libcrypt-dev_1%3a4.4.18-4_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.18-4) ...
Selecting previously unselected package libtirpc-dev:amd64.
Preparing to unpack .../29-libtirpc-dev_1.3.1-1+deb11u1_amd64.deb ...
Unpacking libtirpc-dev:amd64 (1.3.1-1+deb11u1) ...
Selecting previously unselected package libnsl-dev:amd64.
Preparing to unpack .../30-libnsl-dev_1.3.0-2_amd64.deb ...
Unpacking libnsl-dev:amd64 (1.3.0-2) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../31-libc6-dev_2.31-13+deb11u6_amd64.deb ...
Unpacking libc6-dev:amd64 (2.31-13+deb11u6) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../32-libexpat1-dev_2.2.10-2+deb11u5_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.2.10-2+deb11u5) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../33-libjs-jquery_3.5.1+dfsg+~3.5.5-7_all.deb ...
Unpacking libjs-jquery (3.5.1+dfsg+~3.5.5-7) ...
Selecting previously unselected package libjs-underscore.
Preparing to unpack .../34-libjs-underscore_1.9.1~dfsg-3_all.deb ...
Unpacking libjs-underscore (1.9.1~dfsg-3) ...
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack .../35-libjs-sphinxdoc_3.4.3-2_all.deb ...
Unpacking libjs-sphinxdoc (3.4.3-2) ...
Selecting previously unselected package libpython3.9:amd64.
Preparing to unpack .../36-libpython3.9_3.9.2-1_amd64.deb ...
Unpacking libpython3.9:amd64 (3.9.2-1) ...
Selecting previously unselected package libpython3.9-dev:amd64.
Preparing to unpack .../37-libpython3.9-dev_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-dev:amd64 (3.9.2-1) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../38-libpython3-dev_3.9.2-3_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.9.2-3) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../39-manpages-dev_5.10-1_all.deb ...
Unpacking manpages-dev (5.10-1) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../40-zlib1g-dev_1%3a1.2.11.dfsg-2+deb11u2_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.11.dfsg-2+deb11u2) ...
Selecting previously unselected package python3.9-dev.
Preparing to unpack .../41-python3.9-dev_3.9.2-1_amd64.deb ...
Unpacking python3.9-dev (3.9.2-1) ...
Selecting previously unselected package python3-lib2to3.
Preparing to unpack .../42-python3-lib2to3_3.9.2-1_all.deb ...
Unpacking python3-lib2to3 (3.9.2-1) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../43-python3-distutils_3.9.2-1_all.deb ...
Unpacking python3-distutils (3.9.2-1) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../44-python3-dev_3.9.2-3_amd64.deb ...
Unpacking python3-dev (3.9.2-3) ...
Setting up media-types (4.0.0) ...
Setting up javascript-common (11+nmu1) ...
Setting up libxau6:amd64 (1:1.0.9-1) ...
Setting up manpages (5.10-1) ...
Setting up libbrotli1:amd64 (1.0.9-2+b2) ...
Setting up libdeflate0:amd64 (1.7-1) ...
Setting up linux-libc-dev:amd64 (5.10.179-2) ...
Setting up libjbig0:amd64 (2.1-3.1+b2) ...
Setting up libtirpc-dev:amd64 (1.3.1-1+deb11u1) ...
Setting up libjpeg62-turbo:amd64 (1:2.0.6-4) ...
Setting up libx11-data (2:1.7.2-1+deb11u1) ...
Setting up libpng16-16:amd64 (1.6.37-3) ...
Setting up libwebp6:amd64 (0.6.1-2.1+deb11u1) ...
Setting up fonts-dejavu-core (2.37-2) ...
Setting up libmd0:amd64 (1.0.3-3) ...
Setting up libnsl-dev:amd64 (1.3.0-2) ...
Setting up sensible-utils (0.0.14) ...
Setting up libcrypt-dev:amd64 (1:4.4.18-4) ...
Setting up libmpdec3:amd64 (2.5.1-1) ...
Setting up libtiff5:amd64 (4.2.0-1+deb11u4) ...
Setting up libjs-jquery (3.5.1+dfsg+~3.5.5-7) ...
Setting up libc-dev-bin (2.31-13+deb11u6) ...
Setting up libbsd0:amd64 (0.11.3-1) ...
Setting up libpython3.9-stdlib:amd64 (3.9.2-1) ...
Setting up libpython3-stdlib:amd64 (3.9.2-3) ...
Setting up libjs-underscore (1.9.1~dfsg-3) ...
Setting up manpages-dev (5.10-1) ...
Setting up libxdmcp6:amd64 (1:1.1.2-3) ...
Setting up libxcb1:amd64 (1.14-3) ...
Setting up libpython3.9:amd64 (3.9.2-1) ...
Setting up libfreetype6:amd64 (2.10.4+dfsg-1+deb11u1) ...
Setting up ucf (3.0043) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/shar
e/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl
) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libjs-sphinxdoc (3.4.3-2) ...
Setting up libc6-dev:amd64 (2.31-13+deb11u6) ...
Setting up libx11-6:amd64 (2:1.7.2-1+deb11u1) ...
Setting up python3.9 (3.9.2-1) ...
Setting up libxpm4:amd64 (1:3.5.12-1.1~deb11u1) ...
Setting up fontconfig-config (2.13.1-4.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/shar
e/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl
) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up python3 (3.9.2-3) ...
running python rtupdate hooks for python3.9...
running python post-rtupdate hooks for python3.9...
Setting up libexpat1-dev:amd64 (2.2.10-2+deb11u5) ...
Setting up zlib1g-dev:amd64 (1:1.2.11.dfsg-2+deb11u2) ...
Setting up libfontconfig1:amd64 (2.13.1-4.2) ...
Setting up python3-lib2to3 (3.9.2-1) ...
Setting up python3-distutils (3.9.2-1) ...
Setting up libpython3.9-dev:amd64 (3.9.2-1) ...
Setting up libgd3:amd64 (2.3.0-2) ...
Setting up python3.9-dev (3.9.2-1) ...
Setting up libc-devtools (2.31-13+deb11u6) ...
Setting up libpython3-dev:amd64 (3.9.2-3) ...
Setting up python3-dev (3.9.2-3) ...
Processing triggers for libc-bin (2.31-13+deb11u6) ...
Collecting docutils==0.14
  Downloading docutils-0.14-py3-none-any.whl (543 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 543.2/543.2 kB 23.0 MB/s eta 0:00:00
Installing collected packages: docutils
Successfully installed docutils-0.14
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 23.2
[notice] To update, run: pip install --upgrade pip

This is using the docutils-0.14-py3-none-any.whl instead of the docutils-0.14.tar.gz that doodba (test) is using.

moitabenfdz and others added 2 commits July 17, 2023 15:49
Change Debian distro from bullseye to bookworm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running the install in Line 42 without the -qq parameter we get the following error message when installing wkhtmltox:
RUN apt-get install -y --no-install-recommends ./wkhtmltox.deb ...

0.279 Reading package lists...
0.500 Building dependency tree...
0.550 Reading state information...
0.588 Some packages could not be installed. This may mean that you have
0.588 requested an impossible situation or if you are using the unstable
0.588 distribution that some required packages have not yet been created
0.588 or been moved out of Incoming.
0.588 The following information may help to resolve the situation:
0.588 
0.588 The following packages have unmet dependencies:
0.618  wkhtmltox : Depends: libssl1.1 but it is not installable
0.619 E: Unable to correct problems, you have held broken packages.

We need to get libssl1.1 from somewhere to also support wkhtmltopdf in bookworm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently running tests locally with getting libssl1.1 from bullseye:

...
RUN apt-get -qq update \
    && apt-get install -yqq --no-install-recommends \
        curl \
    && curl -SLo wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}-1.buster_amd64.deb \
    && echo "${WKHTMLTOPDF_CHECKSUM} wkhtmltox.deb" | sha256sum -c - \
    && curl -SLo libssl1.1.deb http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb11u5_amd64.deb \
    && apt-get install -yqq --no-install-recommends \
        ./libssl1.1.deb \
        ./wkhtmltox.deb \
        ...

Idea from zerotier/ZeroTierOne#1802 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git-aggregator depends on PyYAML which is not compatible with pip installing as well:

....
31.35 Collecting PyYAML<6,>=3.13 (from kaptan->git-aggregator)
31.36   Downloading PyYAML-5.4.1.tar.gz (175 kB)
31.37      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 64.0 MB/s eta 0:00:00
31.43   Installing build dependencies: started
32.76   Installing build dependencies: finished with status 'done'
32.76   Getting requirements to build wheel: started
32.86   Getting requirements to build wheel: finished with status 'error'
32.87   error: subprocess-exited-with-error
32.87   
32.87   × Getting requirements to build wheel did not run successfully.
32.87   │ exit code: 1
32.87   ╰─> [62 lines of output]
32.87       /tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
32.87       !!
32.87       
32.87               ********************************************************************************
32.87               The license_file parameter is deprecated, use license_files instead.
32.87       
32.87               By 2023-Oct-30, you need to update your project and remove deprecated calls
32.87               or your builds will no longer be supported.
32.87       
32.87               See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
32.87               ********************************************************************************
32.87       
32.87       !!
32.87         parsed = self.parsers.get(option_name, lambda x: x)(value)
32.87       running egg_info
32.87       writing lib3/PyYAML.egg-info/PKG-INFO
32.87       writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
32.87       writing top-level names to lib3/PyYAML.egg-info/top_level.txt
32.87       Traceback (most recent call last):
32.87         File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
32.87           main()
32.87         File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
32.87           json_out['return_val'] = hook(**hook_input['kwargs'])
32.87         File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
32.87           return hook(config_settings)
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
32.87           return self._get_build_requires(config_settings, requirements=['wheel'])
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
32.87           self.run_setup()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
32.87           exec(code, locals())
32.87         File "<string>", line 271, in <module>
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
32.87           return distutils.core.setup(**attrs)
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
32.87           return run_commands(dist)
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
32.87           dist.run_commands()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
32.87           self.run_command(cmd)
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
32.87           super().run_command(command)
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
32.87           cmd_obj.run()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 314, in run
32.87           self.find_sources()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
32.87           mm.run()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 551, in run
32.87           self.add_defaults()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
32.87           sdist.add_defaults(self)
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
32.87           super().add_defaults()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
32.87           self._add_defaults_ext()
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
32.87           self.filelist.extend(build_ext.get_source_files())
32.87         File "<string>", line 201, in get_source_files
32.87         File "/tmp/pip-build-env-9ueu6gbn/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
32.87           raise AttributeError(attr)
32.87       AttributeError: cython_sources
32.87       [end of output]
32.87   
32.87   note: This error originates from a subprocess, and is likely not a problem with pip.
32.87 error: subprocess-exited-with-error
32.87 
32.87 × Getting requirements to build wheel did not run successfully.
32.87 │ exit code: 1
32.87 ╰─> See above for output.
32.87 
32.87 note: This error originates from a subprocess, and is likely not a problem with pip.

Testing with PyYAML==6.0.1:

    ...
    && pip install \
        -r https://raw.githubusercontent.com/$ODOO_SOURCE/$ODOO_VERSION/requirements.txt \
        'websocket-client~=0.56' \
        astor \
        click-odoo-contrib \
        debugpy \
        pydevd-odoo \
        flanker[validator] \
        geoip2 \
        "git-aggregator<3.0.0" \
        # pin PyYAML to 6.0.1 for installing in bookworm python3.10
        "PyYAML==6.0.1" \

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the gitaggregator dependency kaptan seems not compatible with Python3.10 (tests.ScaffoldingCase.test_addons_env_double):

0.473 doodba INFO: Running gitaggregate with /opt/odoo/custom/src/repos.yaml
0.504 Traceback (most recent call last):
0.504   File "/usr/local/bin/gitaggregate", line 5, in <module>
0.504     from git_aggregator.main import main
0.504   File "/usr/local/lib/python3.10/site-packages/git_aggregator/main.py", line 22, in <module>
0.504     from .config import load_config
0.504   File "/usr/local/lib/python3.10/site-packages/git_aggregator/config.py", line 9, in <module>
0.504     import kaptan
0.504   File "/usr/local/lib/python3.10/site-packages/kaptan/__init__.py", line 15, in <module>
0.504     from collections import Mapping, Sequence
0.504 ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
0.507 Traceback (most recent call last):
0.507   File "/usr/local/bin/autoaggregate", line 170, in <module>
0.507     aggregate(REPOS_YAML)
0.507   File "/usr/local/bin/autoaggregate", line 72, in aggregate
0.507     check_call(
0.507   File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
0.508     raise CalledProcessError(retcode, cmd)
0.508 subprocess.CalledProcessError: Command '['gitaggregate', '--expand-env', '--config', '/opt/odoo/custom/src/repos.yaml', '--log-level', 'INFO', '--jobs', '16', 'aggregate']' returned non-zero exit status 1.
0.515 Traceback (most recent call last):
0.515   File "/opt/odoo/common/build", line 30, in <module>
0.515     subprocess.check_call(command)
0.515   File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
0.515     raise CalledProcessError(retcode, cmd)
0.515 subprocess.CalledProcessError: Command '/opt/odoo/common/build.d/100-repos-aggregate' returned non-zero exit status 1.

Which checks out:
docker run --rm python:3.8 python -c 'from collections import Mapping, Sequence'

...
<string>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

docker run --rm python:3.10 python -c 'from collections import Mapping, Sequence'

ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using "git+https://github.com/rjocoleman/git-aggregator.git@feat/config-reader" instead of "git-aggregator<3.0.0" makes git-aggregator work with python3.10.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But i still end up in the same distutils / python-devel error during the tests. It seems we would need to refactor the dotd and dependencies test dir to not mix the test cases for installing dependencies from source (pycrypto==2.6.1 --no-binary :all:) and wheels (docutils==0.14). Right now the --no-binary from pycrypto also affects wheels and I'm not sure that docutils 0.14 compilation is a valid test for Odoo 16.0 (as the line above states we test an upgrade of docutils when in fact it's a downgrade now, 0.16 -> 0.14). Both tests (the compilation of pycrypto and the install of docutils) work if they are not done in the same environment.

@ap-wtioit
Copy link
Contributor

FYI
to locally test building the image run:

docker build -f 16.0.Dockerfile .

to locally run the test we use something like:

python3 -m unittest -f tests

@ap-wtioit
Copy link
Contributor

Added the issue in git-aggregator as a heads up as i expect that to be blocking us in autumn when Odoo 17.0 is released.

@moitabenfdz
Copy link

Tested with git-aggregator 4.0.0

@moitabenfdz
Copy link

How can I test poetry?

@ap-wtioit
Copy link
Contributor

ap-wtioit commented Jul 26, 2023

How can I test poetry?

probably by running the same commands as given here for the CI: https://github.com/Tecnativa/doodba/blob/master/.github/workflows/ci.yaml#L63

to me it would seem the poetry install at least on github CI is broken.

a poetry update pyyaml locally might help updating poetry.lock (which then could be added to the pull request)

[FIX] Git aggregator verison >=4.0.0
@moitabenfdz
Copy link

I have a problem trying to update pyyaml because docker-compose depends on pyyaml >=3.10,<6. This throws an error caused because the version 3.0 of cython is not compatible with pyyaml 5.4.1

I can't upgrade the version of docker-compose because is no more a python module. Furthermore, docker-compose v1 is deprecated. -> https://www.docker.com/blog/announcing-compose-v2-general-availability/

Since docker compose is now built in docker, would be correct if we use docker instead of docker-compose in pyproject.toml?

@ap-wtioit
Copy link
Contributor

Since docker compose is now built in docker, would be correct if we use docker instead of docker-compose in pyproject.toml?

if we get rid of docker-compose (command) in favor of docker compose (plugin) the python docker lib would not be a dependency any more, i guess. i could not find any from docker imports in the project.

on our new servers we are only running docker compose and not docker-compose and it seems to work well. the only difference we discovered was the names of the containers now using - instead of _. but we are not running doodba with docker compose yet.

moitabenfdz and others added 4 commits July 31, 2023 21:39
Add pyyaml 6.0 & upgrade pre-commit to 3.3.3
Remove docker-compose dependency (incompatible with pyyaml >6)
Rebuild poetry.lock
[FIX]Change pyproject.toml dependencies
@gabonog gabonog closed this by deleting the head repository Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants