Otherwise you get this error when a user attempts to upload an image: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/synapse/http/server.py", line 313, in _async_render_wrapper callback_return = await self._async_render(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/synapse/http/server.py", line 343, in _async_render callback_return = await raw_callback_return ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/synapse/rest/media/upload_resource.py", line 96, in _async_render_POST content_uri = await self.media_repo.create_content( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/synapse/media/media_repository.py", line 215, in create_content await self._generate_thumbnails(None, media_id, media_id, media_type) File "/usr/lib/python3.11/site-packages/synapse/media/media_repository.py", line 797, in _generate_thumbnails t_byte_source = await defer_to_thread( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/twisted/python/threadpool.py", line 244, in inContext result = inContext.theWork() # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/twisted/python/threadpool.py", line 260, in <lambda> inContext.theWork = lambda: context.call( # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/twisted/python/context.py", line 117, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/twisted/python/context.py", line 82, in callWithContext return func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/synapse/logging/context.py", line 969, in g return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/synapse/media/thumbnailer.py", line 172, in crop with self._resize(scaled_width, scaled_height) as scaled_image: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/synapse/media/thumbnailer.py", line 134, in _resize return self.image.resize((width, height), Image.ANTIALIAS) ^^^^^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' This is documented in the following upstream issues: https://github.com/matrix-org/synapse/issues/15873 https://github.com/matrix-org/synapse/pull/15876 Reproducible: Always Portage 3.0.49 (python 3.11.4-final-0, default/linux/ppc64le/17.0, gcc-13, glibc-2.37-r3, 6.3.11-gentoo-dist ppc64le) ================================================================= System uname: Linux-6.3.11-gentoo-dist-ppc64le-POWER9,_altivec_supported-with-glibc2.37 KiB Mem: 129259008 total, 1044992 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Tue, 04 Jul 2023 14:47:00 +0000 Head commit of repository gentoo: 73ab3214cd888ecf4fbb6c3116b310989654a9eb Timestamp of repository guru: Tue, 04 Jul 2023 05:01:54 +0000 Head commit of repository guru: 819c0639329f3b67517027b791d55cd2802b03f1 Timestamp of repository lto-overlay: Sun, 02 Jul 2023 15:32:34 +0000 Head commit of repository lto-overlay: 771a246ca7547a50662c51797d0821914ee32e52 Timestamp of repository mv: Mon, 03 Jul 2023 12:01:55 +0000 Head commit of repository mv: aec9472da82bee204de48c5e356e602d92a0a854 sh bash 5.2_p15-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p15-r6::gentoo dev-java/java-config: 2.3.1-r1::gentoo dev-lang/perl: 5.38.0::gentoo dev-lang/python: 3.11.4::gentoo, 3.12.0_beta3::gentoo dev-lang/rust: 1.69.0-r1::gentoo dev-util/cmake: 3.26.4-r1::gentoo dev-util/meson: 1.1.1::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/openrc: 0.47.1::gentoo sys-apps/sandbox: 2.34::gentoo sys-devel/autoconf: 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 16.0.6::gentoo sys-devel/gcc: 13.1.1_p20230527::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/make: 4.3-r1::gentoo sys-kernel/linux-headers: 6.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r3::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo sync-user: portage:portage priority: -1000 volatile: False sync-git-verify-commit-signature: yes guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False local location: /var/db/repos/local masters: gentoo volatile: True lto-overlay location: /var/db/repos/lto-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/lto-overlay.git masters: gentoo mv volatile: False matoro location: /var/db/repos/overlay masters: gentoo volatile: True mv location: /var/db/repos/mv sync-type: git sync-uri: https://github.com/gentoo-mirror/mv.git masters: gentoo volatile: False ACCEPT_KEYWORDS="ppc64 ~ppc64" ACCEPT_LICENSE="@FREE" CBUILD="powerpc64le-unknown-linux-gnu" CFLAGS="-O3 -mcpu=native -mtune=native -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=30 -fuse-linker-plugin -pipe" CHOST="powerpc64le-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O3 -mcpu=native -mtune=native -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=30 -fuse-linker-plugin -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--usepkg --autounmask=n --complete-graph --keep-going --with-bdeps=y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://gentoo.osuosl.org/ https://mirror.leaseweb.com/gentoo/ https://mirror.rackspace.com/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j30" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="acl bash-completion bzip2 caps cli crypt dist-kernel dri elogind fortran gdbm gentoo-vm graphite headless-awt iconv ipv6 libbsd lm-sensors lto native-extensions ncurses nginx nls nptl openmp pam pcre pgo ppc64 readline seccomp split-usr ssl system-bootstrap system-llvm test-rust threads udev unicode verify-sig vhosts vim-syntax xattr zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_PPC="altivec vsx vsx2 vsx3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41b84b114ef7c9038ca2f5b5a410b02c84fd346d commit 41b84b114ef7c9038ca2f5b5a410b02c84fd346d Author: Petr Vaněk <arkamar@atlas.cz> AuthorDate: 2023-07-05 09:08:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-07-12 06:59:34 +0000 net-im/synapse: restrict rdeps to <pillow-10 and <pydantic-2 Pillow 10 removes some deprecated constatns that are used in synapse, the issue is already fixed in upstream, see [1,2]. Moreover, synapse is incompatible with pydantic 2.0 [3]. [1] https://github.com/matrix-org/synapse/issues/15873 [2] https://github.com/matrix-org/synapse/pull/15876 [3] https://github.com/matrix-org/synapse/issues/15858 Closes: https://bugs.gentoo.org/909644 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Sam James <sam@gentoo.org> net-im/synapse/{synapse-1.85.2.ebuild => synapse-1.85.2-r1.ebuild} | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae6ac17d2ff2e1250f8525ba6e4ebaced8914aa1 commit ae6ac17d2ff2e1250f8525ba6e4ebaced8914aa1 Author: Petr Vaněk <arkamar@atlas.cz> AuthorDate: 2023-07-18 17:55:14 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-07-18 18:17:16 +0000 net-im/synapse: add 1.88.0 pillow-10 issue was fixed, see [1]. [1] https://github.com/matrix-org/synapse/pull/15876 Bug: https://bugs.gentoo.org/909644 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/31945 Signed-off-by: Sam James <sam@gentoo.org> net-im/synapse/Manifest | 10 ++ net-im/synapse/synapse-1.88.0.ebuild | 210 +++++++++++++++++++++++++++++++++++ 2 files changed, 220 insertions(+)